/* ============================================
   AQUA 公益 AI 平台 - 深空科技风样式
   Deep Space Tech Style
   ============================================ */

/* CSS 变量 - 深空配色体系 */
:root {
  --bg-deep: #050a18;
  --bg-card: rgba(10, 25, 50, 0.7);
  --bg-card-solid: #0a1932;
  --bg-card-hover: rgba(15, 35, 65, 0.8);
  --bg-input: rgba(5, 15, 35, 0.8);
  --bg-sidebar: #060e20;
  --primary: #00e5ff;
  --primary-hover: #33ecff;
  --primary-dim: rgba(0, 229, 255, 0.12);
  --primary-glow: rgba(0, 229, 255, 0.3);
  --purple: #7c4dff;
  --purple-hover: #9b72ff;
  --purple-dim: rgba(124, 77, 255, 0.12);
  --blue: #0066ff;
  --blue-dim: rgba(0, 102, 255, 0.12);
  --cyan: #00e5ff;
  --text: #e8f4f8;
  --text-secondary: #6b8a99;
  --text-dim: #3d5a6b;
  --border: rgba(0, 229, 255, 0.12);
  --border-light: rgba(0, 229, 255, 0.25);
  --danger: #ff4757;
  --danger-hover: #ff6b7a;
  --success: #00e676;
  --warning: #ffab00;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 50px rgba(0, 0, 0, 0.5);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 260px;
  --nav-height: 64px;
  --font-display: 'Outfit', sans-serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* Google Fonts 导入 */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap');

/* 全局 Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* 背景粒子效果容器 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0, 229, 255, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(124, 77, 255, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 40% 80%, rgba(0, 102, 255, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

img {
  max-width: 100%;
  height: auto;
}

ul, ol {
  list-style: none;
}

/* ============================================
   按钮
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  user-select: none;
  outline: none;
  position: relative;
  overflow: hidden;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--blue));
  color: #fff;
  box-shadow: 0 2px 12px var(--primary-glow);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 0 20px var(--primary-glow), 0 4px 24px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--border-light);
  background: rgba(0, 229, 255, 0.05);
  box-shadow: 0 0 15px var(--primary-dim);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover:not(:disabled) {
  background: var(--danger-hover);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(0, 229, 255, 0.05);
  color: var(--text);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* 加载动画按钮 */
.btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn.loading::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
  backdrop-filter: blur(8px);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim), 0 0 20px var(--primary-dim);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-dim);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b8a99' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

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

.form-error {
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 4px;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row > * {
  flex: 1;
}

/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Code input (验证码) */
.code-input {
  display: flex;
  gap: 8px;
}

.code-input input {
  width: 44px;
  height: 52px;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0;
  padding: 0;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  outline: none;
  transition: var(--transition);
}

.code-input input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim);
}

