/* 基础样式 */
html {
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
  background-color: white;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  /* 确保页面加载时的稳定性 */
  position: relative;
}

/* 导航栏样式 */
.main-nav {
  background-color: white;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  left: 0;
  right: 0;
  /* 确保导航栏在页面加载时立即正确定位 */
  transform: translateZ(0);
  will-change: transform;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-link {
  font-size: 1.25rem;
  font-weight: bold;
  color: #1f2937;
  text-decoration: none;
}

.logo-link:hover {
  color: #2563eb;
  transition: color 0.2s;
}

/* 导航菜单 */
.nav-menu {
  display: none;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: #4b5563;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.nav-link:hover {
  color: #2563eb;
}

.nav-link.active {
  color: #2563eb;
  background-color: #eff6ff;
  font-weight: 600;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
  display: block;
}

.mobile-menu-btn button {
  color: #4b5563;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-btn button:hover {
  color: #1f2937;
}

/* 移动端菜单 */
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: white;
  padding: 0.5rem 0;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 0.75rem;
}

.mobile-nav-link {
  display: block;
  color: #4b5563;
  padding: 0.5rem;
  border-radius: 0.375rem;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.mobile-nav-link:hover {
  color: #2563eb;
}

.mobile-nav-link.active {
  color: #2563eb;
  background-color: #eff6ff;
  font-weight: 600;
}

/* 主要内容区域 */
.main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0.125rem 0.25rem 0.25rem 0.25rem;
  margin-top: 0;
}

.content-container {
  width: 100%;
  max-width: 56rem;
  text-align: center;
  margin: 0 auto; /* 确保水平居中 */
}

/* 确保输入框内的文本左对齐 */
.content-container .textarea-container,
.content-container .textarea-container textarea,
.content-container .textarea-container .rich-textarea {
  text-align: left;
}

.page-title {
  color: #1f2937;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: bold;
  margin-top: 0;
  margin-bottom: 0.25rem;
  letter-spacing: -0.025em;
}

/* 功能按钮区域 */
.action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.action-button {
  border: 1px solid #d1d5db;
  border-radius: 9999px;
  color: #1f2937;
  padding: 0.375rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  background: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-button:hover {
  background-color: #f3f4f6;
  transition: background-color 0.2s;
}

.action-button:active {
  transform: scale(0.95);
  transition: transform 0.15s;
}



/* 任务输入区域 */
.task-input-container {
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
  background-color: white;
  border-radius: 1rem;
  padding: 0.5rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.task-input-container.active {
  border: 2px solid #000;
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.2);
}

.textarea-container {
  position: relative;
}

.textarea-container {
  position: relative;
  min-height: 4rem;
}

.textarea-container textarea,
.textarea-container .rich-textarea {
  width: 100%;
  height: 100%;
  max-width: 100%;
  color: #1f2937;
  font-size: 0.875rem;
  border: none;
  outline: none;
  resize: none;
  min-height: 3.5rem;
  max-height: 5rem;
  margin-bottom: 0.375rem;
  padding-right: 0.75rem;
  box-sizing: border-box;
  text-align: left;
}

/* 富文本输入框样式 */
.rich-textarea {
  background: white;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  padding: 0.75rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-y: auto;
  font-family: inherit;
  text-align: left;
  min-height: 3.5rem;
  max-height: 5rem;
}

.rich-textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.rich-textarea:empty:before {
  content: attr(placeholder);
  color: #9ca3af;
  pointer-events: none;
}

/* 文件名引用样式 */
.file-reference {
  color: #059669;
  font-weight: 500;
  background-color: #ecfdf5;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  border: 1px solid #a7f3d0;
  user-select: none;
  cursor: default;
}

.file-info {
  position: absolute;
  right: 0.5rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #10b981;
  display: none;
}

.file-info span {
  font-size: 0.875rem;
  max-width: 6.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-info button {
  color: #6b7280;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 0.25rem;
}

.file-info button:hover {
  color: #ef4444;
}

#fileUpload {
  display: none;
}

/* 文件上传按钮样式 */
#attachmentBtn {
  width: 2rem;
  height: 2rem;
  border: 1px solid #d1d5db;
  background: none;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

#attachmentBtn:hover {
  background-color: #f3f4f6;
}

.input-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.submit-section {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-assistant-btn {
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  color: white;
  border: none;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  font-size: 10px;
  font-weight: 500;
}

.ai-assistant-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(110, 142, 251, 0.3);
}

.ai-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.control-buttons {
  display: flex;
  gap: 0.5rem; /* 增加按钮之间的间距 */
}

.control-buttons button {
  width: 2rem;
  height: 2rem;
  color: #9ca3af;
  background: none;
  border: 1px solid #d1d5db;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  margin-right: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.control-buttons button:last-child {
  margin-right: 0; /* 移除最后一个按钮的右边距 */
}

.control-buttons button:hover {
  color: #6b7280;
  background-color: #f3f4f6;
}



