/* ========================================
   E-TING - Edukasi Interaktif Tenun dan Hukum
   Main Stylesheet
   ======================================== */

/* ---------- CSS Variables ---------- */
:root {
    --color-primary: #00272A;
    --color-primary-light: #013a3e;
    --color-primary-dark: #001a1c;
    --color-gold: #ff8c1a;
    --color-gold-light: #ffb547;
    --color-gold-dark: #e6730d;
    --color-cream: #f5f0e0;
    --color-cream-light: #faf7ef;
    --color-cream-dark: #e8dfc8;
    --color-green: #2d8f6f;
    --color-green-light: #3aab85;
    --color-red: #d94f4f;
    --color-purple: #7b5ea7;
    --color-blue: #4a7fb5;
    --color-orange: #e8873a;
    --color-text: #1a1a1a;
    --color-text-secondary: #555;
    --color-text-muted: #888;
    --color-white: #ffffff;
    --color-border: #e0d8c8;

    --font-family: 'Poppins', 'Fredoka', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);

    --transition: 0.2s ease;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-primary-dark);
    color: var(--color-text);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    border: none;
    cursor: pointer;
    font-family: inherit;
}

select {
    font-family: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* Inline SVG icon — scales with parent font-size */
.material-symbols-rounded {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    vertical-align: middle;
}

.material-symbols-rounded svg {
    width: 1em;
    height: 1em;
    display: block;
}

/* ==========================================
   NAVBAR
   ========================================== */
.navbar {
    background: #00272A;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.navbar-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    height: 80px;
    gap: 24px;
}

/* Logo (clickable → kembali ke beranda) */
.navbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    /* Reset default <a> styling */
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.navbar-logo:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.navbar-logo:active {
    transform: translateY(0);
    opacity: 0.95;
}

.navbar-logo:focus-visible {
    outline: 2px solid #ffd34d;
    outline-offset: 4px;
    border-radius: 6px;
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.logo-separator {
    width: 1.5px;
    height: 42px;
    background: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
    gap: 0;
}

.logo-school {
    font-size: 8.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0;
}

.logo-title {
    font-size: 50px;
    font-weight: 1000;
    color: var(--color-cream);
    letter-spacing: 2px;
    line-height: 1;
    margin-top: -1px;
}

.logo-tagline-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 1px;
}

.logo-tagline-line {
    width: 100%;
    height: 2px;
    background: var(--color-orange);
}

.logo-tagline {
    font-size: 6px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 2.2px;
    text-transform: uppercase;
}

/* Navigation Links */
.navbar-links {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

/* Nav Link - Inset 3D (mendalam/cekung) */
.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(0, 0, 0, 0.2);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.4),
        inset 0 -1px 0 rgba(255, 255, 255, 0.06);
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
}

.nav-link .material-symbols-rounded {
    font-size: 20px;
}

.nav-link:hover {
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    box-shadow:
        inset 0 2px 5px rgba(0, 0, 0, 0.5),
        inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

.nav-link.active {
    background: linear-gradient(180deg, #e6730d 0%, #ff8c1a 100%);
    color: #fff;
    box-shadow:
        inset 0 2px 5px rgba(0, 0, 0, 0.35),
        inset 0 -1px 0 rgba(255, 255, 255, 0.15);
    font-weight: 700;
}

.nav-link.active:hover {
    background: linear-gradient(180deg, #d9680b 0%, #f08416 100%);
}

/* User Profile - Inset 3D (mendalam, konsisten dengan nav-link) */
.navbar-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    cursor: pointer;
    padding: 4px 14px 4px 4px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.2);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.4),
        inset 0 -1px 0 rgba(255, 255, 255, 0.06);
    transition: background 0.2s ease, box-shadow 0.2s ease;
    margin-left: 12px;
}

.navbar-profile:hover {
    background: rgba(0, 0, 0, 0.3);
    box-shadow:
        inset 0 2px 5px rgba(0, 0, 0, 0.5),
        inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.profile-avatar .material-symbols-rounded {
    color: rgba(255, 255, 255, 0.8) !important;
}

.profile-info {
    display: flex;
    flex-direction: column;
}

.profile-greeting {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-white);
}

.profile-school {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.profile-dropdown {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.6);
}

/* Mobile Toggle */
.navbar-toggle {
    display: none;
    background: none;
    padding: 8px;
    border-radius: var(--radius-sm);
}

.navbar-toggle .material-symbols-rounded {
    font-size: 28px;
    color: var(--color-white);
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
    background: url('https://static.wixstatic.com/media/215118_b0fad155339b4178855b1b76d64013e9~mv2.png') center 40% / cover no-repeat;
    background-color: var(--color-primary);
    position: relative;
    overflow: hidden;
    min-height: 600px;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right,
            rgba(15, 36, 36, 0.88) 0%,
            rgba(15, 36, 36, 0.7) 30%,
            rgba(15, 36, 36, 0.35) 55%,
            rgba(15, 36, 36, 0.08) 80%,
            transparent 100%);
    z-index: 1;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(45deg,
            transparent,
            transparent 20px,
            rgba(255, 140, 26, 0.04) 20px,
            rgba(255, 140, 26, 0.04) 22px),
        repeating-linear-gradient(-45deg,
            transparent,
            transparent 20px,
            rgba(255, 140, 26, 0.04) 20px,
            rgba(255, 140, 26, 0.04) 22px);
    pointer-events: none;
    z-index: 2;
}

.hero-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 72px 48px;
    display: flex;
    align-items: center;
    min-height: 600px;
    position: relative;
    z-index: 3;
}

/* Hero Content */
.hero-content {
    color: var(--color-white);
    max-width: 520px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-title {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.hero-title em {
    color: var(--color-gold);
    font-style: italic;
}

.hero-description {
    font-size: 17px;
    opacity: 0.9;
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero-badges {
    display: flex;
    gap: 24px;
    margin-bottom: 28px;
}

.hero-badge {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.badge-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.badge-icon.green {
    background: rgba(45, 143, 111, 0.3);
}

.badge-icon.gold {
    background: rgba(255, 140, 26, 0.3);
}

.badge-icon .material-symbols-rounded {
    font-size: 20px;
    color: var(--color-white);
}

.badge-text strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-white);
}

.badge-text span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
}

/* CTA Button - Game Style (clean) */
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.3px;
    background: linear-gradient(180deg, #ffa336 0%, #ff8c1a 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 0 #cc6a0a;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.hero-cta:hover,
.hero-cta:visited,
.hero-cta:focus {
    color: #fff;
    text-decoration: none;
}

.hero-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 0 #cc6a0a;
}

.hero-cta:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #cc6a0a;
}

.cta-play {
    width: 32px;
    height: 32px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-play .material-symbols-rounded {
    font-size: 20px;
    color: #ff8c1a;
}

.cta-arrow {
    font-size: 20px;
    color: #fff;
}

/* Hero Mascot */
.hero-mascot {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mascot-image {
    width: 280px;
    height: 280px;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.3));
}

.mascot-image svg {
    width: 100%;
    height: 100%;
}

/* Mission Card */
.hero-mission {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.mission-card {
    background: rgba(15, 36, 36, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 140, 26, 0.3);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    color: var(--color-white);
    width: 100%;
    max-width: 280px;
}

.mission-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-gold);
}

.mission-text {
    font-size: 13px;
    opacity: 0.85;
    margin-bottom: 16px;
    line-height: 1.5;
}

.mission-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--color-green);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.progress-count {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-gold);
}

/* ==========================================
   MAIN GAME PAGE - Flappy Bird Style
   ========================================== */
.game-page {
    min-height: calc(100vh - 200px);
    background:
        radial-gradient(ellipse at top, rgba(192, 57, 43, 0.08), transparent 60%),
        var(--color-cream-light);
    padding: 32px 16px 56px;
    position: relative;
    overflow: hidden;
}

.game-page::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.15;
    background-repeat: repeat;
    background-size: 120px 120px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Crect width='120' height='120' fill='none'/%3E%3Cpolygon points='60,42 78,60 60,78 42,60' fill='none' stroke='%23c0392b' stroke-width='1.5'/%3E%3Cpolygon points='60,50 70,60 60,70 50,60' fill='%23e07a1f' opacity='0.5'/%3E%3Ccircle cx='60' cy='60' r='1.5' fill='%23c0392b'/%3E%3C/svg%3E");
}

.game-page-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* ===== Game Header ===== */
.game-header {
    text-align: center;
    margin-bottom: 20px;
}

.game-title {
    font-size: 28px;
    font-weight: 800;
    color: #4a1a08;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 6px;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.08);
}

.game-title .material-symbols-rounded {
    font-size: 32px;
    color: #c0392b;
    background: #fff3df;
    border-radius: 50%;
    padding: 6px;
    box-shadow: 0 3px 0 #c0392b;
}

.game-subtitle {
    color: #6b3410;
    font-size: 14px;
    margin: 0;
}

