@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

* {
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

h1, h2, h3, h4, .btn, .poin-pill, .kode-besar {
  font-family: 'Fredoka', 'Plus Jakarta Sans', sans-serif;
  letter-spacing: 0.3px;
}

body {
  margin: 0;
  padding: 72px 16px 60px;
  min-height: 100vh;
  color: #0f172a;
  background-color: #7dd3fc;
  background-image:
    linear-gradient(180deg, rgba(14, 165, 233, 0.14) 0%, rgba(15, 23, 42, 0.18) 100%),
    url('bg-gunung.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.container {
  max-width: 820px;
  margin: 0 auto;
}

/* Tombol Garis Tiga (☰) di Pojok Kiri Atas */
.btn-hamburger {
  position: fixed;
  top: 14px;
  left: 16px;
  z-index: 110;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  padding: 8px 16px;
  font-family: 'Fredoka', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #064e3b;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16);
  transition: transform 0.15s, background 0.15s;
}

.btn-hamburger:hover {
  transform: translateY(-2px);
  background: #ffffff;
}

/* Overlay & Drawer Menu Samping */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
  z-index: 120;
}

.drawer-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  max-width: 82vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  padding: 20px 18px;
  z-index: 130;
  box-shadow: 10px 0 35px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: geserMasuk 0.22s ease-out;
}

@keyframes geserMasuk {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 6px;
}

.drawer-header h3 {
  margin: 0;
  color: #064e3b;
  font-size: 20px;
}

.btn-tutup-drawer {
  background: #f1f5f9;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 800;
  color: #334155;
  cursor: pointer;
}

.drawer-item {
  width: 100%;
  text-align: left;
  padding: 13px 16px;
  border-radius: 14px;
  border: 2px solid transparent;
  font-family: 'Fredoka', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s;
}

.drawer-item:hover:not(:disabled) {
  transform: translateX(4px);
}

/* Pojok Kanan Atas: Poin + Tombol Musik */
.floating-hud {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
}

.poin-pill {
  position: relative;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: 0 5px 15px rgba(234, 88, 12, 0.35);
  border: 2px solid #fef3c7;
}

.poin-delta {
  position: absolute;
  right: 10px;
  top: 40px;
  font-size: 15px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 10px;
  pointer-events: none;
  animation: melayangPoin 1.1s ease-out forwards;
}

.delta-naik { background: #10b981; color: #ffffff; }
.delta-turun { background: #ef4444; color: #ffffff; }

@keyframes melayangPoin {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-28px) scale(1.15); }
}

.btn-audio {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: 'Fredoka', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
}

/* Header & Judul */
.hero-header {
  text-align: center;
  padding: 6px 16px 18px;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.88);
  color: #065f46;
  font-weight: 700;
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.hero-header h1 {
  margin: 0;
  font-size: 40px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 4px 18px rgba(6, 78, 59, 0.55), 0 2px 0 #065f46;
}

.hero-header p {
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(15, 23, 42, 0.6);
}

/* Kartu Kaca Estetik */
.card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.hidden { display: none !important; }

label {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}

input, select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid #cbd5e1;
  background-color: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  margin-top: 6px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18);
}

/* Tombol 3D Gaya Game */
.btn {
  padding: 12px 20px;
  border: none;
  border-radius: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 8px;
  margin-top: 8px;
  font-size: 15px;
  transition: transform 0.1s, box-shadow 0.1s;
}

.btn:active:not(:disabled) {
  transform: translateY(3px);
}