/* 进度显示区域样式 */
.progress-display {
  flex: 1;
  margin: 0 0.5rem;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  max-width: 300px;
  overflow: hidden;
  position: relative;
}

#progressText {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 1;
  position: relative;
  animation: progress-fade 0.5s ease-in-out;
}

@keyframes progress-fade {
  0% { opacity: 0; transform: translateY(5px); }
  100% { opacity: 1; transform: translateY(0); }
}

.progress-display.processing #progressText {
  color: #f59e0b;
}

.progress-display.success #progressText {
  color: #10b981;
}

.progress-display.error #progressText {
  color: #ef4444;
}
#submitBtn {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: none;
  color: #4b5563;
  border: 1px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;

}

#submitBtn:hover {
  background-color: #f3f4f6;
  transition: background-color 0.2s;
}

/* 结果区域 */
.result-container {
  margin-top: 0.75rem;
  background-color: #f9fafb;
  border-radius: 0.75rem;
  padding: 0.75rem;
  display: none;
}

.result-container h3 {
  color: #1f2937;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.result-container p {
  color: #4b5563;
  margin-bottom: 0.75rem;
}

.result-container a {
  color: #3b82f6;
  font-weight: 500;
  text-decoration: none;
}

.result-container a:hover {
  color: #2563eb;
}

/* 加载状态 */
.loading-container {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  display: none;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  position: relative;
  z-index: 10;
  background-color: #f9fafb;
  border-radius: 0.5rem;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
}

/* 紧凑布局模式 - 当内容过多时自动启用 */
.compact-layout .main-content {
  padding: 0.0625rem 0.125rem 0.125rem 0.125rem;
}

.compact-layout .page-title {
  margin-top: 0;
  margin-bottom: 0.125rem;
}

.compact-layout .action-buttons {
  margin-bottom: 0.125rem;
}

.compact-layout .task-input-container {
  padding: 0.375rem;
}

.compact-layout .file-display-section {
  max-height: 125px;
  min-height: 90px;
  margin-bottom: 0.25rem;
  padding: 0.25rem;
}

.compact-layout .textarea-container textarea,
.compact-layout .rich-textarea {
  max-height: 3rem;
  margin-bottom: 0.25rem;
  min-height: 3rem;
}

.compact-layout .loading-container {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  min-height: 40px;
}



.loading-spinner {
  width: 2rem;
  height: 2rem;
  border: 4px solid #bfdbfe;
  border-top: 4px solid #3b82f6;
  border-radius: 9999px;
  animation: spin 1s linear infinite;
  margin-bottom: 0.5rem;
}

.loading-container p {
  color: #4b5563;
  font-size: 0.875rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 旋转类 */
.rotate-neg-90 {
  transform: rotate(-90deg);
}

/* 函数页面样式 */
.functions-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2rem;
}

.functions-header {
  text-align: center;
  margin-bottom: 3rem;
}

