@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=JetBrains+Mono:wght@600;800&display=swap");

:root {
  --bg: #0b0f1a;
  --bg2: #121a2b;
  --panel: #182238;
  --panel2: #1f2b45;
  --line: #2b3a5c;
  --text: #eef2ff;
  --muted: #94a3c4;
  --accent: #7c5cff;
  --accent2: #22d3ee;
  --ok: #22c55e;
  --bad: #ef4444;
  --warn: #f59e0b;
  --opt-a: #e11d48;
  --opt-b: #2563eb;
  --opt-c: #d97706;
  --opt-d: #16a34a;
  --radius: 16px;
  --mono: "JetBrains Mono", "Fira Code", Consolas, "Courier New", monospace;
  --sans: "Fredoka", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(1200px 600px at 20% -10%, #24184f 0%, transparent 60%),
              radial-gradient(900px 500px at 100% 100%, #0e3a4a 0%, transparent 55%),
              var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; }
a { color: var(--accent2); }

.screen { display: none; min-height: 100vh; padding: 20px; }
.screen.active { display: flex; flex-direction: column; }
.center { align-items: center; justify-content: center; text-align: center; }

.brand {
  font-weight: 900; letter-spacing: 2px; text-transform: uppercase;
  background: linear-gradient(90deg, #a78bfa, #22d3ee);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-big { font-size: clamp(38px, 8vw, 84px); line-height: 1; }
.brand-small { font-size: 16px; }

.card {
  background: rgba(24, 34, 56, .85); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; backdrop-filter: blur(6px);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 12px; border: 0; cursor: pointer;
  font-size: 16px; font-weight: 700; color: #fff; background: var(--panel2);
  transition: transform .08s, filter .15s; user-select: none; -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--accent), #5b3df5); box-shadow: 0 8px 24px rgba(124, 92, 255, .35); }
.btn-accent { background: linear-gradient(135deg, var(--accent2), #0891b2); box-shadow: 0 8px 24px rgba(34, 211, 238, .3); color: #04121a; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.btn-lg { font-size: 20px; padding: 18px 36px; }
.btn-block { width: 100%; }

.input {
  width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg2); color: var(--text); font-size: 18px; outline: none;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 92, 255, .25); }
select.input { appearance: none; }
label.field { display: block; text-align: left; margin-bottom: 14px; }
label.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; }

.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

pre.code {
  font-family: var(--mono); background: #0a0e18; border: 1px solid var(--line);
  border-left: 4px solid var(--accent2); border-radius: 12px; padding: 16px 20px;
  margin: 0; text-align: left; overflow-x: auto; white-space: pre; line-height: 1.5; color: #d8e1ff;
}

/* Warna & bentuk opsi jawaban */
.opt { --c: var(--opt-a); }
.opt[data-i="0"] { --c: var(--opt-a); }
.opt[data-i="1"] { --c: var(--opt-b); }
.opt[data-i="2"] { --c: var(--opt-c); }
.opt[data-i="3"] { --c: var(--opt-d); }
.opt .shape { font-size: 1.3em; line-height: 1; }

.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: var(--panel2); border: 1px solid var(--line); font-weight: 600;
}
.chip.off { opacity: .4; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #fff; color: #111; padding: 12px 18px; border-radius: 12px; font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4); z-index: 99; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.toast.show { opacity: 1; }
.toast.err { background: var(--bad); color: #fff; }

@keyframes pop { 0% { transform: scale(.7); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes fadeUp { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.pop { animation: pop .35s ease-out both; }
.fade-up { animation: fadeUp .35s ease-out both; }
