/* Tarik Tambang Kuis Estafet — tema HUT RI (merah putih) */

:root {
  --merah: #e11d2e;
  --merah-terang: #ff3b4e;
  --merah-gelap: #8f0f1c;
  --putih: #ffffff;
  --krem: #f5efe6;
  --emas: #ffc53d;
  --emas-gelap: #b8860b;
  --bg-1: #1a0a0e;
  --bg-2: #0b0407;
  --panel: rgba(255, 255, 255, 0.06);
  --garis: rgba(255, 255, 255, 0.14);
  --teks: #fff6f6;
  --teks-redup: rgba(255, 246, 246, 0.6);
  --tali: #c9a227;
  --font: "Segoe UI", "Inter", system-ui, -apple-system, sans-serif;

  /* Tema terang mengikuti poster Lomba 17-AN. Font tebal memakai Arial Black /
     Segoe UI Black yang sudah ada di Windows — tidak perlu unduh font apa pun. */
  --krem: #f7f0e6;
  --kartu: #fffbf3;
  --tinta: #2a1a1e;
  --navy: #1b2a4a;
  --font-tebal: "Arial Black", "Segoe UI Black", "Arial Bold", Impact, var(--font);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  font-family: var(--font);
  color: var(--teks);
  background: radial-gradient(ellipse at 50% -10%, #35101a 0%, var(--bg-1) 45%, var(--bg-2) 100%);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* --- ornamen: umbul-umbul bendera segitiga --------------------------- */

.umbul {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 26px;
  display: flex;
  z-index: 60;
  pointer-events: none;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.55));
}

.umbul::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--merah), var(--putih), var(--merah));
}

.umbul i {
  flex: 1;
  height: 100%;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: var(--merah);
}

.umbul i:nth-child(even) {
  background: var(--putih);
}

/* --- pita nama divisi (mengikuti pita "DIV APR" di poster) ------------ */

.pita {
  position: relative;
  display: inline-block;
  padding: 0.42em 1.6em;
  background: var(--merah);
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

/* ujung pita yang terlipat ke belakang, kiri & kanan */
.pita::before,
.pita::after {
  content: "";
  position: absolute;
  top: 0.42em;
  bottom: -0.42em;
  width: 0.85em;
  background: var(--merah-gelap);
  z-index: -1;
}

.pita::before {
  left: -0.7em;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.pita::after {
  right: -0.7em;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

/* takik segitiga di kedua ujung pita */
.pita i {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0.9em;
  background: var(--merah);
}

.pita i:first-child {
  left: -0.88em;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 45% 50%);
}

.pita i:last-child {
  right: -0.88em;
  clip-path: polygon(0 0, 100% 0, 55% 50%, 100% 100%, 0 100%);
}

/* --- layar pilih lomba / kunci operator -------------------------------- */

.pilih-game {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: auto;
  background: var(--krem);
  background-image: url("/aset/latar.jpg");
  background-size: cover;
  background-position: center;
}

.pilih-kotak {
  width: min(440px, 100%);
  padding: 26px 24px 22px;
  border-radius: 22px;
  background: var(--kartu);
  border: 4px solid var(--merah);
  box-shadow: 0 10px 0 rgba(176, 21, 35, 0.24);
  text-align: center;
  color: var(--navy);
  animation: naik 0.3s ease;
}

.pilih-kotak h2 {
  font-family: var(--font-tebal);
  font-size: 22px;
  letter-spacing: 0.14em;
  color: var(--merah);
  margin-bottom: 8px;
}

.pilih-kotak p {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  opacity: 0.75;
  margin-bottom: 16px;
}

.pilih-daftar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.pilih-daftar button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 14px;
  background: #fff;
  border: 3px solid rgba(27, 42, 74, 0.16);
  box-shadow: 0 5px 0 rgba(27, 42, 74, 0.12);
  color: var(--navy);
  font-size: 15px;
  font-weight: 800;
  transition: transform 0.1s, border-color 0.15s, box-shadow 0.1s;
}

.pilih-daftar button:hover {
  border-color: var(--merah);
  transform: translateY(-2px);
  box-shadow: 0 7px 0 rgba(27, 42, 74, 0.14);
}

.pilih-daftar button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(27, 42, 74, 0.12);
}

.pilih-daftar button span {
  font-family: var(--font-tebal);
  font-size: 13px;
  letter-spacing: 0.14em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--merah);
  color: #fff;
}

.pilih-kosong {
  padding: 14px;
  border-radius: 12px;
  background: rgba(27, 42, 74, 0.06);
  font-size: 13px;
}

.pilih-kode label {
  display: block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.2em;
  opacity: 0.6;
  margin-bottom: 6px;
}

.pilih-kode > div {
  display: flex;
  gap: 8px;
}

.pilih-kode input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 3px solid rgba(27, 42, 74, 0.18);
  background: #fff;
  color: var(--navy);
  font-family: var(--font-tebal);
  font-size: 18px;
  letter-spacing: 0.22em;
  text-align: center;
}

.pilih-kode input:focus {
  outline: none;
  border-color: var(--merah);
}

.pilih-kode button {
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--merah);
  color: #fff;
  font-family: var(--font-tebal);
  font-size: 14px;
  letter-spacing: 0.1em;
  box-shadow: 0 5px 0 rgba(176, 21, 35, 0.4);
}

.pilih-kode button:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 rgba(176, 21, 35, 0.4);
}

.pilih-kode em {
  display: block;
  margin-top: 8px;
  min-height: 16px;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  color: var(--merah);
}

.pilih-baru {
  display: inline-block;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--navy);
  opacity: 0.65;
}

/* --- utilitas --------------------------------------------------------- */

.tumpuk {
  display: flex;
  flex-direction: column;
}

.pusat {
  display: flex;
  align-items: center;
  justify-content: center;
}

.chip {
  display: inline-block;
  padding: 0.25em 0.85em;
  border-radius: 999px;
  font-size: 0.72em;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--panel);
  border: 1px solid var(--garis);
  color: var(--teks-redup);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  color: inherit;
}

button:disabled {
  cursor: not-allowed;
}

/* --- animasi bersama --------------------------------------------------- */

@keyframes denyut {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes goyang {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(9px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(4px); }
}

@keyframes kilau {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 197, 61, 0.6); }
  50% { box-shadow: 0 0 40px 8px rgba(255, 197, 61, 0.45); }
}

@keyframes naik {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes berkedip {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