/* ============================================
   卡片 - 玻璃态设计
   ============================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.card:hover {
  border-color: var(--border-light);
  box-shadow: 0 0 30px var(--primary-dim);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  font-family: var(--font-display);
}

/* ============================================
   统计卡片
   ============================================ */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--border-light);
  box-shadow: 0 0 30px var(--primary-dim);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--blue));
  opacity: 0.8;
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card .stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: var(--font-display);
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card .stat-sub {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ============================================
   表格
   ============================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th {
  background: rgba(0, 229, 255, 0.04);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover td {
  background: rgba(0, 229, 255, 0.03);
}

/* ============================================
   布局
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.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); }

.flex {
  display: flex;
}

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

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

.flex-col {
  display: flex;
  flex-direction: column;
}

.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }

/* ============================================
   导航栏 - 毛玻璃效果
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(5, 10, 24, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 32px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: #fff;
  text-decoration: none;
}

.navbar-brand svg {
  width: 32px;
  height: 32px;
}

.navbar-brand span {
  background: linear-gradient(135deg, var(--primary), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 40px;
}

.navbar-nav a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--text);
  background: rgba(0, 229, 255, 0.06);
}

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

/* ============================================
   侧边栏
   ============================================ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 900;
  overflow-y: auto;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.sidebar-brand {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: #fff;
  text-decoration: none;
}

.sidebar-brand svg {
  width: 28px;
  height: 28px;
}

.sidebar-brand span {
  background: linear-gradient(135deg, var(--primary), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 4px;
  position: relative;
}

.sidebar-nav a:hover {
  color: var(--text);
  background: rgba(0, 229, 255, 0.04);
}

.sidebar-nav a.active {
  color: var(--primary);
  background: var(--primary-dim);
}

.sidebar-nav a.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--primary);
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px var(--primary-glow);
}

.sidebar-nav a svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.sidebar-footer .user-id {
  color: var(--text-secondary);
  font-weight: 600;
}

/* ============================================
   控制台主内容区
   ============================================ */
.console-layout {
  display: flex;
  min-height: 100vh;
}

.console-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 32px;
  min-height: 100vh;
}

.console-page {
  display: none;
  animation: fadeUp 0.3s ease;
}

.console-page.active {
  display: block;
}

.page-header {
  margin-bottom: 32px;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-display);
  margin-bottom: 4px;
}

.page-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ============================================
   模态框
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeUp 0.2s ease;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: rgba(10, 25, 50, 0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  width: 90%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  animation: fadeUp 0.3s ease;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 600;
  font-family: var(--font-display);
  margin-bottom: 16px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* ============================================
   Toast 通知 - 毛玻璃效果
   ============================================ */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: #fff;
  box-shadow: var(--shadow);
  animation: fadeUp 0.3s ease;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.toast-success {
  background: rgba(0, 230, 118, 0.85);
  border-color: rgba(0, 230, 118, 0.3);
}

.toast-error {
  background: rgba(255, 71, 87, 0.85);
  border-color: rgba(255, 71, 87, 0.3);
}

.toast-warning {
  background: rgba(255, 171, 0, 0.9);
  color: #000;
  border-color: rgba(255, 171, 0, 0.3);
}

.toast-info {
  background: rgba(0, 229, 255, 0.85);
  border-color: rgba(0, 229, 255, 0.3);
}

/* ============================================
   加载动画
   ============================================ */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ============================================
   标签 Badge
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  backdrop-filter: blur(4px);
}

.badge-primary {
  background: var(--primary-dim);
  color: var(--primary);
  border: 1px solid rgba(0, 229, 255, 0.2);
}

.badge-success {
  background: rgba(0, 230, 118, 0.12);
  color: var(--success);
  border: 1px solid rgba(0, 230, 118, 0.2);
}

.badge-danger {
  background: rgba(255, 71, 87, 0.12);
  color: var(--danger);
  border: 1px solid rgba(255, 71, 87, 0.2);
}

.badge-info {
  background: var(--primary-dim);
  color: var(--cyan);
  border: 1px solid rgba(0, 229, 255, 0.2);
}

.badge-warning {
  background: rgba(255, 171, 0, 0.12);
  color: var(--warning);
  border: 1px solid rgba(255, 171, 0, 0.2);
}

/* ============================================
   代码块
   ============================================ */
.code-block {
  position: relative;
  background: #020810;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.code-block pre {
  padding: 16px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text);
}

.code-block .code-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 10px;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}

.code-block .code-copy:hover {
  background: rgba(0, 229, 255, 0.2);
  color: var(--primary);
  border-color: var(--border-light);
}

/* ============================================
   选项卡 Tabs
   ============================================ */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.tab {
  padding: 10px 20px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeUp 0.2s ease;
}

/* ============================================
   搜索框
   ============================================ */
.search-box {
  position: relative;
}

.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-dim);
}

.search-box input {
  padding-left: 40px;
}

/* ============================================
   Hero 区域
   ============================================ */
