/* ═══════════════════════════════════════════════════════════════════════════
   variables.css — Design Tokens, Reset, Typography
   Based on 中辉智保 Web Style Guide
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── 2.1 Dark Theme (Default) ──────────────────────────────────────────── */
:root {
  --primary:       #1a365d;
  --primary-light: #2a4a7f;
  --primary-dark:  #0f2440;

  --gold:          #c7a02a;
  --gold-light:    #e8c84a;
  --gold-dark:     #a68520;

  --accent-green:  #38a169;
  --accent-red:    #e53e3e;
  --accent-purple: #a78bfa;
  --accent-purple-soft: rgba(167, 139, 250, 0.12);

  --bg:            #0b1121;
  --bg-card:       #111b2e;
  --bg-card-hover: #162440;

  --text:           #e2e8f0;
  --text-secondary: #a0aec0;
  --text-muted:     #718096;

  --border: rgba(255,255,255,0.08);

  --sidebar-bg:     #0a0f1a;
  --sidebar-hover:  rgba(199,160,42,0.08);
  --sidebar-active: rgba(199,160,42,0.15);
}

/* ─── 2.2 Light Theme ───────────────────────────────────────────────────── */
body.light-theme {
  --bg:            #f0f2f5;
  --bg-card:       #ffffff;
  --bg-card-hover: #f8f9fc;
  --text:           #1a202c;
  --text-secondary: #4a5568;
  --text-muted:     #718096;
  --border: rgba(0,0,0,0.08);
  --accent-purple: #6d28d9;
  --accent-purple-soft: rgba(109, 40, 217, 0.08);
  --sidebar-bg:     #ffffff;
  --sidebar-hover:  rgba(199,160,42,0.06);
  --sidebar-active: rgba(199,160,42,0.12);
}

/* ─── 3.1 Typography ────────────────────────────────────────────────────── */
@font-face {
  font-family: 'LatinCharter';
  src: local('Charter'), local('Bitstream Charter'), local('Georgia');
  unicode-range: U+0000-024F, U+2000-206F, U+2070-209F, U+20A0-20CF, U+2100-214F;
}

/* ─── 5. Global Reset & Base ────────────────────────────────────────────── */
html { font-size: 16px; }
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
input, select, textarea, button { font-family: inherit; }

body {
  font-family: 'LatinCharter', 'KaiTi', 'STKaiti', '楷体', 'Kai', serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }

.text-green { color: var(--accent-green); }
.text-red   { color: var(--accent-red); }
.text-gold  { color: var(--gold); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Keyframes */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