.game-subtitle b {
    background: #4a1a08;
    color: #f5e6c8;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

/* ===== Bingkai Game Sederhana (Desktop only) ===== */
.game-wood-frame {
    position: relative;
    padding: 0;
}

/* Judul di atas canvas */
.game-wood-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 auto 18px;
    padding: 14px 24px;
    max-width: 900px;
    text-align: center;
    background: linear-gradient(180deg, #fff3df 0%, #f4d35e 100%);
    border: 4px solid #4a1a08;
    border-radius: 16px;
    box-shadow: 0 5px 0 #2a0c04;
}

.game-wood-title h1 {
    font-size: 22px;
    font-weight: 800;
    color: #4a1a08;
    margin: 0;
    line-height: 1.3;
    letter-spacing: 0.3px;
}

.game-wood-title .title-eting {
    color: #c0392b;
    background: #fff;
    padding: 2px 10px;
    border-radius: 8px;
    border: 2px solid #4a1a08;
    display: inline-block;
}

.game-wood-title .title-judol {
    color: #fff;
    background: #8b1818;
    padding: 2px 10px;
    border-radius: 8px;
    border: 2px solid #4a1a08;
    text-decoration: line-through;
    text-decoration-color: #f4d35e;
    text-decoration-thickness: 3px;
    display: inline-block;
}

.game-wood-title-icon {
    font-size: 28px;
    animation: titleBounce 2s ease-in-out infinite;
}

.game-wood-title-icon:last-child {
    animation-delay: 1s;
}

@keyframes titleBounce {

    0%,
    100% {
        transform: translateY(0) rotate(-5deg);
    }

    50% {
        transform: translateY(-5px) rotate(5deg);
    }
}

/* ===== Canvas Wrapper ===== */
.game-canvas-wrapper {
    position: relative;
    background: #87ceeb;
    border: 6px solid #4a1a08;
    border-radius: 18px;
    box-shadow:
        0 10px 0 #2a0c04,
        0 18px 40px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    /* Game dibuat LEBIH TINGGI di desktop (rasio 16:9 → 16:10 area main) */
    aspect-ratio: 1280 / 640;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    cursor: pointer;
}

/* ===== HUD ===== */
.game-hud {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    z-index: 5;
    pointer-events: none;
    flex-wrap: wrap;
}

.hud-item {
    background: rgba(74, 26, 8, 0.85);
    color: #f5e6c8;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.hud-item .material-symbols-rounded {
    font-size: 18px;
}

.hud-score .material-symbols-rounded {
    color: #f4d35e;
}

.hud-level .material-symbols-rounded {
    color: #e07a1f;
}

.hud-coins .material-symbols-rounded {
    color: #f4d35e;
}

.hud-player {
    background: rgba(192, 57, 43, 0.92);
}

.hud-player .material-symbols-rounded {
    color: #f4d35e;
}

/* ===== Input nama pemain ===== */
.game-input {
    width: 100%;
    padding: 12px 16px;
    margin: 4px 0 16px;
    border: 3px solid #4a1a08;
    border-radius: 14px;
    background: #fff;
    color: #4a1a08;
    font-family: 'Poppins', 'Fredoka', sans-serif;
    font-size: 16px;
    font-weight: 600;
    outline: none;
    box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.1);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.game-input::placeholder {
    color: #b5926c;
    font-weight: 500;
}

.game-input:focus {
    border-color: #e07a1f;
    box-shadow:
        inset 0 3px 0 rgba(0, 0, 0, 0.1),
        0 0 0 4px rgba(224, 122, 31, 0.25);
}

/* ===== Countdown 5-4-3-2-1-GO ===== */
.game-countdown {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 20;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
    pointer-events: none;
}

.game-countdown.active {
    display: flex;
}

.countdown-number {
    font-family: 'Poppins', 'Fredoka', sans-serif;
    font-size: 140px;
    font-weight: 800;
    color: #fff3df;
    text-shadow:
        0 0 0 #4a1a08,
        -4px -4px 0 #4a1a08,
        4px -4px 0 #4a1a08,
        -4px 4px 0 #4a1a08,
        4px 4px 0 #4a1a08,
        0 10px 30px rgba(0, 0, 0, 0.6);
    -webkit-text-stroke: 0;
    line-height: 1;
    animation: countdownPop 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.countdown-number.go {
    color: #4ade80;
    font-size: 110px;
    letter-spacing: 3px;
}

.countdown-label {
    margin-top: 14px;
    background: #4a1a08;
    color: #f4d35e;
    padding: 8px 22px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    border: 3px solid #f4d35e;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
    animation: countdownLabelFade 0.5s ease;
}

/* Saat label dikosongkan (mis. ketika GO ditampilkan), sembunyikan box
   coklat-kuning supaya tidak ada "kotak kosong" di bawah teks GO. */
.countdown-label:empty {
    display: none;
}

@keyframes countdownPop {
    0% {
        transform: scale(0.3) rotate(-15deg);
        opacity: 0;
    }

    50% {
        transform: scale(1.15) rotate(5deg);
        opacity: 1;
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes countdownLabelFade {
    from {
        transform: translateY(10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== Ready Hint (hint kecil "Tap/Spasi" setelah countdown) ===== */
.ready-hint {
    position: absolute;
    left: 50%;
    bottom: 18%;
    transform: translateX(-50%);
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(74, 26, 8, 0.88);
    color: #ffe082;
    font-family: 'Poppins', 'Fredoka', sans-serif;
    font-size: 14px;
    letter-spacing: 1px;
    border: 2px solid #f4d35e;
    border-radius: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    z-index: 15;
    pointer-events: none;
    animation: readyHintPulse 1.2s ease-in-out infinite;
}

.ready-hint.active {
    display: inline-flex;
}

.ready-hint .material-symbols-rounded {
    font-size: 20px;
    color: #ffe082;
}

@keyframes readyHintPulse {

    0%,
    100% {
        transform: translateX(-50%) scale(1);
        opacity: 0.92;
    }

    50% {
        transform: translateX(-50%) scale(1.08);
        opacity: 1;
    }
}

/* ===== Overlay (Start/GameOver/Checkpoint) ===== */
.game-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 20px;
    animation: overlayFadeIn 0.3s ease;
}

.game-overlay-hidden {
    display: none;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.overlay-card {
    background: linear-gradient(180deg, #fff8eb 0%, #f5e6c8 100%);
    border: 4px solid #4a1a08;
    border-radius: 18px;
    padding: 28px 24px;
    text-align: center;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 8px 0 #2a0c04, 0 14px 30px rgba(0, 0, 0, 0.5);
    animation: cardPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cardPop {
    0% {
        transform: scale(0.7);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.overlay-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    background: #c0392b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 0 #721818;
}

.overlay-icon .material-symbols-rounded {
    font-size: 36px;
    color: #fff;
}

.overlay-icon-danger {
    background: #8b1818;
    box-shadow: 0 4px 0 #4a0c0c;
}

.overlay-icon-success {
    background: #2e7d4f;
    box-shadow: 0 4px 0 #1a4a2d;
}

.overlay-card h2 {
    margin: 0 0 8px;
    font-size: 24px;
    color: #4a1a08;
    font-weight: 800;
}

.overlay-card p {
    margin: 0 0 16px;
    color: #6b3410;
    font-size: 15px;
    line-height: 1.5;
}

.overlay-card p b {
    color: #c0392b;
    font-size: 18px;
}

.overlay-hint {
    font-style: italic;
    font-size: 13px !important;
}

.overlay-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Game Buttons =====
   Disamakan dengan style .hero-cta di beranda:
   - Tanpa border tebal (border: none) → tampilan lebih clean, bukan chunky
   - Background gradient (untuk primary/revive) atau solid putih (secondary)
   - Box-shadow tipis "drop" 4px untuk efek mengambang halus (bukan timbul tebal)
   - Hover: shadow naik 1px, transform -1px (subtle lift)
   - Active: tekan turun 3px + shadow tipis 1px → "ngeklik" feedback
*/
.game-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 30px;
    font-family: 'Poppins', 'Fredoka', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-btn-primary {
    background: linear-gradient(180deg, #ffa336 0%, #ff8c1a 100%);
    color: #fff;
    box-shadow: 0 4px 0 #cc6a0a;
}

.game-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 0 #cc6a0a;
}

.game-btn-primary:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #cc6a0a;
}

.game-btn-secondary {
    background: linear-gradient(180deg, #ffffff 0%, #f5e6c8 100%);
    color: #4a1a08;
    box-shadow: 0 4px 0 #b9a378;
}

.game-btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 0 #b9a378;
}

.game-btn-secondary:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #b9a378;
}

.game-btn-revive {
    background: linear-gradient(180deg, #3a9a5f 0%, #2e7d4f 100%);
    color: #fff;
    box-shadow: 0 4px 0 #1a4a2d;
}

.game-btn-revive:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 0 #1a4a2d;
}

.game-btn-revive:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #1a4a2d;
}

.game-btn .material-symbols-rounded {
    font-size: 20px;
}

/* ===== Quiz Modal ===== */
.quiz-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
    animation: overlayFadeIn 0.3s ease;
}

.quiz-modal.quiz-modal-active {
    display: flex;
}

.quiz-card {
    background: linear-gradient(180deg, #fff8eb 0%, #f5e6c8 100%);
    border: 5px solid #4a1a08;
    border-radius: 20px;
    padding: 28px 28px 28px 24px;
    /* padding-right ekstra supaya konten tidak ketutup scrollbar */
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    max-height: 90dvh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 10px 0 #2a0c04, 0 18px 40px rgba(0, 0, 0, 0.6);
    animation: cardPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Firefox scrollbar coklat */
    scrollbar-width: thin;
    scrollbar-color: #8b4513 rgba(139, 69, 19, 0.12);
}

/* Scrollbar coklat untuk quiz-card (WebKit) */
.quiz-card::-webkit-scrollbar {
    width: 10px;
}

.quiz-card::-webkit-scrollbar-track {
    background: rgba(139, 69, 19, 0.12);
    border-radius: 10px;
    margin: 6px 0;
}

.quiz-card::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #a0522d 0%, #8b4513 50%, #5a2d0c 100%);
    border-radius: 10px;
    border: 2px solid rgba(139, 69, 19, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 211, 77, 0.3);
}

.quiz-card::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #b5651d 0%, #8b4513 50%, #4a1a08 100%);
}

.quiz-header {
    text-align: center;
    margin-bottom: 18px;
}

.quiz-badge {
    display: inline-block;
    background: #c0392b;
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    box-shadow: 0 2px 0 #721818;
}

.quiz-badge.quiz-badge-coin {
    background: #e07a1f;
    box-shadow: 0 2px 0 #b35c10;
}

.quiz-card h3 {
    margin: 0;
    font-size: 18px;
    color: #4a1a08;
    line-height: 1.4;
    font-weight: 700;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-option {
    background: #fff;
    border: 3px solid #4a1a08;
    border-radius: 14px;
    padding: 12px 16px;
    text-align: left;
    font-family: 'Poppins', 'Fredoka', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #4a1a08;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.2s ease, box-shadow 0.12s ease;
    box-shadow: 0 4px 0 #4a1a08;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quiz-option:hover {
    background: #fff8eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #4a1a08;
}

.quiz-option:active {
    transform: translateY(1px);
    box-shadow: 0 2px 0 #4a1a08;
}

.quiz-option-letter {
    width: 28px;
    height: 28px;
    background: #e07a1f;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 2px 0 #b35c10;
}

.quiz-option.quiz-correct {
    background: #d4f4dd;
    border-color: #2e7d4f;
    box-shadow: 0 4px 0 #1a4a2d;
}

.quiz-option.quiz-correct .quiz-option-letter {
    background: #2e7d4f;
    box-shadow: 0 2px 0 #1a4a2d;
}

.quiz-option.quiz-wrong {
    background: #f8d7d7;
    border-color: #8b1818;
    box-shadow: 0 4px 0 #4a0c0c;
}

.quiz-option.quiz-wrong .quiz-option-letter {
    background: #8b1818;
    box-shadow: 0 2px 0 #4a0c0c;
}

.quiz-option.quiz-disabled {
    pointer-events: none;
    opacity: 0.7;
}

.quiz-feedback {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    display: none;
}

.quiz-feedback.quiz-feedback-success {
    background: #d4f4dd;
    color: #1a4a2d;
    border: 2px solid #2e7d4f;
    display: block;
}

.quiz-feedback.quiz-feedback-error {
    background: #f8d7d7;
    color: #4a0c0c;
    border: 2px solid #8b1818;
    display: block;
}

/* ===== Responsive Game ===== */
@media (max-width: 768px) {
    .game-title {
        font-size: 22px;
    }

    .game-title .material-symbols-rounded {
        font-size: 26px;
    }

    .game-subtitle {
        font-size: 13px;
    }

    /* Mode mobile: fullscreen game area, hilangkan bingkai kayu & judul.
       HANYA berlaku saat Flappy fullscreen aktif (body.flappy-fullscreen),
       supaya Game Hub / Quiz / Pasal tetap pakai layout normal. */
    body.flappy-fullscreen .game-page {
        padding: 0 !important;
        background: #000 !important;
        min-height: calc(100vh - 80px);
        min-height: calc(100dvh - 80px);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    body.flappy-fullscreen .game-page::before {
        display: none;
    }

    body.flappy-fullscreen .game-page-container {
        max-width: 100% !important;
        width: 100% !important;
        height: calc(100vh - 80px);
        height: calc(100dvh - 80px);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 !important;
    }

    body.flappy-fullscreen .game-header {
        display: none;
    }

    /* Bingkai kayu di-flatten total saat fullscreen mobile: tanpa padding,
       border, background, atau bayangan. !important supaya menang dari aturan
       .game-wood-frame yang tidak ter-scope di breakpoint 900px / 640px. */
    body.flappy-fullscreen .game-wood-frame {
        padding: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
        height: 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    body.flappy-fullscreen .game-wood-frame::before,
    body.flappy-fullscreen .game-wood-frame::after {
        display: none !important;
    }

    body.flappy-fullscreen .game-wood-title {
        display: none !important;
    }

    /* Canvas wrapper di mobile fullscreen: penuhi viewport tanpa aspect-ratio
       supaya tidak ada "bingkai" hitam/coklat di kiri-kanan canvas.
       Canvas internal sudah resize otomatis lewat resizeCanvas() di game.js. */
    body.flappy-fullscreen .game-canvas-wrapper {
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        aspect-ratio: auto !important;
        width: 100vw !important;
        height: calc(100vh - 80px) !important;
        height: calc(100dvh - 80px) !important;
        max-width: 100vw !important;
        max-height: calc(100vh - 80px);
        max-height: calc(100dvh - 80px);
        margin: 0 !important;
    }

    /* User minta hilangkan panel leaderboard "Top" di mobile Flappy karena
       tombol toggle-nya menutupi area canvas. Tetap aman karena handler JS
       di game.js sudah guarded dengan null-check. Desktop tidak terpengaruh. */
    body.flappy-fullscreen .game-leaderboard-panel {
        display: none !important;
    }

    /* HUD di mobile: pakai z-index tinggi supaya tidak ke-cover overlay/canvas
       dan beri jarak aman dari atas. */
    .game-hud {
        top: 10px;
        left: 10px;
        right: 10px;
        z-index: 50;
        gap: 6px;
    }

    .hud-item {
        font-size: 11px;
        padding: 5px 10px;
        background: rgba(74, 26, 8, 0.92);
        box-shadow: 0 2px 0 rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(244, 211, 94, 0.3);
    }

    .hud-item .material-symbols-rounded {
        font-size: 15px;
    }

    .overlay-card {
        padding: 22px 18px;
    }

    .overlay-card h2 {
        font-size: 20px;
    }

    .quiz-card {
        padding: 22px 18px;
    }

    .quiz-card h3 {
        font-size: 15px;
    }

    .quiz-option {
        font-size: 13px;
        padding: 10px 12px;
    }

    .countdown-number {
        font-size: 96px;
    }

    .countdown-number.go {
        font-size: 72px;
    }

    .countdown-label {
        font-size: 13px;
        padding: 6px 16px;
    }
}

@media (max-width: 480px) {
    body.flappy-fullscreen .game-page {
        padding: 0;
    }

    .game-title {
        font-size: 18px;
        flex-direction: column;
        gap: 6px;
    }

    /* Canvas wrapper lebih persegi-vertikal di HP sempit (portrait) */
    body.flappy-fullscreen .game-canvas-wrapper {
        aspect-ratio: 9 / 15;
    }

    .game-hud {
        top: 8px;
        left: 8px;
        right: 8px;
        gap: 5px;
        z-index: 50;
    }

    .hud-item {
        font-size: 10px;
        padding: 4px 9px;
    }

    .hud-item .material-symbols-rounded {
        font-size: 14px;
    }

    /* Compact mode: di layar SANGAT sempit, sembunyikan label "Skor:" / "Lv:" / "Koin:" */
    .hud-score span:not(.material-symbols-rounded),
    .hud-level span:not(.material-symbols-rounded),
    .hud-coins span:not(.material-symbols-rounded) {
        display: inline-flex;
        gap: 2px;
    }

    .game-btn {
        padding: 9px 16px;
        font-size: 13px;
    }

    /* Overlay card di HP kecil */
    .overlay-card {
        padding: 18px 14px;
        max-width: 92vw;
    }

    .overlay-card h2 {
        font-size: 18px;
    }

    .overlay-card p {
        font-size: 13px;
    }
}

/* Layar ULTRA pendek (HP landscape atau split-screen) - hanya untuk Flappy */
@media (max-width: 768px) and (max-height: 500px) {
    body.flappy-fullscreen .game-canvas-wrapper {
        aspect-ratio: auto;
        height: calc(100vh - 60px);
        height: calc(100dvh - 60px);
        width: auto;
        max-width: 100vw;
    }
}

/* ==========================================
   VIDEO SHOWCASE - Retro CRT TV Style
   ========================================== */
.video-showcase {
    padding: 48px 20px 24px;
    background: var(--color-cream-light);
    position: relative;
    overflow: hidden;
}

/* Motif tenun minimalis - belah ketupat halus dengan jarak lebar */
.video-showcase::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.18;
    background-repeat: repeat;
    background-size: 120px 120px;
    background-attachment: fixed;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Crect width='120' height='120' fill='none'/%3E%3Cpolygon points='60,42 78,60 60,78 42,60' fill='none' stroke='%23c0392b' stroke-width='1.5'/%3E%3Cpolygon points='60,50 70,60 60,70 50,60' fill='%23e07a1f' opacity='0.5'/%3E%3Ccircle cx='60' cy='60' r='1.5' fill='%23c0392b'/%3E%3C/svg%3E");
}


.video-showcase-container {
    max-width: 640px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* ==== Retro CRT TV ==== */
.tv-frame {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
}

/* TV Antenna (rabbit ears) */
.tv-antenna {
    position: relative;
    width: 100%;
    height: 60px;
    margin-bottom: -6px;
    pointer-events: none;
}

.tv-antenna-left,
.tv-antenna-right {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 3px;
    height: 56px;
    background: linear-gradient(180deg, #d4d4d4 0%, #6a6a6a 100%);
    border-radius: 2px;
    transform-origin: bottom center;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
}

.tv-antenna-left {
    transform: translateX(-2px) rotate(-32deg);
}

.tv-antenna-right {
    transform: translateX(0) rotate(32deg);
}

.tv-antenna-left::after,
.tv-antenna-right::after {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #eee 0%, #888 70%, #555 100%);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.tv-antenna-base {
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 8px;
    background: linear-gradient(180deg, #4a4a4a 0%, #2a2a2a 100%);
    border-radius: 4px 4px 2px 2px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* TV Body â€” wooden retro look */
.tv-body {
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.25) 100%),
        repeating-linear-gradient(90deg,
            #6b3410 0px,
            #7a3d18 2px,
            #5a2d0e 4px,
            #6b3410 6px),
        #6b3410;
    border-radius: 16px 16px 12px 12px;
    padding: 18px 18px 12px;
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.12),
        inset 0 -3px 0 rgba(0, 0, 0, 0.4),
        inset 0 0 0 2px rgba(60, 25, 8, 0.5),
        0 12px 30px rgba(0, 0, 0, 0.5),
        0 4px 0 rgba(0, 0, 0, 0.6);
    position: relative;
}

/* Screen bezel */
.tv-screen {
    background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
    border-radius: 18px;
    padding: 12px;
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.8),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05),
        0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
}

.tv-screen-inner {
    position: relative;
    border-radius: 18px / 14px;
    /* slight CRT curve */
    overflow: hidden;
    background: #000;
    box-shadow:
        inset 0 0 30px rgba(0, 0, 0, 0.9),
        inset 0 0 0 2px #000;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
    background: #000;
    cursor: pointer;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Poster fallback */
.video-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, filter 0.3s ease;
    filter: brightness(0.85) saturate(1.05);
}

.video-wrapper:hover .video-poster {
    transform: scale(1.04);
    filter: brightness(0.95) saturate(1.1);
}

/* Tombol play */
.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: rgba(192, 57, 43, 0.92);
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.55),
        0 0 0 6px rgba(255, 255, 255, 0.15);
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    z-index: 4;
}

.video-play-btn .play-icon {
    margin-left: 4px;
    line-height: 1;
}

.video-wrapper:hover .video-play-btn {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(192, 57, 43, 1);
    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.6),
        0 0 0 8px rgba(255, 255, 255, 0.2);
}

.video-wrapper.video-loaded {
    cursor: default;
}

/* Screen glare/reflection â€” diletakkan di .tv-screen (di luar screen-inner)
   agar TIDAK menutupi iframe. Hanya menempel di bingkai luar layar
   sehingga tidak men-trigger Error 153 (anti-clickjack YouTube). */
.tv-glare {
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    height: 30%;
    pointer-events: none;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.10) 0%,
            rgba(255, 255, 255, 0.03) 40%,
            transparent 70%);
    border-radius: 8px 8px 40% 40% / 8px 8px 30% 30%;
}

/* TV bottom panel (brand, speaker, knobs) */
.tv-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 6px 4px;
}

.tv-brand {
    font-family: 'Courier New', monospace;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #f4d8a8;
    text-shadow:
        0 1px 0 rgba(0, 0, 0, 0.6),
        0 0 4px rgba(244, 216, 168, 0.3);
    padding: 4px 8px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5));
    border-radius: 3px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