.hero {
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 1000px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.06) 0%, transparent 60%);
  pointer-events: none;
  animation: pulse 6s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124, 77, 255, 0.05) 0%, transparent 60%);
  pointer-events: none;
  animation: pulse 8s ease-in-out infinite reverse;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  font-family: var(--font-display);
  margin-bottom: 16px;
  line-height: 1.15;
  position: relative;
  z-index: 1;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--primary), var(--blue), var(--purple));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* ============================================
   特性卡片
   ============================================ */
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: var(--transition);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(0, 229, 255, 0.05) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.feature-card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: 0 0 40px var(--primary-dim), 0 12px 40px rgba(0, 0, 0, 0.3);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary-dim), var(--blue-dim));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  position: relative;
  z-index: 1;
}

.feature-icon svg {
  width: 28px;
  height: 28px;
  color: var(--primary);
}

.feature-title {
  font-size: 1.1rem;
  font-weight: 600;
  font-family: var(--font-display);
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.feature-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

/* ============================================
   模型卡片
   ============================================ */
.model-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
  cursor: default;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.model-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.model-card:hover {
  border-color: var(--border-light);
  box-shadow: 0 0 30px var(--primary-dim), 0 8px 30px rgba(0, 0, 0, 0.3);
}

.model-card:hover::before {
  opacity: 1;
}

.model-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.model-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-dim), var(--blue-dim));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
  flex-shrink: 0;
}

.model-name {
  font-weight: 600;
  font-size: 1rem;
  font-family: var(--font-display);
}

.model-provider {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.model-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

/* ============================================
   架构图
   ============================================ */
.arch-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 40px 20px;
  flex-wrap: wrap;
}

.arch-node {
  background: rgba(10, 25, 50, 0.6);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 16px 28px;
  text-align: center;
  min-width: 120px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: var(--transition);
  position: relative;
}

.arch-node:hover {
  border-color: var(--primary);
  box-shadow: 0 0 20px var(--primary-dim);
  transform: translateY(-2px);
}

.arch-node-title {
  font-weight: 700;
  font-size: 1rem;
  font-family: var(--font-display);
  margin-bottom: 2px;
}

.arch-node-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.arch-arrow {
  color: var(--primary);
  font-size: 1.5rem;
  padding: 0 12px;
}

/* ============================================
   密钥展示 (创建后仅显示一次)
   ============================================ */
.key-display {
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin: 16px 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.key-display .key-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--warning);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.key-display .key-value {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 10px 14px;
  border-radius: var(--radius-xs);
  word-break: break-all;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.key-display .key-value code {
  flex: 1;
}

/* ============================================
   折线图 (Canvas)
   ============================================ */
.chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.chart-container canvas {
  width: 100%;
  height: 200px;
}

/* ============================================
   登录/注册居中布局
   ============================================ */
.auth-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
}

.auth-layout::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0, 229, 255, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.auth-card {
  background: rgba(10, 25, 50, 0.75);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  position: relative;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo a {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: #fff;
  text-decoration: none;
}

.auth-logo a span {
  background: linear-gradient(135deg, var(--primary), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-title {
  font-size: 1.3rem;
  font-weight: 600;
  font-family: var(--font-display);
  text-align: center;
  margin-bottom: 28px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--primary);
  font-weight: 500;
}

/* 步骤指示器 */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}

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

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
}

.step.active .step-dot {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

.step.done .step-dot {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.step-line {
  width: 40px;
  height: 2px;
  background: var(--border);
}

.step.done + .step-line,
.step.active ~ .step-line {
  background: var(--primary);
}

/* ============================================
   底部
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  background: rgba(5, 10, 24, 0.5);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.footer-links a {
  color: var(--text-secondary);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
}

/* ============================================
   移动端侧边栏切换
   ============================================ */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--blue));
  color: #fff;
  border: none;
  cursor: pointer;
  z-index: 1100;
  box-shadow: 0 4px 20px var(--primary-glow);
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.sidebar-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 28px var(--primary-glow);
}

.sidebar-toggle svg {
  width: 24px;
  height: 24px;
}

