/* ===== 17用AI 全局样式 ===== */
:root {
  --primary: #6C3BFF;
  --primary-light: #8A5FFF;
  --primary-dark: #4E20D4;
  --secondary: #FF6B35;
  --accent: #00D4AA;
  --bg-dark: #0A0A1A;
  --bg-card: #13132A;
  --bg-card2: #1A1A35;
  --border: rgba(108,59,255,0.25);
  --text-primary: #FFFFFF;
  --text-secondary: #B0AACE;
  --text-muted: #6B6896;
  --success: #00D4AA;
  --warning: #FFB830;
  --danger: #FF4B6E;
  --gradient-main: linear-gradient(135deg, #6C3BFF 0%, #FF6B35 100%);
  --gradient-card: linear-gradient(145deg, #13132A, #1A1A35);
  --shadow-glow: 0 0 30px rgba(108,59,255,0.3);
  --shadow-card: 0 8px 32px rgba(0,0,0,0.4);
  --radius: 16px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ===== 导航栏 ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(10,10,26,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: 68px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 0;
  transition: var(--transition);
}

.navbar.scrolled { background: rgba(10,10,26,0.98); box-shadow: 0 2px 20px rgba(0,0,0,0.5); }

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 38px; height: 38px;
  background: var(--gradient-main);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900;
  color: white;
  box-shadow: var(--shadow-glow);
}

.logo-text {
  font-size: 20px;
  font-weight: 800;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 32px;
  list-style: none;
  flex: 1;
}

.nav-menu a {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-menu a:hover, .nav-menu a.active {
  color: var(--text-primary);
  background: rgba(108,59,255,0.15);
}
.nav-menu a.active { color: var(--primary-light); }

.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* ===== 按钮系统 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  border: none; cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-main);
  color: white;
  box-shadow: 0 4px 15px rgba(108,59,255,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(108,59,255,0.5); }

.btn-outline {
  background: transparent;
  color: var(--primary-light);
  border: 1px solid var(--primary);
}
.btn-outline:hover { background: rgba(108,59,255,0.1); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }

.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: 12px; }
.btn-xl { padding: 16px 36px; font-size: 17px; border-radius: 14px; }

.btn-danger { background: var(--danger); color: white; }
.btn-success { background: var(--success); color: white; }

/* ===== 卡片 ===== */
.card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}
.card:hover { border-color: rgba(108,59,255,0.5); box-shadow: var(--shadow-glow); transform: translateY(-2px); }

/* ===== 标签 ===== */
.badge {
  display: inline-flex; align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px; font-weight: 600;
}
.badge-primary { background: rgba(108,59,255,0.2); color: var(--primary-light); border: 1px solid rgba(108,59,255,0.3); }
.badge-success { background: rgba(0,212,170,0.15); color: var(--success); border: 1px solid rgba(0,212,170,0.3); }
.badge-warning { background: rgba(255,184,48,0.15); color: var(--warning); border: 1px solid rgba(255,184,48,0.3); }
.badge-danger { background: rgba(255,75,110,0.15); color: var(--danger); border: 1px solid rgba(255,75,110,0.3); }
.badge-hot { background: linear-gradient(135deg,#FF6B35,#FF4B6E); color: white; }
.badge-new { background: linear-gradient(135deg,#6C3BFF,#00D4AA); color: white; }

/* ===== 表单元素 ===== */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px; font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--primary); background: rgba(108,59,255,0.08); box-shadow: 0 0 0 3px rgba(108,59,255,0.1); }
.form-control::placeholder { color: var(--text-muted); }

textarea.form-control { resize: vertical; min-height: 100px; }

.form-control-dark {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.08);
}

/* ===== 范围滑块 ===== */
.range-slider {
  -webkit-appearance: none;
  width: 100%; height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px; outline: none; cursor: pointer;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  background: var(--gradient-main);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(108,59,255,0.5);
}

/* ===== 主内容区域 ===== */
.main-content { padding-top: 68px; }
.page-container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ===== Section 标题 ===== */
.section-title {
  font-size: 36px; font-weight: 800;
  text-align: center; margin-bottom: 12px;
}
.section-title span {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-subtitle { text-align: center; color: var(--text-secondary); font-size: 16px; margin-bottom: 48px; }

/* ===== 网格 ===== */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2,1fr); } .grid-3 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 768px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ===== 模态框 ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: var(--transition);
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
  width: 90%; max-width: 460px;
  box-shadow: var(--shadow-glow), var(--shadow-card);
  transform: scale(0.95) translateY(20px);
  transition: var(--transition);
}
.modal-overlay.active .modal-box { transform: scale(1) translateY(0); }