.tv-speaker {
    flex: 1;
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    background:
        radial-gradient(circle at 30% 30%, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.7));
    border-radius: 4px;
    box-shadow:
        inset 0 2px 3px rgba(0, 0, 0, 0.7),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05);
}

.tv-speaker span {
    width: 3px;
    height: 16px;
    background: linear-gradient(180deg, #2a2a2a 0%, #0a0a0a 100%);
    border-radius: 2px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.8);
}

.tv-knobs {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tv-knob {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%,
            #f0e6d4 0%,
            #c8a877 35%,
            #8a6a3d 80%,
            #4a3a20 100%);
    box-shadow:
        inset 0 -2px 2px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.4),
        0 2px 3px rgba(0, 0, 0, 0.5);
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.tv-knob::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 6px;
    background: #2a1a05;
    border-radius: 1px;
}

.tv-knob:hover {
    transform: rotate(45deg);
}

/* TV Legs */
.tv-legs {
    display: flex;
    justify-content: space-between;
    padding: 0 50px;
    margin-top: -2px;
}

.tv-leg {
    width: 16px;
    height: 14px;
    background: linear-gradient(180deg, #4a2a10 0%, #2a1505 100%);
    border-radius: 0 0 6px 6px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 4px 6px rgba(0, 0, 0, 0.5);
}

/* ==========================================
   MAIN BERANDA
   ========================================== */
.main-beranda {
    padding: 24px 0 40px;
    position: relative;
    overflow: hidden;
    background: var(--color-cream-light);
}

/* Motif Tenun Minimalis - belah ketupat halus dengan jarak lebar */
.main-beranda::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.18;
    background-repeat: repeat;
    background-size: 120px 120px;
    background-attachment: fixed;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Crect width='120' height='120' fill='none'/%3E%3Cpolygon points='60,42 78,60 60,78 42,60' fill='none' stroke='%23c0392b' stroke-width='1.5'/%3E%3Cpolygon points='60,50 70,60 60,70 50,60' fill='%23e07a1f' opacity='0.5'/%3E%3Ccircle cx='60' cy='60' r='1.5' fill='%23c0392b'/%3E%3C/svg%3E");
}

.beranda-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: row;
    gap: 24px;
    align-items: stretch;
}

/* Card Leaderboard Full */
.card-leaderboard-full {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Card Body Row: Leaderboard kiri + Maskot kanan */
.card-body-row {
    display: flex;
    padding: 16px 20px;
    gap: 24px;
    flex: 1;
}

/* Leaderboard Scroll — beranda (coklat) */
.leaderboard-scroll {
    flex: 1;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: #8a5a2a #f3e0bd;
}

.leaderboard-scroll::-webkit-scrollbar {
    width: 8px;
}

.leaderboard-scroll::-webkit-scrollbar-track {
    background: #f3e0bd;
    border-radius: 10px;
}

.leaderboard-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #b88a4a, #8a5a2a);
    border: 1px solid #4a1a08;
    border-radius: 10px;
}

.leaderboard-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #d4a060, #a06a30);
}

/* Leaderboard Side (Maskot) */
.leaderboard-side {
    width: 220px;
    flex-shrink: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-left: 1px solid var(--color-border);
}

.side-mascot-img {
    width: 170px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
    animation: mascotBounce 2.5s ease-in-out infinite;
    margin-bottom: 12px;
}

@keyframes mascotBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.side-mascot-text {
    text-align: center;
}

.side-mascot-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 6px;
    line-height: 1.3;
}

.side-mascot-desc {
    font-size: 12px;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

/* ---------- Card 2: Ringkasan Materi Hukum ---------- */
.card-materi-hukum {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.materi-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

/* Bagian atas card materi: gambar kiri + heading/desc kanan */
.materi-top {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: center;
}

.materi-image-side {
    width: 200px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.materi-intro {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Bagian bawah card materi: dasar hukum + tags + cta (full width) */
.materi-extra {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.materi-img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.12));
    animation: mascotBounce 2.5s ease-in-out infinite;
}

.materi-heading {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.3;
}

.materi-desc {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.materi-laws-box {
    background: var(--color-cream-light);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    border-left: 3px solid var(--color-gold);
}

.laws-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 8px;
}

.laws-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.laws-list li {
    font-size: 12px;
    color: var(--color-text-secondary);
    line-height: 1.5;
    padding-left: 16px;
    position: relative;
}

.laws-list li::before {
    content: 'Â§';
    position: absolute;
    left: 0;
    color: var(--color-gold-dark);
    font-weight: 700;
}

.laws-list li strong {
    color: var(--color-primary);
    font-weight: 600;
}

.materi-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.materi-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
}

.materi-tag .material-symbols-rounded {
    font-size: 16px;
}

.tag-danger {
    background: rgba(217, 79, 79, 0.12);
    color: var(--color-red);
}

.tag-warning {
    background: rgba(255, 140, 26, 0.15);
    color: var(--color-gold-dark);
}

/* Card Base */
.card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px 0;
}

.card-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
    flex: 1;
}

.card-icon {
    font-size: 22px;
    color: var(--color-green);
}

.card-icon.gold-icon {
    color: var(--color-gold);
}

.card-icon.blue-icon {
    color: var(--color-blue);
}

.card-icon.purple-icon {
    color: var(--color-purple);
}

.card-icon.orange-icon {
    color: var(--color-orange);
}

.card-body {
    padding: 16px 20px;
    flex: 1;
}

/* ---------- Card CTA Buttons - Game Style (clean) ---------- */
.card-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    color: #fff;
    letter-spacing: 0.3px;
    background: linear-gradient(180deg, #ffa336 0%, #ff8c1a 100%);
    border: none;
    box-shadow: 0 3px 0 #cc6a0a;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    margin-top: 8px;
}

.card-cta .material-symbols-rounded {
    font-size: 18px;
    color: #fff;
}

.card-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 0 #cc6a0a;
}

.card-cta:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #cc6a0a;
}

/* Variant Orange & Purple sekarang konsisten orange */
.cta-orange,
.cta-purple {
    background: linear-gradient(180deg, #ffa336 0%, #ff8c1a 100%);
    color: #fff;
}

/* ---------- Card 1: Kemajuan Motif Tenun ---------- */
.card-progress .progress-info {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.progress-level {
    display: flex;
    flex-direction: column;
}

.progress-level .label {
    font-size: 11px;
    color: var(--color-text-muted);
}

.progress-level .level-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
}

.progress-level .level-title {
    font-size: 11px;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.motif-preview {
    margin-left: auto;
}

.motif-pattern {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.motif-pattern svg {
    width: 100%;
    height: 100%;
}

.progress-motif-bar {
    margin-bottom: 12px;
}

.progress-motif-bar .label {
    font-size: 11px;
    color: var(--color-text-muted);
    display: block;
    margin-bottom: 6px;
}

.bar-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bar-track {
    flex: 1;
    height: 8px;
    background: var(--color-cream);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-green));
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.bar-percent {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text);
}

.poin-tenun {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.poin-tenun .label {
    font-size: 11px;
    color: var(--color-text-muted);
}

.poin-value {
    display: flex;
    align-items: center;
    gap: 4px;
}

.poin-value .material-symbols-rounded {
    font-size: 20px;
    color: var(--color-gold);
}

.poin-value strong {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-primary);
}

/* ---------- Card 2: Koleksi Badge ---------- */
.card-badges .badge-count {
    margin-bottom: 16px;
}

.badge-count .count-big {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary);
    display: block;
}

.badge-count p {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.badge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.badge-item {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.badge-item.earned {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
}

.badge-item.earned .material-symbols-rounded {
    font-size: 24px;
    color: var(--color-gold);
}

.badge-item.gold-badge {
    background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
}

.badge-item.gold-badge .material-symbols-rounded {
    color: var(--color-white);
}

.badge-item.purple-badge {
    background: linear-gradient(135deg, var(--color-purple), #9b7ec8);
}

.badge-item.purple-badge .material-symbols-rounded {
    color: var(--color-white);
}

.badge-item.locked {
    background: var(--color-cream-dark);
}

.badge-item.locked .material-symbols-rounded {
    font-size: 20px;
    color: var(--color-text-muted);
}

/* ---------- Card 3: Ringkasan Materi Hukum ---------- */
.card-materi .materi-top {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.materi-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.materi-icon svg {
    width: 100%;
    height: 100%;
}

.materi-info h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.materi-info p {
    font-size: 11px;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.materi-laws {
    background: var(--color-cream-light);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.laws-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-secondary);
    display: block;
    margin-bottom: 6px;
}

.materi-laws ul {
    padding-left: 16px;
    list-style: disc;
}

.materi-laws li {
    font-size: 11px;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* ---------- Card 4: Hasil Kuis Adaptif ---------- */
.card-quiz .quiz-label {
    font-size: 11px;
    color: var(--color-text-muted);
    display: block;
    margin-bottom: 12px;
}

.quiz-stats {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.quiz-circle {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.quiz-circle svg {
    width: 100%;
    height: 100%;
}

.quiz-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quiz-detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--color-text-secondary);
}

.quiz-detail-item .material-symbols-rounded {
    font-size: 18px;
}

.quiz-detail-item.correct .material-symbols-rounded {
    color: var(--color-green);
}

.quiz-detail-item.wrong .material-symbols-rounded {
    color: var(--color-red);
}

.quiz-detail-item.time .material-symbols-rounded {
    color: var(--color-blue);
}

.quiz-detail-item strong {
    margin-left: auto;
    font-weight: 700;
    color: var(--color-text);
}

.quiz-topics {
    display: flex;
    gap: 12px;
}

.topic-item {
    flex: 1;
}

.topic-label {
    font-size: 10px;
    color: var(--color-text-muted);
    display: block;
    margin-bottom: 4px;
}

.topic-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
}

.green-tag {
    background: rgba(45, 143, 111, 0.12);
    color: var(--color-green);
}

.red-tag {
    background: rgba(217, 79, 79, 0.12);
    color: var(--color-red);
}

/* ---------- Card 5: Leaderboard Siswa ---------- */
.leaderboard-filter {
    padding: 4px 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 11px;
    color: var(--color-text-secondary);
    background: var(--color-white);
    cursor: pointer;
    outline: none;
}

.leaderboard-filter:focus {
    border-color: var(--color-primary);
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    background: var(--color-cream);
    color: var(--color-text-secondary);
    flex-shrink: 0;
}

.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffb800);
    color: #7a5c00;
}

.rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
    color: #555;
}

.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #b8722e);
    color: #fff;
}

.lb-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lb-avatar .material-symbols-rounded {
    font-size: 24px;
    color: var(--color-text-muted);
}

.lb-info {
    flex: 1;
    min-width: 0;
}

.lb-info strong {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-info span {
    font-size: 10px;
    color: var(--color-text-muted);
}

.lb-score {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary);
    flex-shrink: 0;
}

/* ==========================================
   FOOTER - BAGIAN 1: MOTIVASI BANNER
   ========================================== */
.footer-motivation {
    background: linear-gradient(135deg, var(--color-gold-dark) 0%, var(--color-gold) 50%, var(--color-gold-light) 100%);
    position: relative;
    overflow: hidden;
}

.footer-motivation::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(45deg,
            transparent,
            transparent 15px,
            rgba(255, 255, 255, 0.06) 15px,
            rgba(255, 255, 255, 0.06) 17px),
        repeating-linear-gradient(-45deg,
            transparent,
            transparent 15px,
            rgba(255, 255, 255, 0.06) 15px,
            rgba(255, 255, 255, 0.06) 17px);
    pointer-events: none;
}

.motivation-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 36px 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.motivation-icon-left,
.motivation-icon-right {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.motivation-icon-left .material-symbols-rounded,
.motivation-icon-right .material-symbols-rounded {
    font-size: 28px;
    color: var(--color-primary-dark);
}

.motivation-content {
    text-align: center;
}

.motivation-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--color-primary-dark);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.motivation-text {
    font-size: 14px;
    color: rgba(15, 36, 36, 0.8);
    line-height: 1.6;
    max-width: 520px;
    margin: 0 auto;
}

/* ==========================================
   FOOTER - BAGIAN 2: CREDITS
   ========================================== */
.site-footer {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    padding: 48px 0 0;
}

.footer-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 32px;
}

.footer-top {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 48px;
    padding-bottom: 36px;
    flex-wrap: wrap;
}

.footer-divider {
    width: 1px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    align-self: center;
    flex-shrink: 0;
}

.footer-group {
    text-align: center;
    min-width: 160px;
}

.footer-group-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 140, 26, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.footer-group-icon .material-symbols-rounded {
    font-size: 22px;
    color: var(--color-gold);
}

.footer-group h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-gold);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-group ol {
    list-style: none;
    padding: 0;
}

.footer-group ol li {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 2;
    font-weight: 500;
}

.footer-group .school-name {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    line-height: 1.6;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 0;
    text-align: center;
}

.footer-bottom span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