/* ============================================
   危险区域
   ============================================ */
.danger-zone {
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  padding: 20px;
  background: rgba(255, 71, 87, 0.06);
  backdrop-filter: blur(8px);
}

.danger-zone-title {
  color: var(--danger);
  font-weight: 600;
  font-family: var(--font-display);
  margin-bottom: 8px;
}

.danger-zone-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* ============================================
   空状态
   ============================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.empty-state p {
  font-size: 0.95rem;
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .console-main {
    padding: 24px;
  }
}

@media (max-width: 768px) {
  :root {
    --sidebar-width: 0px;
  }

  .navbar {
    padding: 0 16px;
  }

  .navbar-nav {
    display: none;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero {
    padding: 100px 16px 60px;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
  }

  .auth-card {
    padding: 28px 20px;
  }

  .sidebar {
    transform: translateX(-100%);
    width: 260px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: flex;
  }

  .console-main {
    margin-left: 0;
    padding: 16px;
    padding-top: 80px;
  }

  .arch-diagram {
    flex-direction: column;
  }

  .arch-arrow {
    transform: rotate(90deg);
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .container {
    padding: 0 16px;
  }

  .table {
    font-size: 0.8rem;
  }

  .table th,
  .table td {
    padding: 8px 10px;
  }
}

/* ============================================
   辅助类
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--text-secondary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-cyan { color: var(--cyan); }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }
.mt-xl { margin-top: 40px; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.mb-lg { margin-bottom: 24px; }
.p-md { padding: 16px; }
.p-lg { padding: 24px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 滚动条 - 深色细滚动条 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 229, 255, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 229, 255, 0.3);
}

/* 选择高亮 */
::selection {
  background: rgba(0, 229, 255, 0.3);
  color: #fff;
}

/* ============================================
   动画关键帧
   ============================================ */

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px var(--primary-dim); }
  50% { box-shadow: 0 0 40px var(--primary-glow); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}

@keyframes fadeInBadge {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes flowPulse {
  0% { left: -20px; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { left: 60px; opacity: 0; }
}

@keyframes flowPulseV {
  0% { top: -20px; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { top: 40px; opacity: 0; }
}

/* ============================================
   新首页 - 深空科技美学
   ============================================ */

/* --- 按钮：强调色(accent) --- */
.btn-accent {
  background: linear-gradient(135deg, var(--primary), var(--blue));
  color: #fff;
  box-shadow: 0 4px 20px var(--primary-glow);
  font-weight: 600;
}
.btn-accent:hover:not(:disabled) {
  box-shadow: 0 6px 28px var(--primary-glow), 0 0 40px var(--primary-dim);
  transform: translateY(-2px);
}

/* --- 按钮：玻璃态 --- */
.btn-glass {
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn-glass:hover:not(:disabled) {
  background: rgba(0, 229, 255, 0.1);
  border-color: var(--border-light);
  transform: translateY(-1px);
}

/* --- Hero 区域 --- */
.hero-new {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(170deg, #050a18 0%, #071430 40%, #050d1f 100%);
}

.hero-new #hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 120px 24px 80px;
  max-width: 720px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 20px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--primary);
  background: var(--primary-dim);
  border: 1px solid rgba(0, 229, 255, 0.2);
  margin-bottom: 28px;
  animation: fadeUp 1s ease 0.2s both;
}

.hero-new .hero-title {
  font-size: 4.5rem;
  font-weight: 700;
  font-family: var(--font-display);
  line-height: 1.05;
  margin-bottom: 20px;
  animation: fadeUp 0.8s ease 0.4s both;
}

.hero-aqua {
  background: linear-gradient(135deg, var(--primary), var(--blue), var(--primary));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}

.hero-sub {
  font-size: 2.2rem;
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
  animation: fadeUp 0.8s ease 0.6s both;
}

.hero-new .hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 60px;
  animation: fadeUp 0.8s ease 0.8s both;
}

.hero-btn-primary {
  padding: 16px 40px;
  font-size: 1.05rem;
}

/* Hero 统计 */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  animation: fadeUp 0.8s ease 1s both;
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  font-family: var(--font-display);
  background: linear-gradient(135deg, var(--primary), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.hero-stat-divider {
  width: 1px;
  height: 36px;
  background: linear-gradient(180deg, transparent, var(--border), transparent);
}

/* --- 区域通用 --- */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-dim);
  border: 1px solid rgba(0, 229, 255, 0.15);
  margin-bottom: 16px;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text);
}

/* --- 特性区域 --- */
.features-section {
  padding: 100px 0;
  background: linear-gradient(180deg, var(--bg-deep) 0%, #070e24 100%);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.feature-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent, #00e5ff), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.feature-item:hover {
  border-color: var(--border-light);
  background: rgba(10, 25, 50, 0.85);
  transform: translateY(-4px);
  box-shadow: 0 0 40px var(--primary-dim), 0 12px 40px rgba(0, 0, 0, 0.3);
}

.feature-item:hover::before {
  opacity: 1;
}

.feature-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-dim), var(--blue-dim));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-icon-wrap svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.feature-item h3 {
  font-size: 1.05rem;
  font-weight: 600;
  font-family: var(--font-display);
  margin-bottom: 8px;
  color: var(--text);
}

