/* base.css — token warna, huruf, dan komponen dasar WIZPAW.
   Bahasa visual: "batu bulan & jubah ungu" — panel kaca embun terang di siang hari,
   panel tinta malam untuk HUD di atas dunia 3D, aksen ungu sihir + emas lentera (hemat).
   SEMUA modul UI (HUD, misi, minigame, landing) wajib memakai token ini, jangan menulis warna sendiri. */

:root {
  /* tinta & permukaan */
  --ink: #1f1b2e;          /* teks utama */
  --ink-2: #5b5670;        /* teks kedua */
  --ink-3: #9a94ad;        /* teks samar */
  --snow: #f6f4fb;         /* permukaan panel terang */
  --moon: #ebe7f6;         /* permukaan kedua */
  --moon-2: #dcd6ee;       /* garis tebal / isian tab */
  --line: rgba(31, 27, 46, 0.12);
  --line-2: rgba(31, 27, 46, 0.22);

  /* malam (HUD di atas dunia) */
  --night: rgba(22, 19, 38, 0.82);
  --night-solid: #171427;
  --night-2: #241f3b;
  --night-ink: #f3f0ff;
  --night-ink-2: rgba(243, 240, 255, 0.66);
  --night-line: rgba(243, 240, 255, 0.14);

  /* aksen */
  --violet: #6b4fd8;       /* tombol utama, sihir */
  --violet-deep: #4a33a8;
  --violet-light: #a996ff;
  --violet-wash: #ece7ff;
  --lantern: #f4b740;      /* emas lentera — untuk Marks, hadiah, sorotan kecil saja */
  --lantern-deep: #c98a12;
  --mint: #5fd3b0;         /* status live / berhasil */
  --ember: #d9573b;        /* bahaya / gagal */
  --pine: #2f6b57;

  /* jubah (dipakai pembuat avatar & NPC) */
  --robe-violet: #6b4fd8;
  --robe-midnight: #2b3a67;
  --robe-moss: #4e7d4a;
  --robe-ember: #c4553a;
  --robe-sky: #4d9de0;
  --robe-plum: #8e3f7e;

  /* huruf */
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;   /* judul: serif lembut agak "magis" */
  --font-ui: 'Nunito', ui-rounded, system-ui, -apple-system, 'Segoe UI', sans-serif; /* UI: bulat ramah */
  --font-mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;            /* angka, jam, alamat */

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --shadow: 0 1px 2px rgba(31, 27, 46, 0.08), 0 12px 32px -12px rgba(31, 27, 46, 0.35);
  --shadow-night: 0 10px 30px -10px rgba(0, 0, 0, 0.55);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--night-solid);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.display { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; }

/* ---------- tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: var(--r);
  border: 1px solid transparent; cursor: pointer; user-select: none;
  font-weight: 800; font-size: 15px; letter-spacing: 0.005em;
  transition: transform .12s var(--ease), background .15s, box-shadow .15s, border-color .15s;
}
.btn:active { transform: translateY(1px) scale(0.985); }
.btn:focus-visible { outline: 2px solid var(--violet-light); outline-offset: 2px; }
.btn-primary { background: var(--violet); color: #fff; box-shadow: inset 0 -2px 0 rgba(0,0,0,.18), 0 6px 18px -8px rgba(107,79,216,.8); }
.btn-primary:hover { background: #7a5ee6; }
.btn-gold { background: var(--lantern); color: #2b1d00; box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); }
.btn-ghost { background: var(--snow); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--violet-light); }
.btn-night { background: var(--night); color: var(--night-ink); border-color: var(--night-line); backdrop-filter: blur(8px); }
.btn-night:hover { border-color: rgba(169,150,255,.5); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-icon { width: 42px; padding: 0; }

/* ---------- panel ---------- */
.panel { background: var(--snow); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.panel-night { background: var(--night); color: var(--night-ink); border: 1px solid var(--night-line); border-radius: var(--r-lg); box-shadow: var(--shadow-night); backdrop-filter: blur(10px); }

/* ---------- chip / pil ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.chip-night { background: var(--night); color: var(--night-ink); border: 1px solid var(--night-line); backdrop-filter: blur(8px); }
.chip-violet { background: var(--violet-wash); color: var(--violet-deep); }
.chip-gold { background: rgba(244,183,64,.16); color: var(--lantern); border: 1px solid rgba(244,183,64,.35); }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(95,211,176,.22); }

/* tombol keyboard */
.key { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px;
  background: var(--violet); color: #fff; font-family: var(--font-mono); font-size: 11px; font-weight: 500; box-shadow: inset 0 -2px 0 rgba(0,0,0,.25); }

@media (prefers-reduced-motion: reduce) { * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; } }