/* Tablet */
@media (max-width: 1024px) {

    .beranda-container {
        max-width: 960px;
    }

    .card-body-row {
        gap: 16px;
    }

    .leaderboard-side {
        width: 180px;
    }

    .side-mascot-img {
        width: 150px;
    }

    .materi-image-side {
        width: 180px;
    }

    .navbar-links {
        gap: 2px;
    }

    .nav-link {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Mobile */
@media (max-width: 768px) {

    .navbar-container {
        height: 64px;
        padding: 0 16px;
    }

    .navbar-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--color-primary);
        flex-direction: column;
        align-items: stretch;
        padding: 14px 16px 18px;
        gap: 10px;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar-links li {
        width: 100%;
        list-style: none;
    }

    .navbar-links .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 18px;
        font-size: 14px;
    }

    .navbar-links.active {
        display: flex;
    }

    .navbar-profile {
        display: none;
    }

    .navbar-toggle {
        display: flex;
        margin-left: auto;
    }

    .hero {
        min-height: auto;
        background-position: center 35%;
    }

    .hero::before {
        background: linear-gradient(to bottom,
                rgba(15, 36, 36, 0.75) 0%,
                rgba(15, 36, 36, 0.55) 40%,
                rgba(15, 36, 36, 0.3) 70%,
                rgba(15, 36, 36, 0.5) 100%);
    }

    .hero-container {
        padding: 40px 20px;
        min-height: auto;
        text-align: left;
    }

    .hero-content {
        max-width: 65%;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-description {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .hero-cta {
        padding: 12px 22px;
        font-size: 14px;
    }

    .cta-play {
        width: 32px;
        height: 32px;
    }

    .cta-play .material-symbols-rounded {
        font-size: 18px;
    }

    .hero-badges {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .beranda-container {
        flex-direction: column;
        padding: 0 16px;
    }

    .card-body-row {
        flex-direction: column;
        gap: 12px;
    }

    .leaderboard-side {
        order: -1;
        width: 100%;
        border-left: none;
        border-bottom: 1px solid var(--color-border);
        flex-direction: row;
        align-items: center;
        gap: 12px;
        padding: 12px;
    }

    .side-mascot-text {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .leaderboard-side .card-cta {
        align-self: flex-start;
        margin-top: 4px;
    }

    .side-mascot-text {
        text-align: left;
    }

    .side-mascot-img {
        width: 100px;
    }

    .side-mascot-title {
        font-size: 13px;
        margin-bottom: 2px;
    }

    .side-mascot-desc {
        font-size: 11px;
    }

    .leaderboard-scroll {
        max-height: 260px;
    }

    .card-cta {
        padding: 10px 18px;
        font-size: 12px;
        align-self: flex-start;
    }

    /* Card Materi - Mobile: bagian atas (gambar+intro) row, bagian bawah full width */
    .materi-body {
        flex-direction: column;
        padding: 14px;
        gap: 14px;
    }

    .materi-top {
        flex-direction: row;
        gap: 12px;
        align-items: center;
    }

    .materi-image-side {
        width: 160px;
        flex-shrink: 0;
    }

    .materi-intro {
        gap: 6px;
    }

    .materi-heading {
        font-size: 15px;
    }

    .materi-desc {
        font-size: 12px;
    }

    .materi-extra {
        gap: 10px;
    }

    .motivation-container {
        padding: 28px 20px;
        flex-direction: column;
        gap: 16px;
    }

    .motivation-icon-left,
    .motivation-icon-right {
        width: 44px;
        height: 44px;
    }

    .motivation-title {
        font-size: 20px;
    }

    .motivation-text {
        font-size: 13px;
    }

    .footer-top {
        flex-direction: column;
        align-items: center;
        gap: 28px;
    }

    .footer-divider {
        width: 60px;
        height: 1px;
    }

    /* Video Showcase - Mobile (Retro TV) */
    .video-showcase {
        padding: 32px 16px 24px;
    }

    .tv-frame {
        max-width: 420px;
    }

    .tv-antenna {
        height: 48px;
    }

    .tv-antenna-left,
    .tv-antenna-right {
        height: 44px;
    }

    .tv-body {
        padding: 14px 14px 10px;
        border-radius: 14px 14px 10px 10px;
    }

    .tv-screen {
        padding: 10px;
        border-radius: 14px;
    }

    .tv-brand {
        font-size: 9px;
        padding: 3px 6px;
        letter-spacing: 1.5px;
    }

    .tv-speaker {
        padding: 5px 6px;
        gap: 3px;
    }

    .tv-speaker span {
        width: 2px;
        height: 12px;
    }

    .tv-knob {
        width: 14px;
        height: 14px;
    }

    .tv-legs {
        padding: 0 40px;
    }

    .tv-leg {
        width: 14px;
        height: 12px;
    }
}

@media (max-width: 480px) {
    .hero-container {
        padding: 32px 16px;
    }

    .hero-content {
        max-width: 70%;
    }

    .hero-title {
        font-size: 24px;
    }

    .hero-description {
        font-size: 13px;
    }

    .hero-cta {
        padding: 10px 18px;
        font-size: 13px;
        gap: 8px;
    }

    .hero-badges {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-body-row {
        padding: 10px 12px;
    }

    .side-mascot-img {
        width: 80px;
    }

    .side-mascot-title {
        font-size: 12px;
    }

    .side-mascot-desc {
        font-size: 10px;
    }

    .leaderboard-scroll {
        max-height: 200px;
    }

    /* Card Materi - Small Mobile */
    .materi-body {
        padding: 12px;
        gap: 12px;
    }

    .materi-top {
        gap: 10px;
    }

    .materi-image-side {
        width: 130px;
    }

    .materi-heading {
        font-size: 13px;
    }

    .materi-desc {
        font-size: 11px;
    }

    .materi-laws-box {
        padding: 10px 12px;
    }

    .laws-list li {
        font-size: 11px;
    }

    .card-cta {
        padding: 10px 18px;
        font-size: 12px;
    }

    .card-cta .material-symbols-rounded {
        font-size: 16px;
    }

    .materi-tags {
        gap: 6px;
    }

    .materi-tag {
        font-size: 10px;
        padding: 4px 10px;
    }

    .quiz-stats {
        flex-direction: column;
    }

    .quiz-topics {
        flex-direction: column;
    }

    /* Video Showcase - Small Mobile (Retro TV) */
    .video-showcase {
        padding: 24px 12px 18px;
    }

    .tv-frame {
        max-width: 320px;
    }

    .tv-antenna {
        height: 40px;
    }

    .tv-antenna-left,
    .tv-antenna-right {
        height: 36px;
        width: 2px;
    }

    .tv-body {
        padding: 10px 10px 8px;
        border-radius: 12px 12px 8px 8px;
    }

    .tv-screen {
        padding: 7px;
        border-radius: 10px;
    }

    .tv-panel {
        padding: 8px 4px 2px;
        gap: 8px;
    }

    .tv-brand {
        font-size: 8px;
        padding: 2px 4px;
        letter-spacing: 1px;
    }

    .tv-speaker {
        padding: 4px 5px;
        gap: 2px;
    }

    .tv-speaker span {
        width: 2px;
        height: 10px;
    }

    .tv-knobs {
        gap: 4px;
    }

    .tv-knob {
        width: 12px;
        height: 12px;
    }

    .tv-knob::after {
        height: 4px;
        top: 1px;
    }

    .tv-legs {
        padding: 0 30px;
    }

    .tv-leg {
        width: 12px;
        height: 10px;
    }
}

/* ============================================
   CHAMPION OVERLAY (Checkpoint Level Up)
   Auto-show effect, tanpa tombol
   ============================================ */
.champion-overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 70;
    pointer-events: none;
    background: radial-gradient(circle at center, rgba(255, 215, 0, 0.25) 0%, rgba(0, 0, 0, 0.55) 60%, rgba(0, 0, 0, 0.75) 100%);
    animation: championFadeIn 0.25s ease-out;
}

.champion-overlay.show {
    display: flex;
}

@keyframes championFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.champion-overlay.fade-out {
    animation: championFadeOut 0.4s ease-in forwards;
}

@keyframes championFadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.champion-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 32px;
    animation: championPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes championPop {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    60% {
        transform: scale(1.15);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.champion-rays {
    position: absolute;
    inset: -40px;
    background: conic-gradient(from 0deg,
            rgba(255, 215, 0, 0.55) 0deg,
            transparent 20deg,
            rgba(255, 215, 0, 0.55) 40deg,
            transparent 60deg,
            rgba(255, 215, 0, 0.55) 80deg,
            transparent 100deg,
            rgba(255, 215, 0, 0.55) 120deg,
            transparent 140deg,
            rgba(255, 215, 0, 0.55) 160deg,
            transparent 180deg,
            rgba(255, 215, 0, 0.55) 200deg,
            transparent 220deg,
            rgba(255, 215, 0, 0.55) 240deg,
            transparent 260deg,
            rgba(255, 215, 0, 0.55) 280deg,
            transparent 300deg,
            rgba(255, 215, 0, 0.55) 320deg,
            transparent 340deg);
    border-radius: 50%;
    filter: blur(2px);
    animation: championRaysSpin 4s linear infinite;
    z-index: -1;
    opacity: 0.85;
}

@keyframes championRaysSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.champion-trophy {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 30%, #fff7c2, #ffd54a 55%, #c89100 100%);
    box-shadow:
        0 0 30px rgba(255, 215, 0, 0.85),
        0 0 60px rgba(255, 215, 0, 0.55),
        inset 0 -6px 12px rgba(120, 80, 0, 0.45);
    animation: trophyBounce 1.2s ease-in-out infinite;
}

.champion-trophy .material-symbols-rounded {
    font-size: 52px;
    color: #5a3a00;
    font-variation-settings: 'FILL' 1, 'wght' 700;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.5);
}

@keyframes trophyBounce {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-8px) scale(1.05);
    }
}

.champion-title {
    font-family: 'Bungee', 'Fredoka', sans-serif;
    font-size: 28px;
    color: #fff;
    letter-spacing: 2px;
    text-shadow:
        0 0 8px #ffd54a,
        0 0 16px #ff9800,
        0 3px 0 #8b4513,
        0 5px 8px rgba(0, 0, 0, 0.6);
    animation: titlePulse 1s ease-in-out infinite alternate;
}

@keyframes titlePulse {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.08);
    }
}

.champion-sub {
    font-family: 'Poppins', 'Fredoka', sans-serif;
    font-size: 16px;
    color: #fff8e1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
    background: rgba(0, 0, 0, 0.4);
    padding: 6px 16px;
    border-radius: 999px;
    border: 2px solid rgba(255, 215, 0, 0.7);
}

.champion-sub b {
    color: #ffd54a;
    font-size: 18px;
}

@media (max-width: 600px) {
    .champion-trophy {
        width: 70px;
        height: 70px;
    }

    .champion-trophy .material-symbols-rounded {
        font-size: 40px;
    }

    .champion-title {
        font-size: 20px;
    }

    .champion-sub {
        font-size: 13px;
        padding: 4px 12px;
    }
}

/* ============================================
   PUZZLE MODAL (Simple, Compact, Mobile-First)
   ============================================ */
.puzzle-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    background: rgba(0, 0, 0, 0.75);
    padding: 12px;
    animation: overlayFadeIn 0.2s ease-out;
}

.puzzle-modal.show {
    display: flex;
}

.puzzle-card {
    width: 100%;
    max-width: 380px;
    max-height: 95vh;
    max-height: 95dvh;
    overflow-y: auto;
    overflow-x: hidden;
    background: linear-gradient(145deg, #fff8e7 0%, #ffe8b8 100%);
    border: 3px solid #8b4513;
    border-radius: 16px;
    padding: 14px 18px 14px 14px;
    /* extra padding-right supaya konten tidak ketutup scrollbar coklat */
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    animation: cardPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* Firefox scrollbar coklat */
    scrollbar-width: thin;
    scrollbar-color: #8b4513 rgba(139, 69, 19, 0.12);
}

/* Scrollbar coklat untuk puzzle-card (WebKit: Chrome/Safari/Edge) */
.puzzle-card::-webkit-scrollbar {
    width: 10px;
}

.puzzle-card::-webkit-scrollbar-track {
    background: rgba(139, 69, 19, 0.12);
    border-radius: 10px;
    margin: 4px 0;
}

.puzzle-card::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #a0522d 0%, #8b4513 50%, #5a2d0c 100%);
    border-radius: 10px;
    border: 2px solid rgba(139, 69, 19, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 211, 77, 0.3);
}

.puzzle-card::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #b5651d 0%, #8b4513 50%, #4a1a08 100%);
}

.puzzle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 2px dashed rgba(139, 69, 19, 0.3);
    padding-bottom: 8px;
}

.puzzle-head-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.puzzle-badge {
    display: inline-block;
    width: fit-content;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: #fff;
    font-family: 'Poppins', 'Fredoka', sans-serif;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 999px;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.puzzle-head-left h3 {
    margin: 0;
    font-family: 'Poppins', 'Fredoka', sans-serif;
    font-size: 16px;
    color: #5a2d0c;
    line-height: 1.2;
}

.puzzle-target-mini {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.puzzle-target-mini img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #8b4513;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    background: #fff;
}

.puzzle-target-label {
    font-family: 'Poppins', 'Fredoka', sans-serif;
    font-size: 9px;
    color: #8b4513;
    letter-spacing: 0.5px;
}

.puzzle-board-wrap {
    display: flex;
    justify-content: center;
}

/* OLD puzzle-modal style — scoped ke .puzzle-modal supaya tidak konflik dengan puzzle baru di mini-game */
.puzzle-modal .puzzle-board {
    --grid: 3;
    display: grid;
    grid-template-columns: repeat(var(--grid), 1fr);
    grid-template-rows: repeat(var(--grid), 1fr);
    gap: 2px;
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1 / 1;
    padding: 4px;
    background: rgba(139, 69, 19, 0.15);
    border: 2px dashed #8b4513;
    border-radius: 10px;
}

.puzzle-slot {
    background: rgba(255, 255, 255, 0.55);
    border-radius: 6px;
    border: 1px dashed rgba(139, 69, 19, 0.4);
    position: relative;
    overflow: hidden;
    transition: background 0.15s, border-color 0.15s;
}

.puzzle-slot.drag-over {
    background: rgba(76, 175, 80, 0.3);
    border-color: #4caf50;
    border-style: solid;
}

.puzzle-slot.filled {
    border-style: solid;
    border-color: rgba(139, 69, 19, 0.6);
}

.puzzle-slot.correct {
    border-color: #4caf50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.4);
}

.puzzle-slot.wrong {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.4);
}

.puzzle-modal .puzzle-piece {
    position: relative;
    width: 100%;
    height: 100%;
    background-size: calc(var(--grid) * 100%) calc(var(--grid) * 100%);
    background-repeat: no-repeat;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: high-quality;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    cursor: grab;
    user-select: none;
    -webkit-user-drag: element;
    touch-action: none;
    transition: transform 0.12s;
}

/* Label angka posisi pada piece (1-9 untuk grid 3x3) — bantu player tahu piece ini untuk slot mana */
.puzzle-piece .piece-label {
    position: absolute;
    top: 2px;
    left: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: rgba(0, 0, 0, 0.72);
    color: #ffe082;
    font-family: 'Poppins', 'Fredoka', sans-serif;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
    border-radius: 4px;
    pointer-events: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.puzzle-piece.placed .piece-label {
    display: none;
}

.puzzle-piece:active {
    cursor: grabbing;
    transform: scale(1.04);
}

.puzzle-piece.dragging {
    opacity: 0.4;
}

.puzzle-piece.ghost {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    opacity: 0.9;
    will-change: transform, left, top;
}

.puzzle-modal .puzzle-tray {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 56px;
    gap: 6px;
    justify-content: center;
    padding: 8px 8px 14px;
    background: rgba(139, 69, 19, 0.08);
    border-radius: 10px;
    min-height: 64px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #8b4513 rgba(139, 69, 19, 0.12);
}

/* Scrollbar coklat untuk puzzle-tray (horizontal) */
.puzzle-tray::-webkit-scrollbar {
    height: 8px;
}

.puzzle-tray::-webkit-scrollbar-track {
    background: rgba(139, 69, 19, 0.15);
    border-radius: 8px;
}

.puzzle-tray::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #a0522d 0%, #8b4513 50%, #5a2d0c 100%);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 211, 77, 0.3);
}

