/* ============================================================
   theme.css — 主题变量（dark-first + light 可切换）
   ============================================================ */

:root {
  /* === Dark theme (default) === */
  --bg-base:        #0a0c10;
  --bg-elevated:    #14171d;
  --bg-elevated-2:  #1b1f26;
  --bg-overlay:     rgba(20, 23, 29, 0.72);
  --bg-overlay-strong: rgba(20, 23, 29, 0.92);
  --border-subtle:  rgba(255, 255, 255, 0.06);
  --border-strong:  rgba(255, 255, 255, 0.12);
  --border-focus:   rgba(125, 211, 252, 0.5);

  --text-primary:   #e8eaed;
  --text-secondary: #9aa0a6;
  --text-tertiary:  #5f6368;

  --accent:         #7dd3fc;
  --accent-strong:  #38bdf8;
  --accent-soft:    rgba(125, 211, 252, 0.12);
  --success:        #4ade80;
  --warning:        #fbbf24;
  --danger:         #f87171;
  --info:           #a78bfa;

  --shadow-card:    0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 0 0 1px var(--border-subtle);
  --shadow-hover:   0 8px 24px -8px rgba(0, 0, 0, 0.6);
  --shadow-strong:  0 16px 40px -12px rgba(0, 0, 0, 0.7);

  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 16px;

  --transition: 0.18s ease;
  --transition-slow: 0.3s ease;

  --font-stack: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Helvetica Neue',
                'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', Menlo, Monaco, Consolas, monospace;
}

:root[data-theme="light"] {
  --bg-base:        #fafbfc;
  --bg-elevated:    #ffffff;
  --bg-elevated-2:  #f3f4f6;
  --bg-overlay:     rgba(255, 255, 255, 0.78);
  --bg-overlay-strong: rgba(255, 255, 255, 0.96);
  --border-subtle:  rgba(0, 0, 0, 0.06);
  --border-strong:  rgba(0, 0, 0, 0.12);
  --border-focus:   rgba(56, 189, 248, 0.5);

  --text-primary:   #1a1d21;
  --text-secondary: #5f6368;
  --text-tertiary:  #9aa0a6;

  --accent:         #0284c7;
  --accent-strong:  #0369a1;
  --accent-soft:    rgba(2, 132, 199, 0.10);

  --shadow-card:    0 1px 2px rgba(0, 0, 0, 0.04), 0 0 0 1px var(--border-subtle);
  --shadow-hover:   0 8px 24px -8px rgba(0, 0, 0, 0.18);
  --shadow-strong:  0 16px 40px -12px rgba(0, 0, 0, 0.24);
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font: 14px/1.45 var(--font-stack);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

body {
  background-image:
    radial-gradient(1200px 800px at 20% 0%, var(--accent-soft), transparent 60%),
    radial-gradient(1000px 600px at 90% 100%, rgba(167, 139, 250, 0.06), transparent 60%);
  background-attachment: fixed;
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

button {
  font: inherit;
  cursor: pointer;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
}

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

input {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  outline: 0;
}

kbd {
  font: 11px/1 var(--font-mono);
  padding: 2px 6px;
  background: var(--bg-elevated-2);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-secondary);
}

::selection {
  background: var(--accent-soft);
  color: var(--accent);
}

/* === Toast === */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 16px;
  background: var(--bg-overlay-strong);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 13px;
  z-index: 100;
  box-shadow: var(--shadow-strong);
  animation: toast-in 0.2s ease;
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
