:root {
  --bg: #f4f6fa;
  --bg-2: #eaeef5;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --border: #e2e7ef;
  --text: #0e1726;
  --text-2: #4a5568;
  --text-3: #8592a6;
  --accent: #0f9d8a;
  --accent-2: #2563eb;
  --accent-soft: rgba(15, 157, 138, 0.12);
  --gold: #c98a1b;
  --danger: #d64545;
  --good: #16a34a;
  --shadow: 0 1px 2px rgba(14, 23, 38, 0.06), 0 8px 24px rgba(14, 23, 38, 0.06);
  --shadow-lg: 0 24px 60px rgba(14, 23, 38, 0.18);
  --radius: 14px;
  --font: "Segoe UI Variable", "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0f1a;
    --bg-2: #0e1524;
    --surface: #121a2b;
    --surface-2: #172036;
    --border: #22304a;
    --text: #e8edf6;
    --text-2: #a9b5c9;
    --text-3: #6f7d95;
    --accent: #2dd4bf;
    --accent-2: #60a5fa;
    --accent-soft: rgba(45, 212, 191, 0.12);
    --gold: #f5b84b;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0a0f1a;
  --bg-2: #0e1524;
  --surface: #121a2b;
  --surface-2: #172036;
  --border: #22304a;
  --text: #e8edf6;
  --text-2: #a9b5c9;
  --text-3: #6f7d95;
  --accent: #2dd4bf;
  --accent-2: #60a5fa;
  --accent-soft: rgba(45, 212, 191, 0.12);
  --gold: #f5b84b;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-weight: 600;
  transition: transform 0.15s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: scale(0.97); }
.btn-primary {
  border: 0; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px rgba(15, 157, 138, 0.3);
}
.btn-primary:hover { box-shadow: 0 10px 26px rgba(37, 99, 235, 0.35); }
.btn:disabled { opacity: 0.6; cursor: default; }

.input {
  width: 100%; height: 42px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-2);
  outline: none; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--surface); }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}
