/* AggrAI Platform - 公共样式 */
/* Logo配色：绿色渐变主题 (#22c55e → #059669) */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { font-family: 'Inter', system-ui, -apple-system, sans-serif; background: #f8fafc; color: #1e293b; line-height: 1.6; }

/* 卡片悬浮效果 */
.card-hover { transition: transform 0.2s, box-shadow 0.2s; }
.card-hover:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,0.08); }

/* 渐变文字 - Logo绿色配色 */
.text-gradient { background: linear-gradient(135deg, #22c55e 0%, #059669 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.text-gradient-alt { background: linear-gradient(135deg, #4ade80 0%, #16a34a 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.text-gradient-dark { background: linear-gradient(135deg, #16a34a 0%, #166534 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* 表格样式 */
.table-wrapper { overflow-x: auto; border-radius: 12px; border: 1px solid #e5e7eb; background: #fff; }
.table-wrapper table { min-width: 100%; }
.table-wrapper thead { background: #f9fafb; }
.table-wrapper tbody tr:hover { background: #f0fdf4 !important; }
.table-wrapper th { white-space: nowrap; font-weight: 600; color: #6b7280; border-bottom: 1px solid #e5e7eb; }
.table-wrapper td { white-space: nowrap; border-bottom: 1px solid #f3f4f6; }

/* Tag标签 */
.tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 9999px; font-size: 12px; font-weight: 500; }

/* 动画 */
.fade-in { animation: fadeInUp 0.5s ease both; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* 滚动条美化 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* 加载动画 */
.loading-spinner { width: 24px; height: 24px; border: 3px solid #e5e7eb; border-top-color: #22c55e; border-radius: 50%; animation: spin 0.8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 主按钮 - Logo绿色渐变 */
.btn-primary {
  background: linear-gradient(135deg, #22c55e 0%, #059669 100%);
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.45);
  background: linear-gradient(135deg, #16a34a 0%, #047857 100%);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: #f1f5f9;
  color: #64748b;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  border: 1px solid #e2e8f0;
  cursor: pointer;
}
.btn-secondary:hover {
  background: #e2e8f0;
  color: #475569;
}

/* 主导航Tab - Logo绿色配色 */
.main-nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #64748b;
  transition: all 0.3s ease;
  background: transparent;
  border: 1px solid transparent;
}
.main-nav-tab:hover {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.05);
}
.main-nav-tab.active {
  color: white;
  background: linear-gradient(135deg, #22c55e 0%, #059669 100%);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.35);
}

/* 渐变边框卡片 */
.gradient-border-card {
  position: relative;
  background: white;
  border-radius: 1.25rem;
  overflow: hidden;
}
.gradient-border-card::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.4), rgba(5, 150, 105, 0.3), rgba(22, 163, 74, 0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  border-radius: inherit;
  pointer-events: none;
}

/* 卡片悬浮 - Logo绿色配色 */
.card-hover-primary:hover {
  border-color: #22c55e;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.12);
  transform: translateY(-2px);
}

/* 表单聚焦 - Logo绿色配色 */
.form-input:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}
.form-select:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* 进度条 - Logo绿色配色 */
.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
  background: linear-gradient(90deg, #22c55e, #059669);
}
.progress-fill-light {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
  background: linear-gradient(90deg, #4ade80, #22c55e);
}

/* 统计卡片悬浮 */
.stat-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.25rem;
  text-align: center;
  transition: all 0.3s ease;
}
.stat-card:hover {
  border-color: #22c55e;
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.1);
}

/* 攻略卡片悬浮 */
.guide-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}
.guide-card:hover {
  border-color: #22c55e;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.12);
  transform: translateY(-4px);
}

/* 暗色模式：黑底白字 */
body.dark { background: #000000; color: #ffffff; }
body.dark .bg-white { background: #0f0f10 !important; }
body.dark .bg-gray-50 { background: #0b0b0c !important; }
body.dark .bg-gray-100 { background: #131315 !important; }
body.dark .bg-gray-200 { background: #1b1b1f !important; }
body.dark .border-gray-100, body.dark .border-gray-200 { border-color: rgba(255,255,255,0.06) !important; }
body.dark .border-gray-300 { border-color: rgba(255,255,255,0.12) !important; }
body.dark .text-gray-900 { color: #ffffff !important; }
body.dark .text-gray-800 { color: #f5f5f5 !important; }
body.dark .text-gray-700 { color: #efefef !important; }
body.dark .text-gray-600 { color: #e5e7eb !important; }
body.dark .text-gray-500 { color: #d1d5db !important; }
body.dark .text-gray-400 { color: #9ca3af !important; }
body.dark .bg-white .text-gray-900,
body.dark .bg-gray-100 .text-gray-900,
body.dark .bg-gray-200 .text-gray-900 { color: #ffffff !important; }
body.dark .bg-white .text-gray-800,
body.dark .bg-gray-100 .text-gray-800,
body.dark .bg-gray-200 .text-gray-800 { color: #f5f5f5 !important; }
body.dark .bg-white .text-gray-700,
body.dark .bg-gray-100 .text-gray-700,
body.dark .bg-gray-200 .text-gray-700 { color: #efefef !important; }
body.dark .bg-white .text-gray-600,
body.dark .bg-gray-100 .text-gray-600,
body.dark .bg-gray-200 .text-gray-600 { color: #e5e7eb !important; }
body.dark .bg-white .text-gray-500,
body.dark .bg-gray-100 .text-gray-500,
body.dark .bg-gray-200 .text-gray-500 { color: #d1d5db !important; }
body.dark .bg-white .text-gray-400,
body.dark .bg-gray-100 .text-gray-400,
body.dark .bg-gray-200 .text-gray-400 { color: #9ca3af !important; }
body.dark .hover\:bg-gray-50:hover { background: #222231 !important; }
body.dark .hover\:bg-gray-100:hover { background: #2b2b3b !important; }
body.dark header { background: rgba(0,0,0,0.95) !important; border-color: rgba(255,255,255,0.06) !important; }
body.dark .table-wrapper { background: #141422 !important; border-color: rgba(255,255,255,0.08) !important; }
body.dark .table-wrapper thead { background: #1a1a25 !important; }
body.dark .table-wrapper td, body.dark .table-wrapper th { border-color: rgba(255,255,255,0.06) !important; }
body.dark .btn-primary { background: linear-gradient(135deg, #16a34a 0%, #047857 100%); }
body.dark .loading-spinner { border-top-color: #22c55e; }
body.dark main .bg-indigo-600 .text-white,
body.dark main .bg-indigo-700 .text-white,
body.dark main .bg-purple-600 .text-white,
body.dark main .bg-green-600 .text-white,
body.dark main .bg-red-600 .text-white,
body.dark main .bg-black .text-white,
body.dark main .bg-indigo-600.text-white,
body.dark main .bg-indigo-700.text-white,
body.dark main .bg-purple-600.text-white,
body.dark main .bg-green-600.text-white,
body.dark main .bg-red-600.text-white,
body.dark main .bg-black.text-white,
body.dark main .from-indigo-600 .text-white,
body.dark main .from-purple-600 .text-white,
body.dark main .from-green-600 .text-white,
body.dark main .from-indigo-600.text-white,
body.dark main .from-purple-600.text-white,
body.dark main .from-green-600.text-white {
  color: #ffffff !important;
}

/* 首页首屏区域深色化（避免大面积发白） */
body.dark .from-indigo-50 {
  --tw-gradient-from: rgb(15 23 42 / 1) var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgb(15 23 42 / 0) var(--tw-gradient-to-position) !important;
}
body.dark .via-white {
  --tw-gradient-stops: var(--tw-gradient-from), rgb(17 24 39 / 1) var(--tw-gradient-via-position), var(--tw-gradient-to) !important;
}
body.dark .to-purple-50 {
  --tw-gradient-to: rgb(10 15 25 / 1) var(--tw-gradient-to-position) !important;
}
body.dark .bg-indigo-100 {
  background-color: rgba(79, 70, 229, 0.15) !important;
}
body.dark .bg-purple-100 {
  background-color: rgba(168, 85, 247, 0.14) !important;
}
body.dark .bg-indigo-100\/60 {
  background-color: rgba(79, 70, 229, 0.2) !important;
}