.puzzle-tray::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #b5651d 0%, #8b4513 50%, #4a1a08 100%);
}

.puzzle-modal .puzzle-tray .puzzle-piece {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    border: 2px solid #8b4513;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    background-size: calc(var(--tray-bg-size, 168px)) calc(var(--tray-bg-size, 168px));
}

.puzzle-feedback {
    min-height: 20px;
    text-align: center;
    font-family: 'Poppins', 'Fredoka', sans-serif;
    font-size: 12px;
    color: #5a2d0c;
}

.puzzle-feedback.success {
    color: #2e7d32;
}

.puzzle-feedback.error {
    color: #c0392b;
}

.puzzle-footer {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.puzzle-btn-sm {
    flex: 1;
    font-size: 12px !important;
    padding: 8px 12px !important;
    min-height: 38px !important;
}

.puzzle-btn-sm .material-symbols-rounded {
    font-size: 16px !important;
}

/* Confetti */
.puzzle-confetti {
    position: fixed;
    width: 8px;
    height: 8px;
    pointer-events: none;
    z-index: 10000;
    border-radius: 2px;
}

/* Mobile tweaks */
@media (max-width: 480px) {
    .puzzle-card {
        max-width: 100%;
        padding: 10px;
        gap: 8px;
        border-radius: 12px;
    }

    .puzzle-head-left h3 {
        font-size: 14px;
    }

    .puzzle-badge {
        font-size: 10px;
        padding: 2px 8px;
    }

    .puzzle-target-mini img {
        width: 46px;
        height: 46px;
    }

    .puzzle-modal .puzzle-board {
        max-width: 280px;
    }

    .puzzle-modal .puzzle-tray {
        grid-auto-columns: 48px;
        min-height: 56px;
    }

    .puzzle-modal .puzzle-tray .puzzle-piece {
        width: 48px;
        height: 48px;
    }

    .puzzle-btn-sm {
        font-size: 11px !important;
        padding: 7px 10px !important;
        min-height: 34px !important;
    }
}

@media (max-height: 600px) {
    .puzzle-modal .puzzle-board {
        max-width: 240px;
    }

    .puzzle-modal .puzzle-tray .puzzle-piece {
        width: 44px;
        height: 44px;
    }

    .puzzle-modal .puzzle-tray {
        grid-auto-columns: 44px;
    }
}

/* ==========================================
   GAME LOADING SCREEN — tema tenun coklat & emas
   ========================================== */
.game-loading-screen {
    position: absolute;
    inset: 0;
    z-index: 50;
    background:
        radial-gradient(ellipse at top, rgba(0, 60, 65, 0.55) 0%, rgba(0, 39, 42, 0.7) 70%, rgba(0, 22, 24, 0.8) 100%);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
    border-radius: inherit;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.game-loading-screen.loading-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-bg-pattern {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.10;
    background-repeat: repeat;
    background-size: 64px 64px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cpolygon points='32,12 52,32 32,52 12,32' fill='none' stroke='%237ed6c8' stroke-width='1.2'/%3E%3Cpolygon points='32,22 42,32 32,42 22,32' fill='%237ed6c8' opacity='0.45'/%3E%3C/svg%3E");
    animation: loadingPatternSlide 40s linear infinite;
    will-change: background-position;
}

@keyframes loadingPatternSlide {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 64px 64px;
    }
}

.loading-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: rgba(0, 22, 24, 0.55);
    border: 2px solid rgba(126, 214, 200, 0.35);
    border-radius: 20px;
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.loading-logo {
    text-align: center;
    animation: loadingLogoIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes loadingLogoIn {
    from {
        opacity: 0;
        transform: translateY(-18px) scale(0.92);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.loading-logo-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 8px;
    background: linear-gradient(145deg, #00484c 0%, #00272A 100%);
    border: 3px solid #001517;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 4px 0 #001517,
        0 8px 20px rgba(0, 0, 0, 0.5),
        inset 0 2px 0 rgba(126, 214, 200, 0.25);
    overflow: hidden;
}

.loading-logo-icon img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.loading-title {
    font-family: 'Bungee', 'Fredoka', sans-serif;
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 2px;
    color: #7ed6c8;
    text-shadow:
        2px 2px 0 #001517,
        0 0 18px rgba(126, 214, 200, 0.5);
    letter-spacing: 2px;
}

.loading-subtitle {
    font-size: 11px;
    color: #d5f0ec;
    margin: 0;
    opacity: 0.9;
    letter-spacing: 0.5px;
}

.loading-bird {
    font-size: 38px;
    color: #7ed6c8;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    animation: loadingBirdFly 1.4s ease-in-out infinite;
    margin: -2px 0;
}

.loading-bird .material-symbols-rounded {
    font-size: 38px;
    font-variation-settings: 'FILL' 1;
}

@keyframes loadingBirdFly {

    0%,
    100% {
        transform: translateY(0) rotate(-6deg);
    }

    50% {
        transform: translateY(-14px) rotate(6deg);
    }
}

.loading-progress-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.loading-progress-track {
    position: relative;
    width: 100%;
    height: 18px;
    background: rgba(0, 21, 23, 0.85);
    border: 2px solid #001517;
    border-radius: 999px;
    box-shadow:
        inset 0 2px 5px rgba(0, 0, 0, 0.6),
        0 3px 0 #000a0b;
    overflow: hidden;
}

.loading-progress-bar {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0%;
    background: linear-gradient(90deg,
            #00272A 0%,
            #3a8d8a 50%,
            #7ed6c8 100%);
    border-radius: 999px;
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.25),
        inset 0 -2px 0 rgba(0, 21, 23, 0.4),
        0 0 16px rgba(126, 214, 200, 0.5);
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.loading-progress-shimmer {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.35) 50%,
            transparent 100%);
    animation: loadingShimmer 1.8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes loadingShimmer {
    0% {
        left: -60px;
    }

    100% {
        left: 100%;
    }
}

.loading-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Poppins', 'Fredoka', sans-serif;
}

.loading-status {
    font-size: 13px;
    color: #d5f0ec;
    opacity: 0.9;
    font-weight: 500;
}

.loading-percent {
    font-family: 'Poppins', 'Fredoka', sans-serif;
    font-size: 16px;
    color: #7ed6c8;
    font-weight: 700;
    text-shadow: 0 2px 0 #001517;
    min-width: 48px;
    text-align: right;
}

.loading-tips {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(126, 214, 200, 0.10);
    border: 1px dashed rgba(126, 214, 200, 0.35);
    border-radius: 999px;
    color: #d5f0ec;
    font-size: 12px;
    max-width: 100%;
    text-align: left;
    animation: loadingTipFadeIn 0.6s ease 0.3s both;
}

.loading-tips .material-symbols-rounded {
    color: #7ed6c8;
    font-size: 18px;
    flex-shrink: 0;
}

@keyframes loadingTipFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .loading-logo-icon {
        width: 76px;
        height: 76px;
    }

    .loading-title {
        font-size: 32px;
    }

    .loading-subtitle {
        font-size: 12px;
    }

    .loading-bird .material-symbols-rounded {
        font-size: 44px;
    }

    .loading-progress-track {
        height: 18px;
    }

    .loading-status {
        font-size: 11px;
    }

    .loading-percent {
        font-size: 14px;
    }

    .loading-tips {
        font-size: 11px;
        padding: 8px 12px;
    }
}

/* ============================================================
   LEADERBOARD - Empty state (beranda)
   ============================================================ */
.leaderboard-empty {
    padding: 24px 16px;
    text-align: center;
    color: #8a7458;
    font-size: 13px;
    font-weight: 500;
    background: #fff8e8;
    border: 2px dashed #d8c39b;
    border-radius: 12px;
}

/* ============================================================
   GAME LEADERBOARD PANEL (overlay di DALAM canvas frame)
   ============================================================ */
.game-canvas-wrapper {
    position: relative;
}

.game-leaderboard-panel {
    position: absolute;
    top: 64px;
    left: 12px;
    width: 270px;
    max-height: calc(100% - 80px);
    z-index: 25;
    background: linear-gradient(180deg, #fff8e8 0%, #ffeac4 100%);
    border: 3px solid #4a1a08;
    border-radius: 16px;
    box-shadow:
        0 5px 0 #2a0f04,
        0 8px 20px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    font-family: 'Poppins', 'Fredoka', sans-serif;
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.22s ease;
    transform: translateX(0);
}

/* State collapsed: panel geser ke KIRI (sembunyi), sisa tab toggle */
.game-leaderboard-panel.game-lb-collapsed {
    transform: translateX(calc(-100% - 12px));
}

/* Toggle tab (selalu kelihatan, nempel di sisi KANAN panel) */
.game-lb-toggle {
    position: absolute;
    top: 10px;
    right: -42px;
    width: 42px;
    min-height: 88px;
    padding: 10px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: linear-gradient(180deg, #ffa336 0%, #ff8c1a 100%);
    color: #fff;
    border: 3px solid #4a1a08;
    border-left: none;
    border-radius: 0 12px 12px 0;
    cursor: pointer;
    box-shadow: 3px 4px 0 #2a0f04;
    font-family: inherit;
    transition: transform 0.18s ease, background 0.18s ease;
}

.game-lb-toggle:hover {
    background: linear-gradient(180deg, #ffb14a 0%, #ff9a30 100%);
    transform: translateX(2px);
}

.game-lb-toggle:active {
    transform: translateX(0) translateY(2px);
    box-shadow: 3px 2px 0 #2a0f04;
}

.game-lb-toggle-icon {
    font-size: 22px !important;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}

.game-lb-toggle-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.game-lb-toggle-caret {
    font-size: 16px !important;
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Default caret: chevron_right (panel collapsed di kiri → klik untuk buka ke kanan).
   Saat panel TERBUKA: caret rotate 180° jadi chevron_left (untuk close ke kiri). */
.game-lb-toggle-caret {
    transform: rotate(0deg);
}

.game-leaderboard-panel:not(.game-lb-collapsed) .game-lb-toggle-caret {
    transform: rotate(180deg);
}

.game-lb-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(180deg, #ffa336 0%, #ff8c1a 100%);
    color: #fff;
    border-bottom: 3px solid #4a1a08;
}

.game-lb-header h3 {
    margin: 0;
    flex: 1;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}

.game-lb-icon {
    font-size: 26px !important;
    color: #fff;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}

.game-lb-refresh {
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(74, 26, 8, 0.6);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
    padding: 0;
}

.game-lb-refresh .material-symbols-rounded {
    font-size: 18px;
}

.game-lb-refresh:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(45deg);
}

.game-lb-refresh:active {
    transform: rotate(90deg) scale(0.95);
}

.game-lb-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
    max-height: 420px;
    scrollbar-width: thin;
    scrollbar-color: #8a5a2a #f3e0bd;
}

.game-lb-body::-webkit-scrollbar {
    width: 8px;
}

.game-lb-body::-webkit-scrollbar-track {
    background: #f3e0bd;
    border-radius: 8px;
}

.game-lb-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #b88a4a, #8a5a2a);
    border: 1px solid #4a1a08;
    border-radius: 8px;
}

.game-lb-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #d4a060, #a06a30);
}

.game-lb-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.game-lb-empty {
    padding: 20px 12px;
    text-align: center;
    color: #8a5a2a;
    font-size: 13px;
    font-weight: 500;
    background: #fff;
    border: 2px dashed #d8c39b;
    border-radius: 10px;
}

.game-lb-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #fff;
    border: 2px solid #e8d3aa;
    border-radius: 12px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.game-lb-item:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 0 #d8a76a;
}

.game-lb-rank {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    background: #f5e6c8;
    color: #6b4a1a;
    flex-shrink: 0;
}

.game-lb-rank.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffb800);
    color: #7a5c00;
    box-shadow: 0 2px 0 #b88a00;
}

.game-lb-rank.rank-2 {
    background: linear-gradient(135deg, #d8d8d8, #a8a8a8);
    color: #444;
    box-shadow: 0 2px 0 #777;
}

.game-lb-rank.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #b8722e);
    color: #fff;
    box-shadow: 0 2px 0 #7a4a1a;
}

.game-lb-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff3df;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid #e8d3aa;
}

.game-lb-avatar .material-symbols-rounded {
    font-size: 18px;
    color: #b88a4a;
}

.game-lb-info {
    flex: 1;
    min-width: 0;
}

.game-lb-info strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #4a1a08;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-lb-info span {
    display: block;
    font-size: 11px;
    color: #8a5a2a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-lb-score {
    font-weight: 800;
    color: #d4760a;
    font-size: 14px;
    flex-shrink: 0;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.game-lb-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #fff3df;
    border-top: 2px solid #e8d3aa;
    color: #8a5a2a;
    font-size: 11px;
    font-weight: 500;
}

.game-lb-foot .material-symbols-rounded {
    font-size: 16px;
    color: #d4760a;
}

/* Tablet (max 1100px): panel lebih ramping */
@media (max-width: 1100px) {
    .game-leaderboard-panel {
        width: 240px;
        top: 56px;
    }

    .game-lb-header h3 {
        font-size: 14px;
    }
}

/* Mobile (<=768px): panel jadi overlay slide-in dari KIRI */
@media (max-width: 768px) {
    .game-leaderboard-panel {
        top: 50px;
        left: 8px;
        width: min(260px, 75%);
        max-height: calc(100% - 70px);
        border-radius: 14px;
    }

    .game-leaderboard-panel.game-lb-collapsed {
        transform: translateX(calc(-100% - 8px));
    }

    .game-lb-toggle {
        top: 6px;
        right: -38px;
        width: 38px;
        min-height: 76px;
        border-radius: 0 10px 10px 0;
    }

    .game-lb-toggle-icon {
        font-size: 18px !important;
    }

    .game-lb-toggle-label {
        font-size: 9px;
    }

    .game-lb-header {
        padding: 10px 12px;
    }

    .game-lb-body {
        padding: 8px 10px;
    }

    .game-lb-item {
        padding: 6px 8px;
        gap: 8px;
    }

    .game-lb-foot {
        padding: 8px 10px;
        font-size: 10px;
    }
}

/* Sangat kecil (<=420px): panel jadi lebih hemat tempat */
@media (max-width: 420px) {
    .game-leaderboard-panel {
        width: min(240px, 80%);
        top: 44px;
        left: 6px;
    }

    .game-lb-avatar {
        display: none;
    }

    .game-lb-info strong {
        font-size: 12px;
    }

    .game-lb-info span {
        font-size: 10px;
    }
}