.functions-header h1 {
  font-size: 2.25rem;
  font-weight: bold;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.functions-header .subtitle {
  color: #6b7280;
  font-size: 1.125rem;
  margin-top: 0.5rem;
}

.function-category {
  margin-bottom: 2rem;
}

.function-card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.function-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.functions-categories {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.function-category {
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.function-category h2 {
  font-size: 1.5rem;
  font-weight: bold;
  color: #1f2937;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.function-category i {
  margin-right: 0.75rem;
  color: #3b82f6;
}
.function-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.function-card {
  background-color: #f9fafb;
  padding: 1rem;
  border-radius: 0.5rem;
  transition: all 0.2s;
  max-width: 100%;
  overflow: hidden;
  word-wrap: break-word;
}

.function-card:hover {
  background-color: #f3f4f6;
}

@media (max-width: 767px) {
  .function-card {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
  }
  
  .function-card > * {
    width: 100%;
    padding: 0 0.75rem;
    box-sizing: border-box;
  }
  
  .function-card h3,
  .function-card p {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    margin-left: 0;
    margin-right: 0;
  }
  
  .function-example {
    white-space: pre-wrap;
    word-break: break-all;
    padding: 0.5rem 0.75rem;
    margin: 0 0.75rem;
    width: calc(100% - 1.5rem);
    box-sizing: border-box;
  }
}

.function-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.function-card p {
  color: #4b5563;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.function-example {
  background-color: #e5e7eb;
  padding: 0.5rem;
  border-radius: 0.25rem;
  font-family: monospace;
  font-size: 0.875rem;
  color: #1f2937;
}

/* 使用说明页面样式 */
.instructions-container {
  max-width: 60rem;
  margin: 0 auto;
  padding: 2rem;
}

.instructions-header {
  text-align: center;
  margin-bottom: 3rem;
}

.instructions-header h1 {
  font-size: 2.25rem;
  font-weight: bold;
  color: #1f2937;
  margin-bottom: 1rem;
}

.instructions-header p {
  color: #4b5563;
  font-size: 1.125rem;
}

.instructions-steps {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.instruction-step {
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.step-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.step-number {
  width: 2rem;
  height: 2rem;
  background-color: #3b82f6;
  color: white;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 1rem;
}

.instruction-step h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
}

.instruction-step p {
  color: #4b5563;
  margin-bottom: 1rem;
}

.examples {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.example {
  background-color: #f9fafb;
  padding: 0.75rem;
  border-left: 4px solid #3b82f6;
  border-radius: 0.25rem;
}

.example p {
  font-size: 0.875rem;
  color: #1f2937;
  margin: 0;
}

/* 功能特性 */
.features-section {
  margin-top: 3rem;
}

.features-section h2 {
  font-size: 1.75rem;
  font-weight: bold;
  color: #1f2937;
  text-align: center;
  margin-bottom: 2rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
}

.feature-card {
  padding: 1.5rem;
  border-radius: 0.5rem;
}

.feature-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.feature-header i {
  font-size: 1.25rem;
  margin-right: 0.75rem;
}

.feature-header h3 {
  font-weight: 600;
  color: #1f2937;
}

.feature-card p {
  color: #4b5563;
  font-size: 0.875rem;
}

.blue-feature {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
}

.blue-feature i {
  color: #3b82f6;
}

.green-feature {
  background-color: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.green-feature i {
  color: #10b981;
}

.purple-feature {
  background-color: #f5f3ff;
  border: 1px solid #c4b5fd;
}

.purple-feature i {
  color: #8b5cf6;
}

.orange-feature {
  background-color: #fff7ed;
  border: 1px solid #fed7aa;
}

.orange-feature i {
  color: #f97316;
}

/* 快捷话术页面样式 */
.shortcuts-container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem;
}

.shortcuts-header {
  text-align: center;
  margin-bottom: 3rem;
}

.shortcuts-header h1 {
  font-size: 2.25rem;
  font-weight: bold;
  color: #1f2937;
  margin-bottom: 1rem;
}

.shortcuts-header p {
  color: #4b5563;
  font-size: 1.125rem;
}

.shortcuts-categories {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.shortcuts-category {
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.shortcuts-category h2 {
  font-size: 1.5rem;
  font-weight: bold;
  color: #1f2937;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.shortcuts-category i {
  margin-right: 0.75rem;
}

.blue-icon {
  color: #3b82f6;
}

.green-icon {
  color: #10b981;
}

.purple-icon {
  color: #8b5cf6;
}

.orange-icon {
  color: #f97316;
}

.red-icon {
  color: #ef4444;
}

.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
}

.shortcut-card {
  background-color: #f9fafb;
  padding: 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.shortcut-text {
  font-weight: 500;
  color: #1f2937;
}

.shortcut-desc {
  color: #6b7280;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.blue-hover:hover {
  background-color: #eff6ff;
}

.green-hover:hover {
  background-color: #ecfdf5;
}

.purple-hover:hover {
  background-color: #f5f3ff;
}

.orange-hover:hover {
  background-color: #fff7ed;
}

.red-hover:hover {
  background-color: #fef2f2;
}

/* 使用提示 */
.usage-tips {
  margin-top: 3rem;
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.usage-tips h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e40af;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
}

.usage-tips i {
  margin-right: 0.5rem;
}

.usage-tips ul {
  color: #1e40af;
  list-style-type: none;
  padding-left: 0;
}

.usage-tips li {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

/* 复制提示 */
.copy-toast {
  position: fixed;
  top: 5rem;
  right: 1rem;
  background-color: #10b981;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  z-index: 50;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s, transform 0.3s;
}

.copy-toast.fade-out {
  opacity: 0;
  transform: translateY(-1rem);
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateY(-10px); }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
  .main-content {
    padding: 0.5rem 0.5rem 1rem 0.5rem;
  }
  
  .content-container {
    padding: 0 5px !important;
  }
  
  .page-title {
    font-size: 1.125rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
  }
  
  .action-buttons {
    gap: 0.75rem;
    margin-bottom: 1.25rem;
  }
  
  .action-button {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }
  
  .task-input-container {
    width: 100%;
    padding: 1rem;
    margin: 0 auto 1rem auto;
    box-sizing: border-box;
  }
  
  .textarea-container textarea {
    min-height: 3rem;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
  }
  
  .input-controls {
    margin-top: 1rem;
    gap: 0.75rem;
  }
  
  .control-buttons {
    gap: 0.75rem;
  }
  
  .control-buttons button {
    width: 2.5rem;
    height: 2.5rem;
  }
  
  #attachmentBtn {
    width: 2.5rem;
    height: 2.5rem;
  }
  
  .ai-assistant-btn {
    width: 2.5rem;
    height: 2.5rem;
  }
  
  #submitBtn {
    width: 2.5rem;
    height: 2.5rem;
  }
  
  .submit-section {
    gap: 0.75rem;
  }
  
  .file-display-section {
    max-height: 120px;
    min-height: 90px;
    padding: 0.5rem;
    margin-bottom: 0.75rem;
  }
  
  .file-display-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .file-card {
    padding: 0.5rem;
    gap: 0.5rem;
  }
  
  .file-card-icon {
    width: 1.5rem;
    height: 1.5rem;
  }
  
  .file-card-icon i {
    font-size: 0.75rem;
  }
  
  .file-card-name {
    font-size: 0.625rem;
  }
  
  .file-card-meta {
    font-size: 0.5rem;
  }
}

@media (max-width: 767px) {
  .main-content {
    padding: 0.75rem 0.75rem 1.25rem 0.75rem;
  }
  
  .content-container {
    padding: 0 8px !important;
  }
  
  .page-title {
    font-size: 1.5rem;
    margin-top: 0.75rem;
    margin-bottom: 1.5rem;
  }
  
  .action-buttons {
    gap: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .action-button {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }
  
  .textarea-container textarea {
    width: 100%;
    margin: 0 auto;
    display: block;
    box-sizing: border-box;
    min-height: 3.5rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
  }

  .task-input-container {
    margin: 0 auto 1rem auto;
    width: 100%;
    max-width: 100%;
    padding: 1.25rem;
    box-sizing: border-box;
  }
  
  .input-controls {
    margin-top: 1.25rem;
    gap: 1rem;
  }
  
  .control-buttons {
    gap: 1rem;
  }
  
  .control-buttons button {
    width: 2.75rem;
    height: 2.75rem;
  }
  
  #attachmentBtn {
    width: 2.75rem;
    height: 2.75rem;
  }
  
  .ai-assistant-btn {
    width: 2.75rem;
    height: 2.75rem;
  }
  
  #submitBtn {
    width: 2.75rem;
    height: 2.75rem;
  }
  
  .submit-section {
    gap: 1rem;
  }
  
  .file-display-section {
    max-height: 140px;
    min-height: 100px;
    padding: 0.75rem;
    margin-bottom: 1rem;
  }
  
  .function-grid {
    grid-template-columns: 1fr !important;
  }
  
  .file-display-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .file-card {
    padding: 0.75rem;
    min-width: auto;
    max-width: none;
    gap: 0.75rem;
  }
  
  .file-card-icon {
    width: 1.75rem;
    height: 1.75rem;
  }
  
  .file-card-icon i {
    font-size: 0.875rem;
  }
  
  .file-card-name {
    font-size: 0.75rem;
  }
  
  .file-card-meta {
    font-size: 0.625rem;
  }
}

@media (min-width: 768px) {
  .shortcuts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .function-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .nav-menu {
    display: flex;
  }
  
  .mobile-menu-btn {
    display: none;
  }
  
  .page-title {
    font-size: 2.25rem;
  }
  
  .action-buttons {
    gap: 0.75rem;
  }
}

/* 中等屏幕优化 */
@media (min-width: 1024px) {
  .main-content {
    padding: 1.5rem;
  }
  
  .page-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
  }
  
  .action-buttons {
    gap: 1rem;
    margin-bottom: 2rem;
  }
  
  .task-input-container {
    padding: 1.25rem;
  }
  
  .file-display-section {
    max-height: 250px;
  }
}

/* 大屏幕优化 */
@media (min-width: 1440px) {
  .main-content {
    padding: 2rem;
  }
  
  .page-title {
    font-size: 3rem;
    margin-bottom: 2.5rem;
  }
  
  .action-buttons {
    gap: 1.25rem;
    margin-bottom: 2.5rem;
  }
  
  .task-input-container {
    padding: 1.5rem;
  }
  
  .file-display-section {
    max-height: 300px;
  }
}


/* 个人中心页面专用样式 */
/* ====================== */
.profile-container {
  background-color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

.profile-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.profile-header {
  text-align: center;
  margin-bottom: 3rem;
}

.profile-title {
  font-size: 2.25rem;
  font-weight: bold;
  color: #1f2937;
  margin-bottom: 1rem;
}

.profile-subtitle {
  color: #4b5563;
  font-size: 1.125rem;
}

.profile-grid {
  display: grid;
  gap: 2rem;
}

.profile-card {
  background-color: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.profile-section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.profile-section-title i {
  margin-right: 0.5rem;
}

.profile-avatar {
  width: 6rem;
  height: 6rem;
  background-color: #dbeafe;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.profile-avatar i {
  font-size: 1.75rem;
  color: #3b82f6;
}

.profile-form-group {
  margin-bottom: 1rem;
}

.profile-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.profile-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

.profile-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: #dbeafe;
  color: #1e40af;
}

.profile-btn {
  width: 100%;
  padding: 0.5rem 1rem;
  background-color: #3b82f6;
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-top: 1.5rem;
}

.profile-btn:hover {
  background-color: #2563eb;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.profile-stat-item {
  text-align: center;
}

.profile-stat-value {
  font-size: 1.5rem;
  font-weight: bold;
}

.profile-stat-label {
  font-size: 0.875rem;
  color: #4b5563;
}

.profile-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  background-color: #f9fafb;
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
}

.profile-list-link {
  color: #3b82f6;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  display: block;
  margin-top: 1rem;
}

.profile-list-link:hover {
  color: #2563eb;
}

.profile-toggle {
  position: relative;
  display: inline-block;
  width: 2.75rem;
  height: 1.5rem;
}

.profile-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.profile-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e5e7eb;
  transition: .4s;
  border-radius: 9999px;
}

.profile-toggle-slider:before {
  position: absolute;
  content: "";
  height: 1.125rem;
  width: 1.125rem;
  left: 0.25rem;
  bottom: 0.1875rem;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

.profile-toggle input:checked + .profile-toggle-slider {
  background-color: #3b82f6;
}

.profile-toggle input:checked + .profile-toggle-slider:before {
  transform: translateX(1.125rem);
}

.profile-setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.profile-setting-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1f2937;
}

.profile-setting-description {
  font-size: 0.75rem;
  color: #6b7280;
}

.profile-select {
  padding: 0.25rem 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

.profile-security-item {
  width: 100%;
  text-align: left;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.profile-security-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1f2937;
}

.profile-security-description {
  font-size: 0.75rem;
  color: #6b7280;
}

.profile-list-content {
  display: flex;
  align-items: center;
}

.profile-list-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1f2937;
}

.profile-list-subtitle {
  font-size: 0.75rem;
  color: #6b7280;
}

.profile-text {
  font-size: 0.875rem;
  color: #6b7280;
}

/* 新增颜色样式类 */
.blue-text {
  color: #3b82f6;
}

.green-text {
  color: #10b981;
}

.purple-text {
  color: #8b5cf6;
}

.orange-text {
  color: #f97316;
}

.red-text {
  color: #ef4444;
}

.gray-icon {
  color: #6b7280;
}

.mr-1 {
  margin-right: 0.25rem;
}

.mr-2 {
  margin-right: 0.5rem;
}

.mr-3 {
  margin-right: 0.75rem;
}

.success-badge {
  background-color: #d1fae5;
  color: #065f46;
}

.profile-left-column {
  grid-column: span 1;
}

.profile-right-column {
  grid-column: span 1;
}

/* 聊天助手样式 */
.chat-container {
  max-width: 800px;
  margin: 20px auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow: hidden;
}

.chat-header {
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  color: white;
  padding: 16px;
  font-size: 18px;
  font-weight: 500;
}

.chat-messages {
  padding: 16px;
  background: #f9f9f9;
  height: 400px;
  overflow-y: auto;
}

.message {
  max-width: 80%;
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 18px;
  position: relative;
  line-height: 1.5;
}

.ai-message {
  background: white;
  border-bottom-left-radius: 4px;
  margin-right: auto;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  padding: 0.4rem 0.6rem;
  line-height: 1.3;
  min-height: auto;
  height: auto;
  max-width: 80%;
  width: fit-content;
  margin-bottom: 0.5rem; /* 添加底部间距 */
}

.ai-message p {
  margin-bottom: 1rem;
}

.ai-message pre {
  background-color: #f6f8fa;
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.ai-message code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  background-color: rgba(175,184,193,0.2);
  border-radius: 6px;
  padding: 0.2em 0.4em;
  font-size: 85%;
}

.ai-message table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
}

.ai-message table th,
.ai-message table td {
  border: 1px solid #dfe2e5;
  padding: 6px 13px;
}

.ai-message table tr {
  background-color: #fff;
  border-top: 1px solid #c6cbd1;
}

.ai-message table tr:nth-child(2n) {
  background-color: #f6f8fa;
}

.ai-message blockquote {
  border-left: 4px solid #dfe2e5;
  color: #6a737d;
  padding: 0 1em;
  margin: 1rem 0;
}

.user-message {
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  color: white;
  border-bottom-right-radius: 4px;
  margin-left: auto;
  padding: 0.4rem 0.6rem;
  line-height: 1.3;
  min-height: auto;
  height: auto;
  max-width: 80%;
  width: fit-content;
  margin-bottom: 0.5rem; /* 添加底部间距 */
}

/* 移除.message-time样式 */

.chat-input {
  display: flex;
  padding: 12px;
  background: white;
  border-top: 1px solid #eee;
}

#messageInput {
  flex: 1;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 24px;
  resize: none;
  outline: none;
  transition: border 0.3s;
  font-size: 16px;
}