.feature-item p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- 模型展示区域 --- */
.models-section {
  padding: 100px 0;
  background: #070e24;
}

.models-showcase {
  margin-bottom: 36px;
}

.models-grid-new {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.model-card-new {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.model-card-new:hover {
  border-color: var(--model-accent, var(--border-light));
  background: rgba(10, 25, 50, 0.85);
  transform: translateY(-2px);
  box-shadow: 0 0 25px var(--primary-dim), 0 4px 16px rgba(0, 0, 0, 0.2);
}

.model-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.12), rgba(0, 102, 255, 0.12));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--model-accent, var(--primary));
  flex-shrink: 0;
}

.model-card-info {
  min-width: 0;
}

.model-card-name {
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-card-provider {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.models-more {
  text-align: center;
}

.model-showcase-loading {
  text-align: center;
  padding: 60px 0;
  color: var(--text-secondary);
}

.pulse-ring {
  width: 40px;
  height: 40px;
  border: 2px solid rgba(0, 229, 255, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

/* --- 快速接入区域 --- */
.quickstart-section {
  padding: 100px 0;
  background: linear-gradient(180deg, #070e24 0%, var(--bg-deep) 100%);
}

.steps-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 60px;
}

.step-card {
  text-align: center;
  padding: 28px 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 180px;
  position: relative;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: var(--transition);
}

.step-card:hover {
  border-color: var(--border-light);
  box-shadow: 0 0 25px var(--primary-dim);
  transform: translateY(-2px);
}

.step-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  font-family: var(--font-display);
  color: #fff;
  margin: 0 auto 14px;
  box-shadow: 0 4px 16px var(--primary-glow);
}

.step-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  font-family: var(--font-display);
  margin-bottom: 6px;
}

.step-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.step-connector {
  padding: 0 12px;
  color: var(--text-dim);
}

/* --- 代码展示 --- */
.code-showcase {
  max-width: 800px;
  margin: 0 auto;
}

.code-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: -1px;
  position: relative;
  z-index: 1;
}

.code-tab {
  padding: 10px 24px;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}

.code-tab:hover {
  color: var(--text);
}

.code-tab.active {
  background: #020810;
  color: var(--primary);
  border-color: var(--border);
}

.code-panels {
  position: relative;
}

.code-panel {
  display: none;
}

.code-panel.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

.code-block-new {
  position: relative;
  background: #020810;
  border: 1px solid var(--border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) var(--radius-sm);
  overflow: hidden;
}

.code-block-new pre {
  padding: 24px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
  color: #c8d0e0;
}

.code-copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 14px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}

