/* ============================================
   PETUALANGAN MATEMATIKA - MAIN STYLESHEET
   Game Belajar Matematika Anak SD Kelas 3
   ============================================ */

/* ---- RESET & BASE ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --green: #4CAF50;
    --green-dark: #388E3C;
    --green-light: #81C784;
    --blue: #2196F3;
    --blue-dark: #1565C0;
    --blue-light: #64B5F6;
    --orange: #FF9800;
    --orange-dark: #E65100;
    --orange-light: #FFB74D;
    --purple: #9C27B0;
    --purple-dark: #6A1B9A;
    --purple-light: #BA68C8;
    --red: #F44336;
    --red-light: #EF9A9A;
    --pink: #E91E63;
    --yellow: #FFEB3B;
    --yellow-dark: #F9A825;
    --teal: #009688;
    --teal-dark: #00695C;
    --bg-gradient-start: #E8F5E9;
    --bg-gradient-mid: #E3F2FD;
    --bg-gradient-end: #F3E5F5;
    --text-dark: #333333;
    --text-medium: #666666;
    --shadow-soft: 0 4px 15px rgba(0,0,0,0.1);
    --shadow-medium: 0 6px 25px rgba(0,0,0,0.15);
    --shadow-strong: 0 8px 35px rgba(0,0,0,0.2);
    --radius-small: 12px;
    --radius-medium: 20px;
    --radius-large: 30px;
    --radius-round: 50%;
}

body {
    font-family: 'Nunito', 'Segoe UI', Tahoma, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-mid), var(--bg-gradient-end));
    min-height: 100vh;
    overflow: hidden;
    color: var(--text-dark);
    user-select: none;
    -webkit-user-select: none;
}

/* ---- FLOATING BACKGROUND ---- */
.bg-floats {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-float-item {
    position: absolute;
    font-size: 2rem;
    opacity: 0.12;
    animation: floatAround 20s infinite ease-in-out;
}

@keyframes floatAround {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-30px) rotate(15deg); }
    50% { transform: translateY(-10px) rotate(-10deg); }
    75% { transform: translateY(-40px) rotate(8deg); }
}

/* ---- SCREENS ---- */
.screen {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: max(12px, env(safe-area-inset-top, 12px)) max(10px, env(safe-area-inset-right, 10px)) max(24px, env(safe-area-inset-bottom, 24px)) max(10px, env(safe-area-inset-left, 10px));
    box-sizing: border-box;
}

.screen.active {
    opacity: 1;
    visibility: visible;
}

.screen > div {
    margin: auto;
    box-sizing: border-box;
}

/* ============================================
   SCREEN 1: MENU UTAMA
   ============================================ */
.menu-container {
    text-align: center;
    width: 90%;
    max-width: 800px;
    animation: slideUp 0.6s ease-out;
}

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

.title-section {
    margin-bottom: 1.5rem;
}

.mascot-large {
    font-size: 5rem;
    animation: bounce 2s ease-in-out infinite;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.15));
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.game-title {
    margin: 0.5rem 0;
    line-height: 1.1;
}

.title-line1 {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--orange-dark);
    text-shadow: 2px 2px 0 rgba(255,152,0,0.3);
}

.title-line2 {
    display: block;
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange), var(--pink), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-medium);
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Main Mode Grid (Home Screen) */
.main-mode-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.1rem;
    margin: 1.2rem 0;
}

@media (min-width: 680px) {
    .main-mode-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .main-mode-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.main-mode-card {
    border: none;
    border-radius: 22px;
    padding: 1.4rem 1.2rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
    font-family: 'Nunito', sans-serif;
    color: white;
    text-align: center;
}

.main-mode-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 60%);
    pointer-events: none;
}

.main-mode-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 12px 30px rgba(0,0,0,0.22);
}

.main-mode-card:active {
    transform: translateY(-2px) scale(0.98);
}