#messageInput:focus {
  border-color: #a777e3;
}

#sendButton {
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  color: white;
  border: none;
  border-radius: 24px;
  padding: 0 20px;
  margin-left: 12px;
  cursor: pointer;
  transition: opacity 0.3s;
}

#sendButton:hover {
  opacity: 0.9;
}

.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background: white;
  border-bottom: 1px solid #eee;
}

.suggestion-btn {
  background: #f3f4f6;
  border: none;
  border-radius: 16px;
  padding: 8px 16px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}

.suggestion-btn:hover {
  background: #e5e7eb;
}

/* 加载指示器 */
.typing-indicator {
  display: flex;
  padding: 12px 16px;
  background: white;
  border-radius: 18px;
  margin-bottom: 16px;
  width: fit-content;
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: #ddd;
  border-radius: 50%;
  margin: 0 2px;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

@media (min-width: 768px) {
  .profile-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .profile-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .profile-grid {
    grid-template-columns: 220px 1fr;
    gap: 1.5rem;
  }
}

/* 多文件处理样式 */
.file-list {
  margin: 1rem 0;
  padding: 1rem;
  background-color: #f9fafb;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
}

.file-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.file-item:hover {
  border-color: #2563eb;
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.1);
}

.file-item:last-child {
  margin-bottom: 0;
}

