:root {
    --kuning: #FFD93D;
    --oranye: #FF9F1C;
    --merah: #FF6B6B;
    --hijau: #6BCB77;
    --biru: #4D96FF;
    --ungu: #9D4EDD;
    --pink: #FF85A1;
    --cream: #FFF9E6;
    --dark: #2D3142;
    --soft: #F4F7FB;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }
  html { scroll-behavior: smooth; }

  body {
    font-family: 'Nunito', sans-serif;
    background: var(--cream);
    color: var(--dark);
    overflow-x: hidden;
    line-height: 1.6;
  }

  h1, h2, h3, h4, .logo, .btn { font-family: 'Baloo 2', cursive; }

  /* ============ NAVBAR ============ */
  nav {
    position: sticky; top: 0; z-index: 999;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    padding: 10px 5%;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  }
  .logo { font-size: 1.7rem; font-weight: 800; color: var(--oranye); display: flex; align-items: center; gap: 8px; }
  .logo span { color: var(--biru); }
  .logo-emoji { display: inline-block; animation: wiggle 2.5s infinite; }
  @keyframes wiggle { 0%,100%{transform:rotate(-8deg)} 50%{transform:rotate(8deg)} }

  .nav-links { display: flex; gap: 4px; list-style: none; align-items: center; }
  .nav-links a {
    text-decoration: none; color: var(--dark); font-weight: 700;
    padding: 10px 16px; border-radius: 50px; transition: all 0.25s; font-size: 0.95rem;
  }
  .nav-links a:hover { background: var(--kuning); transform: translateY(-2px); }
  .btn-nav {
    background: var(--hijau) !important; color: white !important;
    box-shadow: 0 4px 0 #4aa857;
  }
  .btn-nav:hover { transform: translateY(2px) !important; box-shadow: 0 2px 0 #4aa857 !important; background: var(--hijau) !important; }
  .menu-toggle { display: none; font-size: 1.8rem; background: none; border: none; cursor: pointer; }

  /* ============ HERO ============ */
  .hero {
    position: relative; padding: 50px 5% 110px;
    display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center;
    min-height: 85vh;
    background: radial-gradient(circle at 80% 20%, #E0F4FF 0%, transparent 40%),
                radial-gradient(circle at 10% 80%, #FFE9C4 0%, transparent 45%),
                var(--cream);
    overflow: hidden;
  }

  .hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: white; padding: 8px 18px; border-radius: 50px;
    font-weight: 800; font-size: 0.85rem; margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border: 2px solid var(--kuning);
  }
  .hero-badge .dot {
    width: 8px; height: 8px; background: var(--hijau); border-radius: 50%;
    animation: pulse 1.5s infinite;
  }
  @keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(1.4)} }

  .hero-text h1 {
    font-size: clamp(2rem, 4.5vw, 3.5rem); line-height: 1.12; margin-bottom: 20px;
    font-weight: 800;
  }
  .highlight {
    background: var(--kuning); padding: 0 10px; border-radius: 12px;
    display: inline-block; transform: rotate(-2deg); position: relative;
  }
  .highlight2 { color: var(--merah); }
  .hero-text > p { font-size: 1.15rem; margin-bottom: 28px; color: #555; max-width: 500px; }

  .hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

  .btn {
    padding: 15px 30px; border-radius: 50px; font-weight: 800; font-size: 1rem;
    text-decoration: none; border: none; cursor: pointer; transition: all 0.2s;
    display: inline-flex; align-items: center; gap: 8px;
  }
  .btn-primary { background: var(--oranye); color: white; box-shadow: 0 6px 0 #cc7a00; }
  .btn-primary:hover { transform: translateY(3px); box-shadow: 0 3px 0 #cc7a00; }
  .btn-secondary { background: white; color: var(--biru); border: 3px solid var(--biru); }
  .btn-secondary:hover { background: var(--biru); color: white; }

  /* ============ MASKOT + ANIMASI IDLE ============ */
  .hero-visual { position: relative; display: flex; justify-content: center; align-items: center; }
  .mascot-wrap { position: relative; width: 100%; max-width: 440px; }
  .mascot-stage { position: relative; width: 100%; display: flex; align-items: center; justify-content: center; }

  .mascot-shadow {
    position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
    width: 160px; height: 18px; background: rgba(0,0,0,.12);
    border-radius: 50%; filter: blur(6px);
    animation: shadowBreathe 3.5s ease-in-out infinite;
  }
  @keyframes shadowBreathe {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: .12; }
    50%      { transform: translateX(-50%) scale(.88); opacity: .2; }
  }
  .mascot-breathe {
    width: 100%;
    animation: breathe 3.5s ease-in-out infinite;
    transform-origin: center bottom;
  }
  @keyframes breathe {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-6px) scale(1.012); }
  }
  .mascot-head-tilt {
    animation: headTilt 5s ease-in-out infinite;
    transform-origin: 50% 55%;
  }
  @keyframes headTilt {
    0%, 100% { transform: rotate(0deg); }
    25%      { transform: rotate(-2deg); }
    75%      { transform: rotate(2deg); }
  }
  .mascot-svg { width: 100%; height: auto; display: block; overflow: visible; }
  .eye-blink { transform-origin: center; transform-box: fill-box; }
  .eye-blink.blinking { animation: blinkAnim 0.18s ease-in-out; }
  @keyframes blinkAnim { 0%,100%{transform:scaleY(1)} 50%{transform:scaleY(0.08)} }
  .lens-shine { animation: shineShift 4s ease-in-out infinite; }
  @keyframes shineShift {
    0%, 100% { opacity: .55; transform: translate(0,0); }
    50%      { opacity: .85; transform: translate(2px,-2px); }
  }
  .wing-left  { transform-origin: 80% 20%; animation: wingWaveL 3.5s ease-in-out infinite; }
  .wing-right { transform-origin: 20% 20%; animation: wingWaveR 3.5s ease-in-out infinite; }
  @keyframes wingWaveL { 0%,100%{transform:rotate(-12deg)} 50%{transform:rotate(-16deg)} }
  @keyframes wingWaveR { 0%,100%{transform:rotate(12deg)} 50%{transform:rotate(16deg)} }
  .book { transform-origin: 40% 60%; animation: bookWiggle 4s ease-in-out infinite; }
  @keyframes bookWiggle { 0%,100%{transform:rotate(15deg)} 50%{transform:rotate(18deg)} }
  .beak { transform-origin: 50% 0%; animation: beakTalk 6s ease-in-out infinite; }
  @keyframes beakTalk { 0%,90%,100%{transform:scaleY(1)} 93%{transform:scaleY(1.15)} 96%{transform:scaleY(1)} }
  .tassel { transform-origin: 50% 0%; animation: tasselSwing 4s ease-in-out infinite; }
  @keyframes tasselSwing { 0%,100%{transform:rotate(-4deg)} 50%{transform:rotate(6deg)} }

  .speech-bubble {
    position: absolute; top: -10px; right: -10px;
    background: white; padding: 12px 18px; border-radius: 20px 20px 20px 4px;
    font-weight: 800; font-size: 0.9rem; box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    max-width: 160px; line-height: 1.3; z-index: 3;
    animation: bob 3s ease-in-out infinite;
  }
  @keyframes bob { 0%,100%{transform:translateY(0) rotate(-2deg)} 50%{transform:translateY(-6px) rotate(2deg)} }

  .mascot-breathe.cheer { animation: cheerJump 0.8s ease-in-out; }
  @keyframes cheerJump {
    0%, 100% { transform: translateY(0) scale(1); }
    30%      { transform: translateY(-25px) scale(1.05, 0.95); }
    50%      { transform: translateY(-35px) scale(1); }
    70%      { transform: translateY(-15px) scale(0.97, 1.03); }
  }
  .mascot-breathe.surprised { animation: surprisedShake 0.5s ease-in-out; }
  @keyframes surprisedShake {
    0%, 100% { transform: translateX(0) rotate(0); }
    20%      { transform: translateX(-8px) rotate(-3deg); }
    40%      { transform: translateX(8px) rotate(3deg); }
    60%      { transform: translateX(-6px) rotate(-2deg); }
    80%      { transform: translateX(6px) rotate(2deg); }
  }

  /* dekorasi hero */
  .cloud { position: absolute; width: 110px; height: 45px; background: white; border-radius: 50px; opacity: .9; pointer-events: none; }
  .cloud::before, .cloud::after { content:''; position: absolute; background: white; border-radius: 50%; }
  .cloud::before { width: 55px; height: 55px; top: -22px; left: 15px; }
  .cloud::after { width: 42px; height: 42px; top: -16px; left: 58px; }
  .cloud1 { top: 8%; left: 4%; animation: drift 22s linear infinite; }
  .cloud2 { top: 18%; right: 6%; transform: scale(.7); animation: drift 26s linear infinite reverse; }
  @keyframes drift { 0%,100%{transform:translateX(0)} 50%{transform:translateX(28px)} }

  .star { position: absolute; font-size: 1.8rem; animation: twinkle 2s infinite; pointer-events: none; }
  @keyframes twinkle { 0%,100%{transform:scale(1) rotate(0); opacity:1} 50%{transform:scale(1.3) rotate(15deg); opacity:.6} }
  .star1 { top: 22%; left: 46%; } .star2 { bottom: 22%; left: 7%; animation-delay:.5s; }
  .star3 { top: 33%; right: 4%; animation-delay:1s; }

  .balloon {
    position: absolute; width: 44px; height: 54px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: floatUp 6s ease-in-out infinite; pointer-events: none;
  }
  .balloon::after { content:''; position:absolute; bottom:-24px; left:50%; width:1.5px; height:24px; background:#999; transform:translateX(-50%); }
  .b1 { background: var(--merah); top: 52%; right: 10%; }
  .b2 { background: var(--hijau); top: 62%; right: 18%; animation-delay:1s; transform:scale(.8); }
  @keyframes floatUp { 0%,100%{transform:translateY(0) rotate(-3deg)} 50%{transform:translateY(-14px) rotate(3deg)} }

  /* ============ STATS ============ */
  .stats {
    background: var(--biru); padding: 40px 5%;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; color: white;
    border-radius: 50px 50px 0 0; margin-top: -50px; position: relative; z-index: 2;
    box-shadow: 0 -10px 40px rgba(77,150,255,.25);
  }
  .stat { text-align: center; padding: 8px; }
  .stat .num { font-family: 'Baloo 2', cursive; font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--kuning); }
  .stat .label { font-weight: 700; opacity: .95; margin-top: 4px; font-size: .95rem; }

  /* ============ SECTION COMMON ============ */
  section { padding: 80px 5%; position: relative; }
  .section-title { text-align: center; margin-bottom: 48px; }
  .section-title h2 { font-size: clamp(1.9rem, 3.8vw, 2.8rem); margin-bottom: 10px; font-weight: 800; }
  .section-title p { font-size: 1.1rem; color: #666; max-width: 620px; margin: 0 auto; }
  .wavy { display: inline-block; background: var(--kuning); padding: 0 10px; border-radius: 8px; transform: rotate(-1deg); }

  /* ============ FITUR ============ */
  .features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; max-width: 1200px; margin: 0 auto; }
  .feature-card {
    background: white; border-radius: 28px; padding: 32px 24px; text-align: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06); transition: all .3s;
    border: 3px solid transparent; cursor: pointer;
  }
  .feature-card:hover { transform: translateY(-8px) rotate(-1deg); border-color: var(--kuning); box-shadow: 0 15px 40px rgba(0,0,0,0.1); }
  .feature-icon {
    font-size: 3rem; width: 84px; height: 84px; line-height: 84px;
    border-radius: 26px; margin: 0 auto 18px; transition: transform .3s;
  }
  .feature-card:hover .feature-icon { transform: rotate(10deg) scale(1.08); }
  .icon-1{background:#FFF3C4}.icon-2{background:#D4F8E8}.icon-3{background:#FFE0E6}
  .icon-4{background:#DCE9FF}.icon-5{background:#F0E0FF}.icon-6{background:#FFEAD4}
  .feature-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
  .feature-card p { color: #777; font-size: .95rem; }

  /* ============ PROGRAM ============ */
  .programs { background: #F0F8FF; }
  .program-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 26px; max-width: 1100px; margin: 0 auto; }
  .program-card {
    border-radius: 32px; padding: 36px 28px; color: white; position: relative;
    overflow: hidden; transition: transform .3s; min-height: 220px;
    display: flex; flex-direction: column; justify-content: flex-end;
  }
  .program-card:hover { transform: scale(1.03) rotate(-1deg); }
  .program-card .emoji { font-size: 3.6rem; position: absolute; top: 18px; right: 22px; opacity: .55; transition: all .3s; }
  .program-card:hover .emoji { transform: scale(1.15) rotate(12deg); opacity: .8; }
  .program-card h3 { font-size: 1.5rem; margin-bottom: 6px; }
  .program-card p { font-size: .92rem; opacity: .95; }
  .prog-1{background:linear-gradient(135deg,#FF9F1C,#FF6B6B)}
  .prog-2{background:linear-gradient(135deg,#4D96FF,#9D4EDD)}
  .prog-3{background:linear-gradient(135deg,#6BCB77,#2EAF7D)}

  /* ============ GAME HUB + THEME SWITCHER ============ */
  .game-section {
    position: relative; overflow: hidden;
    transition: background 0.6s ease;
    background: linear-gradient(180deg, #FFF9E6 0%, #FFEEDB 100%);
  }
  .game-section::before {
    content:''; position:absolute; top:-40px; left:50%; transform:translateX(-50%);
    width: 200%; height: 80px; background: #F0F8FF;
    border-radius: 50%; z-index: 0;
    transition: background 0.6s ease;
  }
  .game-section > * { position: relative; z-index: 1; }

  /* Tema Game Section */
  .game-section[data-theme="kelas"] { background: linear-gradient(180deg, #FFF9E6 0%, #FFEEDB 100%); }
  .game-section[data-theme="laut"] { background: linear-gradient(180deg, #E0F7FA 0%, #B2EBF2 100%); }
  .game-section[data-theme="antariksa"] { background: linear-gradient(180deg, #1A1A3E 0%, #2D2D6B 100%); }
  .game-section[data-theme="dino"] { background: linear-gradient(180deg, #E8F5E9 0%, #C8E6C9 100%); }
  .game-section[data-theme="pantai"] { background: linear-gradient(180deg, #FFF3E0 0%, #FFE0B2 100%); }

  .game-section[data-theme="antariksa"] .section-title h2,
  .game-section[data-theme="antariksa"] .section-title p { color: #fff; }
  .game-section[data-theme="antariksa"] .wavy { background: var(--ungu); color: white; }

  .theme-switcher {
    display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
    margin-bottom: 32px;
  }
  .theme-btn {
    padding: 8px 18px; border-radius: 50px; border: 3px solid transparent;
    background: white; font-weight: 800; font-family: 'Baloo 2', cursive;
    cursor: pointer; font-size: .88rem; transition: all .25s;
    box-shadow: 0 3px 0 rgba(0,0,0,0.08);
  }
  .theme-btn:hover { transform: translateY(-2px); }
  .theme-btn.active { border-color: var(--oranye); background: var(--kuning); transform: scale(1.05); }

  .game-section[data-theme="antariksa"] .theme-btn { background: #3A3A7A; color: #fff; }
  .game-section[data-theme="antariksa"] .theme-btn.active { background: var(--ungu); color: #fff; }

  /* Dekorasi tema (bintang/gelembung/ombak) */
  .theme-deco { position: absolute; pointer-events: none; font-size: 2rem; opacity: .4; z-index: 0; }
  .theme-deco.d1 { top: 10%; left: 5%; }
  .theme-deco.d2 { top: 20%; right: 6%; }
  .theme-deco.d3 { bottom: 15%; left: 8%; }
  .theme-deco.d4 { bottom: 20%; right: 10%; }

  .game-hub {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px; max-width: 1100px; margin: 0 auto;
  }

  .game-card {
    background: white; border-radius: 28px; padding: 28px 22px;
    text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all .3s; cursor: pointer; position: relative; overflow: hidden;
    border: 3px solid transparent;
  }
  .game-card:hover { transform: translateY(-8px) scale(1.02); border-color: var(--oranye); }
  .game-card .game-emoji {
    font-size: 3.4rem; display: block; margin-bottom: 12px;
    transition: transform .3s;
  }
  .game-card:hover .game-emoji { transform: scale(1.2) rotate(-8deg); }
  .game-card h3 { font-size: 1.3rem; margin-bottom: 6px; }
  .game-card p { font-size: .9rem; color: #777; margin-bottom: 14px; min-height: 40px; }
  .game-card .play-hint {
    display: inline-block; padding: 6px 18px; border-radius: 50px;
    background: var(--oranye); color: white; font-weight: 800; font-size: .78rem;
    font-family: 'Baloo 2', cursive;
  }
  .game-card.available { cursor: pointer; }
  .game-card.available:hover .play-hint { background: var(--hijau); }

  .game-tag {
    display: inline-block; padding: 5px 14px; border-radius: 50px;
    font-size: .72rem; font-weight: 800; color: white; margin-bottom: 8px;
  }
  .tag-mat { background: var(--biru); }
  .tag-bahasa { background: var(--merah); }
  .tag-sains { background: var(--hijau); }
  .tag-inggris { background: var(--ungu); }

  .game-badge-new {
    position: absolute; top: 12px; right: 12px; background: var(--merah);
    color: white; padding: 4px 10px; border-radius: 50px; font-size: .65rem;
    font-weight: 800; transform: rotate(8deg);
    animation: bounceBadge 1.5s infinite;
  }
  @keyframes bounceBadge { 0%,100%{transform:rotate(8deg) translateY(0)} 50%{transform:rotate(8deg) translateY(-4px)} }

  /* Demo kuis lama (tetap ada buat quick demo) */
  .game-demo {
    background: white; border-radius: 34px; padding: 40px 30px;
    max-width: 640px; margin: 40px auto 0;
    box-shadow: 0 20px 60px rgba(255,159,28,0.18);
    border: 4px dashed var(--kuning); text-align: center;
  }
  .game-demo h3 { font-size: 1.6rem; margin-bottom: 6px; }
  .game-demo p { color: #777; margin-bottom: 22px; }

  .quiz-option {
    display: inline-block; margin: 6px; padding: 14px 28px;
    background: var(--cream); border: 3px solid #e0e0e0; border-radius: 18px;
    font-size: 1.2rem; font-weight: 800; font-family: 'Baloo 2', cursive;
    cursor: pointer; transition: all .2s; min-width: 80px;
  }
  .quiz-option:hover { background: var(--kuning); border-color: var(--oranye); transform: translateY(-3px); }
  .quiz-option.correct { background: var(--hijau); border-color: #4aa857; color: white; animation: pop .4s; }
  .quiz-option.wrong { background: var(--merah); border-color: #cc4b4b; color: white; animation: shake .4s; }
  @keyframes pop { 50% { transform: scale(1.15); } }
  @keyframes shake { 25%,75% { transform: translateX(-8px); } 50% { transform: translateX(8px); } }

  #quiz-result { margin-top: 18px; font-weight: 800; font-size: 1.1rem; min-height: 28px; }
  #quiz-progress { display: flex; gap: 6px; justify-content: center; margin-bottom: 18px; }
  .progress-dot { width: 10px; height: 10px; border-radius: 50%; background: #ddd; transition: all .3s; }
  .progress-dot.active { background: var(--oranye); transform: scale(1.3); }
  .progress-dot.done { background: var(--hijau); }

  /* ============ MODAL GAME ============ */
  .game-modal {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(0,0,0,0.75);
    display: none; align-items: center; justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
  }
  .game-modal.open { display: flex; animation: fadeIn .3s; }
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

  .game-modal-inner {
    background: white; border-radius: 32px;
    width: 100%; max-width: 600px; max-height: 92vh; overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalIn .4s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  @keyframes modalIn { from { opacity: 0; transform: scale(0.9) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }

  .modal-header {
    background: linear-gradient(135deg, var(--oranye), var(--merah));
    color: white; padding: 20px 24px;
    border-radius: 32px 32px 0 0;
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 5;
  }
  .modal-header h3 { font-size: 1.3rem; }
  .modal-close {
    background: rgba(255,255,255,0.25); border: none; color: white;
    width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
    font-size: 1.3rem; font-weight: 800; transition: all .2s;
    display: flex; align-items: center; justify-content: center;
  }
  .modal-close:hover { background: rgba(255,255,255,0.4); transform: rotate(90deg); }

  .modal-body { padding: 24px; position: relative; }

  .game-hud {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; gap: 12px;
  }
  .hud-item {
    background: var(--cream); padding: 10px 18px; border-radius: 16px;
    text-align: center; flex: 1;
  }
  .hud-item .hud-label { font-size: .72rem; font-weight: 800; color: #999; text-transform: uppercase; letter-spacing: .5px; }
  .hud-item .hud-val { font-family: 'Baloo 2', cursive; font-size: 1.5rem; font-weight: 800; color: var(--oranye); }
  .hud-item.time-low .hud-val { color: var(--merah); animation: pulseHud .5s infinite; }
  @keyframes pulseHud { 0%,100%{transform:scale(1)} 50%{transform:scale(1.15)} }

  .timer-bar {
    height: 12px; background: #eee; border-radius: 50px; overflow: hidden;
    margin-bottom: 24px;
  }
  .timer-fill {
    height: 100%; background: linear-gradient(90deg, var(--hijau), var(--kuning), var(--merah));
    border-radius: 50px; transition: width 1s linear;
    width: 100%;
  }

  .game-q {
    font-family: 'Baloo 2', cursive; font-size: 2.2rem; font-weight: 800;
    text-align: center; margin-bottom: 24px; color: var(--dark);
    min-height: 60px;
  }

  .btn-speak {
    display: inline-block; vertical-align: middle; margin-left: 10px;
    width: 44px; height: 44px; border-radius: 50%;
    border: 3px solid var(--ungu); background: #fff; cursor: pointer;
    font-size: 1.3rem; line-height: 1; transition: transform .15s, background .15s;
  }
  .btn-speak:hover { background: var(--cream); transform: scale(1.12) rotate(-8deg); }
  .btn-speak:active { transform: scale(.95); }

  .game-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .game-opt {
    padding: 18px; border-radius: 20px; border: 3px solid #e0e0e0;
    background: white; font-family: 'Baloo 2', cursive; font-size: 1.6rem;
    font-weight: 800; cursor: pointer; transition: all .2s;
    color: var(--dark);
  }
  .game-opt:hover:not(:disabled) { background: var(--kuning); border-color: var(--oranye); transform: translateY(-3px); }
  .game-opt:disabled { cursor: default; }
  .game-opt.correct { background: var(--hijau); border-color: #4aa857; color: white; animation: pop .4s; }
  .game-opt.wrong { background: var(--merah); border-color: #cc4b4b; color: white; animation: shake .4s; }

  /* Maskot mini di modal */
  .mini-mascot {
    position: absolute; bottom: 8px; right: 8px;
    width: 70px; height: 80px; pointer-events: none; z-index: 3;
    transition: transform .2s;
  }
  .mini-mascot.cheer { animation: miniCheer .6s ease-in-out; }
  @keyframes miniCheer {
    0%,100%{transform:translateY(0) rotate(0)}
    50%{transform:translateY(-15px) rotate(-8deg)}
  }
  .mini-mascot.surprised { animation: miniShake .4s ease-in-out; }
  @keyframes miniShake {
    0%,100%{transform:translateX(0) rotate(0)}
    25%{transform:translateX(-5px) rotate(-5deg)}
    75%{transform:translateX(5px) rotate(5deg)}
  }

  /* End screen */
  .game-end { text-align: center; padding: 20px 0; }
  .game-end .end-emoji { font-size: 4.5rem; display: block; margin-bottom: 12px; animation: pop .6s; }
  .game-end h3 { font-size: 1.7rem; margin-bottom: 6px; }
  .game-end .final-score {
    font-family: 'Baloo 2', cursive; font-size: 3rem; font-weight: 800;
    color: var(--oranye); margin: 12px 0;
  }
  .game-end .final-score small { font-size: 1rem; color: #999; }
  .game-end .medal { font-size: 2rem; margin: 8px 0 16px; }
  .game-end p { color: #777; margin-bottom: 20px; }
  .game-end-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

  .name-input-wrap {
    margin: 16px auto; max-width: 300px;
  }
  .name-input-wrap input {
    width: 100%; padding: 12px 16px; border-radius: 14px;
    border: 2px solid #e0e0e0; font-family: 'Nunito', sans-serif;
    font-size: 1rem; font-weight: 700; text-align: center;
  }
  .name-input-wrap input:focus { outline: none; border-color: var(--oranye); }

  /* ============ LEADERBOARD ============ */
  .leaderboard-section { background: #F0F8FF; }
  .lb-card {
    max-width: 640px; margin: 0 auto; background: white;
    border-radius: 28px; padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
  }
  #global-lb { list-style: none; padding: 0; margin: 0; }
  #global-lb li {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 4px; border-bottom: 1px solid #eee; font-weight: 700;
  }
  #global-lb li:last-child { border-bottom: none; }
  #global-lb .lb-name { display: flex; align-items: center; gap: 8px; }
  #global-lb .lb-score { color: var(--oranye); font-weight: 800; }
  #global-lb-empty { text-align: center; color: #999; margin: 12px 0; font-weight: 600; }

  /* ============ GALERI ============ */
  .galeri-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
    max-width: 1100px; margin: 0 auto;
  }
  .galeri-item {
    border-radius: 22px; overflow: hidden; position: relative;
    cursor: pointer; aspect-ratio: 1; display: flex;
    align-items: center; justify-content: center; font-size: 3.5rem;
    transition: all .3s;
  }
  .galeri-item:nth-child(1) { grid-column: span 2; grid-row: span 2; font-size: 6rem; }
  .galeri-item:hover { transform: scale(1.04) rotate(1.5deg); z-index: 2; }
  .galeri-item .galeri-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.65));
    color: white; padding: 40px 16px 14px; font-weight: 800; font-size: .9rem;
    opacity: 0; transition: opacity .3s;
  }
  .galeri-item:hover .galeri-overlay { opacity: 1; }
  .g1{background:linear-gradient(135deg,#FFD93D,#FF9F1C)}
  .g2{background:linear-gradient(135deg,#FF85A1,#FF6B6B)}
  .g3{background:linear-gradient(135deg,#6BCB77,#2EAF7D)}
  .g4{background:linear-gradient(135deg,#4D96FF,#9D4EDD)}
  .g5{background:linear-gradient(135deg,#FFD3A5,#FF9F1C)}
  .g6{background:linear-gradient(135deg,#A0E7E5,#4D96FF)}
  .g7{background:linear-gradient(135deg,#FBE7C6,#FF85A1)}
  .g8{background:linear-gradient(135deg,#B4F8C8,#6BCB77)}

  /* ============ PPDB FORM ============ */
  .ppdb { background: #F0F8FF; }
  .ppdb-wrap {
    max-width: 680px; margin: 0 auto; background: white;
    border-radius: 34px; padding: 40px 32px;
    box-shadow: 0 20px 60px rgba(77,150,255,.15); position: relative;
  }
  .ppdb-steps { display: flex; justify-content: space-between; margin-bottom: 36px; position: relative; }
  .ppdb-steps::before {
    content: ''; position: absolute; top: 22px; left: 12%; right: 12%; height: 3px;
    background: #e0e0e0; z-index: 0;
  }
  .ppdb-step { position: relative; z-index: 1; text-align: center; flex: 1; }
  .ppdb-step .circle {
    width: 46px; height: 46px; border-radius: 50%; background: #e0e0e0;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 6px; font-weight: 800; font-size: 1.1rem; color: #999;
    transition: all .3s; font-family: 'Baloo 2', cursive;
  }
  .ppdb-step.active .circle { background: var(--oranye); color: white; transform: scale(1.12); box-shadow: 0 4px 15px rgba(255,159,28,.4); }
  .ppdb-step.done .circle { background: var(--hijau); color: white; }
  .ppdb-step .step-label { font-size: .78rem; font-weight: 800; color: #999; }
  .ppdb-step.active .step-label { color: var(--oranye); }
  .ppdb-step.done .step-label { color: var(--hijau); }

  .ppdb-panel { display: none; animation: slideIn .35s ease; }
  .ppdb-panel.active { display: block; }
  @keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
  .ppdb-panel h3 { font-size: 1.4rem; margin-bottom: 6px; }
  .ppdb-panel > p { color: #777; margin-bottom: 20px; font-size: .95rem; }
  .form-group { margin-bottom: 16px; }
  .form-group label { display: block; font-weight: 800; font-size: .88rem; margin-bottom: 6px; color: var(--dark); }
  .form-group input, .form-group select {
    width: 100%; padding: 13px 16px; border-radius: 14px;
    border: 2px solid #e0e0e0; font-family: 'Nunito', sans-serif;
    font-size: .95rem; font-weight: 600; transition: all .2s; background: #fafbfd;
  }
  .form-group input:focus, .form-group select:focus {
    outline: none; border-color: var(--oranye); background: white;
    box-shadow: 0 0 0 4px rgba(255,159,28,.12);
  }
  .form-group input.error { border-color: var(--merah); background: #FFF0F0; }
  .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .ppdb-nav { display: flex; gap: 12px; margin-top: 24px; justify-content: space-between; }
  .btn-sm { padding: 12px 24px; font-size: .92rem; }
  .btn-outline { background: white; border: 2.5px solid #ddd; color: #666; box-shadow: none; }
  .btn-outline:hover { border-color: var(--oranye); color: var(--oranye); transform: none; }
  .success-panel { text-align: center; padding: 20px 0; }
  .success-panel .big-emoji { font-size: 5rem; display: block; margin-bottom: 16px; animation: pop .6s; }
  .success-panel h3 { font-size: 1.6rem; margin-bottom: 8px; }
  .success-panel p { color: #777; margin-bottom: 20px; }

  /* ============ BERITA ============ */
  .news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; max-width: 1100px; margin: 0 auto; }
  .news-card { background: white; border-radius: 24px; overflow: hidden; box-shadow: 0 8px 25px rgba(0,0,0,0.06); transition: transform .3s; }
  .news-card:hover { transform: translateY(-6px); }
  .news-thumb { height: 150px; display: flex; align-items: center; justify-content: center; font-size: 3.5rem; }
  .news-body { padding: 22px; }
  .news-tag { display: inline-block; padding: 4px 14px; border-radius: 50px; font-size: .72rem; font-weight: 800; margin-bottom: 10px; color: white; }
  .news-body h3 { font-size: 1.1rem; margin-bottom: 6px; line-height: 1.3; }
  .news-body p { color: #777; font-size: .88rem; }
  .news-date { color: #aaa; font-size: .78rem; margin-top: 10px; font-weight: 700; }

  /* ============ CTA ============ */
  .cta {
    background: linear-gradient(135deg, var(--ungu), var(--biru));
    border-radius: 44px; margin: 0 5% 70px; padding: 60px 40px;
    text-align: center; color: white; position: relative; overflow: hidden;
  }
  .cta h2 { font-size: clamp(1.7rem, 3.8vw, 2.6rem); margin-bottom: 12px; }
  .cta p { font-size: 1.1rem; margin-bottom: 26px; opacity: .95; }
  .cta .btn { background: var(--kuning); color: var(--dark); box-shadow: 0 6px 0 #ccaa00; }
  .cta .btn:hover { transform: translateY(3px); box-shadow: 0 3px 0 #ccaa00; }
  .cta-deco { position: absolute; opacity: .25; font-size: 8rem; pointer-events: none; }
  .cta-deco.d1 { top: -20px; left: 5%; }
  .cta-deco.d2 { bottom: -30px; right: 8%; font-size: 6rem; }

  /* ============ FOOTER ============ */
  footer { background: var(--dark); color: #ccc; padding: 60px 5% 30px; }
  .footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; max-width: 1200px; margin: 0 auto 36px; }
  .footer-brand .logo { color: var(--kuning); margin-bottom: 14px; }
  .footer-brand p { line-height: 1.7; font-size: .92rem; }
  footer h4 { color: white; font-size: 1.15rem; margin-bottom: 16px; }
  footer ul { list-style: none; }
  footer ul li { margin-bottom: 9px; font-size: .92rem; }
  footer ul a { color: #ccc; text-decoration: none; transition: color .2s; }
  footer ul a:hover { color: var(--kuning); }
  .footer-bottom { text-align: center; padding-top: 26px; border-top: 1px solid #444; font-size: .88rem; }

  .reveal { opacity: 0; transform: translateY(30px); transition: all .7s ease; }
  .reveal.visible { opacity: 1; transform: translateY(0); }

  /* ============ AKSESIBILITAS ============ */
  @media (prefers-reduced-motion: reduce) {
    .mascot-breathe, .mascot-head-tilt, .wing-left, .wing-right,
    .book, .tassel, .beak, .lens-shine, .mascot-shadow,
    .cloud1, .cloud2, .star, .balloon, .speech-bubble,
    .logo-emoji, .hero-badge .dot, .game-badge-new {
      animation: none !important;
    }
  }

  /* ============ RESPONSIVE ============ */
  @media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; text-align: center; padding-top: 30px; }
    .hero-text > p { margin: 0 auto 26px; }
    .hero-buttons { justify-content: center; }
    .hero-visual { order: -1; }
    .mascot-wrap { max-width: 300px; }
    .speech-bubble { right: 0; top: -20px; font-size: .8rem; max-width: 140px; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .galeri-grid { grid-template-columns: repeat(3, 1fr); }
    .galeri-item:nth-child(1) { grid-column: span 3; grid-row: span 1; aspect-ratio: 2/1; }
  }

  @media (max-width: 600px) {
    .nav-links {
      display: none; position: absolute; top: 100%; left: 0; right: 0;
      background: white; flex-direction: column; padding: 18px;
      box-shadow: 0 10px 30px rgba(0,0,0,.1); border-radius: 0 0 20px 20px;
    }
    .nav-links.active { display: flex; }
    .nav-links a { width: 100%; text-align: center; }
    .menu-toggle { display: block; }
    .stat .num { font-size: 2rem; }
    .cta { border-radius: 30px; margin: 0 4% 50px; padding: 44px 22px; }
    .footer-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .galeri-grid { grid-template-columns: repeat(2, 1fr); }
    .galeri-item:nth-child(1) { grid-column: span 2; aspect-ratio: 16/9; }
    .ppdb-wrap { padding: 30px 20px; }
    .ppdb-steps::before { left: 15%; right: 15%; }
    .ppdb-step .step-label { display: none; }
    .quiz-option { padding: 12px 20px; font-size: 1rem; }
    .game-options { grid-template-columns: 1fr; }
    .game-q { font-size: 1.7rem; }
    .modal-body { padding: 18px; }
  }

/* ================================================================
   TAMBAHAN UNTUK VERSI CI4 (halaman berita, pagination, dsb.)
   ================================================================ */

/* Kartu berita yang bisa diklik (sekarang elemen <a>) */
a.news-card { text-decoration: none; color: inherit; display: block; }
a.news-card h3 { color: var(--dark); }
a.news-card:hover h3 { color: var(--biru); }

/* Error state untuk select (melengkapi input.error bawaan mockup) */
.form-group select.error { border-color: var(--merah); background: #FFF0F0; }

/* Nomor pendaftaran di panel sukses PPDB */
.kode-pendaftaran {
  background: var(--cream); border: 2px dashed var(--kuning); border-radius: 16px;
  padding: 14px 18px; margin: 16px auto 20px; max-width: 420px;
  font-weight: 700;
}
.kode-pendaftaran b { color: var(--oranye); font-size: 1.1rem; letter-spacing: .03em; }
.kode-pendaftaran small { color: #8a6d00; font-weight: 600; }

/* Banner judul halaman (berita daftar/detail) */
.page-band {
  position: relative; overflow: hidden; text-align: center;
  padding: 70px 5% 50px;
  background: radial-gradient(circle at 80% 20%, #E0F4FF 0%, transparent 40%),
              radial-gradient(circle at 10% 80%, #FFE9C4 0%, transparent 45%),
              var(--cream);
}
.page-band h1 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); margin: 10px 0 8px; }
.page-band p { color: #555; font-size: 1.05rem; }
.page-band .news-tag { margin-bottom: 4px; }
.page-band .star { position: absolute; }

/* Artikel detail berita */
.berita-detail {
  background: #fff; border-radius: 26px; overflow: hidden;
  box-shadow: 0 12px 35px rgba(0,0,0,.08);
  max-width: 820px; margin: 0 auto;
}
.berita-hero-thumb {
  height: 220px; display: flex; align-items: center; justify-content: center;
  font-size: 5.5rem;
}
.berita-body { padding: 34px 6% 40px; }
.berita-body p { margin-bottom: 16px; font-size: 1.05rem; color: #444; }
.berita-body p:last-child { margin-bottom: 0; }

/* Pagination halaman berita */
.pager-wrap { display: flex; justify-content: center; margin-top: 34px; }
.pager-wrap ul { display: flex; gap: 6px; list-style: none; flex-wrap: wrap; justify-content: center; }
.pager-wrap a, .pager-wrap strong {
  display: inline-block; min-width: 40px; text-align: center;
  padding: 9px 13px; border-radius: 13px; background: #fff; text-decoration: none;
  font-weight: 800; color: var(--dark); border: 2px solid #E4E8F0; transition: all .2s;
}
.pager-wrap a:hover { border-color: var(--kuning); background: #FFFBEA; transform: translateY(-2px); }
.pager-wrap strong { background: var(--kuning); border-color: #F5C518; }
.pager-wrap li[aria-hidden="true"] a { opacity: .4; pointer-events: none; }

/* State memuat soal dari bank soal (modal game) */
.game-loading {
  text-align: center; padding: 40px 20px;
  font-weight: 800; color: #667085; font-size: 1.05rem;
  animation: pulse 1.4s ease-in-out infinite;
}

/* ================================================================
   GAME KATA AJAIB (susun huruf)
   ================================================================ */
.kata-board { padding: 8px 4px 2px; }
.kata-slots { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 14px 0 20px; }
.kata-slot {
  width: 40px; height: 46px; border-radius: 11px;
  border: 2.5px dashed #C9D2E0; background: #fff;
  font-family: 'Baloo 2', cursive; font-weight: 800; font-size: 1.3rem; color: var(--dark);
  cursor: pointer; transition: all .15s;
}
.kata-slot.filled { border-style: solid; border-color: var(--biru); background: #EAF3FF; }
.kata-slot.correct { border-color: var(--hijau); background: #E3F9E5; color: #1E7B34; }
.kata-slot.wrong { border-color: var(--merah); background: #FFE9E9; color: #C0392B; }
.kata-tiles { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.kata-tile {
  width: 46px; height: 46px; border-radius: 13px; border: none; cursor: pointer;
  background: linear-gradient(135deg, #FFD93D, #FF9F1C); color: #7a4d00;
  font-family: 'Baloo 2', cursive; font-weight: 800; font-size: 1.35rem;
  box-shadow: 0 4px 0 #cc7a00; transition: transform .12s, opacity .2s;
}
.kata-tile:hover { transform: translateY(-3px); }
.kata-tile.used { opacity: .22; pointer-events: none; box-shadow: none; transform: none; }
.kata-actions { text-align: center; }
.kata-answer { text-align: center; font-weight: 800; color: var(--merah); margin-top: 12px; font-size: 1.05rem; }
.kata-answer b { letter-spacing: .06em; }

/* Ikon jenis game di papan skor */
.lb-game { font-size: .82rem; opacity: .8; margin-left: 4px; }