/* ============================================================
   GAME HUB + MINI GAMES (Quiz Anti-Judol & Tebak Pasal)
   ============================================================ */

/* ---------- Game Hub ---------- */
.game-hub {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 20px 56px;
}

.game-hub-hidden {
    display: none !important;
}

.game-hub-header {
    text-align: center;
    margin-bottom: 36px;
}

.game-hub-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fde68a 0%, #fbbf24 100%);
    color: #78350f;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.35);
}

.game-hub-eyebrow .material-symbols-rounded {
    font-size: 18px;
}

.game-hub-title {
    margin: 14px 0 10px;
    font-family: 'Fredoka', sans-serif;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700;
    color: #1f2937;
    line-height: 1.15;
}

.game-hub-subtitle {
    color: #4b5563;
    font-size: clamp(14px, 1.5vw, 17px);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.55;
}

.game-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

/* ---------- Game Hub Cards (Chunky Game UI) ---------- */
.game-card {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(180deg, #fff8eb 0%, #f5e6c8 100%);
    box-shadow: 0 8px 0 #4a1a08, 0 14px 28px rgba(0, 0, 0, 0.25);
    border: 4px solid #4a1a08;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 0 #4a1a08, 0 20px 36px rgba(0, 0, 0, 0.3);
}

.game-card-thumb {
    position: relative;
    height: 200px;
    display: block;
    overflow: hidden;
    border-bottom: 4px solid #4a1a08;
    background: #2a0c04;
}

.game-card-thumb::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 50%;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.35) 100%);
    pointer-events: none;
    z-index: 1;
}

.game-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
}

.game-card:hover .game-card-img {
    transform: scale(1.05);
}

.game-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    padding: 6px 14px;
    border-radius: 999px;
    background: #fff8eb;
    color: #4a1a08;
    font-family: 'Fredoka', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border: 2px solid #4a1a08;
    box-shadow: 0 3px 0 #4a1a08;
}

.game-card-body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.game-card-body h3,
.game-card-title {
    margin: 0;
    font-family: 'Fredoka', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #4a1a08;
    text-shadow: 0 2px 0 rgba(74, 26, 8, 0.08);
}

.game-card-body p,
.game-card-desc {
    margin: 0;
    color: #6b4423;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
}

.game-card-meta {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.game-card-meta li {
    padding: 5px 12px;
    border-radius: 999px;
    background: #fff8eb;
    color: #4a1a08;
    font-size: 12px;
    font-weight: 700;
    border: 2px solid #4a1a08;
    box-shadow: 0 2px 0 #4a1a08;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.game-card-btn {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 18px;
    border-radius: 14px;
    border: 3px solid #4a1a08;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #4a1a08;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    background: linear-gradient(180deg, #ffd54d 0%, #e07a1f 100%);
    box-shadow: 0 4px 0 #4a1a08;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.game-card-flappy .game-card-btn {
    background: linear-gradient(180deg, #ffb84d 0%, #ea580c 100%);
    color: #fff;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}

.game-card-quiz .game-card-btn {
    background: linear-gradient(180deg, #a78bfa 0%, #4f46e5 100%);
    color: #fff;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}

.game-card-pasal .game-card-btn {
    background: linear-gradient(180deg, #5eead4 0%, #059669 100%);
    color: #fff;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}

.game-card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #4a1a08;
}

.game-card-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #4a1a08;
}

.game-card-btn .material-symbols-rounded {
    font-size: 20px;
}

/* ---------- Game Section Wrapper ---------- */
.game-section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 16px 40px;
}

.game-section-hidden {
    display: none !important;
}

.game-section-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding: 0 4px;
}

.game-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 12px;
    border: 1px solid rgba(17, 24, 39, 0.12);
    background: #fff;
    color: #1f2937;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 2px 6px rgba(17, 24, 39, 0.06);
}

.game-back-btn:hover {
    background: #f9fafb;
    transform: translateX(-2px);
    box-shadow: 0 4px 10px rgba(17, 24, 39, 0.1);
}

.game-back-btn .material-symbols-rounded {
    font-size: 18px;
}

.game-section-title {
    margin: 0;
    font-family: 'Fredoka', sans-serif;
    font-size: clamp(20px, 2.4vw, 26px);
    font-weight: 700;
    color: #1f2937;
}

/* ---------- Mini Game Frame ---------- */
.mini-game-frame {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 18px 40px rgba(17, 24, 39, 0.14);
    border: 1px solid rgba(17, 24, 39, 0.08);
    min-height: 560px;
}

.mini-game-quiz {
    background: linear-gradient(180deg, #eef2ff 0%, #faf5ff 100%);
}

.mini-game-pasal {
    background: linear-gradient(180deg, #ecfdf5 0%, #f0fdf4 100%);
}

/* ---------- Mini Screens (Intro / Play / Result) ---------- */
.mini-screen {
    padding: 36px 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: miniFadeIn 0.3s ease;
}

.mini-screen-hidden {
    display: none !important;
}

@keyframes miniFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.mini-screen-intro,
.mini-screen-result {
    align-items: center;
    text-align: center;
    padding: 48px 28px;
}

.mini-screen-icon {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 10px 26px rgba(17, 24, 39, 0.18);
}

.mini-game-quiz .mini-screen-icon {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.mini-game-pasal .mini-screen-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.mini-screen-icon .material-symbols-rounded {
    font-size: 56px;
}

.mini-screen-icon-result {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
}

.mini-screen-title {
    margin: 0;
    font-family: 'Fredoka', sans-serif;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    color: #1f2937;
}

.mini-screen-desc {
    margin: 0;
    color: #4b5563;
    font-size: 15px;
    line-height: 1.6;
    max-width: 540px;
}

.mini-screen-meta {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.mini-screen-meta li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 12px;
    background: #fff;
    color: #1f2937;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(17, 24, 39, 0.06);
    border: 1px solid rgba(17, 24, 39, 0.06);
}

.mini-screen-meta li .material-symbols-rounded {
    font-size: 18px;
    color: #4f46e5;
}

.mini-game-pasal .mini-screen-meta li .material-symbols-rounded {
    color: #059669;
}

/* ---------- Topbar (Play screen) ---------- */
.mini-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 6px 16px rgba(17, 24, 39, 0.08);
    flex-wrap: wrap;
}

.mini-topbar-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #1f2937;
    font-size: 14px;
}

.mini-topbar-item .material-symbols-rounded {
    font-size: 20px;
    color: #6b7280;
}

.mini-topbar-score {
    color: #f59e0b;
}

.mini-topbar-score .material-symbols-rounded {
    color: #f59e0b;
}

.mini-topbar-timer {
    color: #4f46e5;
}

.mini-topbar-timer .material-symbols-rounded {
    color: #4f46e5;
}

.mini-topbar-timer-danger {
    color: #dc2626 !important;
    animation: timerPulse 0.6s ease-in-out infinite;
}

.mini-topbar-timer-danger .material-symbols-rounded {
    color: #dc2626 !important;
}

@keyframes timerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* ---------- Timer Bar ---------- */
.mini-timer-bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.08);
    overflow: hidden;
    margin-top: -6px;
}

.mini-timer-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #4f46e5 0%, #6366f1 100%);
    border-radius: 999px;
    transition: width 0.4s linear, background 0.3s ease;
}

/* ---------- Question Card ---------- */
.mini-question-card {
    background: #fff;
    border-radius: 18px;
    padding: 22px 22px 20px;
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.08);
    border: 1px solid rgba(17, 24, 39, 0.05);
}

.mini-question-card-case {
    background: linear-gradient(180deg, #fff 0%, #f0fdf4 100%);
    border-left: 4px solid #10b981;
}

.mini-question-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.mini-badge-case {
    background: #d1fae5;
    color: #065f46;
}

.mini-question-text {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.5;
}

.mini-case-text {
    margin: 0;
    font-size: 15px;
    color: #1f2937;
    line-height: 1.65;
    font-style: italic;
}

/* ---------- Options ---------- */
.mini-options {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.mini-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 2px solid rgba(17, 24, 39, 0.08);
    background: #fff;
    color: #1f2937;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.mini-option:hover:not(:disabled) {
    border-color: #6366f1;
    background: #f5f3ff;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(99, 102, 241, 0.15);
}

.mini-game-pasal .mini-option:hover:not(:disabled) {
    border-color: #10b981;
    background: #ecfdf5;
    box-shadow: 0 6px 14px rgba(16, 185, 129, 0.15);
}

.mini-option:disabled {
    cursor: default;
    opacity: 0.85;
}

.mini-option-text {
    flex: 1;
    line-height: 1.45;
}

.mini-option-correct {
    border-color: #10b981 !important;
    background: #d1fae5 !important;
    color: #065f46 !important;
    animation: optionPop 0.35s ease;
}

.mini-option-wrong {
    border-color: #ef4444 !important;
    background: #fee2e2 !important;
    color: #991b1b !important;
}

@keyframes optionPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

/* ---------- Feedback ---------- */
.mini-feedback {
    min-height: 24px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    display: none;
}

.mini-feedback:not(:empty) {
    display: block;
}

.mini-feedback-ok {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.mini-feedback-bad {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.mini-feedback-warn {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

/* ---------- Next Button Wrap (Pasal) ---------- */
.mini-next-wrap {
    display: flex;
    justify-content: flex-end;
}

.mini-next-hidden {
    display: none !important;
}

/* ---------- Result Stats ---------- */
.mini-result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 14px;
    width: 100%;
    max-width: 520px;
}

.mini-stat {
    background: #fff;
    border-radius: 14px;
    padding: 14px 12px;
    box-shadow: 0 6px 14px rgba(17, 24, 39, 0.08);
    border: 1px solid rgba(17, 24, 39, 0.05);
    text-align: center;
}

.mini-stat-label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.mini-stat-value {
    display: block;
    font-family: 'Fredoka', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #1f2937;
}

.mini-result-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
}

/* ---------- Mini Buttons ---------- */
.mini-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 14px;
    border: none;
    font-family: inherit;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.mini-btn .material-symbols-rounded {
    font-size: 20px;
}

.mini-btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

.mini-game-pasal .mini-btn-primary,
.game-card-pasal .mini-btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35);
}

.mini-btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.mini-btn-secondary {
    background: #fff;
    color: #1f2937;
    border: 1px solid rgba(17, 24, 39, 0.12);
    box-shadow: 0 3px 8px rgba(17, 24, 39, 0.08);
}

.mini-btn-secondary:hover {
    background: #f9fafb;
    transform: translateY(-2px);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .game-page-container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .game-hub-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .game-card {
        max-width: 520px;
        margin: 0 auto;
        width: 100%;
    }

    .game-wood-frame {
        padding: 10px;
        border-radius: 18px;
    }

    .game-canvas-wrapper {
        border-radius: 14px;
    }

    .quiz-modal .quiz-card,
    .puzzle-modal .puzzle-card {
        width: calc(100% - 24px);
        max-width: 520px;
    }
}

@media (max-width: 640px) {
    .game-page-container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .game-hub {
        padding: 24px 14px 40px;
    }

    .game-hub-header {
        margin-bottom: 18px;
    }

    .game-hub-eyebrow {
        font-size: 11px;
        letter-spacing: 1.5px;
    }

    .game-hub-title {
        font-size: 24px;
        line-height: 1.2;
    }

    .game-hub-subtitle {
        font-size: 14px;
        line-height: 1.5;
    }

    .game-hub-grid {
        gap: 16px;
    }

    .game-card-thumb {
        height: 170px;
    }

    .game-card-body {
        padding: 16px 18px 18px;
        gap: 10px;
    }

    .game-card-title {
        font-size: 18px;
    }

    .game-card-desc {
        font-size: 13.5px;
        line-height: 1.5;
    }

    .game-card-meta {
        gap: 6px;
        font-size: 12px;
    }

    .game-card-meta li {
        padding: 4px 10px;
        font-size: 12px;
    }

    .game-card-btn {
        padding: 10px 14px;
        font-size: 14px;
    }

    .game-section-bar {
        gap: 10px;
        padding: 10px 12px;
        flex-wrap: wrap;
    }

    .game-section-title {
        font-size: 16px;
        line-height: 1.3;
    }

    .game-back-btn {
        padding: 8px 12px;
        font-size: 13px;
        gap: 4px;
    }

    .game-back-btn .material-symbols-rounded {
        font-size: 18px;
    }

    .mini-game-frame {
        border-radius: 16px;
    }

    .mini-screen {
        padding: 24px 16px;
    }

    .mini-screen-intro,
    .mini-screen-result {
        padding: 32px 16px;
    }

    .mini-screen-icon {
        width: 72px;
        height: 72px;
    }

    .mini-screen-icon .material-symbols-rounded {
        font-size: 42px;
    }

    .mini-screen-title {
        font-size: 22px;
        line-height: 1.25;
    }

    .mini-screen-desc {
        font-size: 14px;
        line-height: 1.55;
    }

    .mini-screen-meta {
        gap: 6px;
        font-size: 12.5px;
    }

    .mini-screen-meta li {
        padding: 5px 10px;
        font-size: 12.5px;
    }

    .mini-question-card {
        padding: 16px 14px;
    }

    .mini-question-text {
        font-size: 15px;
        line-height: 1.5;
    }

    .mini-case-text {
        font-size: 14px;
        line-height: 1.55;
    }

    .mini-option {
        padding: 12px 14px;
        font-size: 14px;
    }

    .mini-topbar {
        padding: 10px 12px;
        font-size: 13px;
        gap: 8px;
        flex-wrap: wrap;
    }

    .mini-topbar-item {
        font-size: 13px;
    }

    .mini-stat-value {
        font-size: 22px;
    }

    .mini-result-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .mini-stat {
        padding: 12px 10px;
    }

    .mini-stat-label {
        font-size: 11.5px;
    }

    .mini-result-actions {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .mini-result-actions .mini-btn {
        width: 100%;
        justify-content: center;
    }

    .mini-btn {
        padding: 12px 18px;
        font-size: 14px;
    }

    /* Flappy game canvas wrapper smaller chrome on mobile */
    .game-wood-frame {
        padding: 8px;
        border-radius: 16px;
    }

    .game-canvas-wrapper {
        border-radius: 12px;
    }
}

@media (max-width: 420px) {
    .game-hub-title {
        font-size: 21px;
    }

    .game-hub-subtitle {
        font-size: 13px;
    }

    .game-card-thumb {
        height: 150px;
    }

    .game-card-title {
        font-size: 17px;
    }

    .game-card-desc {
        font-size: 13px;
    }

    .game-section-title {
        font-size: 15px;
    }

    .game-back-btn {
        padding: 7px 10px;
        font-size: 12.5px;
    }

    .mini-screen-title {
        font-size: 20px;
    }

    .mini-screen-desc {
        font-size: 13.5px;
    }

    .mini-screen-icon {
        width: 64px;
        height: 64px;
    }

    .mini-screen-icon .material-symbols-rounded {
        font-size: 36px;
    }

    .mini-result-stats {
        grid-template-columns: 1fr;
    }

    .mini-topbar {
        padding: 8px 10px;
        font-size: 12px;
    }

    .mini-topbar-item {
        font-size: 12px;
    }

    .mini-question-text {
        font-size: 14.5px;
    }

    .mini-case-text {
        font-size: 13.5px;
    }

    .mini-option {
        padding: 11px 12px;
        font-size: 13.5px;
    }
}

/* =========================================================
   Hub Profile Panel + Leaderboard (di depan Game Hub)
   ========================================================= */
.hub-profile-panel {
    margin-top: 28px;
    padding: 24px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 247, 237, 0.95) 0%, rgba(254, 243, 199, 0.92) 100%);
    border: 2px solid rgba(234, 88, 12, 0.18);
    box-shadow:
        0 10px 30px rgba(234, 88, 12, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    position: relative;
    overflow: hidden;
}

