@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Plus+Jakarta+Sans:wght@400;600;700;800&display=swap');

:root {
  --ocean: #0e7c86;
  --ocean-deep: #06313a;
  --coral: #ff6b4a;
  --gold: #ffc845;
  --biru: #1e88e5;
  --merah: #e53935;
  --ink: #0f172a;
  --paper: #fff8ec;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(3, 40, 48, 0.25);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 0%, #15909b, #06313a 70%);
  color: var(--paper);
}

h1, h2, .brand, .btn, .tag { font-family: 'Fredoka', sans-serif; }
h1, h2 { margin: 0 0 12px; }
.hidden { display: none !important; }
.err { color: #b91c1c; font-weight: 700; min-height: 1.2em; }

.btn {
  border: 0; border-radius: 999px; padding: 12px 20px;
  font-weight: 700; font-size: 16px; cursor: pointer;
  background: var(--gold); color: var(--ink);
}
.btn.primary { background: var(--coral); color: #fff; }
.btn.ghost { background: transparent; color: var(--paper); border: 2px solid rgba(255, 248, 236, 0.5); }
.btn.small { padding: 6px 12px; font-size: 14px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.panel {
  background: #fff; color: var(--ink);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px; max-width: 520px; margin: 20px auto;
}
.panel label { display: block; font-weight: 700; margin: 10px 0; }
.panel input[type=text], .panel input[type=password] {
  width: 100%; padding: 12px; margin-top: 6px; font-size: 16px;
  border: 2px solid #cbd5e1; border-radius: 12px;
}

/* ---- Pemain (play.html) ---- */
.page-play { padding: 12px; }
.team-pick { display: flex; gap: 10px; margin: 10px 0 16px; }
.team-btn {
  flex: 1; padding: 14px; border-radius: 14px; border: 3px solid transparent;
  font-weight: 700; font-size: 16px; color: #fff; cursor: pointer;
  font-family: 'Fredoka', sans-serif;
}
.team-btn.biru { background: var(--biru); }
.team-btn.merah { background: var(--merah); }
.team-btn.active { border-color: var(--gold); transform: scale(1.03); }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.tag { padding: 6px 12px; border-radius: 999px; color: #fff; font-weight: 700; background: var(--ocean); }
.tag.biru { background: var(--biru); }
.tag.merah { background: var(--merah); }
.status { color: #475569; font-weight: 600; }
.q { font-size: 22px; line-height: 1.35; }
.opts button.opt {
  display: flex; gap: 10px; align-items: center; width: 100%;
  padding: 14px; margin: 8px 0; border-radius: 14px;
  border: 2px solid #cbd5e1; background: #fff; color: var(--ink);
  font-size: 16px; text-align: left; cursor: pointer;
}
.opt:disabled { cursor: default; }
.opt.wrong { border-color: var(--merah); background: #ffe9e5; animation: shake 0.35s; }
.opt .badge, .abadge {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%;
  background: var(--ocean); color: #fff; display: grid; place-items: center; font-weight: 800;
}
.feedback { font-weight: 700; min-height: 1.4em; color: var(--ocean-deep); }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-6px)} 75%{transform:translateX(6px)} }

/* ---- Layar guru (display.html) : split-stage tanpa overlap ---- */
.page-display { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.hud {
  display: flex; align-items: center; gap: 16px; padding: 12px 18px;
  background: rgba(3, 40, 48, 0.6); flex-wrap: wrap;
}
.brand { font-size: 22px; font-weight: 700; color: var(--gold); white-space: nowrap; }
.lanes-hud { display: flex; gap: 14px; flex: 1; min-width: 260px; }
.hud-team { display: flex; align-items: center; gap: 8px; flex: 1; font-weight: 700; }
.hud-team.biru .bar i { background: #64b5f6; }
.hud-team.merah .bar i { background: #ff8a80; }
.bar { height: 12px; background: rgba(255, 255, 255, 0.2); border-radius: 99px; overflow: hidden; flex: 1; min-width: 100px; }
.bar i { display: block; height: 100%; width: 0; transition: width 0.6s; background: var(--gold); }
.split { flex: 1; display: grid; grid-template-columns: 1fr 360px; min-height: 0; }
.split.q-hidden { grid-template-columns: 1fr 0; }
.stage-viewport { min-height: 0; min-width: 0; position: relative; overflow: hidden; }
.q-panel { background: var(--paper); color: var(--ink); padding: 22px; overflow: auto; min-width: 0; }
.q-hidden .q-panel { padding: 0; overflow: hidden; }
.round { font-weight: 700; color: var(--coral); margin: 0 0 6px; }
.display-opts { list-style: none; padding: 0; margin: 14px 0; }
.display-opts li { display: flex; gap: 10px; align-items: center; padding: 12px; margin: 8px 0; background: #fff; border-radius: 12px; font-size: 18px; }
.info { color: #475569; font-size: 14px; }
@media (max-width: 820px) {
  .page-display { height: auto; min-height: 100vh; overflow: auto; }
  .split { grid-template-columns: 1fr; grid-template-rows: 60vh auto; }
  .split.q-hidden { grid-template-rows: 60vh 0; }
}

/* ---- Admin (admin.html) : full-width ---- */
.page-admin { padding: 16px; }
.page-admin .panel { max-width: 520px; }
.page-admin main { width: 100%; max-width: none; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs .btn.active { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.qcard { background: #fff; color: var(--ink); border-radius: 14px; padding: 14px; margin: 12px 0; width: 100%; }
.qcard textarea {
  width: 100%; padding: 10px; font-size: 15px; border: 2px solid #cbd5e1; border-radius: 10px; margin-top: 6px; font-family: inherit;
}
.opt-row { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.opt-row input[type=text] { flex: 1; padding: 10px; font-size: 15px; border: 2px solid #cbd5e1; border-radius: 10px; }
.opt-row .radio { font-weight: 600; margin: 0; white-space: nowrap; }
.qcard .btn.small { background: #fde68a; color: var(--ink); }
.report-wrap { overflow-x: auto; background: #fff; border-radius: 14px; }
table { width: 100%; border-collapse: collapse; background: #fff; color: #0f172a; }
th, td { padding: 8px 10px; border-bottom: 1px solid #e2e8f0; text-align: left; font-size: 14px; color: #0f172a; }
th { background: #e0f2f1; }
#scoreTxt { font-weight: 700; margin: 6px 0; }