.file-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.file-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.file-item-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #1f2937;
}

.file-item-name i {
  color: #10b981;
  font-size: 1.1rem;
}

.file-name {
  font-size: 0.95rem;
  word-break: break-all;
}

.file-reference {
  font-size: 0.75rem;
  color: #6b7280;
  background-color: #f3f4f6;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  margin-left: 0.5rem;
  font-family: 'Courier New', monospace;
}

/* 文件展示区域样式 - 紧凑深色主题 */
.file-display-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.375rem;
  margin-bottom: 0.375rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  max-height: 165px;
  min-height: 110px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}

.file-display-section::-webkit-scrollbar {
  width: 6px;
}

.file-display-section::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.file-display-section::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.file-display-section::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.file-display-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #e2e8f0;
}

.file-display-title {
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 500;
}

.file-display-remove-btn {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.125rem;
  border-radius: 0.25rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-display-remove-btn:hover {
  background: #f1f5f9;
  color: #ef4444;
}

.file-display-remove-btn i {
  font-size: 0.75rem;
}

.file-display-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
}

.file-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.2s;
  position: relative;
  min-width: 0;
  max-width: none;
  min-height: 2.25rem;
}

.file-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.file-card-icon {
  width: 1.375rem;
  height: 1.375rem;
  background: #fbbf24;
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.file-card-icon i {
  color: #1f2937;
  font-size: 0.6875rem;
}

.file-card-content {
  flex: 1;
  min-width: 0;
}

.file-card-name {
  color: #1f2937;
  font-size: 0.6875rem;
  font-weight: 500;
  margin-bottom: 0.0625rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-card-meta {
  color: #64748b;
  font-size: 0.5625rem;
  display: flex;
  flex-direction: column;
  gap: 0.0625rem;
}

.file-reference-code {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
  padding: 0.125rem 0.25rem;
  font-family: 'Courier New', monospace;
  font-size: 0.625rem;
  color: #475569;
  user-select: none;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.file-reference-code:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #374151;
}

.file-card-remove {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  background: rgba(239, 68, 68, 0.1);
  border: none;
  color: #ef4444;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  transition: all 0.2s;
}

.file-card-remove:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* 文件操作按钮 */
.file-actions {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  justify-content: center;
}

/* 文件引用自动补全样式 */
.file-autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
}

.autocomplete-list {
  padding: 0.5rem 0;
}

.autocomplete-item {
  padding: 0.5rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.2s;
}

.autocomplete-item:hover {
  background-color: #f3f4f6;
}

.autocomplete-item.selected {
  background-color: #eff6ff;
  color: #2563eb;
}

.autocomplete-item i {
  color: #6b7280;
  font-size: 0.875rem;
}

.autocomplete-item .file-name {
  font-weight: 500;
  color: #1f2937;
}

.autocomplete-item .file-reference {
  font-size: 0.75rem;
  color: #6b7280;
  background-color: #f3f4f6;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-family: 'Courier New', monospace;
}

.file-item-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: 1.6rem;
}