.hub-profile-panel::before {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.hub-profile-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 22px;
    align-items: stretch;
    position: relative;
    z-index: 1;
}

/* ---------- Form (kiri) ---------- */
.hub-profile-form-wrap {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.75);
    border: 1.5px solid rgba(234, 88, 12, 0.15);
    backdrop-filter: blur(6px);
}

.hub-profile-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hub-profile-head .hub-profile-icon {
    font-size: 28px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(234, 88, 12, 0.3));
}

.hub-profile-head h3 {
    margin: 0;
    font-family: 'Fredoka', system-ui, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #7c2d12;
    line-height: 1.2;
}

.hub-profile-head p {
    margin: 2px 0 0;
    font-size: 13px;
    color: #92400e;
    opacity: 0.85;
}

.hub-profile-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hub-profile-label {
    font-size: 13px;
    font-weight: 600;
    color: #7c2d12;
    margin-bottom: -4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hub-profile-input {
    width: 100%;
    padding: 11px 14px;
    border-radius: 12px;
    border: 2px solid rgba(234, 88, 12, 0.2);
    background: #fffbeb;
    font-size: 14.5px;
    font-family: inherit;
    color: #451a03;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.hub-profile-input:focus {
    outline: none;
    border-color: #ea580c;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

.hub-profile-input::placeholder {
    color: #b45309;
    opacity: 0.55;
}

.hub-profile-save {
    margin-top: 6px;
    width: 100%;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(234, 88, 12, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hub-profile-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(234, 88, 12, 0.45);
}

.hub-profile-save:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(234, 88, 12, 0.3);
}

.hub-profile-hint {
    min-height: 18px;
    font-size: 12.5px;
    font-weight: 600;
    margin-top: 2px;
    transition: color 0.2s ease;
}

.hub-profile-hint-ok {
    color: #047857;
}

.hub-profile-hint-err {
    color: #b91c1c;
}

.hub-profile-hint-info {
    color: #92400e;
    opacity: 0.8;
}

/* ---------- Leaderboard (kanan) ---------- */
.hub-leaderboard-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(67, 56, 202, 0.06) 0%, rgba(124, 58, 237, 0.08) 100%);
    border: 1.5px solid rgba(99, 102, 241, 0.2);
    min-height: 260px;
}

.hub-lb-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1.5px dashed rgba(99, 102, 241, 0.25);
}

.hub-lb-titles h3 {
    margin: 0;
    font-family: 'Fredoka', system-ui, sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: #3730a3;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.2;
}

.hub-lb-titles p {
    margin: 2px 0 0;
    font-size: 12.5px;
    color: #4338ca;
    opacity: 0.8;
}

.hub-lb-refresh {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1.5px solid rgba(99, 102, 241, 0.3);
    background: #ffffff;
    color: #4338ca;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
}

.hub-lb-refresh:hover {
    background: #4338ca;
    color: #ffffff;
    transform: rotate(180deg);
    border-color: #4338ca;
}

.hub-lb-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: 320px;
    padding-right: 4px;
}

.hub-lb-list::-webkit-scrollbar {
    width: 6px;
}

.hub-lb-list::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.35);
    border-radius: 6px;
}

.hub-lb-empty {
    text-align: center;
    padding: 28px 12px;
    color: #6366f1;
    opacity: 0.7;
    font-size: 13.5px;
    font-style: italic;
}

.hub-lb-item,
.hub-lb-row {
    display: grid;
    grid-template-columns: 38px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(99, 102, 241, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.hub-lb-item:hover,
.hub-lb-row:hover {
    transform: translateX(2px);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.15);
}

.hub-lb-rank {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e7ff;
    color: #4338ca;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    font-family: 'Fredoka', system-ui, sans-serif;
    flex-shrink: 0;
}

.hub-lb-rank.rank-1,
.hub-lb-rank-1 {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(251, 191, 36, 0.45);
}

.hub-lb-rank.rank-2,
.hub-lb-rank-2 {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    color: #475569;
    box-shadow: 0 3px 8px rgba(148, 163, 184, 0.4);
}

.hub-lb-rank.rank-3,
.hub-lb-rank-3 {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(217, 119, 6, 0.4);
}

.hub-lb-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fde68a 0%, #fbbf24 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hub-lb-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.hub-lb-name {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-lb-school {
    font-size: 11.5px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-lb-score {
    font-family: 'Fredoka', system-ui, sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #ea580c;
    letter-spacing: 0.5px;
    padding-left: 6px;
}

/* Anti-overflow: pastikan info pemain tidak memaksa lebar */
.hub-lb-info {
    min-width: 0;
    overflow: hidden;
}

.hub-lb-name,
.hub-lb-school {
    max-width: 100%;
}

/* ---------- Responsive: stack vertikal di mobile ---------- */
@media (max-width: 768px) {
    .hub-profile-panel {
        padding: 18px;
        margin-top: 22px;
        border-radius: 18px;
    }

    .hub-profile-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .hub-profile-form-wrap,
    .hub-leaderboard-wrap {
        padding: 14px;
        border-radius: 14px;
    }

    .hub-profile-head h3,
    .hub-lb-titles h3 {
        font-size: 17px;
    }

    .hub-profile-head p,
    .hub-lb-titles p {
        font-size: 12px;
    }

    .hub-lb-list {
        max-height: 280px;
    }

    .hub-lb-item,
    .hub-lb-row {
        grid-template-columns: 30px 1fr auto;
        gap: 8px;
        padding: 8px 10px;
    }

    .hub-lb-rank {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    .hub-lb-avatar {
        width: 26px;
        height: 26px;
        font-size: 13px;
    }

    .hub-lb-name {
        font-size: 13px;
    }

    .hub-lb-school {
        font-size: 11px;
    }

    .hub-lb-score {
        font-size: 15px;
    }
}

@media (max-width: 420px) {
    .hub-profile-panel {
        padding: 14px;
    }

    .hub-profile-input {
        font-size: 14px;
        padding: 10px 12px;
    }

    .hub-profile-save {
        font-size: 14px;
        padding: 11px 14px;
    }
}

/* =========================================================
   Hub Action Buttons (pemicu modal di header Game Hub)
   Gaya chunky kayu (border 3px coklat + drop shadow solid)
   ========================================================= */
.hub-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 22px;
}

.hub-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    border-radius: 14px;
    border: 3px solid #4a1a08;
    background: #fff8eb;
    color: #4a1a08;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 0 #4a1a08;
    text-align: left;
}

.hub-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #4a1a08;
}

.hub-action-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #4a1a08;
}

.hub-action-btn .material-symbols-rounded {
    font-size: 26px;
    line-height: 1;
    flex-shrink: 0;
}

.hub-action-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
}

.hub-action-title {
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.hub-action-sub {
    font-size: 11.5px;
    font-weight: 500;
    opacity: 0.8;
}

.hub-action-profile {
    background: linear-gradient(180deg, #ffd54d 0%, #e07a1f 100%);
    color: #4a1a08;
}

.hub-action-leaderboard {
    background: linear-gradient(180deg, #c0392b 0%, #8b1818 100%);
    color: #ffffff;
}

.hub-action-leaderboard .hub-action-sub {
    color: #ffe8d6;
}

@media (max-width: 480px) {
    .hub-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .hub-action-btn {
        justify-content: flex-start;
        width: 100%;
    }
}

/* =========================================================
   Hub Modal (Profil + Leaderboard sebagai popup)
   ========================================================= */
.hub-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    box-sizing: border-box;
}

.hub-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.hub-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Dialog: putih krem + border coklat tegas + drop shadow chunky (gaya quiz-card) */
.hub-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 720px;
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(180deg, #fff8eb 0%, #f5e6c8 100%);
    border: 5px solid #4a1a08;
    box-shadow: 0 10px 0 #2a0c04, 0 18px 40px rgba(0, 0, 0, 0.6);
    transform: scale(0.92) translateY(10px);
    transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.hub-modal.is-open .hub-modal-dialog {
    transform: scale(1) translateY(0);
}

/* ===== Header merah maroon ===== */
.hub-modal-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 60px 16px 18px;
    background: linear-gradient(180deg, #c0392b 0%, #8b1818 100%);
    border-bottom: 4px solid #4a1a08;
    color: #fff;
    flex-shrink: 0;
}

.hub-modal-mascot {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #fff8eb;
    border: 3px solid #4a1a08;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c0392b;
    box-shadow: 0 4px 0 #4a1a08;
    flex-shrink: 0;
}

.hub-modal-mascot .material-symbols-rounded {
    font-size: 30px;
}

.hub-modal-headtext {
    flex: 1;
    min-width: 0;
}

.hub-modal-title {
    margin: 0;
    font-family: 'Fredoka', 'Poppins', system-ui, sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    text-shadow: 0 2px 0 rgba(74, 26, 8, 0.55);
}

.hub-modal-subtitle {
    margin: 4px 0 0;
    font-size: 12.5px;
    font-weight: 500;
    color: #ffe8d6;
    opacity: 0.95;
    line-height: 1.3;
}

.hub-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 3px solid #4a1a08;
    background: #fff8eb;
    color: #4a1a08;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s ease, background 0.18s ease;
    z-index: 2;
    box-shadow: 0 3px 0 #4a1a08;
}

.hub-modal-close:hover {
    background: #ffe8d6;
    transform: rotate(90deg);
}

.hub-modal-close:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #4a1a08;
}

.hub-modal-close .material-symbols-rounded {
    font-size: 22px;
    font-weight: 800;
}

/* ===== Body cream (scroll area) ===== */
.hub-modal-body {
    padding: 20px 18px 18px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: #8b4513 rgba(139, 69, 19, 0.12);
}

.hub-modal-body::-webkit-scrollbar {
    width: 10px;
}

.hub-modal-body::-webkit-scrollbar-track {
    background: rgba(139, 69, 19, 0.12);
    border-radius: 10px;
}

.hub-modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #a0522d 0%, #8b4513 50%, #5a2d0c 100%);
    border-radius: 10px;
    border: 2px solid rgba(139, 69, 19, 0.12);
}

.hub-modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #b5651d 0%, #8b4513 50%, #4a1a08 100%);
}

/* ===== Override form & leaderboard di dalam modal ===== */
.hub-modal .hub-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
}

.hub-modal .hub-profile-form-wrap,
.hub-modal .hub-leaderboard-wrap {
    min-width: 0;
    box-sizing: border-box;
    padding: 14px;
    border-radius: 14px;
    background: #ffffff;
    border: 3px solid #4a1a08;
    box-shadow: 0 4px 0 #4a1a08;
}

.hub-modal .hub-profile-head .hub-profile-icon,
.hub-modal .hub-lb-head .hub-lb-icon {
    color: #c0392b;
    filter: none;
}

.hub-modal .hub-profile-title,
.hub-modal .hub-lb-title {
    color: #4a1a08;
    font-size: 17px;
    font-weight: 800;
    margin: 0;
}

.hub-modal .hub-profile-desc,
.hub-modal .hub-lb-desc {
    color: #8b4513;
    font-size: 12px;
    margin: 2px 0 0;
}

.hub-modal .hub-profile-label {
    color: #4a1a08;
    font-weight: 700;
}

.hub-modal .hub-profile-input {
    border: 3px solid #4a1a08;
    background: #fff8eb;
    color: #4a1a08;
    border-radius: 12px;
    box-shadow: 0 3px 0 #4a1a08;
    font-weight: 600;
}

.hub-modal .hub-profile-input:focus {
    border-color: #c0392b;
    background: #ffffff;
    box-shadow: 0 3px 0 #4a1a08;
}

.hub-modal .hub-profile-input::placeholder {
    color: #a0522d;
    opacity: 0.7;
}

/* Tombol simpan: kuning emas dengan shadow chunky */
.hub-modal .hub-profile-save {
    margin-top: 8px;
    background: linear-gradient(180deg, #f4c430 0%, #e07a1f 100%);
    color: #4a1a08;
    border: 3px solid #4a1a08;
    border-radius: 14px;
    font-weight: 800;
    box-shadow: 0 4px 0 #4a1a08;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.hub-modal .hub-profile-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 0 #4a1a08;
}

.hub-modal .hub-profile-save:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #4a1a08;
}

/* Refresh button */
.hub-modal .hub-lb-refresh {
    background: #fff8eb;
    border: 3px solid #4a1a08;
    color: #4a1a08;
    box-shadow: 0 3px 0 #4a1a08;
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.hub-modal .hub-lb-refresh:hover {
    background: #ffe8d6;
    color: #4a1a08;
    border-color: #4a1a08;
    transform: rotate(180deg);
}

.hub-modal .hub-lb-head {
    border-bottom: 2px dashed #8b4513;
    padding-bottom: 8px;
}

/* Leaderboard rows */
.hub-modal .hub-lb-item,
.hub-modal .hub-lb-row {
    background: #fff8eb;
    border: 2px solid #4a1a08;
    box-shadow: 0 3px 0 #4a1a08;
    border-radius: 10px;
}

.hub-modal .hub-lb-item:hover,
.hub-modal .hub-lb-row:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 0 #4a1a08;
}

.hub-modal .hub-lb-rank {
    background: #e07a1f;
    color: #fff;
    box-shadow: 0 2px 0 #b35c10;
    border: 2px solid #4a1a08;
}

.hub-modal .hub-lb-rank.rank-1,
.hub-modal .hub-lb-rank-1 {
    background: linear-gradient(135deg, #ffd54d 0%, #f4c430 100%);
    color: #4a1a08;
    box-shadow: 0 2px 0 #8b4513;
}

.hub-modal .hub-lb-rank.rank-2,
.hub-modal .hub-lb-rank-2 {
    background: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 100%);
    color: #1e293b;
    box-shadow: 0 2px 0 #475569;
}