.card-basic {
    background: linear-gradient(135deg, #43A047, #1B5E20);
}

.card-warung {
    background: linear-gradient(135deg, #FB8C00, #E65100);
}

.card-time {
    background: linear-gradient(135deg, #8E24AA, #4A148C);
}

.card-fraction {
    background: linear-gradient(135deg, #FF5722, #C62828);
}

.card-measure {
    background: linear-gradient(135deg, #00897B, #004D40);
}

.card-frog {
    background: linear-gradient(135deg, #2E7D32, #1B5E20);
}

.mode-card-badge {
    position: absolute;
    top: 10px;
    right: 12px;
    background: rgba(255,255,255,0.28);
    backdrop-filter: blur(4px);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 0.5px;
}

.mode-card-icon {
    font-size: 3.2rem;
    margin-top: 0.4rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
    animation: bounce 2.5s ease-in-out infinite;
}

.mode-card-title {
    font-size: 1.4rem;
    font-weight: 900;
    margin-bottom: 0.2rem;
}

.mode-card-desc {
    font-size: 0.82rem;
    font-weight: 600;
    opacity: 0.92;
    line-height: 1.4;
    min-height: 38px;
}

.mode-card-action {
    display: inline-block;
    margin-top: 0.6rem;
    background: white;
    color: #333;
    font-size: 0.85rem;
    font-weight: 900;
    padding: 0.45rem 1.2rem;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}

.main-mode-card:hover .mode-card-action {
    transform: scale(1.08);
}

/* Submenu Containers */
.submenu-container {
    text-align: center;
    width: 90%;
    max-width: 750px;
    animation: slideUp 0.5s ease-out;
}

.submenu-footer {
    margin-top: 1.2rem;
}

.quick-learn-btn {
    border: 2px dashed #00897B;
    background: rgba(0,137,123,0.1);
    color: #004D40;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    padding: 0.7rem 1.8rem;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.25s;
}

.quick-learn-btn:hover {
    background: #00897B;
    color: white;
    transform: translateY(-2px);
    border-style: solid;
}

.quick-learn-btn.warung-learn {
    border-color: #E65100;
    background: rgba(230,81,0,0.1);
    color: #E65100;
}
.quick-learn-btn.warung-learn:hover {
    background: #E65100;
    color: white;
}

.quick-learn-btn.time-learn {
    border-color: #6A1B9A;
    background: rgba(106,27,154,0.1);
    color: #6A1B9A;
}
.quick-learn-btn.time-learn:hover {
    background: #6A1B9A;
    color: white;
}

.quick-learn-btn.fraction-learn {
    border-color: #E64A19;
    background: rgba(230,74,25,0.1);
    color: #E64A19;
}
.quick-learn-btn.fraction-learn:hover {
    background: #E64A19;
    color: white;
}

.quick-learn-btn.measure-learn {
    border-color: #00897B;
    background: rgba(0,137,123,0.1);
    color: #00897B;
}
.quick-learn-btn.measure-learn:hover {
    background: #00897B;
    color: white;
}

.quick-learn-btn.frog-learn {
    border-color: #2E7D32;
    background: rgba(46,125,50,0.1);
    color: #2E7D32;
}
.quick-learn-btn.frog-learn:hover {
    background: #2E7D32;
    color: white;
}

/* Menu Buttons Grid */
.menu-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1rem 0;
}

.menu-btn {
    border: none;
    border-radius: var(--radius-medium);
    padding: 1.2rem 1rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
    font-family: 'Nunito', sans-serif;
}

.menu-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 50%);
    pointer-events: none;
}

.menu-btn:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: var(--shadow-strong);
}

.menu-btn:active {
    transform: translateY(-2px) scale(0.98);
}

/* Basic math buttons */
.btn-addition {
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: white;
}

.btn-subtraction {
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    color: white;
}

.btn-multiplication {
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    color: white;
}

.btn-division {
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    color: white;
}

/* Warung Pintar buttons */
.btn-kembalian {
    background: linear-gradient(135deg, #00897B, #004D40);
    color: white;
}

.btn-totalbelanja {
    background: linear-gradient(135deg, #FB8C00, #EF6C00);
    color: white;
}

.btn-belibanyak {
    background: linear-gradient(135deg, #E53935, #C62828);
    color: white;
}

.btn-kasircilik {
    background: linear-gradient(135deg, #8E24AA, #5E35B1);
    color: white;
}

/* Time Buttons */
.btn-bacajam {
    background: linear-gradient(135deg, #0288D1, #01579B);
    color: white;
}

.btn-durasi {
    background: linear-gradient(135deg, #7B1FA2, #4A148C);
    color: white;
}

.btn-waktucampuran {
    background: linear-gradient(135deg, #D81B60, #AD1457);
    color: white;
}

/* Fraction Buttons */
.btn-pizzacilik {
    background: linear-gradient(135deg, #FF5722, #E64A19);
    color: white;
}

.btn-pecahantebak {
    background: linear-gradient(135deg, #FF8F00, #F57C00);
    color: white;
}

.btn-pecahanbanding {
    background: linear-gradient(135deg, #00897B, #00695C);
    color: white;
}

.btn-pecahantambah {
    background: linear-gradient(135deg, #43A047, #2E7D32);
    color: white;
}

.btn-pecahancampuran {
    background: linear-gradient(135deg, #7E57C2, #512DA8);
    color: white;
}

/* Measurement Buttons */
.btn-timbangan {
    background: linear-gradient(135deg, #00897B, #004D40);
    color: white;
}

.btn-penggaris {
    background: linear-gradient(135deg, #0288D1, #01579B);
    color: white;
}

.btn-konversi {
    background: linear-gradient(135deg, #F57C00, #E65100);
    color: white;
}

.btn-ukurancampuran {
    background: linear-gradient(135deg, #8E24AA, #5E35B1);
    color: white;
}

/* Frog Lake Buttons */
.btn-kataklompat {
    background: linear-gradient(135deg, #43A047, #1B5E20);
    color: white;
}

.btn-polanaik {
    background: linear-gradient(135deg, #2E7D32, #1B5E20);
    color: white;
}

.btn-polaturun {
    background: linear-gradient(135deg, #0097A7, #006064);
    color: white;
}

.btn-polacampuran {
    background: linear-gradient(135deg, #5C6BC0, #3949AB);
    color: white;
}

/* Piggy Savings Buttons */
.btn-celengan {
    background: linear-gradient(135deg, #EC407A, #C2185B);
    color: white;
}

.btn-harimenabung {
    background: linear-gradient(135deg, #AB47BC, #7B1FA2);
    color: white;
}

.btn-icon {
    font-size: 2.5rem;
}

.btn-label {
    font-size: 1.2rem;
    font-weight: 800;
}

.btn-desc {
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.85;
}

/* Learn Mode Button */
.learn-mode-section {
    margin: 1rem 0;
}

.learn-mode-btn {
    width: 100%;
    border: 3px dashed var(--teal);
    border-radius: var(--radius-medium);
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    background: linear-gradient(135deg, rgba(0,150,136,0.08), rgba(0,150,136,0.18));
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: 'Nunito', sans-serif;
}

.learn-text-wrap {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.learn-category-title {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--teal-dark);
    margin: 1.2rem 0 0.6rem 0;
    text-align: left;
    border-bottom: 2px solid rgba(0,150,136,0.2);
    padding-bottom: 4px;
}
    background: linear-gradient(135deg, rgba(0,150,136,0.08), rgba(0,150,136,0.15));
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: 'Nunito', sans-serif;
}

.learn-mode-btn:hover {
    background: linear-gradient(135deg, rgba(0,150,136,0.15), rgba(0,150,136,0.25));
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
    border-style: solid;
}

.learn-icon {
    font-size: 2rem;
}

.learn-label {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--teal-dark);
}

.learn-desc {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-medium);
}

.learn-mode-btn .learn-label,
.learn-mode-btn .learn-desc {
    display: block;
    text-align: left;
}

/* Menu Footer */
.menu-footer {
    margin-top: 0.8rem;
}

.total-stars {
    display: inline-block;
    background: linear-gradient(135deg, #FFF9C4, #FFF176);
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-large);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--yellow-dark);
    box-shadow: var(--shadow-soft);
}

/* ============================================
   SCREEN 2: PILIH LEVEL
   ============================================ */
.difficulty-container {
    text-align: center;
    width: 90%;
    max-width: 500px;
    animation: slideUp 0.6s ease-out;
}

.back-btn {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: rgba(255,255,255,0.8);
    border: none;
    border-radius: var(--radius-small);
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: all 0.2s;
    font-family: 'Nunito', sans-serif;
    z-index: 10;
}

.back-btn:hover {
    background: white;
    transform: translateX(-3px);
}

.mascot-medium {
    font-size: 4rem;
    animation: bounce 2s ease-in-out infinite;
}

.screen-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0.3rem 0;
}

.screen-subtitle {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--purple);
    margin-bottom: 2rem;
}

.difficulty-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.diff-btn {
    border: none;
    border-radius: var(--radius-medium);
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-medium);
    font-family: 'Nunito', sans-serif;
    position: relative;
    overflow: hidden;
}

.diff-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 50%);
    pointer-events: none;
}

.diff-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-strong);
}

.diff-btn:active {
    transform: scale(0.97);
}

.diff-easy {
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: white;
}

.diff-medium {
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    color: white;
}

.diff-hard {
    background: linear-gradient(135deg, var(--red), #C62828);
    color: white;
}

.diff-star {
    font-size: 1.5rem;
    min-width: 60px;
    text-align: left;
}

.diff-label {
    font-size: 1.3rem;
    font-weight: 800;
    flex: 1;
    text-align: left;
}

.diff-info {
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.9;
}

/* ============================================
   SCREEN 3: GAMEPLAY
   ============================================ */
.game-container {
    width: 95%;
    max-width: 700px;
    height: 95vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem 0;
    position: relative;
}

/* Top Bar */
.game-top-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem 0.8rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255,255,255,0.7);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.progress-section {
    flex: 1;
}

.progress-text {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-medium);
    display: block;
    margin-bottom: 0.3rem;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #E0E0E0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--green), var(--green-light));
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 10%;
}

.score-section {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: linear-gradient(135deg, #FFF9C4, #FFF176);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-small);
    font-weight: 800;
    color: var(--yellow-dark);
    font-size: 0.9rem;
    white-space: nowrap;
}

.score-icon {
    font-size: 1.1rem;
}

.timer-section {
    flex-shrink: 0;
}

.timer-circle {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-round);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--green);
    transition: border-color 0.3s;
}

.timer-circle.warning {
    border-color: var(--orange);
    animation: pulse 0.8s ease-in-out infinite;
}

.timer-circle.danger {
    border-color: var(--red);
    animation: pulse 0.4s ease-in-out infinite;
}

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

.timer-text {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--text-dark);
}

/* Help Button */
/* Help Button (Integrated cleanly inside top bar) */
.help-btn {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    background: linear-gradient(135deg, #FFF9C4, #FFE082);
    border: 2px solid var(--yellow-dark);
    border-radius: var(--radius-large);
    padding: 0.4rem 0.95rem;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    color: #795548;
    box-shadow: var(--shadow-soft);
    transition: all 0.25s ease;
    white-space: nowrap;
    flex-shrink: 0;
    animation: gentlePulse 3s ease-in-out infinite;
}

.help-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-medium);
}

@keyframes gentlePulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(255,193,7,0.3); }
    50% { box-shadow: 0 4px 20px rgba(255,193,7,0.5); }
}

/* Question Area */
.question-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
    position: relative;
    flex: 1;
    justify-content: center;
}

.mascot-game {
    font-size: 3rem;
    animation: bounce 2s ease-in-out infinite;
    position: relative;
}

.speech-bubble {
    background: white;
    border-radius: var(--radius-medium);
    padding: 0.5rem 1rem;
    margin: 0.3rem 0;
    box-shadow: var(--shadow-soft);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-medium);
    position: relative;
    max-width: 250px;
    text-align: center;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

.question-bubble {
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    border-radius: var(--radius-large);
    padding: 1.5rem 2.5rem;
    margin: 1rem 0;
    box-shadow: var(--shadow-strong);
    position: relative;
    animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.question-bubble::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: var(--radius-large);
    background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 40%);
    pointer-events: none;
}

@keyframes popIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.question-text {
    font-size: 2.2rem;
    font-weight: 900;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 2px;
}

/* Question Visual Box */
.question-visual-box {
    margin-bottom: 0.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ============================================
   WARUNG PINTAR (UANG RUPIAH) STYLES
   ============================================ */
.shopping-card {
    background: white;
    border-radius: 20px;
    padding: 1rem 1.4rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    border: 3.5px solid #FFE082;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    max-width: 440px;
    margin: 0 auto;
    color: #333;
}

.shopping-item-icon {
    font-size: 3.5rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
    animation: bounce 2s ease-in-out infinite;
}

.shopping-item-name {
    font-size: 1.35rem;
    font-weight: 900;
    color: #212121;
}

.shopping-item-price {
    font-size: 1.4rem;
    font-weight: 900;
    color: #E65100;
    background: #FFF3E0;
    padding: 0.3rem 1.2rem;
    border-radius: 20px;
    border: 2px solid #FFB74D;
}

.shopping-buyer-cash {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1565C0;
    background: #E3F2FD;
    padding: 0.35rem 1.2rem;
    border-radius: 16px;
    margin-top: 0.2rem;
    border: 2px solid #90CAF9;
}

/* Realistic Rupiah Banknote Cards */
.rupiah-bill {
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
    width: 145px;
    height: 78px;
    border-radius: 12px;
    padding: 6px 10px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18), inset 0 0 0 1.5px rgba(255,255,255,0.45);
    position: relative;
    overflow: hidden;
    color: #212121;
    font-family: 'Nunito', sans-serif;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
}

.rupiah-bill:hover {
    transform: translateY(-4px) scale(1.06);
    box-shadow: 0 8px 20px rgba(0,0,0,0.22);
}

.bill-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.65rem;
    font-weight: 800;
    opacity: 0.85;
    letter-spacing: 0.5px;
}

.bill-mid {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bill-watermark {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    border: 1px dashed rgba(0,0,0,0.18);
}

.bill-nominal {
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: 1px;
}

.bill-bot {
    display: flex;
    justify-content: space-between;
    font-size: 0.6rem;
    font-weight: 800;
    opacity: 0.8;
}

/* Authentic Banknote Colors */
.bill-1k   { background: linear-gradient(135deg, #A7D7C5, #74B49B); color: #1B5E20; }
.bill-2k   { background: linear-gradient(135deg, #CFD8DC, #90A4AE); color: #37474F; }
.bill-5k   { background: linear-gradient(135deg, #D7CCC8, #A1887F); color: #3E2723; }
.bill-10k  { background: linear-gradient(135deg, #E1BEE7, #AB47BC); color: white; }
.bill-20k  { background: linear-gradient(135deg, #C8E6C9, #4CAF50); color: white; }
.bill-50k  { background: linear-gradient(135deg, #BBDEFB, #1E88E5); color: white; }
.bill-100k { background: linear-gradient(135deg, #FFCDD2, #E53935); color: white; }

.rupiah-bills-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 0.8rem 0;
}

/* ============================================
   PETUALANGAN WAKTU (ANALOG CLOCK)
   ============================================ */
.clock-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    margin: 0.5rem 0;
}

.analog-clock-svg {
    width: 175px;
    height: 175px;
    filter: drop-shadow(0 6px 18px rgba(0,0,0,0.2));
}

/* ============================================
   SIMULASI KASIR CILIK (INTERAKTIF DRAG & DROP)
   ============================================ */

/* Customer Card */
.cashier-customer-card {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    background: linear-gradient(135deg, #FFFDE7, #FFF9C4);
    border: 3.5px solid #FFE082;
    border-radius: 22px;
    padding: 1rem 1.4rem;
    margin: 0.6rem 0 1rem 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.customer-avatar {
    font-size: 3.8rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
    animation: bounce 2.2s ease-in-out infinite;
    flex-shrink: 0;
}

.customer-dialog {
    text-align: left;
    flex: 1;
}

.customer-name {
    font-size: 1.15rem;
    font-weight: 900;
    color: #E65100;
    margin-bottom: 3px;
}

.customer-bubble {
    font-size: 1.05rem;
    font-weight: 800;
    color: #37474F;
    line-height: 1.45;
}

/* Cashier Tray (Meja Nampan Kembalian) */
.cashier-tray-wrapper {
    margin: 0.8rem 0;
}

.tray-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 8px;
}

.tray-title {
    font-size: 1.15rem;
    font-weight: 900;
    color: #004D40;
}

.tray-total-badge {
    font-size: 1.3rem;
    font-weight: 900;
    background: #C8E6C9;
    color: #1B5E20;
    padding: 0.35rem 1.2rem;
    border-radius: 18px;
    border: 2px solid #81C784;
    box-shadow: 0 2px 8px rgba(76,175,80,0.2);
}

.tray-clear-btn {
    background: #FFEBEE;
    border: 2px solid #EF5350;
    color: #C62828;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 0.35rem 0.9rem;
    border-radius: 14px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    transition: all 0.2s;
}

.tray-clear-btn:hover {
    background: #EF5350;
    color: white;
    transform: scale(1.05);
}

.cashier-tray-dropzone {
    min-height: 135px;
    border: 3.5px dashed #00897B;
    border-radius: 24px;
    background: #E0F2F1;
    padding: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.06);
}

.cashier-tray-dropzone.drag-over {
    background: #B2DFDB;
    border-color: #004D40;
    transform: scale(1.02);
    box-shadow: 0 0 25px rgba(0,150,136,0.45);
}

.tray-empty-hint {
    font-size: 1.1rem;
    font-weight: 800;
    color: #00796B;
    pointer-events: none;
    text-align: center;
}

.tray-items-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

/* Placed item in tray */
.tray-placed-bill {
    cursor: pointer;
    position: relative;
    animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition: transform 0.2s;
}

.tray-placed-bill:hover {
    transform: translateY(-3px) scale(1.05);
}

.tray-placed-bill::after {
    content: '✕';
    position: absolute;
    top: -8px;
    right: -8px;
    background: #E53935;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 13px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    border: 2px solid white;
}

/* Cashier Drawer (Laci Uang) */
.cashier-drawer-wrapper {
    background: linear-gradient(180deg, #37474F, #263238);
    border-radius: 24px;
    padding: 1rem 1.2rem;
    border: 3.5px solid #78909C;
    box-shadow: inset 0 4px 14px rgba(0,0,0,0.5), 0 8px 24px rgba(0,0,0,0.18);
    margin: 1rem 0;
}

.drawer-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    color: #ECEFF1;
    font-size: 1rem;
    font-weight: 800;
}

.drawer-hint-tap {
    color: #FFE082;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.12);
    padding: 3px 10px;
    border-radius: 12px;
}

.cashier-drawer-bills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 6px;
}

.drawer-item {
    cursor: grab;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
    position: relative;
}

.drawer-item:hover {
    transform: translateY(-5px) scale(1.08);
    filter: brightness(1.06);
    z-index: 5;
}

.drawer-item:active {
    cursor: grabbing;
    transform: scale(0.95);
}

/* Coins */
.rupiah-coin {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25), inset 0 2px 4px rgba(255,255,255,0.6);
    user-select: none;
    cursor: grab;
    transition: transform 0.2s;
}

.coin-500 {
    background: linear-gradient(135deg, #CFD8DC, #90A4AE);
    border: 3px solid #78909C;
    color: #263238;
}

.coin-1000 {
    background: linear-gradient(135deg, #FFE082, #FFB300);
    border: 3px solid #FFA000;
    color: #4E342E;
}

.coin-val {
    font-size: 0.95rem;
    line-height: 1;
}

.coin-sub {
    font-size: 0.55rem;
    line-height: 1;
    opacity: 0.85;
    letter-spacing: 0.5px;
}

/* Cashier Action Bar */
.cashier-action-bar {
    margin: 1.2rem 0 0.6rem 0;
    text-align: center;
}

.cashier-submit-btn {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    border: none;
    border-radius: 26px;
    padding: 1.1rem 2.8rem;
    font-family: 'Nunito', sans-serif;
    font-size: 1.4rem;
    font-weight: 900;
    color: white;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(245,124,0,0.38);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    letter-spacing: 0.5px;
}

.cashier-submit-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 32px rgba(245,124,0,0.5);
}

.cashier-submit-btn:active {
    transform: scale(0.96);
}

/* DIGITAL CASHIER RECEIPT */
.receipt-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 220;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: fadeIn 0.3s ease;
}

.receipt-paper {
    background: #FFFFFF;
    width: 92%;
    max-width: 370px;
    padding: 1.8rem 2rem;
    border-radius: 16px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.35);
    font-family: 'Nunito', sans-serif;
    animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    border-top: 8px solid #00897B;
}

.receipt-header {
    text-align: center;
    margin-bottom: 0.8rem;
}

.receipt-store-icon {
    font-size: 2.6rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.receipt-store-title {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: #212121;
}

.receipt-store-sub {
    font-size: 0.8rem;
    color: #757575;
    font-weight: 700;
}

.receipt-divider-dashed {
    border-top: 2px dashed #BDBDBD;
    margin: 0.8rem 0;
}

.receipt-divider-solid {
    border-top: 2.5px solid #212121;
    margin: 0.8rem 0;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    margin: 0.45rem 0;
    color: #424242;
}

.receipt-row.receipt-highlight {
    font-size: 1.2rem;
    color: #1B5E20;
    font-weight: 800;
}

.receipt-change-val {
    font-size: 1.45rem;
    font-weight: 900;
    color: #2E7D32;
}

.receipt-stamp {
    border: 3.5px solid #2E7D32;
    color: #2E7D32;
    font-size: 1.15rem;
    font-weight: 900;
    text-align: center;
    padding: 0.5rem;
    border-radius: 12px;
    margin: 1.1rem 0 1rem 0;
    transform: rotate(-3deg);
    background: #E8F5E9;
    letter-spacing: 1px;
}

.receipt-next-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    border: none;
    border-radius: 18px;
    padding: 1rem;
    color: white;
    font-size: 1.15rem;
    font-weight: 900;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    transition: transform 0.2s;
    box-shadow: var(--shadow-medium);
}

.receipt-next-btn:hover {
    transform: scale(1.04);
}

/* ============================================
   PIZZA CHEF PLAY AREA (Dapur Kue Pecahan)
   ============================================ */
.pizza-customer-card {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    background: #FFF8E1;
    border: 3px solid #FFE082;
    border-radius: 20px;
    padding: 1rem 1.3rem;
    margin-bottom: 1.2rem;
    box-shadow: var(--shadow-soft);
}

.pizza-kitchen-counter {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-bottom: 1.2rem;
}

@media (max-width: 720px) {
    .pizza-kitchen-counter {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.pizza-pan-station, .pizza-plate-station {
    border-radius: 22px;
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow-medium);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* Station 1: Loyang Kayu Oven */
.pizza-pan-station {
    background: linear-gradient(135deg, #EFEBE9, #D7CCC8);
    border: 3px solid #BCAAA4;
}

/* Station 2: Piring Saji Porselen */
.pizza-plate-station {
    background: linear-gradient(135deg, #E0F7FA, #B2EBF2);
    border: 3px solid #80DEEA;
}

.station-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    font-family: 'Nunito', sans-serif;
    gap: 6px;
    flex-wrap: wrap;
}

.station-title {
    font-size: 1.05rem;
    font-weight: 900;
    color: #4E342E;
}

.pizza-plate-station .station-title {
    color: #006064;
}

.station-hint {
    font-size: 0.75rem;
    font-weight: 800;
    color: #E65100;
    background: rgba(255,255,255,0.7);
    padding: 2px 8px;
    border-radius: 10px;
}

.station-note {
    font-size: 0.82rem;
    font-weight: 700;
    color: #6D4C41;
    margin-top: 0.5rem;
}

.plate-clear-btn {
    background: #FFEBEE;
    border: 2px solid #EF5350;
    color: #C62828;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 0.25rem 0.8rem;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    transition: all 0.2s;
}

.plate-clear-btn:hover {
    background: #EF5350;
    color: white;
    transform: scale(1.04);
}

/* Dropzones */
.pizza-pan-canvas-wrap, .pizza-plate-canvas-wrap {
    width: 100%;
    min-height: 230px;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 0.8rem 0;
    transition: all 0.25s ease;
}

.pizza-pan-canvas-wrap {
    background: #4E342E;
    border: 3px dashed #8D6E63;
    box-shadow: inset 0 4px 15px rgba(0,0,0,0.35);
}

.pizza-plate-canvas-wrap {
    background: #FFFFFF;
    border: 3.5px dashed #00ACC1;
    box-shadow: inset 0 2px 12px rgba(0,188,212,0.18), 0 4px 12px rgba(0,0,0,0.06);
}

.pizza-plate-canvas-wrap.drag-over {
    border-color: #FF5722;
    background: #FFF3E0;
    transform: scale(1.02);
}

.plate-empty-hint {
    font-size: 0.95rem;
    font-weight: 800;
    color: #00838F;
    text-align: center;
    padding: 1.5rem;
    animation: pulseSlow 2s infinite ease-in-out;
}

/* SVG Container */
.pizza-svg-container {
    width: 220px;
    height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
}

.pizza-svg-interactive {
    width: 220px;
    height: 220px;
    overflow: visible;
}

/* Slice Path in SVG */
.pizza-slice-interactive {
    cursor: pointer;
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.3));
}

.pizza-slice-interactive:hover {
    filter: drop-shadow(0 6px 14px rgba(255, 87, 34, 0.65)) brightness(1.08);
    transform: scale(1.06);
}

.pizza-slice-interactive:active {
    transform: scale(0.96);
}

/* Fraction Readout Badge */
.plate-fraction-badge {
    margin-top: 0.7rem;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.plate-fraction-badge .badge-label {
    font-size: 0.92rem;
    font-weight: 800;
    color: #006064;
}

.fraction-display-inline {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #FFF8E1;
    border: 2.5px solid #FFB300;
    padding: 0.3rem 0.9rem;
    border-radius: 16px;
    font-weight: 900;
    color: #E65100;
    font-size: 1.25rem;
    box-shadow: 0 2px 6px rgba(255,179,0,0.25);
}

.fraction-display-inline .frac-num {
    color: #D84315;
    font-size: 1.4rem;
}

.fraction-display-inline .frac-divider {
    color: #795548;
    font-size: 1.4rem;
}

.fraction-display-inline .frac-den {
    color: #1565C0;
    font-size: 1.4rem;
}

.fraction-display-inline .frac-text {
    font-size: 0.85rem;
    color: #5D4037;
    margin-left: 2px;
}

/* Pizza Action Bar */
.pizza-action-bar {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}

.pizza-submit-btn {
    background: linear-gradient(135deg, #FF5722, #D84315);
    border: none;
    border-radius: 20px;
    padding: 1.1rem 2.8rem;
    color: white;
    font-size: 1.3rem;
    font-weight: 900;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    box-shadow: 0 6px 20px rgba(230, 74, 25, 0.4);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    letter-spacing: 0.5px;
}

.pizza-submit-btn:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 10px 25px rgba(230, 74, 25, 0.55);
}

.pizza-submit-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* ============================================
   VERTICAL FRACTION & QUIZ VISUAL COMPONENTS
   ============================================ */
.frac-vertical {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    vertical-align: middle;
    margin: 0 4px;
    font-weight: 900;
    line-height: 1;
}

.frac-top {
    border-bottom: 2.5px solid currentColor;
    padding-bottom: 2px;
    min-width: 22px;
    text-align: center;
}

.frac-bottom {
    padding-top: 2px;
    min-width: 22px;
    text-align: center;
}

/* Quiz Visual Elements */
.fraction-quiz-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    margin: 0.5rem 0;
}

.fraction-compare-board {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin: 0.5rem 0;
}

.fraction-compare-card {
    background: white;
    border-radius: 20px;
    padding: 1rem 1.3rem;
    box-shadow: var(--shadow-medium);
    border: 3px solid #FFE082;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.fraction-compare-card .card-caption {
    font-size: 1.25rem;
    font-weight: 900;
    color: #E65100;
}

.fraction-compare-vs {
    font-size: 1.8rem;
    font-weight: 900;
    color: #9C27B0;
    background: #F3E5F5;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

/* Chocolate Bar SVG */
.chocolate-bar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin: 0.4rem 0;
}

.chocolate-caption {
    font-size: 0.95rem;
    font-weight: 800;
    color: #4E342E;
}

/* ============================================
   SCALE PLAY AREA (Timbangan Neraca Pasar)
   ============================================ */
.scale-customer-card {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    background: #E0F2F1;
    border: 3px solid #80CBC4;
    border-radius: 20px;
    padding: 1rem 1.3rem;
    margin-bottom: 1.2rem;
    box-shadow: var(--shadow-soft);
}

.scale-stage-wrapper {
    background: #FAFAFA;
    border: 3px solid #CFD8DC;
    border-radius: 24px;
    padding: 1.2rem;
    box-shadow: var(--shadow-medium);
    margin-bottom: 1.2rem;
}

.scale-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
    gap: 8px;
}

.scale-title {
    font-size: 1.15rem;
    font-weight: 900;
    color: #004D40;
}

.scale-status-badge {
    font-size: 1.15rem;
    font-weight: 900;
    padding: 0.35rem 1.1rem;
    border-radius: 16px;
    background: #FFF3E0;
    color: #E65100;
    border: 2px solid #FFE082;
    transition: all 0.3s;
}

.scale-status-badge.balanced {
    background: #E8F5E9;
    color: #2E7D32;
    border-color: #81C784;
}

.scale-clear-btn {
    background: #FFEBEE;
    border: 2px solid #EF5350;
    color: #C62828;
    font-weight: 800;
    font-size: 0.82rem;
    padding: 0.35rem 0.9rem;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    transition: all 0.2s;
}

.scale-clear-btn:hover {
    background: #EF5350;
    color: white;
    transform: scale(1.04);
}

.scale-svg-stage {
    width: 100%;
    min-height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(180deg, #ECEFF1 0%, #CFD8DC 100%);
    border-radius: 20px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

/* Weights Rack */
.scale-weights-rack {
    margin-top: 1rem;
    background: #ECEFF1;
    border: 2.5px dashed #90A4AE;
    border-radius: 20px;
    padding: 0.9rem;
}

.rack-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    font-weight: 800;
    color: #37474F;
    font-size: 0.9rem;
}

.rack-weights-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

/* Brass Weight Item */
.brass-weight {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FFE082, #FFB300, #FF8F00);
    border: 2.5px solid #E65100;
    border-radius: 14px;
    padding: 6px 14px;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 4px 10px rgba(230, 81, 0, 0.25);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: #3E2723;
    font-family: 'Nunito', sans-serif;
}

.brass-weight:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 8px 18px rgba(230, 81, 0, 0.4);
}

.brass-weight:active {
    transform: translateY(-1px) scale(0.96);
}

.brass-weight .weight-knob {
    width: 14px;
    height: 6px;
    background: #FF6F00;
    border-radius: 4px;
    margin-bottom: 3px;
}

.brass-weight .weight-val {
    font-size: 1.1rem;
    font-weight: 900;
    line-height: 1;
}

.brass-weight .weight-unit {
    font-size: 0.72rem;
    font-weight: 800;
    opacity: 0.9;
}

.scale-action-bar {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.scale-submit-btn {
    background: linear-gradient(135deg, #00897B, #004D40);
    border: none;
    border-radius: 20px;
    padding: 1.1rem 2.8rem;
    color: white;
    font-size: 1.3rem;
    font-weight: 900;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    box-shadow: 0 6px 20px rgba(0, 77, 64, 0.35);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scale-submit-btn:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 10px 25px rgba(0, 77, 64, 0.5);
}

/* ============================================
   FROG LILYPAD POND PLAY AREA
   ============================================ */
.frog-pond-wrapper {
    background: linear-gradient(180deg, #E0F7FA 0%, #80DEEA 60%, #4DD0E1 100%);
    border: 3.5px solid #00ACC1;
    border-radius: 26px;
    padding: 1.2rem;
    box-shadow: var(--shadow-medium);
    margin-bottom: 1.2rem;
    position: relative;
    overflow: hidden;
}

.pond-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 6px;
}

.pond-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: #006064;
}

.pond-hint {
    font-size: 0.95rem;
    font-weight: 800;
    background: rgba(255,255,255,0.85);
    color: #004D40;
    padding: 0.3rem 0.9rem;
    border-radius: 14px;
}

.frog-pond-stage {
    min-height: 240px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 1rem;
}

/* Lilypad Row in Stage */
.lilypads-track {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 1rem 0;
}

.lilypad-leaf {
    width: 82px;
    height: 82px;
    background: radial-gradient(circle at 35% 35%, #81C784, #388E3C);
    border: 3px solid #2E7D32;
    border-radius: 50%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(0, 77, 64, 0.25);
    user-select: none;
    transition: transform 0.3s;
}

.lilypad-leaf.active-frog {
    transform: scale(1.1);
    box-shadow: 0 8px 22px rgba(46, 125, 50, 0.45);
}

.lilypad-leaf .leaf-num {
    font-size: 1.5rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
    z-index: 2;
}

.lilypad-leaf .leaf-missing {
    font-size: 1.8rem;
    font-weight: 900;
    color: #FFEB3B;
    animation: bounce 1.5s infinite;
    z-index: 2;
}

.lilypad-frog-mascot {
    position: absolute;
    top: -36px;
    font-size: 2.6rem;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
    z-index: 3;
    animation: frogBreathe 2s infinite ease-in-out;
}

@keyframes frogBreathe {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.08) translateY(-4px); }
}

/* Choices Grid for Frog */
.frog-choices-wrapper {
    background: rgba(255,255,255,0.9);
    border-radius: 20px;
    padding: 1rem;
    text-align: center;
}

.choices-title {
    font-size: 1.05rem;
    font-weight: 900;
    color: #006064;
    margin-bottom: 0.8rem;
}

.frog-choices-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

@media (max-width: 600px) {
    .frog-choices-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.frog-choice-btn {
    background: linear-gradient(135deg, #43A047, #2E7D32);
    border: none;
    border-radius: 18px;
    padding: 0.9rem;
    color: white;
    font-size: 1.6rem;
    font-weight: 900;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(46,125,50,0.3);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.frog-choice-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(46,125,50,0.5);
    background: linear-gradient(135deg, #66BB6A, #388E3C);
}

/* ============================================
   PIGGY BANK PLAY AREA (Celengan Menabung)
   ============================================ */
.piggy-customer-card {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    background: #FCE4EC;
    border: 3px solid #F48FB1;
    border-radius: 20px;
    padding: 1rem 1.3rem;
    margin-bottom: 1.2rem;
    box-shadow: var(--shadow-soft);
}

.piggy-stage-wrapper {
    background: #FFF8E1;
    border: 3px solid #FFE082;
    border-radius: 24px;
    padding: 1.2rem;
    box-shadow: var(--shadow-medium);
    margin-bottom: 1.2rem;
}

.piggy-center-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.piggy-svg-container {
    width: 190px;
    height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.piggy-progress-wrap {
    width: 100%;
    max-width: 420px;
}

.piggy-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    font-weight: 800;
    color: #4E342E;
    margin-bottom: 4px;
}

.piggy-progress-bar-bg {
    width: 100%;
    height: 22px;
    background: #E0E0E0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.15);
}

.piggy-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #F06292, #E91E63);
    border-radius: 12px;
    transition: width 0.35s ease;
}

.piggy-clear-btn {
    background: #FFEBEE;
    border: 2px solid #EF5350;
    color: #C62828;
    font-weight: 800;
    font-size: 0.82rem;
    padding: 0.35rem 0.9rem;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    transition: all 0.2s;
}

.piggy-clear-btn:hover {
    background: #EF5350;
    color: white;
    transform: scale(1.04);
}

.piggy-wallet-wrapper {
    background: #ECEFF1;
    border: 2.5px dashed #90A4AE;
    border-radius: 20px;
    padding: 0.9rem;
}

.wallet-header {
    font-size: 0.92rem;
    font-weight: 800;
    color: #37474F;
    margin-bottom: 0.6rem;
}

.piggy-wallet-bills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.piggy-action-bar {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.piggy-submit-btn {
    background: linear-gradient(135deg, #EC407A, #C2185B);
    border: none;
    border-radius: 20px;
    padding: 1.1rem 2.8rem;
    color: white;
    font-size: 1.3rem;
    font-weight: 900;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    box-shadow: 0 6px 20px rgba(194, 24, 91, 0.35);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.piggy-submit-btn:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 10px 25px rgba(194, 24, 91, 0.5);
}

/* Ruler SVG Wrap */
.ruler-svg-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 0.6rem 0;
}

/* Answers Grid */
.answers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    padding: 0 0.5rem;
}

.answer-btn {
    border: none;
    border-radius: var(--radius-medium);
    padding: 1.2rem;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: white;
    box-shadow: var(--shadow-medium);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.answer-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 50%);
    pointer-events: none;
}

.answer-btn:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-strong);
}

.answer-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.answer-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.answer-a { background: linear-gradient(135deg, #FF7043, #E64A19); }
.answer-b { background: linear-gradient(135deg, #66BB6A, #2E7D32); }
.answer-c { background: linear-gradient(135deg, #42A5F5, #1565C0); }
.answer-d { background: linear-gradient(135deg, #AB47BC, #7B1FA2); }

.answer-btn.correct {
    background: linear-gradient(135deg, #4CAF50, #2E7D32) !important;
    animation: correctPulse 0.5s ease;
}

.answer-btn.wrong {
    background: linear-gradient(135deg, #F44336, #C62828) !important;
    animation: shake 0.5s ease;
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-8px); }
    80% { transform: translateX(8px); }
}

/* Feedback Overlay */
.feedback-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    z-index: 10;
    transition: opacity 0.3s;
}

.feedback-overlay.show {
    opacity: 1;
}

.feedback-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: feedbackPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes feedbackPop {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.feedback-icon {
    font-size: 4rem;
}

.feedback-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    background: rgba(0,0,0,0.3);
    padding: 0.3rem 1rem;
    border-radius: var(--radius-small);
    backdrop-filter: blur(5px);
}

/* ============================================
   SCREEN 4: HASIL
   ============================================ */
.result-container {
    text-align: center;
    width: 90%;
    max-width: 550px;
    animation: slideUp 0.6s ease-out;
    position: relative;
    max-height: 95vh;
    overflow-y: auto;
    padding: 1rem 0;
}

.result-container::-webkit-scrollbar {
    display: none;
}

.result-title {
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange), var(--pink), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.result-mascot {
    font-size: 4rem;
    animation: celebrate 1s ease-in-out infinite;
}

@keyframes celebrate {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-10deg) scale(1.1); }
    75% { transform: rotate(10deg) scale(1.1); }
}

.result-stars {
    margin: 1rem 0;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.result-star {
    font-size: 3rem;
    opacity: 0.3;
    transition: all 0.5s ease;
    filter: grayscale(1);
}

.result-star.earned {
    opacity: 1;
    filter: grayscale(0);
    animation: starPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes starPop {
    from { transform: scale(0) rotate(-180deg); }
    to { transform: scale(1) rotate(0deg); }
}

.result-stats {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.stat-card {
    background: white;
    border-radius: var(--radius-medium);
    padding: 1rem;
    min-width: 130px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.stat-icon {
    font-size: 1.5rem;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-medium);
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--text-dark);
}

.result-message {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-medium);
    margin: 1rem 0;
    padding: 0.8rem 1.5rem;
    background: rgba(255,255,255,0.6);
    border-radius: var(--radius-medium);
}

.result-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.result-btn {
    border: none;
    border-radius: var(--radius-medium);
    padding: 1rem 2rem;
    font-family: 'Nunito', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: white;
    cursor: pointer;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.result-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-strong);
}

.result-btn:active {
    transform: scale(0.95);
}

.btn-play-again {
    background: linear-gradient(135deg, var(--green), var(--green-dark));
}

.btn-menu {
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
}

/* Confetti */
.confetti-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -10px;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotateZ(0deg) rotateX(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotateZ(720deg) rotateX(360deg);
        opacity: 0;
    }
}

/* ============================================
   SCREEN 5: MODE BELAJAR (PILIH TOPIK)
   ============================================ */
.learn-menu-container {
    text-align: center;
    width: 90%;
    max-width: 550px;
    animation: slideUp 0.6s ease-out;
}

.learn-topic-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1rem;
}

.learn-topic-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border: none;
    border-radius: var(--radius-medium);
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: white;
    position: relative;
    overflow: hidden;
}

.learn-topic-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 50%);
    pointer-events: none;
}

.learn-topic-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-strong);
}

.topic-addition { background: linear-gradient(135deg, var(--green), var(--green-dark)); }
.topic-subtraction { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); }
.topic-multiplication { background: linear-gradient(135deg, var(--orange), var(--orange-dark)); }
.topic-division { background: linear-gradient(135deg, var(--purple), var(--purple-dark)); }
.topic-warung { background: linear-gradient(135deg, #FB8C00, #E65100); }
.topic-pecahan { background: linear-gradient(135deg, #00897B, #004D40); }
.topic-time { background: linear-gradient(135deg, #8E24AA, #4A148C); }
.topic-fraction { background: linear-gradient(135deg, #FF5722, #C62828); }
.topic-fraction-banding { background: linear-gradient(135deg, #009688, #004D40); }
.topic-measure { background: linear-gradient(135deg, #00897B, #004D40); }
.topic-ruler { background: linear-gradient(135deg, #0288D1, #01579B); }
.topic-frog { background: linear-gradient(135deg, #43A047, #1B5E20); }
.topic-piggy { background: linear-gradient(135deg, #EC407A, #C2185B); }

.topic-icon {
    font-size: 2rem;
    min-width: 45px;
}

.topic-info {
    flex: 1;
    text-align: left;
}

.topic-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
}

.topic-desc {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.85;
}

.topic-arrow {
    font-size: 1.2rem;
    opacity: 0.7;
}

/* ============================================
   SCREEN 6: TUTORIAL INTERAKTIF
   ============================================ */
.tutorial-container {
    width: 95%;
    max-width: 820px;
    max-height: 95vh;
    overflow-y: auto;
    animation: slideUp 0.6s ease-out;
    padding: 0.5rem 0.5rem;
}

.tutorial-container::-webkit-scrollbar { display: none; }

.tutorial-header {
    text-align: center;
    margin-bottom: 1.2rem;
    margin-top: 2.5rem;
}

.tutorial-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    color: white;
    padding: 0.7rem 2.2rem;
    border-radius: var(--radius-large);
    font-size: 1.3rem;
    font-weight: 900;
    box-shadow: var(--shadow-medium);
    letter-spacing: 0.5px;
}

.tutorial-progress-dots {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1rem;
}

.tutorial-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ccc;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tutorial-dot.active {
    background: var(--teal);
    transform: scale(1.4);
    box-shadow: 0 0 10px rgba(0,150,136,0.5);
}

.tutorial-dot.done {
    background: var(--green);
}

/* Tutorial Card */
.tutorial-card {
    background: white;
    border-radius: 24px;
    padding: 2rem 2.2rem;
    box-shadow: var(--shadow-strong);
    border: 3px solid #E0F2F1;
    animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-height: 380px;
}

.tutorial-step-label {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--teal-dark);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
    display: inline-block;
    background: #E0F2F1;
    padding: 0.3rem 0.9rem;
    border-radius: 12px;
}

.tutorial-mascot-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.tutorial-mascot {
    font-size: 3.5rem;
    flex-shrink: 0;
    animation: bounce 2s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

.tutorial-speech {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    border-radius: 20px;
    padding: 1.1rem 1.4rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: #1B5E20;
    flex: 1;
    line-height: 1.6;
    box-shadow: 0 4px 12px rgba(76,175,80,0.12);
    border: 2px solid #A5D6A7;
}

/* Tutorial Visual Area */
.tutorial-visual {
    margin: 1.4rem 0;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

.visual-equation {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--blue-dark);
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
    padding: 1.2rem 2.8rem;
    border-radius: 24px;
    letter-spacing: 4px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(33,150,243,0.18);
    border: 3px solid #90CAF9;
}

.visual-equation .highlight {
    color: #D32F2F;
    text-decoration: underline;
    text-decoration-style: wavy;
    text-underline-offset: 8px;
    font-size: 3.2rem;
}

.visual-equation .result-highlight {
    color: #1B5E20;
    background: #A5D6A7;
    padding: 0.15rem 0.8rem;
    border-radius: 12px;
    font-size: 3.2rem;
    display: inline-block;
    box-shadow: 0 4px 10px rgba(46,125,50,0.2);
}

/* Visual Counting Tiles / Fruits */
.visual-objects {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 0.8rem;
    max-width: 100%;
}

.fruit-tile {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    border: 3px solid #FFE082;
    border-radius: 18px;
    padding: 8px 12px;
    min-width: 70px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: popInObj 0.35s ease forwards;
}

.fruit-tile:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

.fruit-tile.removed {
    opacity: 0.35;
    border-color: #EF5350;
    background: #FFEBEE;
    filter: grayscale(0.6);
}

.fruit-tile.removed .fruit-badge {
    background: #E53935;
}

.fruit-emoji {
    font-size: 2.8rem;
    line-height: 1;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.fruit-badge {
    font-size: 0.95rem;
    font-weight: 900;
    background: #FF9800;
    color: white;
    border-radius: 20px;
    padding: 2px 10px;
    margin-top: 5px;
    letter-spacing: 0.5px;
}

.fruit-tile.extra {
    border-style: dashed;
    border-color: #90A4AE;
    background: #ECEFF1;
}

.extra-count {
    font-size: 1.4rem;
    font-weight: 900;
    color: #455A64;
}

@keyframes popInObj {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ============================================
   PAPAN BERSUSUN VERTIKAL (SD KELAS 3)
   ============================================ */
.vertical-math-board {
    background: white;
    border: 3.5px solid #0288D1;
    border-radius: 24px;
    padding: 1.5rem 2.2rem;
    box-shadow: 0 10px 30px rgba(2,136,209,0.18);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 290px;
    font-family: 'Nunito', sans-serif;
    animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vm-labels {
    display: grid;
    grid-template-columns: 35px 85px 85px;
    gap: 8px;
    margin-bottom: 6px;
    align-items: center;
}

.vm-lbl {
    font-size: 0.85rem;
    font-weight: 900;
    padding: 5px 8px;
    border-radius: 10px;
    background: #ECEFF1;
    color: #546E7A;
    letter-spacing: 1px;
    text-align: center;
}

.vm-lbl.highlight-col {
    background: #FFE082;
    color: #E65100;
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(255,160,0,0.25);
}

.vm-carry-row,
.vm-borrow-row {
    display: grid;
    grid-template-columns: 35px 85px 85px;
    gap: 8px;
    height: 34px;
    align-items: center;
    margin-bottom: 2px;
}

.vm-carry {
    font-size: 0.95rem;
    font-weight: 900;
    background: #FFF59D;
    color: #E65100;
    border: 2px dashed #FF9800;
    border-radius: 12px;
    padding: 3px 6px;
    text-align: center;
    display: block;
}

.vm-carry.active {
    background: #FFE082;
    transform: scale(1.15);
    animation: pulse 1s infinite;
}

.vm-borrow-tens {
    font-size: 1.2rem;
    font-weight: 900;
    color: #E53935;
    text-decoration: line-through;
    text-decoration-thickness: 3px;
    text-align: center;
    display: block;
}

.vm-borrow-ones {
    font-size: 1.15rem;
    font-weight: 900;
    background: #FFCDD2;
    color: #C62828;
    border-radius: 10px;
    padding: 2px 6px;
    text-align: center;
    display: block;
}

.vm-borrow-ones.active {
    transform: scale(1.15);
    background: #EF9A9A;
    animation: pulse 1s infinite;
}

.vm-row {
    display: grid;
    grid-template-columns: 35px 85px 85px;
    gap: 8px;
    align-items: center;
    margin: 5px 0;
}

.vm-sign {
    font-size: 2.5rem;
    font-weight: 900;
    color: #FF9800;
    text-align: center;
    line-height: 1;
}

.vm-num {
    font-size: 2.8rem;
    font-weight: 900;
    text-align: center;
    border-radius: 14px;
    padding: 5px 0;
    color: #263238;
    background: #F5F5F5;
    border: 2.5px solid transparent;
    transition: all 0.25s ease;
}

.vm-num.highlight-col {
    background: #FFF9C4;
    border-color: #FFA000;
    color: #E65100;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255,160,0,0.25);
}

.vm-divider {
    width: 100%;
    height: 4px;
    background: #37474F;
    border-radius: 4px;
    margin: 8px 0;
}

.vm-result-row .vm-num.result-done {
    background: #C8E6C9;
    color: #1B5E20;
    border-color: #4CAF50;
    animation: correctPulse 0.4s ease;
}

/* Visual Groups / Baskets */
.visual-groups-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem;
    margin: 0.8rem 0;
}

.visual-group {
    background: #FFFDE7;
    border: 3.5px dashed #FFB300;
    border-radius: 22px;
    padding: 1rem 1.3rem;
    min-width: 130px;
    box-shadow: 0 6px 18px rgba(255,179,0,0.12);
    text-align: center;
    transition: transform 0.2s;
}

.visual-group:hover {
    transform: translateY(-3px) scale(1.03);
}

.visual-group-label {
    font-size: 1.15rem;
    font-weight: 900;
    color: #E65100;
    margin-bottom: 0.6rem;
}

.visual-group-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    padding: 0.8rem;
    background: white;
    border-radius: 16px;
    min-height: 60px;
    align-items: center;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.05);
}

.group-fruit {
    font-size: 2.6rem;
    line-height: 1;
    filter: drop-shadow(0 3px 5px rgba(0,0,0,0.12));
}

.visual-group-count {
    font-size: 1rem;
    font-weight: 800;
    color: #4E342E;
    margin-top: 0.6rem;
}

.visual-separator {
    font-size: 3rem;
    font-weight: 900;
    color: var(--orange);
    margin: 0 0.8rem;
    display: flex;
    align-items: center;
}

/* Tutorial Explanation */
.tutorial-explanation {
    margin-top: 1.2rem;
    padding: 1.2rem 1.6rem;
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
    border-radius: 20px;
    font-size: 1.25rem;
    font-weight: 800;
    color: #5D4037;
    line-height: 1.6;
    text-align: center;
    border: 2px solid #FFCC80;
    box-shadow: 0 4px 14px rgba(255,152,0,0.12);
}

.tutorial-explanation .step-math {
    display: block;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--blue-dark);
    margin: 0.5rem 0;
}

/* Tutorial Navigation */
.tutorial-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 1.4rem;
    gap: 1.2rem;
}

.tutorial-nav-btn {
    flex: 1;
    border: none;
    border-radius: var(--radius-medium);
    padding: 1.1rem 2rem;
    font-family: 'Nunito', sans-serif;
    font-size: 1.2rem;
    font-weight: 900;
    color: white;
    cursor: pointer;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tutorial-nav-btn:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.03);
    box-shadow: var(--shadow-strong);
}

.tutorial-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-prev {
    background: linear-gradient(135deg, #90A4AE, #607D8B);
}

.btn-next {
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
}

/* Tutorial Try Section */
.tutorial-try {
    margin-top: 1.2rem;
    background: white;
    border-radius: 24px;
    padding: 2rem 2.2rem;
    box-shadow: var(--shadow-strong);
    border: 3px solid #80CBC4;
    text-align: center;
    animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.try-question {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 1.2rem;
}

.try-input-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    align-items: center;
}

.try-input {
    width: 140px;
    padding: 0.8rem 1.2rem;
    font-size: 2.2rem;
    font-weight: 900;
    text-align: center;
    border: 3.5px solid #80CBC4;
    border-radius: 18px;
    font-family: 'Nunito', sans-serif;
    outline: none;
    transition: all 0.3s;
    color: #004D40;
}

.try-input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 15px rgba(0,150,136,0.3);
    transform: scale(1.05);
}

.try-submit-btn {
    padding: 0.9rem 2rem;
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    border: none;
    border-radius: 18px;
    color: white;
    font-size: 1.2rem;
    font-weight: 900;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    transition: all 0.3s;
    box-shadow: var(--shadow-soft);
}

.try-submit-btn:hover {
    transform: scale(1.06);
    box-shadow: var(--shadow-medium);
}

.try-feedback {
    margin-top: 1rem;
    font-size: 1.3rem;
    font-weight: 900;
    min-height: 2rem;
}

.try-feedback.correct {
    color: #2E7D32;
    animation: correctPulse 0.4s ease;
}

.try-feedback.wrong {
    color: #D32F2F;
    animation: shake 0.4s ease;
}

/* ============================================
   MODAL: IN-GAME TUTORIAL
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 24px;
    width: 95%;
    max-width: 680px;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
    animation: modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 3.5px solid #80CBC4;
}

.modal-content::-webkit-scrollbar { display: none; }

@keyframes modalSlideUp {
    from { transform: translateY(50px) scale(0.9); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.5rem;
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    border-radius: 20px 20px 0 0;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 900;
    color: white;
    letter-spacing: 0.5px;
}

.modal-close {
    background: rgba(255,255,255,0.25);
    border: none;
    color: white;
    font-size: 1.4rem;
    font-weight: 900;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.modal-close:hover {
    background: rgba(255,255,255,0.45);
    transform: scale(1.1);
}

.modal-body {
    padding: 1.3rem 1.6rem;
}

.modal-step-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.modal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    transition: all 0.3s;
}

.modal-dot.active {
    background: var(--teal);
    transform: scale(1.4);
}

.modal-dot.done {
    background: var(--green);
}

.modal-tutorial-card {
    animation: popIn 0.3s ease;
}

.modal-mascot-row {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.modal-mascot {
    font-size: 2.8rem;
    flex-shrink: 0;
    animation: bounce 2s ease-in-out infinite;
}

.modal-speech {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    border-radius: 18px;
    padding: 0.9rem 1.2rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: #1B5E20;
    flex: 1;
    line-height: 1.5;
    border: 2px solid #A5D6A7;
}

.modal-visual {
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.modal-visual .visual-equation {
    font-size: 2.3rem;
    padding: 0.9rem 2rem;
}

.modal-explanation {
    padding: 1rem 1.3rem;
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
    border-radius: 16px;
    font-size: 1.15rem;
    font-weight: 800;
    color: #5D4037;
    line-height: 1.6;
    text-align: center;
    border: 2px solid #FFCC80;
}

.modal-explanation .step-math {
    display: block;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--blue-dark);
    margin: 0.4rem 0;
}

.modal-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.2rem;
    gap: 0.8rem;
}

.modal-nav-btn {
    padding: 0.8rem 1.4rem;
    border: none;
    border-radius: 14px;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    color: white;
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    transition: all 0.2s;
    box-shadow: var(--shadow-soft);
}

.modal-nav-btn:hover:not(:disabled) {
    transform: scale(1.06);
    box-shadow: var(--shadow-medium);
}

.modal-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.modal-step-label {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-medium);
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    text-align: center;
}

.modal-done-btn {
    padding: 0.9rem 2.5rem;
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    border: none;
    border-radius: 18px;
    color: white;
    font-family: 'Nunito', sans-serif;
    font-size: 1.15rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-done-btn:hover {
    transform: scale(1.06);
    box-shadow: var(--shadow-strong);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablets */
@media (max-width: 768px) {
    .title-line1 { font-size: 1.6rem; }
    .title-line2 { font-size: 2.2rem; }
    .mascot-large { font-size: 4rem; }
    .menu-buttons { gap: 0.8rem; }
    .btn-icon { font-size: 2rem; }
    .btn-label { font-size: 1rem; }
    .question-text { font-size: 2rem; }
    .answer-btn { padding: 1rem; font-size: 1.5rem; }
}

/* Phones */
@media (max-width: 480px) {
    .title-line1 { font-size: 1.3rem; }
    .title-line2 { font-size: 1.8rem; }
    .mascot-large { font-size: 3.5rem; }
    .subtitle { font-size: 0.9rem; }
    .menu-buttons { gap: 0.6rem; }
    .menu-btn { padding: 0.9rem 0.7rem; }
    .btn-icon { font-size: 1.6rem; }
    .btn-label { font-size: 0.9rem; }
    .btn-desc { font-size: 0.65rem; }
    .question-text { font-size: 1.6rem; letter-spacing: 2px; }
    .question-bubble { padding: 1rem 1.5rem; }
    .answer-btn { padding: 0.8rem; font-size: 1.3rem; }
    .answers-grid { gap: 0.6rem; }
    .game-top-bar { padding: 0.4rem; gap: 0.5rem; }
    .score-section { font-size: 0.75rem; padding: 0.3rem 0.5rem; }
    .timer-circle { width: 42px; height: 42px; }
    .timer-text { font-size: 0.9rem; }
    .mascot-game { font-size: 2.5rem; }
    .speech-bubble { font-size: 0.8rem; padding: 0.4rem 0.8rem; }
    .result-title { font-size: 1.4rem; }
    .stat-card { min-width: 100px; padding: 0.7rem; }
    .stat-value { font-size: 1.1rem; }
    .result-btn { padding: 0.8rem 1.5rem; font-size: 1rem; }
    .result-star { font-size: 2.5rem; }
    .help-btn { font-size: 0.75rem; padding: 0.3rem 0.65rem; }
    .visual-equation { font-size: 1.8rem; padding: 0.8rem 1.2rem; letter-spacing: 2px; }
    .visual-equation .highlight { font-size: 2rem; }
    .visual-equation .result-highlight { font-size: 2rem; }
    .tutorial-card { padding: 1.2rem 1rem; }
    .tutorial-speech { font-size: 1.05rem; }
    .tutorial-explanation { font-size: 1.05rem; }
    .fruit-tile { min-width: 52px; padding: 6px 8px; }
    .fruit-emoji { font-size: 2.2rem; }
    .fruit-badge { font-size: 0.8rem; }
    .vertical-math-board { min-width: 240px; padding: 1rem 1.2rem; }
    .vm-labels, .vm-row, .vm-carry-row, .vm-borrow-row { grid-template-columns: 28px 65px 65px; gap: 4px; }
    .vm-num { font-size: 2.2rem; }
    .group-fruit { font-size: 2rem; }
    .try-question { font-size: 1.4rem; }
    .try-input { width: 110px; font-size: 1.8rem; padding: 0.6rem; }
    .learn-mode-btn { padding: 0.8rem 1rem; }
    .learn-label { font-size: 1rem; }
}

/* Landscape phones */
@media (max-height: 500px) {
    .mascot-large { font-size: 2.5rem; }
    .title-line1 { font-size: 1.2rem; }
    .title-line2 { font-size: 1.6rem; }
    .subtitle { display: none; }
    .menu-buttons { gap: 0.5rem; margin: 0.5rem 0; }
    .menu-btn { padding: 0.6rem; }
    .btn-icon { font-size: 1.5rem; }
    .mascot-game { font-size: 2rem; }
    .question-bubble { padding: 0.8rem 1.5rem; margin: 0.5rem 0; }
    .question-text { font-size: 1.5rem; }
    .speech-bubble { display: none; }
    .answer-btn { padding: 0.7rem; font-size: 1.2rem; }
    .learn-mode-section { margin: 0.5rem 0; }
    .learn-mode-btn { padding: 0.5rem 1rem; }
}

/* =============================================
   MASCOT WARDROBE & DRESSING ROOM STYLES (NEW)
   ============================================= */

/* Home Mascot Wrapper & Clickable Dressing Prompt */
.home-mascot-wrapper {
    cursor: pointer;
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.home-mascot-wrapper:hover {
    transform: scale(1.1) rotate(-3deg);
}

.home-mascot-wrapper::after {
    content: '👗 Ganti Baju';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: #FFD54F;
    color: #4E342E;
    font-size: 0.75rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.home-mascot-wrapper:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(2px);
}

/* Wardrobe Access Button in Menu */
.wardrobe-access-section {
    margin: 0.8rem 0 1.2rem 0;
}

.wardrobe-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.6rem;
    border-radius: 24px;
    background: linear-gradient(135deg, #EC407A, #8E24AA);
    border: 3.5px solid #F8BBD0;
    color: #FFFFFF;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(236, 64, 122, 0.35);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.wardrobe-btn:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 30px rgba(236, 64, 122, 0.45);
}

.wardrobe-btn:active {
    transform: scale(0.98);
}

.wardrobe-icon {
    font-size: 2.4rem;
    min-width: 48px;
    animation: bounce 2s infinite;
}

.wardrobe-text-wrap {
    flex: 1;
}

.wardrobe-label {
    display: block;
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: -0.3px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.wardrobe-desc {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    opacity: 0.95;
    margin-top: 2px;
}

.wardrobe-star-badge {
    background: #FFF8E1;
    color: #F57F17;
    font-size: 1rem;
    font-weight: 900;
    padding: 6px 14px;
    border-radius: 20px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.18);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* =============================================
   COMPOSITE LAYERED MASCOT COMPONENT
   ============================================= */

.mascot-composite {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    line-height: 1;
}

.mascot-composite.mascot-size-sm {
    font-size: 2.2rem;
    width: 48px;
    height: 48px;
}

.mascot-composite.mascot-size-md {
    font-size: 3.5rem;
    width: 72px;
    height: 72px;
}

.mascot-composite.mascot-size-lg {
    font-size: 5rem;
    width: 105px;
    height: 105px;
}

.mascot-composite.mascot-size-xl {
    font-size: 7.2rem;
    width: 150px;
    height: 150px;
}

.mascot-composite .layer-base-mascot {
    position: relative;
    z-index: 2;
    transition: transform 0.25s ease;
    animation: mascotIdleBreathe 3s ease-in-out infinite;
}

@keyframes mascotIdleBreathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04) translateY(-2px); }
}

.mascot-composite .layer-outfit-back {
    position: absolute;
    z-index: 1;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85em;
    pointer-events: none;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.25));
}

.mascot-composite .layer-face {
    position: absolute;
    z-index: 3;
    top: 18%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.42em;
    pointer-events: none;
}

.mascot-composite .layer-head {
    position: absolute;
    z-index: 4;
    top: -24%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.58em;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.mascot-composite .layer-outfit-front {
    position: absolute;
    z-index: 5;
    bottom: -6%;
    right: -10%;
    font-size: 0.48em;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}

/* =============================================
   WARDROBE SCREEN LAYOUT
   ============================================= */

.wardrobe-screen-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem 1rem;
}

.wardrobe-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.wardrobe-star-wallet {
    background: linear-gradient(135deg, #FFF9C4, #FFF176);
    color: #E65100;
    padding: 0.6rem 1.4rem;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: 900;
    box-shadow: 0 4px 12px rgba(255, 179, 0, 0.35);
    border: 2px solid #FFE082;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wardrobe-header {
    text-align: center;
    margin-bottom: 1.6rem;
}

.wardrobe-main-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 820px) {
    .wardrobe-main-layout {
        grid-template-columns: 1fr;
    }
}

/* LEFT: MIRROR BOOTH CARD */
.wardrobe-booth-card {
    background: linear-gradient(180deg, #FFFFFF, #FCE4EC);
    border-radius: 28px;
    border: 4px solid #F8BBD0;
    padding: 1.6rem 1.2rem;
    box-shadow: 0 10px 30px rgba(236, 64, 122, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.booth-spotlight {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 1.5rem 0 1rem 0;
}

.booth-mirror-frame {
    background: linear-gradient(135deg, #FFF9C4, #FFFDE7);
    border: 5px solid #FFD54F;
    border-radius: 50% 50% 30% 30% / 40% 40% 20% 20%;
    padding: 1.5rem 2rem;
    box-shadow: inset 0 0 25px rgba(255, 213, 79, 0.6), 0 8px 24px rgba(0,0,0,0.1);
    position: relative;
}

.booth-stage-podium {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.podium-shadow {
    width: 120px;
    height: 16px;
    background: rgba(173, 20, 87, 0.18);
    border-radius: 50%;
    margin-top: -6px;
}

.booth-info-box {
    margin: 1.2rem 0;
    width: 100%;
}

.preview-mascot-name {
    font-size: 1.4rem;
    font-weight: 900;
    color: #880E4F;
    margin-bottom: 0.4rem;
}

.preview-mascot-bubble {
    background: #FFFFFF;
    border: 2.5px solid #F48FB1;
    border-radius: 16px;
    padding: 0.7rem 1rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: #4A148C;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    position: relative;
}

.preview-mascot-bubble::before {
    content: '';
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 8px 9px 8px;
    border-style: solid;
    border-color: transparent transparent #F48FB1 transparent;
}

.booth-action-bar {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
}

.booth-apply-btn {
    background: linear-gradient(135deg, #43A047, #1B5E20);
    color: #FFFFFF;
    border: none;
    padding: 0.9rem 1.2rem;
    border-radius: 18px;
    font-size: 1.1rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(67, 160, 71, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.booth-apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(67, 160, 71, 0.45);
}

.booth-clear-btn {
    background: #ECEFF1;
    color: #546E7A;
    border: 2px solid #CFD8DC;
    padding: 0.65rem 1rem;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease;
}

.booth-clear-btn:hover {
    background: #CFD8DC;
    color: #263238;
}

/* RIGHT: CATALOG & ITEMS RACK */
.wardrobe-catalog-card {
    background: #FFFFFF;
    border-radius: 28px;
    border: 4px solid #E1BEE7;
    padding: 1.4rem;
    box-shadow: 0 10px 30px rgba(142, 36, 170, 0.15);
    display: flex;
    flex-direction: column;
}

.wardrobe-tabs-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 1.2rem;
}

@media (max-width: 550px) {
    .wardrobe-tabs-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

.wardrobe-tab-btn {
    background: #F3E5F5;
    color: #6A1B9A;
    border: 2.5px solid transparent;
    padding: 0.65rem 0.5rem;
    border-radius: 16px;
    font-size: 0.9rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.wardrobe-tab-btn:hover {
    background: #E1BEE7;
}

.wardrobe-tab-btn.active {
    background: linear-gradient(135deg, #8E24AA, #4A148C);
    color: #FFFFFF;
    border-color: #BA68C8;
    box-shadow: 0 4px 12px rgba(142, 36, 170, 0.35);
}

.wardrobe-catalog-scroll {
    max-height: 440px;
    overflow-y: auto;
    padding: 4px;
    scrollbar-width: thin;
    scrollbar-color: #BA68C8 #F3E5F5;
}

.wardrobe-catalog-scroll::-webkit-scrollbar {
    width: 8px;
}

.wardrobe-catalog-scroll::-webkit-scrollbar-thumb {
    background-color: #BA68C8;
    border-radius: 4px;
}

.wardrobe-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

/* INDIVIDUAL ITEM CARD */
.wardrobe-item-card {
    background: #FAFAFA;
    border: 3px solid #E0E0E0;
    border-radius: 20px;
    padding: 1rem 0.6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.wardrobe-item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.1);
}

.wardrobe-item-card.equipped {
    background: #E8F5E9;
    border-color: #4CAF50;
    box-shadow: 0 4px 14px rgba(76, 175, 80, 0.3);
}

.wardrobe-item-card.previewing {
    background: #FFF8E1;
    border-color: #FFB300;
    box-shadow: 0 4px 14px rgba(255, 179, 0, 0.35);
}

.wardrobe-item-card.locked {
    background: #F5F5F5;
    opacity: 0.95;
}

.item-icon-box {
    font-size: 2.8rem;
    margin-bottom: 0.4rem;
    line-height: 1;
}

.item-name-tag {
    font-size: 0.9rem;
    font-weight: 900;
    color: #37474F;
    margin-bottom: 0.3rem;
    min-height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-price-tag {
    font-size: 0.85rem;
    font-weight: 800;
    color: #E65100;
    background: #FFF9C4;
    padding: 2px 8px;
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

.item-status-btn {
    width: 100%;
    padding: 0.45rem 0.4rem;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 900;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.item-status-btn.btn-equipped {
    background: #4CAF50;
    color: #FFFFFF;
    cursor: default;
}

.item-status-btn.btn-wear {
    background: #2196F3;
    color: #FFFFFF;
}

.item-status-btn.btn-wear:hover {
    background: #1976D2;
}

.item-status-btn.btn-buy {
    background: linear-gradient(135deg, #FFB300, #F57F17);
    color: #FFFFFF;
    box-shadow: 0 3px 8px rgba(255, 179, 0, 0.4);
}

.item-status-btn.btn-buy:hover {
    transform: scale(1.04);
}

.wardrobe-footer-hint {
    margin-top: 1rem;
    font-size: 0.85rem;
    font-weight: 800;
    color: #6A1B9A;
    text-align: center;
    background: #F3E5F5;
    padding: 0.6rem 1rem;
    border-radius: 14px;
}

/* Animations */
@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.shake-error {
    animation: shakeError 0.4s ease;
}




/* ==========================================================================
   6 NEW GAME MODULES: CARD GRADIENTS, PLAY AREAS, & COMPONENT STYLES
   ========================================================================== */

/* --------------------------------------------------------------------------
   A. 6 Mode Card Gradients (.card-*)
   -------------------------------------------------------------------------- */
.card-geometry {
    background: linear-gradient(135deg, #E65100, #BF360C);
}

.card-symmetry {
    background: linear-gradient(135deg, #8E24AA, #4A148C);
}

.card-rounding {
    background: linear-gradient(135deg, #5D4037, #3E2723);
}

.card-coordinate {
    background: linear-gradient(135deg, #F9A825, #F57F17);
}

.card-oddeven {
    background: linear-gradient(135deg, #00897B, #004D40);
}

.card-chart {
    background: linear-gradient(135deg, #1565C0, #0D47A1);
}

/* Submenu Learn Quick Buttons */
.quick-learn-btn.geometry-learn {
    background: linear-gradient(135deg, #E65100, #BF360C);
}
.quick-learn-btn.symmetry-learn {
    background: linear-gradient(135deg, #8E24AA, #4A148C);
}
.quick-learn-btn.rounding-learn {
    background: linear-gradient(135deg, #5D4037, #3E2723);
}
.quick-learn-btn.coordinate-learn {
    background: linear-gradient(135deg, #F9A825, #F57F17);
}
.quick-learn-btn.oddeven-learn {
    background: linear-gradient(135deg, #00897B, #004D40);
}
.quick-learn-btn.chart-learn {
    background: linear-gradient(135deg, #1565C0, #0D47A1);
}

/* --------------------------------------------------------------------------
   B. Grid Build Play Area Styles (Geometry & Symmetry)
   -------------------------------------------------------------------------- */
#gridBuildPlayArea {
    width: 100%;
    animation: fadeIn 0.4s ease-out;
}

.grid-build-header {
    display: flex;
    justify-content: center;
    margin-bottom: 0.8rem;
}

.grid-instruction-bubble {
    background: rgba(255, 255, 255, 0.95);
    border: 3px solid #FF9800;
    border-radius: 20px;
    padding: 0.8rem 1.4rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: #E65100;
    box-shadow: var(--shadow-soft);
    text-align: center;
    max-width: 650px;
    line-height: 1.4;
}

.grid-build-stage {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0.8rem auto;
    padding: 1.2rem;
    background: #FFF8E1;
    border: 3.5px solid #FFE082;
    border-radius: 24px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.06), var(--shadow-soft);
    max-width: 100%;
    overflow-x: auto;
}

.grid-matrix {
    display: grid;
    gap: 5px;
    user-select: none;
    touch-action: manipulation;
}

.grid-cell {
    width: 42px;
    height: 42px;
    background: #FFFFFF;
    border: 2.5px solid #CFD8DC;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.grid-cell:hover {
    border-color: #29B6F6;
    background: #E1F5FE;
    transform: scale(1.06);
    z-index: 2;
}

.grid-cell.filled {
    background: linear-gradient(135deg, #29B6F6, #0288D1);
    border-color: #01579B;
    color: white;
    box-shadow: 0 4px 10px rgba(2, 136, 209, 0.4);
    transform: scale(0.96);
}

.grid-cell.fixed {
    background: linear-gradient(135deg, #AB47BC, #7B1FA2);
    border-color: #4A148C;
    color: white;
    cursor: default;
    box-shadow: 0 3px 8px rgba(123, 31, 162, 0.35);
}

.grid-cell.mirror-side {
    border-style: dashed;
    border-color: #BA68C8;
    background: #F3E5F5;
}

.grid-cell.mirror-side.filled {
    background: linear-gradient(135deg, #AB47BC, #6A1B9A);
    border-color: #4A148C;
    color: white;
}

.grid-mirror-divider {
    width: 4px;
    background: repeating-linear-gradient(to bottom, #7B1FA2 0, #7B1FA2 8px, transparent 8px, transparent 14px);
    margin: 0 4px;
}

.grid-build-stats {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 0.9rem 0;
    flex-wrap: wrap;
}

.stat-badge {
    background: white;
    padding: 0.55rem 1.2rem;
    border-radius: 16px;
    font-weight: 800;
    font-size: 0.95rem;
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-badge.luas {
    border-left: 5px solid #0288D1;
    color: #01579B;
}

.stat-badge.keliling {
    border-left: 5px solid #FF9800;
    color: #E65100;
}

.stat-badge.target {
    border-left: 5px solid #4CAF50;
    color: #2E7D32;
}

.grid-build-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.action-btn {
    border: none;
    border-radius: var(--radius-medium);
    padding: 0.85rem 1.6rem;
    font-family: 'Nunito', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--shadow-medium);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.action-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: var(--shadow-strong);
}

.action-btn:active {
    transform: scale(0.97);
}

.action-btn.clear-btn {
    background: #ECEFF1;
    color: #455A64;
    border: 2px solid #B0BEC5;
}

.action-btn.submit-btn {
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: white;
    border: 2px solid #81C784;
}

/* --------------------------------------------------------------------------
   C. Treasure Map Play Area Styles (Coordinate & Compass)
   -------------------------------------------------------------------------- */
#treasureMapPlayArea {
    width: 100%;
    animation: fadeIn 0.4s ease-out;
}

.treasure-map-header {
    display: flex;
    justify-content: center;
    margin-bottom: 0.8rem;
}

.map-instruction-bubble {
    background: #FFF8E1;
    border: 3px solid #FFA000;
    border-radius: 20px;
    padding: 0.85rem 1.4rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: #E65100;
    box-shadow: 0 4px 12px rgba(230, 81, 0, 0.15);
    text-align: center;
    max-width: 650px;
    line-height: 1.4;
}

.treasure-map-stage {
    background: radial-gradient(circle at 50% 50%, #FFF3E0 0%, #FFE0B2 70%, #FFCC80 100%);
    border: 4.5px solid #8D6E63;
    border-radius: 26px;
    padding: 1.4rem;
    box-shadow: inset 0 0 24px rgba(141, 110, 99, 0.3), 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0.8rem auto;
    position: relative;
    max-width: 520px;
}

.map-grid-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.map-grid-row {
    display: flex;
    align-items: center;
    gap: 5px;
}

.map-axis-label {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 900;
    color: #5D4037;
}

.map-cell {
    width: 54px;
    height: 54px;
    background: rgba(255, 253, 245, 0.92);
    border: 2.5px solid #D7CCC8;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.map-cell:hover {
    border-color: #FFB300;
    background: #FFFDE7;
    transform: scale(1.08);
    z-index: 2;
}

.map-cell.selected {
    border: 3.5px solid #FF8F00;
    background: #FFF8E1;
    box-shadow: 0 0 16px rgba(255, 143, 0, 0.65);
    transform: scale(1.1);
}

.map-cell.treasure {
    background: #FFEBEE;
    border-color: #D32F2F;
    color: #D32F2F;
    font-weight: 900;
}

.map-cell.start {
    background: #E1F5FE;
    border-color: #0288D1;
}

.treasure-map-actions {
    display: flex;
    justify-content: center;
    margin-top: 1.1rem;
}

.treasure-map-actions .submit-btn {
    background: linear-gradient(135deg, #FF8F00, #E65100);
    color: white;
    font-size: 1.15rem;
    padding: 0.9rem 2.2rem;
    border-radius: 24px;
    border: 2.5px solid #FFE082;
    box-shadow: 0 6px 16px rgba(230, 81, 0, 0.3);
}

/* --------------------------------------------------------------------------
   D. Zoo Play Area Styles (Odd & Even Sorting)
   -------------------------------------------------------------------------- */
#zooPlayArea {
    width: 100%;
    animation: fadeIn 0.4s ease-out;
}

.zoo-header {
    display: flex;
    justify-content: center;
    margin-bottom: 0.8rem;
}

.zoo-instruction-bubble {
    background: #E8F5E9;
    border: 3px solid #66BB6A;
    border-radius: 20px;
    padding: 0.85rem 1.4rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: #1B5E20;
    text-align: center;
    max-width: 650px;
    line-height: 1.4;
    box-shadow: var(--shadow-soft);
}

.zoo-stage {
    background: linear-gradient(180deg, #A5D6A7 0%, #81C784 60%, #4CAF50 100%);
    border: 4px solid #2E7D32;
    border-radius: 26px;
    padding: 1.2rem;
    box-shadow: var(--shadow-medium);
    min-height: 190px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin: 0.8rem auto;
    max-width: 600px;
}

.zoo-stage-fence {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-bottom: 0.6rem;
    opacity: 0.85;
    font-size: 1.4rem;
}

.zoo-active-animal-spot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 110px;
}

.zoo-active-animal-badge {
    font-size: 3.8rem;
    animation: bounce 2s infinite ease-in-out;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.zoo-active-number-tag {
    background: white;
    border: 3px solid #2E7D32;
    border-radius: 20px;
    padding: 0.35rem 1.4rem;
    font-size: 1.7rem;
    font-weight: 900;
    color: #1B5E20;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 4px;
}

.zoo-queue {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 1rem 0;
    padding: 0.9rem;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 22px;
    backdrop-filter: blur(4px);
    box-shadow: var(--shadow-soft);
}

.zoo-animal-card {
    background: white;
    border: 3px solid #81C784;
    border-radius: 18px;
    padding: 0.6rem 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    min-width: 65px;
}

.zoo-animal-card:hover {
    transform: translateY(-4px) scale(1.06);
    border-color: #4CAF50;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.zoo-animal-card.selected {
    border: 3.5px solid #FFB300;
    box-shadow: 0 0 16px rgba(255, 179, 0, 0.65);
    transform: scale(1.12);
    background: #FFFDE7;
}

.zoo-animal-card.sorted {
    opacity: 0.3;
    filter: grayscale(0.85);
    pointer-events: none;
    transform: scale(0.9);
}

.zoo-animal-emoji {
    font-size: 2rem;
}

.zoo-animal-num {
    font-size: 1.15rem;
    font-weight: 900;
    color: #2E7D32;
    background: #E8F5E9;
    padding: 2px 8px;
    border-radius: 10px;
}

.zoo-gates {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.gate-btn {
    border: none;
    border-radius: 24px;
    padding: 1.1rem 2.2rem;
    font-family: 'Nunito', sans-serif;
    font-size: 1.25rem;
    font-weight: 900;
    cursor: pointer;
    color: white;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.gate-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.gate-btn:active {
    transform: scale(0.96);
}

.gate-odd {
    background: linear-gradient(135deg, #1E88E5, #1565C0);
    border: 3px solid #90CAF9;
    box-shadow: 0 6px 18px rgba(21, 101, 192, 0.35);
}

.gate-even {
    background: linear-gradient(135deg, #43A047, #2E7D32);
    border: 3px solid #A5D6A7;
    box-shadow: 0 6px 18px rgba(46, 125, 50, 0.35);
}

/* --------------------------------------------------------------------------
   E. Bar Chart Container Styles (Standard Quiz Area Display)
   -------------------------------------------------------------------------- */
.barchart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 1rem;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    border: 2.5px solid #E0E0E0;
}

.barchart-svg {
    width: 100%;
    height: auto;
    max-height: 260px;
    display: block;
}

.chart-bar-rect {
    transition: all 0.2s ease;
    cursor: pointer;
}

.chart-bar-rect:hover {
    filter: brightness(1.15);
    transform: scaleY(1.02);
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 0.8rem;
    flex-wrap: wrap;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-medium);
}

.chart-legend-color {
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

/* --------------------------------------------------------------------------
   F. Learn Mode Topic Colors (6 New Modules)
   -------------------------------------------------------------------------- */
.topic-geometry {
    background: linear-gradient(135deg, #E65100, #BF360C);
}

.topic-symmetry {
    background: linear-gradient(135deg, #8E24AA, #4A148C);
}

.topic-rounding {
    background: linear-gradient(135deg, #5D4037, #3E2723);
}

.topic-coordinate {
    background: linear-gradient(135deg, #F9A825, #F57F17);
}

.topic-oddeven {
    background: linear-gradient(135deg, #00897B, #004D40);
}

.topic-chart {
    background: linear-gradient(135deg, #1565C0, #0D47A1);
}

/* --------------------------------------------------------------------------
   Mobile Responsiveness for New Modules
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
    .grid-cell {
        width: 34px;
        height: 34px;
        font-size: 0.8rem;
    }
    .map-cell {
        width: 42px;
        height: 42px;
        font-size: 1.3rem;
    }
    .gate-btn {
        padding: 0.85rem 1.4rem;
        font-size: 1.05rem;
    }
    .zoo-active-animal-badge {
        font-size: 3rem;
    }
    .zoo-active-number-tag {
        font-size: 1.4rem;
        padding: 0.25rem 1rem;
    }
}



/* ============================================================================
   PETUALANGAN MATEMATIKA - SUPPORTING FEATURES STYLESHEET
   1. Special Features Hub (Menu)
   2. Achievements Screen (16 Badges & Progress)
   3. Daily Challenge Screen (Calendar, Streak 🔥, Chest)
   4. Two-Player Duel (Split Screen, Tug-of-War, Podium)
   5. Interactive Storybook (Parchment Paper, Typography, Checkpoints)
   6. Achievement Toast Notification Banner
   ============================================================================ */

/* ----------------------------------------------------------------------------
   SCREEN OVERFLOW FIX FOR EXPANDED MODULES
   ---------------------------------------------------------------------------- */
#achievementsScreen.active,
#dailyChallengeScreen.active,
#twoPlayerScreen.active,
#storyBookScreen.active {
    overflow-y: auto !important;
    display: block !important;
    padding: 1.5rem 1rem 3.5rem 1rem;
    scrollbar-width: thin;
    scrollbar-color: #FFA726 #FFF3E0;
}

#achievementsScreen::-webkit-scrollbar,
#dailyChallengeScreen::-webkit-scrollbar,
#twoPlayerScreen::-webkit-scrollbar,
#storyBookScreen::-webkit-scrollbar {
    width: 8px;
}

#achievementsScreen::-webkit-scrollbar-thumb,
#dailyChallengeScreen::-webkit-scrollbar-thumb,
#twoPlayerScreen::-webkit-scrollbar-thumb,
#storyBookScreen::-webkit-scrollbar-thumb {
    background: #FFA726;
    border-radius: 10px;
}

/* ============================================================================
   1. SPECIAL FEATURES HUB IN MENU SCREEN
   ============================================================================ */
.special-features-section {
    margin: 1.8rem auto 1.4rem auto;
    width: 100%;
    max-width: 860px;
    text-align: center;
}

.special-features-header {
    margin-bottom: 1.1rem;
}

.special-features-title {
    font-size: 1.45rem;
    font-weight: 900;
    color: #E65100;
    text-shadow: 1px 1px 0 rgba(255, 152, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 0.25rem;
}

.special-features-subtitle {
    font-size: 0.95rem;
    font-weight: 700;
    color: #616161;
}

.special-features-hub {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.1rem;
}

@media (max-width: 620px) {
    .special-features-hub {
        grid-template-columns: 1fr;
    }
}

.special-hub-card {
    border: none;
    border-radius: 22px;
    padding: 1.25rem 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1.1rem;
    text-align: left;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
    font-family: 'Nunito', sans-serif;
    color: #FFFFFF;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.special-hub-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 55%);
    pointer-events: none;
}

.special-hub-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.2);
}

.special-hub-card:active {
    transform: translateY(-2px) scale(0.98);
}

/* Card Theme Gradients */
.hub-achievements {
    background: linear-gradient(135deg, #FFB300, #F57F17);
    border: 3px solid #FFE082;
}

.hub-daily {
    background: linear-gradient(135deg, #FF7043, #D84315);
    border: 3px solid #FFCCBC;
}

.hub-twoplayer {
    background: linear-gradient(135deg, #7E57C2, #4527A0);
    border: 3px solid #D1C4E9;
}

.hub-storybook {
    background: linear-gradient(135deg, #26A69A, #00695C);
    border: 3px solid #B2DFDB;
}

.hub-card-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.9rem;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 0.25rem 0.65rem;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.hub-card-icon {
    font-size: 2.8rem;
    min-width: 54px;
    text-align: center;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.special-hub-card:hover .hub-card-icon {
    transform: scale(1.15) rotate(6deg);
}

.hub-card-content {
    flex: 1;
}

.hub-card-title {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: -0.2px;
    margin-bottom: 0.25rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.hub-card-desc {
    font-size: 0.88rem;
    font-weight: 700;
    opacity: 0.95;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.hub-card-meta {
    display: flex;
    gap: 0.5rem;
}

.hub-badge-pill,
.hub-streak-pill,
.hub-versus-pill,
.hub-story-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.25rem 0.7rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 800;
}

.hub-card-arrow {
    font-size: 1.2rem;
    opacity: 0.85;
    transition: transform 0.25s ease;
}

.special-hub-card:hover .hub-card-arrow {
    transform: translateX(5px);
    opacity: 1;
}

/* ============================================================================
   2. SCREEN: ACHIEVEMENTS (PAPAN PRESTASI)
   ============================================================================ */
.achievements-screen-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 1.2rem 1rem 3rem 1rem;
}

.achieve-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.achieve-wallet-stars {
    background: linear-gradient(135deg, #FFF9C4, #FFF176);
    color: #E65100;
    padding: 0.6rem 1.4rem;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: 900;
    box-shadow: 0 4px 12px rgba(255, 179, 0, 0.35);
    border: 2px solid #FFE082;
    display: flex;
    align-items: center;
    gap: 8px;
}

.achievements-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.trophy-mascot {
    font-size: 4.5rem;
    animation: bounce 2s infinite ease-in-out;
    filter: drop-shadow(0 6px 16px rgba(255, 179, 0, 0.4));
}

.achievements-stats-bar {
    display: grid;
    grid-template-columns: 1fr 1fr 1.6fr;
    gap: 1.1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .achievements-stats-bar {
        grid-template-columns: 1fr;
    }
}

.achieve-stat-card {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 1.1rem 1.3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border: 2.5px solid #FFE082;
}

.stat-card-icon {
    font-size: 2.5rem;
}

.stat-card-info {
    flex: 1;
}

.stat-card-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #757575;
}

.stat-card-val {
    display: block;
    font-size: 1.45rem;
    font-weight: 900;
    color: #E65100;
}

.stat-progress-card {
    display: block;
}

.stat-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.stat-card-percent {
    font-size: 1.25rem;
    font-weight: 900;
    color: #2E7D32;
}

.achieve-overall-track {
    width: 100%;
    height: 12px;
    background: #ECEFF1;
    border-radius: 10px;
    overflow: hidden;
}

.achieve-overall-fill {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, #FFB300, #4CAF50);
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Category Filter Tabs */
.achieve-tabs-bar {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1.6rem;
}

.achieve-tab-btn {
    border: 2px solid #E0E0E0;
    background: #FFFFFF;
    color: #616161;
    padding: 0.55rem 1.25rem;
    border-radius: 24px;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.achieve-tab-btn:hover {
    border-color: #FFA726;
    color: #E65100;
    transform: translateY(-2px);
}

.achieve-tab-btn.active {
    background: linear-gradient(135deg, #FFA000, #F57F17);
    color: #FFFFFF;
    border-color: #E65100;
    box-shadow: 0 4px 14px rgba(255, 152, 0, 0.35);
}

/* 16 Achievement Cards Grid */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 1.25rem;
}

.achievement-card {
    background: #FFFFFF;
    border-radius: 22px;
    padding: 1.3rem 1.1rem;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
    border: 3px solid #FFE082;
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.achievement-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(255, 179, 0, 0.25);
}

/* Glowing Gold Border on Unlocked Cards */
.achievement-card.unlocked {
    border-color: #FFB300;
    box-shadow: 0 0 16px rgba(255, 179, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Locked Card Styling (Greyscale & Muted) */
.achievement-card.locked {
    background: #F8F9FA;
    border-color: #E0E0E0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    opacity: 0.8;
}

.achievement-card.locked .achievement-icon {
    filter: grayscale(1);
    opacity: 0.6;
}

.achieve-tier-badge {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 800;
}

.tier-bronze { background: #EFEBE9; color: #8D6E63; border: 1px solid #D7CCC8; }
.tier-silver { background: #ECEFF1; color: #546E7A; border: 1px solid #CFD8DC; }
.tier-gold { background: #FFF9C4; color: #F57F17; border: 1px solid #FFE082; }
.tier-diamond { background: #E0F7FA; color: #00838F; border: 1px solid #B2EBF2; }

.achievement-icon-wrap {
    margin: 0.8rem 0 0.5rem 0;
}

.achievement-icon {
    font-size: 3.2rem;
    display: inline-block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
    transition: transform 0.3s ease;
}

.achievement-card:hover .achievement-icon {
    transform: scale(1.15) rotate(5deg);
}

.achievement-title {
    font-size: 1.1rem;
    font-weight: 900;
    color: #212121;
    margin-bottom: 0.25rem;
}

.achievement-desc {
    font-size: 0.82rem;
    font-weight: 700;
    color: #616161;
    min-height: 2.4rem;
    margin-bottom: 0.6rem;
    line-height: 1.35;
}

.achievement-reward-tag {
    display: inline-block;
    background: #FFF8E1;
    color: #F57F17;
    font-weight: 800;
    font-size: 0.82rem;
    padding: 0.25rem 0.65rem;
    border-radius: 12px;
    border: 1.5px solid #FFE082;
    margin-bottom: 0.8rem;
}

.achievement-progress-wrap {
    margin-bottom: 0.8rem;
}

.achieve-prog-text {
    font-size: 0.78rem;
    font-weight: 800;
    color: #757575;
    margin-bottom: 0.3rem;
}

.achieve-prog-track {
    height: 8px;
    background: #ECEFF1;
    border-radius: 6px;
    overflow: hidden;
}

.achieve-prog-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #81C784);
    border-radius: 6px;
    transition: width 0.4s ease;
}

/* Claim Button Styling */
.achieve-claim-btn {
    width: 100%;
    padding: 0.65rem;
    border-radius: 14px;
    border: none;
    font-size: 0.88rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Nunito', sans-serif;
}

.achieve-claim-btn:disabled {
    background: #EEEEEE;
    color: #9E9E9E;
    cursor: not-allowed;
}

.achieve-claim-btn.claimable {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(76, 175, 80, 0.4);
    animation: claimPulse 1.6s infinite ease-in-out;
    cursor: pointer;
}

.achieve-claim-btn.claimed {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1.5px solid #A5D6A7;
    cursor: default;
}

@keyframes claimPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 14px rgba(76, 175, 80, 0.4);
    }
    50% {
        transform: scale(1.04);
        box-shadow: 0 8px 22px rgba(76, 175, 80, 0.6);
    }
}

/* ============================================================================
   3. SCREEN: DAILY CHALLENGE (TANTANGAN HARIAN)
   ============================================================================ */
.daily-screen-container {
    max-width: 880px;
    margin: 0 auto;
    padding: 1.2rem 1rem 3rem 1rem;
}

.daily-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.daily-title-badge {
    background: #FFE0B2;
    color: #E65100;
    font-weight: 900;
    font-size: 1.05rem;
    padding: 0.5rem 1.2rem;
    border-radius: 18px;
    border: 2px solid #FFB74D;
}

.daily-header {
    text-align: center;
    margin-bottom: 1.6rem;
}

.daily-hero-grid {
    display: grid;
    grid-template-columns: 190px 1fr 240px;
    gap: 1.2rem;
    margin-bottom: 1.8rem;
}

@media (max-width: 768px) {
    .daily-hero-grid {
        grid-template-columns: 1fr;
    }
}

/* Calendar Card */
.daily-calendar-card {
    background: #FFFFFF;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.09);
    border: 2.5px solid #FFCDD2;
    text-align: center;
}

.calendar-binder {
    background: #E53935;
    color: #FFFFFF;
    padding: 0.55rem 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    font-size: 0.85rem;
}

.binder-hole {
    width: 8px;
    height: 8px;
    background: #FFFFFF;
    border-radius: 50%;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.calendar-body {
    padding: 0.8rem;
}

.calendar-day-num {
    font-size: 3.6rem;
    font-weight: 900;
    color: #212121;
    line-height: 1;
    margin-bottom: 0.2rem;
}

.calendar-day-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: #757575;
}

/* Streak Flame Card */
.daily-streak-card {
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
    border-radius: 20px;
    padding: 1.2rem;
    border: 2.5px solid #FFB74D;
    box-shadow: 0 8px 24px rgba(255, 152, 0, 0.18);
    display: flex;
    align-items: center;
    gap: 1.1rem;
}

.streak-flame-icon {
    font-size: 3.5rem;
    animation: flamePulse 1.8s infinite ease-in-out;
}

@keyframes flamePulse {
    0%, 100% {
        transform: scale(1) rotate(-3deg);
        filter: drop-shadow(0 0 10px rgba(255, 87, 34, 0.6));
    }
    50% {
        transform: scale(1.18) rotate(4deg);
        filter: drop-shadow(0 0 22px rgba(255, 152, 0, 0.9));
    }
}

.streak-details {
    flex: 1;
}

.streak-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 800;
    color: #D84315;
}

.streak-number-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 0.25rem;
}

.streak-number {
    font-size: 2rem;
    font-weight: 900;
    color: #BF360C;
    line-height: 1;
}

.streak-unit {
    font-size: 1.05rem;
    font-weight: 800;
    color: #E65100;
}

.streak-motivation {
    font-size: 0.82rem;
    font-weight: 700;
    color: #616161;
    line-height: 1.35;
}

/* Golden Chest Card */
.daily-chest-card {
    background: linear-gradient(135deg, #FFFDE7, #FFF9C4);
    border-radius: 20px;
    padding: 1.2rem;
    border: 2.5px solid #FFE082;
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
}

.chest-icon {
    font-size: 3.2rem;
    animation: chestWobble 2.5s infinite ease-in-out;
}

@keyframes chestWobble {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-6px) rotate(-4deg); }
    75% { transform: translateY(-4px) rotate(4deg); }
}

.chest-details {
    flex: 1;
}

.chest-title {
    display: block;
    font-size: 0.9rem;
    font-weight: 800;
    color: #F57F17;
}

.chest-reward {
    display: block;
    font-size: 1.05rem;
    font-weight: 900;
    color: #E65100;
    margin-bottom: 0.35rem;
}

.chest-status-pill {
    display: inline-block;
    background: #FFE082;
    color: #BF360C;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 800;
}

/* 3-Step Daily Progress Stepper */
.daily-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 480px;
    margin: 0 auto 1.8rem auto;
}

.daily-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.step-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #E0E0E0;
    color: #757575;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 900;
    transition: all 0.3s ease;
}

.step-name {
    font-size: 0.8rem;
    font-weight: 800;
    color: #757575;
}

.daily-step-item.active .step-circle {
    background: #FF9800;
    color: #FFFFFF;
    box-shadow: 0 0 14px rgba(255, 152, 0, 0.5);
    transform: scale(1.1);
}

.daily-step-item.active .step-name {
    color: #E65100;
}

.daily-step-item.completed .step-circle {
    background: #4CAF50;
    color: #FFFFFF;
}

.step-line {
    flex: 1;
    height: 4px;
    background: #E0E0E0;
    margin: 0 0.6rem 1.2rem 0.6rem;
    transition: background 0.3s ease;
}

.step-line.completed {
    background: #4CAF50;
}

/* Quiz Area */
.daily-quiz-area {
    background: #FFFFFF;
    border-radius: 26px;
    padding: 1.8rem 1.6rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 3px solid #FFE082;
    margin-bottom: 1.5rem;
}

.daily-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.question-counter-pill {
    background: #FFF3E0;
    color: #E65100;
    padding: 0.3rem 0.8rem;
    border-radius: 14px;
    font-weight: 800;
    font-size: 0.85rem;
    border: 1.5px solid #FFB74D;
}

.question-timer-pill {
    background: #E8F5E9;
    color: #2E7D32;
    padding: 0.3rem 0.8rem;
    border-radius: 14px;
    font-weight: 800;
    font-size: 0.85rem;
}

.daily-question-text {
    font-size: 1.35rem;
    font-weight: 900;
    color: #212121;
    line-height: 1.45;
    margin-bottom: 1.2rem;
    text-align: center;
}

.daily-visual-box {
    margin: 1rem auto 1.4rem auto;
    text-align: center;
}

.daily-choices-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 580px) {
    .daily-choices-grid {
        grid-template-columns: 1fr;
    }
}

.daily-choice-btn {
    min-height: 60px;
    font-size: 1.25rem;
    font-weight: 900;
    border-radius: 18px;
    border: 2.5px solid #FFE082;
    background: #FFFDE7;
    color: #E65100;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(255, 179, 0, 0.15);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: 'Nunito', sans-serif;
}

.daily-choice-btn:hover {
    transform: translateY(-4px) scale(1.02);
    background: #FFB300;
    color: #FFFFFF;
    border-color: #F57F17;
    box-shadow: 0 8px 20px rgba(255, 179, 0, 0.35);
}

.daily-choice-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.daily-feedback-box {
    margin-top: 1.2rem;
    padding: 0.9rem 1.2rem;
    border-radius: 16px;
    background: #E8F5E9;
    color: #2E7D32;
    border: 2px solid #81C784;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    animation: slideUp 0.3s ease;
}

/* Daily Completed Card */
.daily-completed-card {
    background: linear-gradient(135deg, #FFF9C4, #FFF176);
    border: 3.5px solid #FBC02D;
    border-radius: 26px;
    padding: 2.2rem 1.6rem;
    text-align: center;
    box-shadow: 0 12px 35px rgba(251, 192, 45, 0.35);
    animation: slideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.completed-confetti-banner {
    display: inline-block;
    background: #E65100;
    color: #FFFFFF;
    padding: 0.4rem 1.4rem;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 900;
    margin-bottom: 0.8rem;
    letter-spacing: 0.5px;
}

.completed-chest-burst {
    font-size: 4rem;
    animation: bounce 1.8s infinite;
}

.completed-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: #212121;
    margin-bottom: 0.4rem;
}

.completed-desc {
    font-size: 1rem;
    font-weight: 700;
    color: #616161;
    margin-bottom: 1.2rem;
}

.completed-streak-update {
    background: #FFFFFF;
    border-radius: 18px;
    padding: 1rem 1.4rem;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.4rem;
    border: 2px solid #FFE082;
}

.streak-flame-large {
    font-size: 2.8rem;
}

.streak-update-info {
    text-align: left;
}

.streak-update-info strong {
    display: block;
    font-size: 1.15rem;
    color: #E65100;
}

.streak-update-info span {
    font-size: 0.85rem;
    color: #757575;
}

.daily-claim-reward-btn {
    border: none;
    border-radius: 20px;
    padding: 1.1rem 2.2rem;
    background: linear-gradient(135deg, #FF6F00, #E65100);
    color: #FFFFFF;
    font-size: 1.2rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(230, 81, 0, 0.4);
    transition: all 0.25s ease;
    font-family: 'Nunito', sans-serif;
}

.daily-claim-reward-btn:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 12px 30px rgba(230, 81, 0, 0.55);
}

/* ============================================================================
   4. SCREEN: TWO-PLAYER DUEL (DUEL 2 PEMAIN)
   ============================================================================ */
.two-player-screen-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.2rem 1rem 3rem 1rem;
}

.two-player-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.two-player-round-badge {
    background: linear-gradient(135deg, #7E57C2, #4527A0);
    color: #FFFFFF;
    padding: 0.6rem 1.4rem;
    border-radius: 22px;
    font-size: 1.1rem;
    font-weight: 900;
    box-shadow: 0 4px 16px rgba(126, 87, 194, 0.35);
    display: flex;
    align-items: center;
    gap: 8px;
}

.restart-round-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #E0E0E0;
    padding: 0.6rem 1.1rem;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Nunito', sans-serif;
}

.restart-round-btn:hover {
    background: #FFFFFF;
    transform: rotate(45deg);
}

/* Tug-of-War Score Bar at Top */
.two-player-tug-bar {
    background: #FFFFFF;
    border-radius: 24px;
    padding: 1.2rem 1.6rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border: 3px solid #E0E0E0;
    display: grid;
    grid-template-columns: 190px 1fr 190px;
    gap: 1.2rem;
    align-items: center;
    margin-bottom: 1.4rem;
}

@media (max-width: 768px) {
    .two-player-tug-bar {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.tug-player-pill {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 1rem;
    border-radius: 18px;
}

.player-pill-red {
    background: #FFEBEE;
    border: 2px solid #EF9A9A;
    color: #C62828;
}

.player-pill-blue {
    background: #E3F2FD;
    border: 2px solid #90CAF9;
    color: #1565C0;
    justify-content: flex-end;
}

.pill-avatar {
    font-size: 2.2rem;
}

.pill-name {
    display: block;
    font-size: 0.85rem;
    font-weight: 800;
}

.pill-score {
    display: block;
    font-size: 1.3rem;
    font-weight: 900;
}

/* Interactive Tug Track */
.tug-track-wrap {
    padding: 0 0.5rem;
}

.tug-track {
    height: 26px;
    background: #ECEFF1;
    border-radius: 14px;
    position: relative;
    display: flex;
    overflow: visible;
    border: 2.5px solid #CFD8DC;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tug-rope {
    height: 100%;
    transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.rope-red {
    background: linear-gradient(90deg, #E53935, #EF5350);
    border-radius: 12px 0 0 12px;
}

.rope-blue {
    background: linear-gradient(90deg, #42A5F5, #1E88E5);
    border-radius: 0 12px 12px 0;
}

.tug-knot {
    position: absolute;
    top: -14px;
    transform: translateX(-50%);
    font-size: 2rem;
    transition: left 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    z-index: 5;
    text-align: center;
}

.tug-marker-line {
    width: 3px;
    height: 38px;
    background: #212121;
    margin: -6px auto 0 auto;
    border-radius: 2px;
}

.tug-scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    font-weight: 800;
    color: #78909C;
    margin-top: 0.45rem;
}

/* Center Shared Question Card */
.two-player-center-card {
    background: #FFFFFF;
    border-radius: 22px;
    padding: 1.2rem 1.6rem;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border: 3px solid #FFE082;
    margin-bottom: 1.4rem;
}

.center-card-badge {
    display: inline-block;
    background: #FFF3E0;
    color: #E65100;
    padding: 0.3rem 0.9rem;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    border: 1.5px solid #FFB74D;
}

.two-player-question-text {
    font-size: 2.3rem;
    font-weight: 900;
    color: #212121;
    margin: 0.2rem 0 0.5rem 0;
    line-height: 1.2;
}

.two-player-status-badge {
    font-size: 0.92rem;
    font-weight: 800;
    color: #5E35B1;
}

/* Split-Screen Arena */
.two-player-arena {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.4rem;
}

@media (max-width: 768px) {
    .two-player-arena {
        grid-template-columns: 1fr;
    }
}

.player-zone {
    border-radius: 24px;
    padding: 1.4rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.player-red {
    background: #FFEBEE;
    border: 3.5px solid #E53935;
}

.player-blue {
    background: #E3F2FD;
    border: 3.5px solid #1E88E5;
}

.player-zone-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.player-profile {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.player-avatar-large {
    font-size: 2.6rem;
}

.player-zone-name {
    font-size: 1.25rem;
    font-weight: 900;
}

.player-red .player-zone-name { color: #C62828; }
.player-blue .player-zone-name { color: #1565C0; }

.player-zone-sub {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #757575;
}

.player-feedback-badge {
    font-size: 1.4rem;
    min-height: 30px;
}

.player-choices-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.player-choice-btn {
    min-height: 64px;
    font-size: 1.35rem;
    font-weight: 900;
    border-radius: 18px;
    border: none;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    color: #FFFFFF;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.p1-btn {
    background: linear-gradient(135deg, #EF5350, #C62828);
    border: 2px solid #FFCDD2;
}

.p1-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 20px rgba(229, 57, 53, 0.45);
}

.p1-btn:active {
    transform: scale(0.97);
}

.p2-btn {
    background: linear-gradient(135deg, #42A5F5, #1565C0);
    border: 2px solid #BBDEFB;
}

.p2-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 20px rgba(30, 136, 229, 0.45);
}

.p2-btn:active {
    transform: scale(0.97);
}

/* Winner Podium Modal */
.podium-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.podium-modal-card {
    background: #FFFFFF;
    border-radius: 28px;
    padding: 2.4rem 2rem;
    text-align: center;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.25);
    border: 4px solid #FFD54F;
    animation: slideUp 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.podium-crown-icon {
    font-size: 3rem;
    margin-bottom: -0.6rem;
}

.podium-cups-row {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    font-size: 3.5rem;
    margin-bottom: 0.6rem;
}

.podium-cup {
    animation: bounce 1.8s infinite;
}

.podium-winner-title {
    font-size: 1.7rem;
    font-weight: 900;
    color: #212121;
    margin-bottom: 0.3rem;
}

.podium-subtitle {
    font-size: 0.95rem;
    font-weight: 700;
    color: #616161;
    margin-bottom: 1.4rem;
}

.podium-scoreboard {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: #F8F9FA;
    border-radius: 20px;
    padding: 1.2rem 0.8rem;
    margin-bottom: 1.6rem;
    border: 2px solid #E0E0E0;
}

.podium-score-col {
    text-align: center;
    flex: 1;
}

.score-col-avatar {
    font-size: 2.2rem;
    display: block;
    margin-bottom: 0.2rem;
}

.score-col-name {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 0.2rem;
}

.score-col-red .score-col-name { color: #C62828; }
.score-col-blue .score-col-name { color: #1565C0; }

.score-col-pts {
    display: block;
    font-size: 1.4rem;
    font-weight: 900;
    color: #212121;
}

.podium-vs-tag {
    font-size: 1.1rem;
    font-weight: 900;
    color: #7E57C2;
    padding: 0 0.5rem;
}

.podium-actions-bar {
    display: flex;
    gap: 1rem;
}

.podium-btn {
    flex: 1;
    padding: 0.95rem;
    border-radius: 16px;
    border: none;
    font-size: 1.05rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Nunito', sans-serif;
}

.btn-rematch {
    background: linear-gradient(135deg, #FFA000, #F57F17);
    color: #FFFFFF;
    box-shadow: 0 6px 18px rgba(255, 152, 0, 0.4);
}

.btn-rematch:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(255, 152, 0, 0.55);
}

.btn-back-menu {
    background: #EEEEEE;
    color: #424242;
}

.btn-back-menu:hover {
    background: #E0E0E0;
    transform: translateY(-3px);
}

/* ============================================================================
   5. SCREEN: STORYBOOK (BUKU CERITA AJAIB)
   ============================================================================ */
.storybook-screen-container {
    max-width: 920px;
    margin: 0 auto;
    padding: 1.2rem 1rem 3rem 1rem;
}

.storybook-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.story-nav-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.story-shelf-toggle-btn {
    background: #8D6E63;
    color: #FFFFFF;
    border: 2px solid #5D4037;
    padding: 0.55rem 1.2rem;
    border-radius: 16px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Nunito', sans-serif;
    box-shadow: 0 4px 12px rgba(93, 64, 55, 0.3);
}

.story-shelf-toggle-btn:hover {
    background: #6D4C41;
    transform: translateY(-2px);
}

.story-active-badge {
    background: #FFF8E1;
    color: #E65100;
    border: 2px solid #FFE082;
    padding: 0.55rem 1.1rem;
    border-radius: 16px;
    font-size: 0.95rem;
    font-weight: 900;
}

/* Story Shelf View */
.story-shelf-view {
    animation: slideUp 0.4s ease;
}

.shelf-header {
    text-align: center;
    margin-bottom: 1.6rem;
}

.shelf-mascot {
    font-size: 4rem;
    animation: bounce 2s infinite ease-in-out;
}

.wooden-shelf-rack {
    background: linear-gradient(180deg, #8D6E63 0%, #5D4037 100%);
    border-radius: 26px;
    padding: 2rem 1.6rem;
    box-shadow: 0 12px 35px rgba(62, 39, 35, 0.35);
    border: 4px solid #4E342E;
}

.story-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.5rem;
}

.story-book-item {
    background: #FFFFFF;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.story-book-item:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.book-cover {
    display: flex;
    flex: 1;
}

.book-spine {
    width: 14px;
    background: rgba(0, 0, 0, 0.25);
    box-shadow: inset -2px 0 4px rgba(0, 0, 0, 0.2);
}

.book-cover-content {
    flex: 1;
    padding: 1.4rem 1.2rem;
    color: #FFFFFF;
}

.book-theme-castle .book-cover { background: linear-gradient(135deg, #FF6F00, #D84315); }
.book-theme-forest .book-cover { background: linear-gradient(135deg, #2E7D32, #1B5E20); }
.book-theme-time .book-cover { background: linear-gradient(135deg, #6A1B9A, #4A148C); }

.book-genre {
    display: inline-block;
    background: rgba(255, 255, 255, 0.25);
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
}

.book-cover-icon {
    font-size: 3.2rem;
    margin-bottom: 0.6rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.book-cover-title {
    font-size: 1.25rem;
    font-weight: 900;
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.book-cover-desc {
    font-size: 0.85rem;
    opacity: 0.95;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.book-cover-tag {
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    opacity: 0.85;
}

.book-read-btn {
    border: none;
    background: #FFD54F;
    color: #5D4037;
    padding: 0.75rem;
    font-size: 0.95rem;
    font-weight: 900;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    transition: background 0.2s;
}

.story-book-item:hover .book-read-btn {
    background: #FFCA28;
}

/* Story Reader View (Parchment Paper Book) */
.story-reader-view {
    animation: slideUp 0.4s ease;
}

.storybook-parchment-book {
    background: #FFFDF7;
    border-radius: 26px;
    padding: 2.2rem 2.4rem;
    box-shadow: 0 14px 40px rgba(101, 67, 33, 0.16), inset 0 0 50px rgba(230, 200, 160, 0.22);
    border: 3.5px solid #EFEBE9;
    position: relative;
    overflow: hidden;
}

@media (max-width: 650px) {
    .storybook-parchment-book {
        padding: 1.4rem 1.1rem;
    }
}

.bookmark-ribbon {
    position: absolute;
    top: 0;
    right: 36px;
    width: 28px;
    height: 64px;
    background: linear-gradient(180deg, #E53935 0%, #C62828 100%);
    box-shadow: 0 4px 10px rgba(198, 40, 40, 0.4);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
    z-index: 10;
}

.chapter-tabs-bar {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #EFEBE9;
    padding-bottom: 0.8rem;
}

.chapter-tab-btn {
    border: 2px solid #D7CCC8;
    background: #F5F5F5;
    color: #5D4037;
    padding: 0.45rem 1rem;
    border-radius: 14px;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Nunito', sans-serif;
}

.chapter-tab-btn:hover {
    border-color: #8D6E63;
    transform: translateY(-2px);
}

.chapter-tab-btn.active {
    background: #8D6E63;
    color: #FFFFFF;
    border-color: #5D4037;
    box-shadow: 0 3px 10px rgba(93, 64, 55, 0.25);
}

.story-scene-card {
    transition: opacity 0.3s ease;
}

.story-illustration-box {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border: 2.5px solid #D7CCC8;
    margin-bottom: 1.4rem;
    background: #E8F5E9;
}

/* Fairy-Tale Narration Typography */
.story-narration-box {
    margin-bottom: 1.4rem;
}

.story-narration-text {
    font-size: 1.18rem;
    line-height: 1.75;
    color: #3E2723;
    font-weight: 600;
    text-align: justify;
}

.drop-cap {
    float: left;
    font-size: 3.8rem;
    line-height: 0.82;
    font-weight: 900;
    font-family: Georgia, 'Times New Roman', serif;
    color: #8D6E63;
    padding-right: 0.75rem;
    padding-top: 0.25rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1);
}

/* Character Dialog Bubble */
.story-dialog-bubble {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    background: #FFFFFF;
    border-radius: 20px;
    padding: 1.1rem 1.3rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    border: 2.5px solid #FFE082;
    margin-bottom: 1.6rem;
}

.dialog-mascot-avatar {
    font-size: 2.8rem;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
}

.dialog-content {
    flex: 1;
}

.dialog-speaker {
    display: block;
    font-size: 0.92rem;
    color: #E65100;
    margin-bottom: 0.2rem;
}

.dialog-speech {
    font-size: 1.05rem;
    font-style: italic;
    color: #4E342E;
    font-weight: 700;
    line-height: 1.4;
}

/* Checkpoint Question Box */
.story-checkpoint-box {
    background: #FFF8E1;
    border: 3px dashed #FFA000;
    border-radius: 22px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1.6rem;
}

.checkpoint-header-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #FF8F00;
    color: #FFFFFF;
    font-weight: 900;
    font-size: 0.88rem;
    padding: 0.35rem 0.95rem;
    border-radius: 14px;
    margin-bottom: 0.8rem;
}

.checkpoint-prompt-text {
    font-size: 1.35rem;
    font-weight: 900;
    color: #BF360C;
    margin-bottom: 1.2rem;
    line-height: 1.35;
}

.story-choices-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.9rem;
}

@media (max-width: 580px) {
    .story-choices-grid {
        grid-template-columns: 1fr;
    }
}

.story-choice-btn {
    min-height: 54px;
    font-size: 1.25rem;
    font-weight: 900;
    border-radius: 16px;
    border: 2px solid #FFD54F;
    background: #FFFFFF;
    color: #E65100;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 179, 0, 0.15);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: 'Nunito', sans-serif;
}

.story-choice-btn:hover {
    background: #FFA000;
    color: #FFFFFF;
    border-color: #FF8F00;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 18px rgba(255, 160, 0, 0.35);
}

.story-choice-btn:active {
    transform: scale(0.98);
}

.story-feedback {
    margin-top: 1.2rem;
    padding: 0.85rem 1.2rem;
    border-radius: 14px;
    background: #E8F5E9;
    color: #2E7D32;
    border: 2px solid #81C784;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1rem;
    animation: slideUp 0.3s ease;
}

/* Page Turn Animation */
@keyframes pageFlip {
    0% {
        transform: perspective(1200px) rotateY(0deg);
        opacity: 1;
    }
    50% {
        transform: perspective(1200px) rotateY(-40deg);
        opacity: 0.65;
    }
    100% {
        transform: perspective(1200px) rotateY(0deg);
        opacity: 1;
    }
}

.page-flip-anim {
    animation: pageFlip 0.6s ease-in-out;
}

/* Page Navigation Bar */
.story-page-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid #EFEBE9;
    padding-top: 1.2rem;
}

.story-nav-btn {
    padding: 0.75rem 1.4rem;
    border-radius: 16px;
    border: none;
    font-size: 0.95rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Nunito', sans-serif;
}

.story-nav-btn:disabled {
    background: #EEEEEE;
    color: #BDBDBD;
    cursor: not-allowed;
}

.btn-prev {
    background: #EFEBE9;
    color: #5D4037;
}

.btn-prev:hover:not(:disabled) {
    background: #D7CCC8;
    transform: translateX(-3px);
}

.btn-next {
    background: linear-gradient(135deg, #FFB300, #F57F17);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(255, 179, 0, 0.35);
}

.btn-next:hover:not(:disabled) {
    transform: translateX(3px);
    box-shadow: 0 8px 20px rgba(255, 179, 0, 0.5);
}

.story-page-indicator {
    font-size: 1rem;
    font-weight: 800;
    color: #5D4037;
}

/* ============================================================================
   6. TOP BANNER NOTIFICATION: ACHIEVEMENT TOAST
   ============================================================================ */
.achievement-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    background: linear-gradient(135deg, #FFFDE7, #FFF8E1);
    border: 3px solid #FFD54F;
    border-radius: 24px;
    padding: 0.95rem 1.6rem;
    box-shadow: 0 14px 40px rgba(255, 179, 0, 0.38), 0 4px 14px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    gap: 1.1rem;
    max-width: 520px;
    width: 90%;
    animation: toastBounceDown 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
}

@keyframes toastBounceDown {
    0% {
        transform: translate(-50%, -120px);
        opacity: 0;
    }
    70% {
        transform: translate(-50%, 18px);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.toast-trophy-wrap {
    font-size: 2.8rem;
    filter: drop-shadow(0 4px 8px rgba(255, 193, 7, 0.45));
    animation: bounce 1.6s infinite ease-in-out;
}

.toast-content {
    flex: 1;
}

.toast-label {
    display: block;
    font-size: 0.76rem;
    font-weight: 900;
    color: #E65100;
    letter-spacing: 0.5px;
    margin-bottom: 0.15rem;
}

.toast-title {
    display: block;
    font-size: 1.2rem;
    font-weight: 900;
    color: #212121;
    line-height: 1.25;
}

.toast-desc {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #616161;
}

.toast-reward-badge {
    background: linear-gradient(135deg, #FFB300, #F57F17);
    color: #FFFFFF;
    padding: 0.35rem 0.8rem;
    border-radius: 14px;
    font-weight: 900;
    font-size: 0.95rem;
    box-shadow: 0 3px 8px rgba(245, 127, 23, 0.35);
    white-space: nowrap;
}

.toast-close-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #9E9E9E;
    cursor: pointer;
    padding: 0.3rem;
    line-height: 1;
    transition: color 0.2s;
}

.toast-close-btn:hover {
    color: #424242;
}


/* ==========================================================================
   COMPREHENSIVE DYNAMIC MOBILE RESPONSIVE STYLESHEET
   Optimized for Smartphones (iPhone, Samsung Galaxy, Xiaomi, Oppo, Vivo, etc.)
   Orientation: Portrait & Landscape (< 768px, < 480px, < 360px)
   ========================================================================== */

/* ---- Global Mobile Touch & Smooth Scrolling Reset ---- */
html, body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

/* Ensure all images and SVGs stay within viewport boundaries */
img, svg {
    max-width: 100%;
    height: auto;
}

/* Base Container Elastic Sizing */
.menu-container,
.submenu-container,
.difficulty-container,
.game-container,
.result-container,
.learn-menu-container,
.tutorial-container,
.wardrobe-screen-container,
.achievements-screen-container,
.daily-screen-container,
.two-player-screen-container,
.storybook-screen-container {
    width: 100%;
    box-sizing: border-box;
}

/* ==========================================================================
   TABLET & PHONE BREAKPOINT: MAX-WIDTH 768px
   ========================================================================== */
@media (max-width: 768px) {
    /* Screen Scroll & Safe Areas */
    .screen {
        padding: max(10px, env(safe-area-inset-top, 10px))
                 max(10px, env(safe-area-inset-right, 10px))
                 max(24px, env(safe-area-inset-bottom, 24px))
                 max(10px, env(safe-area-inset-left, 10px));
    }

    /* Header & Mascot */
    .title-section {
        margin-bottom: 1rem;
    }
    .mascot-large {
        font-size: 3.8rem;
    }
    .home-mascot-wrapper {
        margin-bottom: 0.4rem;
    }
    .title-line1 {
        font-size: 1.4rem;
    }
    .title-line2 {
        font-size: 2.3rem;
    }
    .subtitle {
        font-size: 0.95rem;
        margin-top: 0.3rem;
        padding: 0 0.5rem;
    }

    /* Special Features Hub (2 Columns on Mobile) */
    .special-features-hub {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.65rem !important;
        margin: 1rem 0 !important;
    }
    .special-hub-card {
        padding: 0.85rem 0.65rem !important;
        min-height: 85px !important;
        border-radius: 18px !important;
        gap: 0.45rem !important;
    }
    .hub-card-icon {
        font-size: 1.9rem !important;
    }
    .hub-card-title {
        font-size: 0.95rem !important;
        line-height: 1.25 !important;
    }
    .hub-card-desc {
        display: none !important; /* Hide long description on mobile for clean look */
    }
    .hub-card-badge {
        font-size: 0.72rem !important;
        padding: 3px 7px !important;
    }

    /* Main Mode Grid (1 Column or 2 Compact Columns) */
    .main-mode-grid {
        grid-template-columns: 1fr !important;
        gap: 0.85rem !important;
        margin: 1rem 0 !important;
    }
    .main-mode-card {
        padding: 1.1rem 1rem !important;
        border-radius: 20px !important;
        gap: 0.5rem !important;
    }
    .mode-card-icon {
        font-size: 2.6rem !important;
    }
    .mode-card-title {
        font-size: 1.25rem !important;
    }
    .mode-card-desc {
        font-size: 0.85rem !important;
        line-height: 1.35 !important;
    }
    .mode-card-badge {
        font-size: 0.75rem !important;
        padding: 3px 8px !important;
    }
    .mode-card-action {
        font-size: 0.85rem !important;
        padding: 0.4rem 1rem !important;
    }

    /* Learn & Wardrobe Access Buttons */
    .learn-mode-btn, .wardrobe-btn {
        padding: 0.95rem 1rem !important;
        border-radius: 18px !important;
    }
    .learn-icon, .wardrobe-icon {
        font-size: 2.1rem !important;
    }
    .learn-label, .wardrobe-label {
        font-size: 1.05rem !important;
    }
    .learn-desc, .wardrobe-desc {
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
    }

    /* Sub-Menu & Difficulty Screens */
    .submenu-container,
    .difficulty-container {
        padding: 3.5rem 1rem 1.4rem 1rem !important;
        border-radius: 22px !important;
        position: relative;
    }
    .submenu-container .mascot-medium {
        font-size: 2.8rem !important;
    }
    .submenu-container .screen-title {
        font-size: 1.45rem !important;
        line-height: 1.3 !important;
    }
    .submenu-container .screen-subtitle {
        font-size: 0.88rem !important;
        margin-bottom: 1rem !important;
    }
    .menu-buttons {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
    .menu-btn {
        grid-column: span 1 !important;
        padding: 0.9rem 1rem !important;
        border-radius: 16px !important;
    }
    .menu-btn .btn-label {
        font-size: 1.05rem !important;
    }
    .menu-btn .btn-desc {
        font-size: 0.8rem !important;
    }

    /* Difficulty Screen */
    .difficulty-container {
        padding: 1.3rem 1rem !important;
        border-radius: 22px !important;
    }
    .difficulty-buttons {
        flex-direction: column !important;
        gap: 0.8rem !important;
    }
    .diff-btn {
        width: 100% !important;
        min-height: 68px !important;
        padding: 0.85rem 1rem !important;
        border-radius: 18px !important;
    }

    /* Gameplay Screen Top Bar */
    .game-container {
        padding: 0.9rem 0.8rem !important;
        border-radius: 20px !important;
    }
    .game-top-bar {
        gap: 0.5rem !important;
        margin-bottom: 0.8rem !important;
    }
    .progress-section {
        flex: 1 !important;
        min-width: 120px !important;
    }
    .progress-text {
        font-size: 0.8rem !important;
    }
    .timer-section {
        font-size: 0.85rem !important;
        gap: 0.35rem !important;
    }
    .timer-svg {
        width: 38px !important;
        height: 38px !important;
    }
    .score-section {
        padding: 0.35rem 0.75rem !important;
        font-size: 0.9rem !important;
    }

    /* Question Bubble & Answers */
    .question-bubble {
        padding: 1rem 0.85rem !important;
        font-size: 1.15rem !important;
        border-radius: 18px !important;
        min-height: auto !important;
    }
    .answers-grid {
        grid-template-columns: 1fr !important;
        gap: 0.65rem !important;
    }
    .answer-btn {
        min-height: 52px !important;
        padding: 0.8rem 1rem !important;
        font-size: 1.1rem !important;
        border-radius: 14px !important;
    }

    /* Cashier Play Area Mobile */
    .customer-card {
        padding: 0.7rem 0.8rem !important;
        border-radius: 16px !important;
    }
    .customer-avatar {
        font-size: 2.2rem !important;
    }
    .customer-bubble {
        font-size: 0.88rem !important;
    }
    .drawer-bills-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 6px !important;
    }
    .drawer-item {
        min-width: auto !important;
        padding: 4px !important;
    }
    .rupiah-bill {
        height: 34px !important;
        font-size: 0.7rem !important;
    }
    .rupiah-coin {
        width: 34px !important;
        height: 34px !important;
        font-size: 0.65rem !important;
    }
    .cashier-tray-dropzone {
        min-height: 90px !important;
        padding: 0.6rem !important;
    }

    /* Pizza Play Area Mobile */
    .pizza-kitchen-layout {
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: center !important;
    }
    .pizza-pan-station, .pizza-plate-station {
        width: 100% !important;
        max-width: 320px !important;
    }

    /* Scale Play Area Mobile */
    .scale-stage-wrapper {
        padding: 0.5rem !important;
    }
    .scale-svg-container svg {
        max-width: 100% !important;
        height: auto !important;
    }
    .brass-weights-rack {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 6px !important;
    }
    .brass-weight {
        padding: 0.45rem 0.65rem !important;
        font-size: 0.85rem !important;
    }

    /* Frog Play Area Mobile */
    .frog-choices-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    .frog-choice-btn {
        min-height: 48px !important;
        font-size: 1.15rem !important;
    }

    /* Piggy Play Area Mobile */
    .piggy-stage-wrapper {
        flex-direction: column !important;
        align-items: center !important;
    }
    .piggy-svg-container svg {
        max-width: 230px !important;
    }
    .piggy-wallet-bills {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
    }

    /* Grid Builder & Mirror Grid Mobile */
    .grid-build-stage {
        padding: 6px !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    .grid-build-stage svg {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Treasure Map Mobile */
    .treasure-map-stage svg {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Zoo Gate Mobile */
    .zoo-stage svg {
        max-width: 100% !important;
        height: auto !important;
    }
    .zoo-queue {
        overflow-x: auto !important;
        padding: 6px 0 !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 6px !important;
    }
    .zoo-gates {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }

    /* Two-Player Split Screen Mobile */
    .two-player-arena {
        flex-direction: column !important;
        gap: 0.8rem !important;
    }
    .player-zone {
        width: 100% !important;
        padding: 0.85rem 0.75rem !important;
        border-radius: 18px !important;
    }
    .player-zone .player-answer-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    .player-answer-btn {
        min-height: 52px !important;
        font-size: 1.15rem !important;
    }
    .two-player-center-card {
        padding: 0.85rem !important;
        margin: 0.4rem 0 !important;
    }
    .tug-of-war-container {
        padding: 0.5rem 0.6rem !important;
    }

    /* Storybook Mobile */
    .storybook-screen-container {
        padding: 0.4rem !important;
    }
    .story-shelf-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    .story-reader-view {
        padding: 1.1rem 0.85rem !important;
        border-radius: 18px !important;
    }
    .story-scene-box svg {
        max-height: 220px !important;
    }
    .story-narration-text {
        font-size: 1.05rem !important;
        line-height: 1.6 !important;
    }
    .drop-cap {
        font-size: 2.6rem !important;
    }

    /* Achievements Mobile */
    .achieve-filter-tabs {
        display: flex !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: 6px !important;
        gap: 6px !important;
    }
    .achieve-tab-btn {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        padding: 0.45rem 0.85rem !important;
        font-size: 0.85rem !important;
    }
    .achievements-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    /* Daily Challenge Mobile */
    .daily-hero-cards {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
    }
    .daily-status-card {
        padding: 0.65rem 0.35rem !important;
    }
    .hero-val {
        font-size: 1.25rem !important;
    }
    .hero-lbl {
        font-size: 0.7rem !important;
    }

    /* Wardrobe Mobile */
    .wardrobe-main-layout {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    .wardrobe-booth-card, .wardrobe-catalog-card {
        width: 100% !important;
        max-width: 100% !important;
    }
    .booth-spotlight {
        min-height: 200px !important;
    }
    .wardrobe-items-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }
    .wardrobe-item-card {
        padding: 0.55rem 0.35rem !important;
    }
    .item-icon-box {
        font-size: 2.2rem !important;
    }
    .item-name-tag {
        font-size: 0.8rem !important;
    }

    /* Toast Notification Mobile */
    .achievement-toast {
        width: 94% !important;
        max-width: 94% !important;
        padding: 0.7rem 0.9rem !important;
        gap: 0.7rem !important;
    }
    .toast-trophy-wrap {
        font-size: 2.1rem !important;
    }
    .toast-title {
        font-size: 0.95rem !important;
    }
    .toast-desc {
        font-size: 0.78rem !important;
    }
    .toast-reward-badge {
        font-size: 0.85rem !important;
        padding: 0.25rem 0.55rem !important;
    }

    /* General Back Button Touch Target */
    .back-btn {
        min-height: 44px !important;
        padding: 0.5rem 1rem !important;
        font-size: 0.95rem !important;
        border-radius: 14px !important;
        top: 0.8rem !important;
        left: 0.8rem !important;
    }
}

/* ==========================================================================
   EXTRA SMALL PHONES BREAKPOINT: MAX-WIDTH 400px
   (iPhone SE, older Galaxy, narrow budget smartphones)
   ========================================================================== */
@media (max-width: 400px) {
    .special-features-hub {
        grid-template-columns: 1fr !important;
        gap: 0.55rem !important;
    }
    .mascot-large {
        font-size: 3.2rem !important;
    }
    .title-line1 {
        font-size: 1.25rem !important;
    }
    .title-line2 {
        font-size: 1.95rem !important;
    }
    .wardrobe-items-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .drawer-bills-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    .piggy-wallet-bills {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