.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.modal-title { font-size: 22px; font-weight: 800; }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 20px; transition: var(--transition); }
.modal-close:hover { color: var(--text-primary); }

/* ===== 标签页 ===== */
.tabs { display: flex; gap: 4px; background: rgba(255,255,255,0.05); border-radius: 12px; padding: 4px; margin-bottom: 24px; }
.tab-btn {
  flex: 1; padding: 10px; border: none;
  background: transparent; color: var(--text-secondary);
  border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 14px;
  transition: var(--transition);
}
.tab-btn.active { background: var(--gradient-main); color: white; box-shadow: 0 4px 15px rgba(108,59,255,0.3); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== 进度条 ===== */
.progress-bar { background: rgba(255,255,255,0.08); border-radius: 10px; height: 8px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--gradient-main); border-radius: 10px; transition: width 0.5s ease; }

/* ===== 加载动画 ===== */
.spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(108,59,255,0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 通知 Toast ===== */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 99999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 20px;
  display: flex; align-items: center; gap: 12px;
  min-width: 280px; max-width: 400px;
  box-shadow: var(--shadow-card);
  animation: slideIn 0.3s ease;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--primary); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ===== Hero 粒子背景 ===== */
.particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.particle {
  position: absolute;
  border-radius: 50%;
  animation: float linear infinite;
}
@keyframes float {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

/* ===== 侧边栏（后台） ===== */
.sidebar {
  width: 240px; min-height: 100vh;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  flex-shrink: 0;
}
.sidebar-menu { list-style: none; }
.sidebar-menu li a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px;
  color: var(--text-secondary);
  text-decoration: none; font-size: 14px; font-weight: 500;
  transition: var(--transition);
  border-left: 3px solid transparent;
}
.sidebar-menu li a:hover, .sidebar-menu li a.active {
  color: var(--text-primary);
  background: rgba(108,59,255,0.1);
  border-left-color: var(--primary);
}

/* ===== 表格 ===== */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th { padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); }
tbody td { padding: 14px 16px; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,0.04); }
tbody tr:hover { background: rgba(108,59,255,0.05); }

/* ===== 统计卡片 ===== */
.stat-card { background: var(--gradient-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-value { font-size: 28px; font-weight: 800; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.stat-change { font-size: 12px; color: var(--success); margin-top: 8px; }

/* ===== 特效文字 ===== */
.gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== 分隔线 ===== */
.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* ===== 响应式隐藏 ===== */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  .nav-menu { display: none; }
  .section-title { font-size: 26px; }
}

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

.pulse { animation: pulse 2s cubic-bezier(0.4,0,0.6,1) infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ===== 生成状态动画 ===== */
.generating-dots span { animation: blink 1.4s infinite; }
.generating-dots span:nth-child(2) { animation-delay: 0.2s; }
.generating-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%,80%,100% { opacity: 0; } 40% { opacity: 1; } }

/* ===== 页脚 ===== */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 48px 24px 24px;
  margin-top: 80px;
}
.footer-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 32px; max-width: 1280px; margin: 0 auto 32px; }
.footer-brand .logo-text { font-size: 24px; }
.footer-brand p { color: var(--text-muted); font-size: 14px; margin-top: 12px; line-height: 1.6; }
.footer-col h4 { font-size: 14px; font-weight: 700; margin-bottom: 16px; color: var(--text-primary); }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: var(--text-muted); text-decoration: none; font-size: 14px; transition: var(--transition); }
.footer-col ul li a:hover { color: var(--primary-light); }
.footer-bottom { text-align: center; padding-top: 24px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 13px; max-width: 1280px; margin: 0 auto; }

@media (max-width: 768px) { .footer-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