.hub-modal .hub-lb-rank.rank-3,
.hub-modal .hub-lb-rank-3 {
    background: linear-gradient(135deg, #d97706 0%, #8b4513 100%);
    color: #fff;
    box-shadow: 0 2px 0 #4a1a08;
}

.hub-modal .hub-lb-name {
    color: #4a1a08;
}

.hub-modal .hub-lb-school {
    color: #8b4513;
}

.hub-modal .hub-lb-score {
    color: #c0392b;
    font-weight: 800;
}

.hub-modal .hub-lb-empty {
    color: #8b4513;
    font-style: italic;
}

/* Disable scroll body saat modal terbuka */
body.hub-modal-open {
    overflow: hidden;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hub-modal {
        /* Padding-top besar supaya dialog tidak ketutupan navbar (sticky di mobile).
           Navbar di mobile sekitar 64-72px, jadi 88px aman. */
        padding: 88px 12px 12px;
        align-items: flex-start;
    }
    .hub-modal-dialog {
        border-radius: 18px;
        border-width: 4px;
        max-height: calc(100vh - 100px);
        max-height: calc(100dvh - 100px);
    }
    .hub-modal-header {
        padding: 12px 54px 12px 14px;
        gap: 10px;
    }
    .hub-modal-mascot {
        width: 44px;
        height: 44px;
    }
    .hub-modal-mascot .material-symbols-rounded {
        font-size: 24px;
    }
    .hub-modal-title {
        font-size: 17px;
    }
    .hub-modal-subtitle {
        font-size: 11.5px;
    }
    .hub-modal-close {
        top: 10px;
        right: 10px;
        width: 34px;
        height: 34px;
        border-width: 2.5px;
    }
    .hub-modal-body {
        padding: 14px 12px 12px;
    }
    .hub-modal .hub-profile-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .hub-modal .hub-profile-form-wrap,
    .hub-modal .hub-leaderboard-wrap {
        padding: 12px;
        border-width: 2.5px;
    }
}

@media (max-width: 420px) {
    .hub-modal {
        /* Mobile kecil: padding-top tetap besar untuk hindari navbar.
           Navbar di mobile kecil ~60-64px, jadi 80px aman. */
        padding: 80px 8px 8px;
        align-items: flex-start;
    }
    .hub-modal-dialog {
        border-radius: 14px;
        max-height: calc(100vh - 92px);
        max-height: calc(100dvh - 92px);
    }
    .hub-modal-header {
        padding: 10px 48px 10px 12px;
    }
    .hub-modal-mascot {
        width: 40px;
        height: 40px;
        border-width: 2.5px;
    }
    .hub-modal-title {
        font-size: 16px;
    }
    .hub-modal-subtitle {
        font-size: 11px;
    }
    .hub-modal-body {
        padding: 12px 10px 10px;
    }
}

/* =========================================================
   PUZZLE MENENUN (Mini Game) - Chunky Game UI Theme
   ========================================================= */
.mini-game-puzzle {
    background: linear-gradient(180deg, #fff8eb 0%, #f5e6c8 100%);
    border: 4px solid #4a1a08 !important;
    box-shadow:
        0 8px 0 #4a1a08,
        0 14px 28px rgba(0, 0, 0, 0.18) !important;
}

/* Override intro/result screen icon for puzzle (chunky maroon style) */
.mini-game-puzzle .mini-screen-icon {
    background: linear-gradient(180deg, #fff8eb 0%, #fde9b8 100%) !important;
    border: 4px solid #4a1a08;
    border-radius: 18px;
    box-shadow:
        0 6px 0 #4a1a08,
        0 10px 20px rgba(0, 0, 0, 0.18);
    color: #b91c1c;
}
.mini-game-puzzle .mini-screen-icon .material-symbols-rounded {
    color: #b91c1c;
    text-shadow: 0 2px 0 rgba(74, 26, 8, 0.2);
}
.mini-game-puzzle .mini-screen-icon-result {
    background: linear-gradient(180deg, #fde68a 0%, #fbbf24 100%) !important;
}
.mini-game-puzzle .mini-screen-icon-result .material-symbols-rounded {
    color: #4a1a08;
}

/* Title & description in puzzle theme */
.mini-game-puzzle .mini-screen-title {
    color: #4a1a08;
    text-shadow: 0 2px 0 rgba(74, 26, 8, 0.08);
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
}
.mini-game-puzzle .mini-screen-desc {
    color: #6b3a1a;
}

/* Meta pills - chunky maroon */
.mini-game-puzzle .mini-screen-meta li {
    background: #fff8eb !important;
    color: #4a1a08 !important;
    border: 3px solid #4a1a08;
    border-radius: 10px;
    box-shadow: 0 3px 0 #4a1a08;
    padding: 6px 12px;
    font-weight: 600;
}
.mini-game-puzzle .mini-screen-meta li .material-symbols-rounded {
    color: #b91c1c !important;
}

/* Primary button - chunky red maroon */
.mini-game-puzzle .mini-btn-primary {
    background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%) !important;
    color: #fff8eb !important;
    border: 4px solid #4a1a08;
    border-radius: 12px;
    box-shadow: 0 6px 0 #4a1a08 !important;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.mini-game-puzzle .mini-btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 0 #4a1a08 !important;
    filter: brightness(1.05);
}
.mini-game-puzzle .mini-btn-primary:active {
    transform: translateY(3px) !important;
    box-shadow: 0 3px 0 #4a1a08 !important;
}
.mini-game-puzzle .mini-btn-secondary {
    background: #fff8eb !important;
    color: #4a1a08 !important;
    border: 4px solid #4a1a08;
    border-radius: 12px;
    box-shadow: 0 6px 0 #4a1a08 !important;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.mini-game-puzzle .mini-btn-secondary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 0 #4a1a08 !important;
    background: #fde9b8 !important;
}
.mini-game-puzzle .mini-btn-secondary:active {
    transform: translateY(3px) !important;
    box-shadow: 0 3px 0 #4a1a08 !important;
}

/* Topbar chunky pill style for puzzle */
.mini-game-puzzle .mini-topbar {
    background: #4a1a08;
    border-radius: 14px;
    padding: 12px;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12);
}
.mini-game-puzzle .mini-topbar-item {
    background: #fff8eb;
    color: #4a1a08;
    border: 3px solid #4a1a08;
    border-radius: 10px;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
    padding: 8px 14px;
    font-weight: 700;
    font-family: 'Fredoka', sans-serif;
}
.mini-game-puzzle .mini-topbar-item b {
    color: #b91c1c;
}
.mini-game-puzzle .mini-topbar-item .material-symbols-rounded {
    color: #b91c1c;
}

/* Result stats chunky pills */
.mini-game-puzzle .mini-stat {
    background: #fff8eb !important;
    color: #4a1a08 !important;
    border: 3px solid #4a1a08;
    border-radius: 10px;
    box-shadow: 0 3px 0 #4a1a08;
    padding: 8px 14px;
    font-weight: 600;
}
.mini-game-puzzle .mini-stat b {
    color: #b91c1c;
}
.mini-game-puzzle .mini-stat .material-symbols-rounded {
    color: #b91c1c !important;
}

.puzzle-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 16px 12px 8px;
    width: 100%;
}

.puzzle-stage .puzzle-board {
    position: relative;
    display: block;
    width: 100%;
    max-width: 360px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    padding: 0;
    background: linear-gradient(135deg, #fff3d6 0%, #f1dba2 100%);
    border: 4px solid #4a1a08;
    border-radius: 14px;
    box-shadow:
        0 8px 0 #4a1a08,
        inset 0 0 0 2px rgba(255, 255, 255, 0.4),
        0 14px 28px rgba(0, 0, 0, 0.18);
    gap: 0;
    grid-template-columns: none;
    grid-template-rows: none;
}

.puzzle-stage .puzzle-slot {
    position: absolute;
    box-sizing: border-box;
    border: 1px dashed rgba(74, 26, 8, 0.25);
    background: transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    pointer-events: none;
    border-radius: 0;
}

.puzzle-stage .puzzle-slot.is-hover {
    background: rgba(34, 197, 94, 0.18);
    border: 2px solid #16a34a;
}

.puzzle-stage .puzzle-slot.is-hover-wrong {
    background: rgba(239, 68, 68, 0.15);
    border: 2px solid #dc2626;
}

/* Piece styling di-handle sepenuhnya oleh inline style dari createPieceEl (background-image crop).
   Hanya tambahkan transition + hover effect tanpa override background/border/size. */
.puzzle-stage .puzzle-piece {
    transition: transform 0.12s ease, filter 0.12s ease;
}

.puzzle-stage .puzzle-piece:hover:not(.puzzle-piece-locked) {
    transform: translateY(-2px) scale(1.04);
    filter: brightness(1.05);
}

.puzzle-piece-dragging {
    cursor: grabbing !important;
    transform: scale(1.08);
    filter: brightness(1.08) drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
    z-index: 9999;
}

.puzzle-piece-locked {
    cursor: default;
    pointer-events: none;
}

.puzzle-tray-wrap {
    width: 100%;
    max-width: 520px;
    background: #fff3d6;
    border: 4px solid #4a1a08;
    border-radius: 14px;
    box-shadow:
        0 6px 0 #4a1a08,
        inset 0 2px 0 rgba(255, 255, 255, 0.6);
    padding: 12px;
}

.puzzle-tray-label {
    display: inline-block;
    background: #b91c1c;
    color: #fff8eb;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 13px;
    padding: 4px 12px;
    border: 3px solid #4a1a08;
    border-radius: 8px;
    box-shadow: 0 3px 0 #4a1a08;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.puzzle-tray-wrap .puzzle-tray {
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 120px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    border: 2px dashed rgba(74, 26, 8, 0.35);
    align-items: center;
    justify-content: center;
    grid-auto-flow: unset;
    grid-auto-columns: unset;
    overflow: visible;
}

/* Tray piece: inline style dari createPieceEl sudah mengatur ukuran & background.
   Tidak perlu override apa pun di sini. */

/* Quiz card overlay after puzzle solved */
.puzzle-quiz-card {
    width: 100%;
    max-width: 520px;
    margin: 16px auto 0;
    background: linear-gradient(180deg, #fff8eb 0%, #fde9b8 100%);
    border: 4px solid #4a1a08;
    border-radius: 16px;
    box-shadow:
        0 8px 0 #4a1a08,
        0 14px 28px rgba(0, 0, 0, 0.22);
    padding: 18px;
    animation: puzzleQuizPop 0.4s ease;
}

@keyframes puzzleQuizPop {
    0% { transform: scale(0.85); opacity: 0; }
    60% { transform: scale(1.04); opacity: 1; }
    100% { transform: scale(1); }
}

.puzzle-quiz-hidden {
    display: none !important;
}

.puzzle-quiz-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 3px solid rgba(74, 26, 8, 0.2);
}

.puzzle-quiz-head .material-symbols-rounded {
    font-size: 28px;
    color: #b91c1c;
    background: #fff;
    border: 3px solid #4a1a08;
    border-radius: 10px;
    padding: 4px;
    box-shadow: 0 3px 0 #4a1a08;
}

.puzzle-quiz-head-title {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #4a1a08;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.puzzle-quiz-text {
    font-family: 'Fredoka', sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: #4a1a08;
    line-height: 1.4;
    margin-bottom: 14px;
}

.puzzle-quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.puzzle-quiz-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    background: #fff;
    border: 3px solid #4a1a08;
    border-radius: 12px;
    box-shadow: 0 4px 0 #4a1a08;
    cursor: pointer;
    font-family: 'Fredoka', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #4a1a08;
    text-align: left;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease;
}

.puzzle-quiz-option:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #4a1a08;
    background: #fff8eb;
}

.puzzle-quiz-option:active:not(:disabled) {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #4a1a08;
}

.puzzle-quiz-option:disabled {
    cursor: default;
    opacity: 0.85;
}

.puzzle-quiz-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #b91c1c;
    color: #fff8eb;
    font-weight: 700;
    border: 2px solid #4a1a08;
    border-radius: 8px;
    flex-shrink: 0;
}

.puzzle-quiz-opt-text {
    flex: 1;
}

.puzzle-quiz-option-correct {
    background: linear-gradient(180deg, #bbf7d0 0%, #86efac 100%) !important;
    border-color: #166534 !important;
    box-shadow: 0 4px 0 #166534 !important;
}

.puzzle-quiz-option-correct .puzzle-quiz-letter {
    background: #16a34a;
    border-color: #166534;
}

.puzzle-quiz-option-wrong {
    background: linear-gradient(180deg, #fecaca 0%, #fca5a5 100%) !important;
    border-color: #991b1b !important;
    box-shadow: 0 4px 0 #991b1b !important;
}

.puzzle-quiz-feedback {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    min-height: 18px;
}

.puzzle-quiz-fb-ok {
    background: #dcfce7;
    border: 2px solid #16a34a;
    color: #166534;
}

.puzzle-quiz-fb-bad {
    background: #fee2e2;
    border: 2px solid #dc2626;
    color: #991b1b;
}

/* Responsive: smaller boards on mobile */
@media (max-width: 640px) {
    .puzzle-board {
        max-width: 300px;
    }
    .puzzle-tray-wrap {
        padding: 10px;
    }
    .puzzle-quiz-text {
        font-size: 15px;
    }
    .puzzle-quiz-option {
        font-size: 14px;
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .puzzle-board {
        max-width: 270px;
    }
    .puzzle-stage {
        padding: 10px 6px 4px;
        gap: 14px;
    }
    .puzzle-quiz-letter {
        width: 26px;
        height: 26px;
        font-size: 13px;
    }
}

/* ============================================================
 * GLOBAL PAGE LOADER (Spinner puter + clean fade-out)
 * Dipakai di tiap halaman supaya transisi/loading terlihat
 * smooth. Markup auto-inject lewat assets/js/page-loader.js.
 * ============================================================ */
#pageLoader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    /* Frosted glass: transparan + blur konten di belakangnya.
       Fallback (browser tanpa backdrop-filter): pakai rgba lembut. */
    background: rgba(255, 248, 235, 0.45);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 18px;
    opacity: 1;
    transition: opacity 360ms ease, visibility 360ms ease, backdrop-filter 360ms ease;
    pointer-events: auto;
}

/* Browser tanpa backdrop-filter (Firefox lama): tambah tint sedikit lebih solid */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    #pageLoader {
        background: rgba(255, 248, 235, 0.85);
    }
}

#pageLoader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#pageLoader .page-loader-spinner {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 5px solid rgba(180, 95, 6, 0.18);
    border-top-color: #b35900;
    border-right-color: #d9822b;
    animation: pageLoaderSpin 0.9s linear infinite;
    box-shadow: 0 6px 22px rgba(180, 95, 6, 0.18);
}

#pageLoader .page-loader-label {
    font-family: 'Poppins', 'Fredoka', system-ui, sans-serif;
    font-weight: 600;
    color: #6e3a05;
    font-size: 15px;
    letter-spacing: 0.4px;
    opacity: 0.85;
    animation: pageLoaderPulse 1.4s ease-in-out infinite;
}

@keyframes pageLoaderSpin {
    to { transform: rotate(360deg); }
}

@keyframes pageLoaderPulse {
    0%, 100% { opacity: 0.55; }
    50%      { opacity: 1; }
}

/* Body lock saat loader masih aktif: cegah scroll flicker */
body.page-loading {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    #pageLoader .page-loader-spinner { animation-duration: 1.8s; }
    #pageLoader .page-loader-label { animation: none; }
}