.file-size {
  color: #6b7280;
  font-size: 0.8rem;
  background-color: #f3f4f6;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
}

.file-number {
  color: #6b7280;
  font-size: 0.8rem;
  font-weight: 500;
}

.file-item-remove {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: background-color 0.2s;
}

.file-item-remove:hover {
  background-color: #fef2f2;
}

.file-item-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.requirement-label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 500;
}

.requirement-label i {
  color: #2563eb;
}

.file-item-requirement {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  resize: vertical;
  min-height: 3rem;
  outline: none;
  transition: all 0.2s;
  background-color: #f9fafb;
}

.file-item-requirement:focus {
  border-color: #2563eb;
  background-color: white;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.file-item-requirement::placeholder {
  color: #9ca3af;
}

.file-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e5e7eb;
}

.file-list-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.file-upload-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.file-list-title i {
  color: #2563eb;
  font-size: 1.1rem;
}

.file-count {
  background-color: #2563eb;
  color: white;
  border-radius: 50%;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
}

.file-list-description {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background-color: #eff6ff;
  border-radius: 0.375rem;
  border-left: 4px solid #2563eb;
}

.file-list-description p {
  margin: 0;
  color: #1e40af;
  font-size: 0.875rem;
  line-height: 1.4;
}

.add-file-btn {
  background-color: #2563eb;
  color: white;
  border: none;
  border-radius: 0.375rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.add-file-btn:hover {
  background-color: #1d4ed8;
}

.batch-upload-btn {
  background-color: #10b981;
  color: white;
  border: none;
  border-radius: 0.375rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.batch-upload-btn:hover {
  background-color: #059669;
}

@media (max-width: 767px) {
  .file-item {
    padding: 1rem;
  }
  
  .file-item-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .file-item-info {
    width: 100%;
  }
  
  .file-item-meta {
    margin-left: 0;
    gap: 0.5rem;
  }
  
  .file-name {
    font-size: 0.875rem;
  }
  
  .file-list-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .file-list-title {
    width: 100%;
    justify-content: space-between;
  }
  
  .file-upload-buttons {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }
  
  .add-file-btn,
  .batch-upload-btn {
    width: 100%;
    justify-content: center;
  }
}

/* 认证页面样式 */
.auth-container {
  background-color: #f8fafc;
  min-height: 100vh;
}

.auth-main {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 4rem);
  padding: 2rem 1rem;
}

.auth-card {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 2rem;
  width: 100%;
  max-width: 400px;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 0.5rem 0;
}

.auth-subtitle {
  color: #6b7280;
  font-size: 0.875rem;
  margin: 0;
}

.auth-form {
  margin-bottom: 1.5rem;
}

.auth-form-group {
  margin-bottom: 1rem;
}

.auth-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.auth-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.auth-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.auth-help {
  display: block;
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.auth-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.875rem;
  color: #374151;
}

.auth-checkbox input[type="checkbox"] {
  margin-right: 0.5rem;
  width: 1rem;
  height: 1rem;
}

.auth-checkbox-text {
  user-select: none;
}

.auth-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auth-btn-primary {
  background-color: #2563eb;
  color: white;
}

.auth-btn-primary:hover {
  background-color: #1d4ed8;
}

.auth-divider {
  text-align: center;
  margin: 1.5rem 0;
  position: relative;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #e5e7eb;
}

.auth-divider span {
  background-color: white;
  padding: 0 1rem;
  color: #6b7280;
  font-size: 0.875rem;
}

.auth-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.auth-link {
  color: #2563eb;
  text-decoration: none;
  font-size: 0.875rem;
  text-align: center;
  transition: color 0.2s;
}

.auth-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.auth-footer {
  text-align: center;
  color: #6b7280;
  font-size: 0.875rem;
}

.auth-footer a {
  color: #2563eb;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* 个人中心新增样式 */
.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.profile-action-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #dc2626;
  border-radius: 0.375rem;
  background-color: white;
  color: #dc2626;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.profile-action-btn:hover {
  background-color: #dc2626;
  color: white;
}

@media (max-width: 767px) {
  .auth-card {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .auth-main {
    padding: 1rem;
  }
}

/* 导航栏用户菜单样式 */
.nav-user-menu,
.nav-auth-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-logout-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  transition: all 0.2s;
}

.nav-logout-btn:hover {
  background-color: #fef2f2;
  color: #dc2626;
}

.mobile-logout-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  color: #4b5563;
  transition: all 0.2s;
}