.code-copy-btn:hover {
  background: rgba(0, 229, 255, 0.15);
  color: var(--primary);
  border-color: var(--border-light);
}

/* 代码语法高亮 */
.code-keyword { color: #c792ea; }
.code-string { color: #c3e88d; }
.code-number { color: #f78c6c; }

/* --- 架构区域 --- */
.arch-section {
  padding: 100px 0;
  background: var(--bg-deep);
}

.arch-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 40px 0;
}

.arch-flow-node {
  text-align: center;
  padding: 24px 32px;
  background: rgba(10, 25, 50, 0.6);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  min-width: 160px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.arch-flow-node:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px var(--primary-dim), 0 8px 32px rgba(0, 0, 0, 0.3);
}

.arch-flow-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arch-flow-icon svg {
  width: 36px;
  height: 36px;
}

.arch-flow-label {
  font-weight: 600;
  font-size: 0.95rem;
  font-family: var(--font-display);
  margin-bottom: 4px;
}

.arch-flow-sub {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.arch-flow-user { border-color: rgba(232, 244, 248, 0.12); }
.arch-flow-user .arch-flow-label { color: var(--text); }
.arch-flow-user .arch-flow-icon svg { color: var(--text-secondary); }

.arch-flow-aqua { border-color: rgba(0, 229, 255, 0.3); }
.arch-flow-aqua .arch-flow-label { color: var(--primary); }

.arch-flow-acu { border-color: rgba(124, 77, 255, 0.3); }
.arch-flow-acu .arch-flow-label { color: var(--purple); }

.arch-flow-nvidia { border-color: rgba(118, 185, 0, 0.3); }
.arch-flow-nvidia .arch-flow-label { color: #76b900; }

.arch-flow-line {
  width: 60px;
  height: 2px;
  background: var(--border);
  position: relative;
  overflow: hidden;
  margin: 0 8px;
}

.arch-flow-pulse {
  position: absolute;
  top: 0;
  left: -20px;
  width: 20px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  animation: flowPulse 2s ease-in-out infinite;
  animation-delay: var(--pulse-delay, 0s);
}

/* --- CTA 区域 --- */
.cta-section {
  padding: 80px 0;
  background: linear-gradient(180deg, var(--bg-deep) 0%, #070e24 100%);
}

.cta-card {
  position: relative;
  text-align: center;
  padding: 60px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.cta-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.cta-card h2 {
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-display);
  margin-bottom: 12px;
  position: relative;
}

.cta-card p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 32px;
  position: relative;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  position: relative;
}

/* --- 新底部 --- */
.footer-new {
  padding: 60px 0 30px;
  background: #04091a;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand a {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-display);
  background: linear-gradient(135deg, var(--primary), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.footer-brand p {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 8px;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: var(--text-dim);
  font-size: 0.88rem;
  padding: 4px 0;
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* --- 渐入动画 --- */
.fade-in-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: calc(var(--delay, 0) * 0.1s);
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- 新首页响应式 --- */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .models-grid-new {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .hero-new .hero-title {
    font-size: 2.8rem;
  }
  .hero-sub {
    font-size: 1.5rem;
  }
  .hero-stats {
    gap: 20px;
  }
  .hero-stat-value {
    font-size: 1.2rem;
  }
  .features-grid,
  .models-grid-new {
    grid-template-columns: 1fr;
  }
  .steps-grid {
    flex-direction: column;
    gap: 16px;
  }
  .step-connector {
    transform: rotate(90deg);
    padding: 0;
  }
  .arch-flow {
    flex-direction: column;
    gap: 16px;
  }
  .arch-flow-line {
    width: 2px;
    height: 40px;
    margin: 0;
  }
  .arch-flow-pulse {
    width: 2px;
    height: 20px;
    top: -20px;
    left: 0;
    animation-name: flowPulseV;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .cta-card {
    padding: 40px 24px;
  }
  .hero-btn-primary {
    padding: 14px 28px;
  }
  .section-title {
    font-size: 1.5rem;
  }
}