.btn-hijau { background: linear-gradient(135deg, #22c55e, #15803d); color: #ffffff; box-shadow: 0 4px 0 #14532d; }
.btn-biru { background: linear-gradient(135deg, #38bdf8, #0284c7); color: #ffffff; box-shadow: 0 4px 0 #075985; }
.btn-kuning { background: linear-gradient(135deg, #fbbf24, #d97706); color: #ffffff; box-shadow: 0 4px 0 #92400e; }
.btn-merah { background: linear-gradient(135deg, #f87171, #dc2626); color: #ffffff; box-shadow: 0 4px 0 #991b1b; }
.btn-ungu { background: linear-gradient(135deg, #a78bfa, #7c3aed); color: #ffffff; box-shadow: 0 4px 0 #5b21b6; }
.btn-teal { background: linear-gradient(135deg, #2dd4bf, #0d9488); color: #ffffff; box-shadow: 0 4px 0 #115e59; }
.btn-abu { background: #475569; color: #ffffff; box-shadow: 0 4px 0 #1e293b; }
.btn-kunci { background: #cbd5e1; color: #64748b; box-shadow: 0 4px 0 #94a3b8; cursor: not-allowed; }

/* Grid 2 Tombol Game Utama di Beranda */
.menu-utama-game {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.menu-utama-game .btn {
  width: 100%;
  margin: 0;
  padding: 18px 16px;
  font-size: 17px;
  border-radius: 18px;
}

/* Kotak Kode Bermain */
.kode-box {
  background: rgba(236, 253, 245, 0.9);
  border: 2px dashed #10b981;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.kode-besar {
  display: inline-block;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #065f46;
  background: #d1fae5;
  padding: 6px 18px;
  border-radius: 12px;
}

/* Canvas Gunung & Pendaki */
.canvas-gunung-wrap {
  width: 100%;
  height: 310px;
  border-radius: 18px;
  overflow: hidden;
  border: 3px solid #ffffff;
  margin-bottom: 14px;
  background: #0ea5e9;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
}

#canvasGunung, #canvasGunungGuru {
  width: 100%;
  height: 100%;
  display: block;
}

/* Jalur 4 Pos */
.jalur-pos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.pos-item {
  text-align: center;
  padding: 9px 6px;
  border-radius: 12px;
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}

.pos-aktif { border-color: #f59e0b; background: #fef3c7; color: #92400e; }
.pos-selesai { border-color: #10b981; background: #d1fae5; color: #065f46; }

/* Opsi Jawaban */
.opsi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.btn-opsi {
  padding: 14px 16px;
  text-align: left;
  border-radius: 14px;
  border: 2px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.15s;
}

.btn-opsi:hover:not(:disabled) { border-color: #0ea5e9; background: #e0f2fe; transform: translateY(-2px); }
.opsi-benar { background: #d1fae5 !important; border-color: #10b981 !important; color: #065f46 !important; }
.opsi-salah { background: #fee2e2 !important; border-color: #ef4444 !important; color: #991b1b !important; }

.stat-bar {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #065f46;
  font-weight: 800;
}

/* Materi, PDF, Cara Bermain, Profil */
.rumus-box {
  background: #f0f9ff;
  border-left: 5px solid #0ea5e9;
  padding: 12px 14px;
  border-radius: 12px;
  margin: 10px 0;
  font-size: 14px;
}

.pdf-box {
  margin-top: 14px;
  padding: 14px;
  background: #fefce8;
  border: 2px solid #fde047;
  border-radius: 14px;
}

.pdf-frame {
  width: 100%;
  height: 360px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  margin-top: 10px;
  background: #ffffff;
}

.aturan-box {
  background: #f8fafc;
  border-left: 5px solid #10b981;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.65;
}

.aturan-box h4 {
  margin: 0 0 6px 0;
  color: #065f46;
  font-size: 16px;
}

.aturan-box ul { margin: 0; padding-left: 18px; }

.profil-header {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #ecfdf5, #e0f2fe);
  border: 2px solid #a7f3d0;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}

.profil-avatar {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #0ea5e9);
  color: #ffffff;
  font-size: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.3);
}

.tabel-profil {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 14px;
}

.tabel-profil td {
  padding: 9px 6px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

.tabel-profil td:first-child {
  font-weight: 700;
  color: #334155;
  width: 175px;
}

.daftar-pendidikan {
  margin: 6px 0 0;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.85;
}

/* Podium Juara 1, 2, 3 */
.podium-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-items: end;
  margin: 16px 0;
}

.podium-box {
  text-align: center;
  border-radius: 16px 16px 8px 8px;
  padding: 12px 8px;
  color: #0f172a;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.14);
}

.juara-1 { background: linear-gradient(180deg, #fde047, #eab308); min-height: 132px; }
.juara-2 { background: linear-gradient(180deg, #e2e8f0, #94a3b8); min-height: 105px; }
.juara-3 { background: linear-gradient(180deg, #fdba74, #ea580c); min-height: 85px; }

.daftar-skor { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }

.baris-skor {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
}

/* Tampilan Layar Finish Bertema Puncak Gunung */
.hasil-hero-gunung {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  padding: 28px 20px 22px;
  margin-bottom: 18px;
  background-image:
    linear-gradient(180deg, rgba(6, 78, 59, 0.25) 0%, rgba(6, 78, 59, 0.82) 100%),
    url('peta-gunung.jpg');
  background-size: cover;
  background-position: center;
  border: 3px solid #fde047;
  box-shadow: 0 12px 28px rgba(6, 78, 59, 0.25);
  color: #ffffff;
}

.lencana-puncak {
  width: 68px;
  height: 68px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  border: 4px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.45);
  animation: melayangPiala 2.4s ease-in-out infinite;
}

@keyframes melayangPiala {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.hasil-hero-gunung h2 {
  margin: 0;
  font-size: 26px;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.hasil-sub-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  font-size: 13px;
  font-weight: 700;
  color: #fef08a;
}

/* 4 Kartu Statistik Hasil */
.hasil-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.stat-kotak {
  background: #ffffff;
  border-radius: 16px;
  padding: 12px 10px;
  border: 2px solid #e2e8f0;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
}

.stat-kotak .stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.4px;
}

.stat-kotak .stat-nilai {
  font-family: 'Fredoka', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin-top: 3px;
}

.stat-emas { border-color: #fde047; background: #fefce8; }
.stat-emas .stat-nilai { color: #d97706; }
.stat-hijau { border-color: #6ee7b7; background: #ecfdf5; }
.stat-hijau .stat-nilai { color: #059669; }
.stat-biru { border-color: #7dd3fc; background: #f0f9ff; }
.stat-biru .stat-nilai { color: #0284c7; }
.stat-ungu { border-color: #c4b5fd; background: #f5f3ff; }
.stat-ungu .stat-nilai { color: #7c3aed; }

/* Kartu Sertifikat Apresiasi Berbingkai Emas */
.apresiasi-card {
  background: linear-gradient(135deg, #fffbeb 0%, #ecfdf5 100%);
  border: 3px double #eab308;
  border-radius: 18px;
  padding: 16px 18px;
  margin-top: 8px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(234, 179, 8, 0.14);
}

/* Upgrade Podium Juara 1, 2, 3 Jadi Panggung 3D Meriah */
.podium-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: end;
  margin: 18px 0;
  padding: 44px 16px 14px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 15%, rgba(254, 240, 138, 0.42) 0%, rgba(16, 185, 129, 0.14) 55%, rgba(6, 78, 59, 0.22) 100%),
    linear-gradient(180deg, #e0f2fe 0%, #dcfce7 100%);
  border: 2px solid #86efac;
  box-shadow: inset 0 -10px 0 #15803d, 0 10px 24px rgba(6, 78, 59, 0.14);
}

.podium-box {
  position: relative;
  text-align: center;
  border-radius: 18px 18px 6px 6px;
  padding: 16px 10px 36px;
  color: #0f172a;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.45;
  overflow: visible;
  transition: transform 0.2s;
}

.podium-box:hover {
  transform: translateY(-4px);
}

/* Mahkota & Bintang Melayang di Atas Podium */
.juara-1::before {
  content: "👑";
  position: absolute;
  top: -36px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 32px;
  filter: drop-shadow(0 4px 6px rgba(217, 119, 6, 0.45));
  animation: melayangMahkota 2.2s ease-in-out infinite;
}

.juara-2::before {
  content: "✨";
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 20px;
}

.juara-3::before {
  content: "⭐";
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 20px;
}

@keyframes melayangMahkota {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}

/* Angka Besar 1, 2, 3 di Bagian Bawah Tiang Podium */
.juara-1::after, .juara-2::after, .juara-3::after {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Fredoka', sans-serif;
  font-size: 30px;
  font-weight: 700;
  opacity: 0.24;
  line-height: 1;
}

.juara-1::after { content: "1"; color: #713f12; }
.juara-2::after { content: "2"; color: #1e293b; }
.juara-3::after { content: "3"; color: #7c2d12; }

/* Warna 3D Emas, Perak, Perunggu dengan Kilau */
.juara-1 {
  background: linear-gradient(160deg, #fef08a 0%, #facc15 45%, #d97706 100%);
  min-height: 158px;
  border-top: 5px solid #fef9c3;
  box-shadow: 0 8px 0 #b45309, 0 14px 24px rgba(217, 119, 6, 0.35);
}

.juara-2 {
  background: linear-gradient(160deg, #f8fafc 0%, #cbd5e1 55%, #94a3b8 100%);
  min-height: 126px;
  border-top: 5px solid #ffffff;
  box-shadow: 0 8px 0 #64748b, 0 10px 18px rgba(71, 85, 105, 0.25);
}

.juara-3 {
  background: linear-gradient(160deg, #fed7aa 0%, #fb923c 50%, #c2410c 100%);
  min-height: 104px;
  border-top: 5px solid #ffedd5;
  box-shadow: 0 8px 0 #9a3412, 0 10px 18px rgba(194, 65, 12, 0.28);
}