.mobile-logout-btn:hover {
  background-color: #f3f4f6;
  color: #1f2937;
}

/* 登录模态框样式 */
.login-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.login-modal-content {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 400px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.login-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.5rem 0 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 1rem;
}

.login-modal-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.login-modal-close {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: all 0.2s;
}

.login-modal-close:hover {
  background-color: #f3f4f6;
  color: #374151;
}

.login-modal-body {
  padding: 1.5rem;
}

.login-modal-body p {
  color: #6b7280;
  font-size: 0.875rem;
  margin: 0 0 1.5rem 0;
  text-align: center;
}

.login-modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.login-modal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.login-modal-btn-primary {
  background-color: #2563eb;
  color: white;
}

.login-modal-btn-primary:hover {
  background-color: #1d4ed8;
}

.login-modal-btn-secondary {
  background-color: white;
  color: #2563eb;
  border: 1px solid #2563eb;
}

.login-modal-btn-secondary:hover {
  background-color: #eff6ff;
}

@media (min-width: 768px) {
  .login-modal-buttons {
    flex-direction: row;
    justify-content: center;
  }
}

/* 使用指南区域样式 */
.usage-guide-container {
  max-width: 1200px;
  margin: 3rem auto 2rem auto;
  padding: 0 1rem;
}

.usage-guide-header {
  text-align: center;
  margin-bottom: 2rem;
}

