/* 页面主容器样式 */
.container {
  max-width: auto;
  margin: 100px auto;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* 页面标题样式 */
h1 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 24px;
}

/* 新建按钮样式 */
.primary-btn {
  display: block;
  margin: 0 auto 24px auto;
  padding: 10px 32px;
  background: #409eff;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.primary-btn:hover {
  background: #3076c9;
}

/* 提示词列表区样式 */
.prompts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 提示词卡片样式 */
.prompt-card {
  background: #f8f9fa;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}
.prompt-type {
  font-weight: bold;
  color: #409eff;
  margin-bottom: 4px;
}
.prompt-content {
  font-size: 1rem;
  color: #333;
  word-break: break-all;
  max-height: 120px;
  overflow-y: auto;
  padding-right: 8px;
  background: #f8f9fa;
  border-radius: 4px;
}
.prompt-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.action-btn {
  padding: 4px 16px;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}
.edit-btn {
  background: #67c23a;
  color: #fff;
}
.edit-btn:hover {
  background: #4ea32a;
}
.delete-btn {
  background: #f56c6c;
  color: #fff;
}
.delete-btn:hover {
  background: #c0392b;
}

/* 弹窗遮罩层样式 */
.modal {
  position: fixed;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* 弹窗内容样式 */
.modal-content {
  background: #fff;
  border-radius: 10px;
  padding: 24px 20px 16px 20px;
  min-width: 500px;
  max-width: 90vw;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  position: relative;
}
.close {
  position: absolute;
  right: 16px;
  top: 12px;
  font-size: 1.5rem;
  color: #888;
  cursor: pointer;
}
.close:hover {
  color: #f56c6c;
}

/* 表单样式 */
#promptForm label {
  display: block;
  margin: 12px 0 4px 0;
  font-weight: bold;
}
#promptForm input[type="text"],
#promptForm textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  margin-bottom: 8px;
  box-sizing: border-box;
}
#promptForm textarea {
  resize: vertical;
}

/* 响应式设计：适配手机端 */
@media (max-width: 600px) {
  /* 主容器宽度自适应，去除多余margin */
  .container {
    max-width: 100vw;
    margin-top: 100px;
    padding: 4px 2vw 8vw 2vw;
    border-radius: 0;
    box-shadow: none;
  }
  /* 页面标题字体缩小 */
  h1 {
    font-size: 1.2rem;
    margin-bottom: 12px;
  }
  /* 所有表单区块纵向堆叠，gap增大 */
  .form-group {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    margin-bottom: 10px !important;
  }
  /* label、输入框、按钮等宽度100% */
  .form-group label,
  .form-group input,
  .form-group textarea,
  .form-group button {
    width: 100% !important;
    min-width: 0 !important;
    font-size: 0.98rem !important;
  }
  /* 按钮组纵向排列 */
  .form-group > div[style*="flex-direction: column"],
  .form-group > div[style*="flex-direction:column"] {
    flex-direction: column !important;
    gap: 8px !important;
  }
  /* 横向按钮组（如快速定位）纵向排列 */
  .form-group > div[style*="display: flex;"][style*="gap: 8px"] {
    flex-direction: column !important;
    gap: 8px !important;
    margin-bottom: 0 !important;
  }
  /* 弹窗内容宽度自适应，去除min-width，max-width 95vw */
  .modal-content {
    min-width: unset !important;
    max-width: 95vw !important;
    padding: 10px 4px 8px 4px !important;
  }
  /* 弹窗标题、正文字体缩小 */
  .modal-content h2, .modal-content h3 {
    font-size: 1.08rem !important;
  }
  .modal-body, .modal-content label, .modal-content input, .modal-content textarea {
    font-size: 0.98rem !important;
  }
  /* AI 聊天工具下拉菜单适配 */
  .ai-chat-dropdown-content {
    min-width: 120px !important;
    font-size: 0.95rem !important;
    right: 0;
    left: unset;
  }
  /* 提示词卡片字体缩小 */
  .prompt-card, .prompt-content {
    font-size: 0.98rem !important;
    padding: 8px !important;
  }
  /* 按钮字体、间距缩小 */
  .primary-btn, .expand-btn, .action-btn, .copy-btn {
    font-size: 0.98rem !important;
    padding: 8px 0 !important;
    min-width: 0 !important;
    margin: 0 0 8px 0 !important;
  }
  /* 章节选择下拉框适配 */
  #chapterCountSelect {
    font-size: 0.98rem !important;
    min-width: 0 !important;
    width: 100% !important;
  }
  /* 细纲/正文等大textarea高度缩小 */
  #novelDetailOutline, #novelContent, #novelRewriteContent {
    min-height: 200px !important;
  }
  /* 统计字数显示适配 */
  #novelContentCount, #novelRewriteContentCount {
    font-size: 0.92rem !important;
    margin-bottom: 4px !important;
  }
  /* 隐藏多余的margin/padding */
  [style*="margin-top: 40px"], [style*="margin-top: 400px"], [style*="margin-top: 200px"] {
    margin-top: 8px !important;
  }
}

.copy-btn {
  background: #1890ff;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 0.95rem;
  cursor: pointer;
  margin-left: 8px;
  transition: background 0.2s;
}
.copy-btn:hover {
  background: #1765ad;
}

/* 扩写润色按钮样式 */
.expand-btn {
  position: absolute;
  z-index: 10;
  background: #ff9800;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: background 0.2s;
}
.expand-btn:hover {
  background: #e67c00;
}

/* AI 聊天工具下拉菜单样式 */
.ai-chat-dropdown {
  position: relative;
  display: inline-block;
  margin-right: auto;
  margin-top: -20px;
}
.ai-chat-btn {
  background: #409eff;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}
.ai-chat-btn:hover {
  background: #3076c9;
}
.ai-chat-dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 60%;
  min-width: 180px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.13);
  border-radius: 8px;
  z-index: 999;
  padding: 8px 0;
  border: 1px solid #e6e6e6;
}
.ai-chat-dropdown:hover .ai-chat-dropdown-content {
  display: block;
}
.ai-chat-dropdown-content a {
  color: #333;
  padding: 10px 20px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  border-radius: 4px;
  transition: background 0.18s, color 0.18s;
}
.ai-chat-dropdown-content a:hover {
  background: #f0f7ff;
  color: #409eff;
} 