.usage-guide-header h2 {
  color: #1f2937;
  font-size: 1.875rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.usage-guide-header p {
  color: #6b7280;
  font-size: 1.125rem;
}

.usage-guide-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.usage-guide-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.usage-guide-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.usage-guide-icon {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.usage-guide-icon i {
  color: white;
  font-size: 1.25rem;
}

.usage-guide-card h3 {
  color: #1f2937;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.usage-guide-content p {
  color: #4b5563;
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.usage-guide-content p:last-child {
  margin-bottom: 0;
}

.usage-guide-content strong {
  color: #1f2937;
  font-weight: 600;
}

/* 用户反馈区域样式 */
.feedback-container {
  max-width: 800px;
  margin: 3rem auto 2rem auto;
  padding: 0 1rem;
}

.feedback-header {
  text-align: center;
  margin-bottom: 2rem;
}

.feedback-header h2 {
  color: #1f2937;
  font-size: 1.875rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.feedback-header p {
  color: #6b7280;
  font-size: 1.125rem;
}

.feedback-form {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.feedback-form-group {
  margin-bottom: 1.5rem;
}

.feedback-form-group label {
  display: block;
  color: #374151;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.feedback-select,
.feedback-input,
.feedback-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.feedback-select:focus,
.feedback-input:focus,
.feedback-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.feedback-textarea {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
}

.feedback-form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
}

.feedback-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feedback-btn-primary {
  background: #3b82f6;
  color: white;
}

.feedback-btn-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

.feedback-btn-secondary {
  background: #f3f4f6;
  color: #374151;
}

.feedback-btn-secondary:hover {
  background: #e5e7eb;
  transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .usage-guide-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .usage-guide-card {
    padding: 1rem;
  }
  
  .feedback-form {
    padding: 1.5rem;
  }
  
  .feedback-form-actions {
    flex-direction: column;
  }
  
  .feedback-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (min-width: 769px) and (max-width: 1200px) {
  .usage-guide-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

/* AI助手弹出卡片样式 */
.assistant-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
}

.assistant-modal-content {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: assistantSlideIn 0.3s ease-out;
}

@keyframes assistantSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.assistant-header {
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  color: white;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.assistant-title {
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.assistant-title i {
  font-size: 20px;
}

.assistant-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.assistant-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.assistant-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #f8f9fa;
  max-height: 400px;
}

.assistant-message {
  max-width: 85%;
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 18px;
  position: relative;
  line-height: 1.5;
  word-wrap: break-word;
}

.assistant-message.ai-message {
  background: white;
  border-bottom-left-radius: 4px;
  margin-right: auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  color: #333;
}

.assistant-message.user-message {
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  color: white;
  border-bottom-right-radius: 4px;
  margin-left: auto;
}

.assistant-message.ai-message p {
  margin-bottom: 1rem;
}

.assistant-message.ai-message pre {
  background-color: #f6f8fa;
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid #e1e4e8;
}

.assistant-message.ai-message code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  background-color: rgba(175, 184, 193, 0.2);
  border-radius: 6px;
  padding: 0.2em 0.4em;
  font-size: 85%;
}

.assistant-message.ai-message table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
}

.assistant-message.ai-message table th,
.assistant-message.ai-message table td {
  border: 1px solid #dfe2e5;
  padding: 6px 13px;
  text-align: left;
}

.assistant-message.ai-message table th {
  background-color: #f6f8fa;
  font-weight: 600;
}

.assistant-message.ai-message table tr:nth-child(2n) {
  background-color: #f6f8fa;
}

.assistant-message.ai-message blockquote {
  border-left: 4px solid #dfe2e5;
  color: #6a737d;
  padding: 0 1em;
  margin: 1rem 0;
  font-style: italic;
}

.assistant-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0;
  margin-top: 8px;
}

.assistant-suggestion-btn {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  color: #374151;
}

.assistant-suggestion-btn:hover {
  background: #e5e7eb;
  border-color: #d1d5db;
  transform: translateY(-1px);
}

.assistant-input {
  display: flex;
  padding: 16px 20px;
  background: white;
  border-top: 1px solid #e5e7eb;
  gap: 12px;
  align-items: flex-end;
}

#assistantMessageInput {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 24px;
  resize: none;
  outline: none;
  transition: border-color 0.2s;
  font-size: 14px;
  line-height: 1.4;
  max-height: 120px;
  min-height: 44px;
  height: 44px;
  box-sizing: border-box;
}

#assistantMessageInput:focus {
  border-color: #6e8efb;
  box-shadow: 0 0 0 3px rgba(110, 142, 251, 0.1);
}

#assistantSendBtn {
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  color: white;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#assistantSendBtn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(110, 142, 251, 0.3);
}

#assistantSendBtn:active {
  transform: scale(0.95);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .assistant-modal-content {
    width: 95%;
    max-height: 90vh;
    margin: 20px;
  }
  
  .assistant-messages {
    max-height: 300px;
    padding: 16px;
  }
  
  .assistant-message {
    max-width: 90%;
    font-size: 14px;
  }
  
  .assistant-suggestions {
    gap: 6px;
  }
  
  .assistant-suggestion-btn {
    font-size: 13px;
    padding: 6px 12px;
  }
  
  .assistant-input {
    padding: 12px 16px;
  }
  
  #assistantMessageInput {
    font-size: 16px; /* 防止iOS缩放 */
  }
}

/* 滚动条样式 */
.assistant-messages::-webkit-scrollbar {
  width: 6px;
}

.assistant-messages::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.assistant-messages::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.assistant-messages::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}