:root {
    --primary: #FF5E7E;
    --primary-shadow: #e03b5f;
    --blue: #1E90FF;
    --blue-shadow: #0984e3;
    --green: #2ED573;
    --green-shadow: #218c53;
    --orange: #FFA502;
    --orange-shadow: #e67e22;
    --purple: #9B59B6;
    --purple-shadow: #8e44ad;
    --yellow: #FDCB6E;
    --yellow-shadow: #e1b12c;
    --pink: #FF6B81;
    --bg-gradient: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --border-radius-lg: 26px;
    --border-radius-md: 18px;
    --border-radius-sm: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

body {
    font-family: 'Nunito', sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #2f3542;
    overflow-x: hidden;
    position: relative;
    padding-bottom: 2rem;
}

/* Background floating animated bubbles */
.background-animation {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, #74b9ff 0%, #a1c4fd 50%, #fed6e3 100%);
    transition: opacity 0.5s ease;
}

.background-animation::before,
.background-animation::after {
    content: "";
    position: absolute;
    width: 350px; height: 350px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    filter: blur(50px);
    animation: floatBubble 14s infinite ease-in-out alternate;
}

.background-animation::after {
    width: 450px; height: 450px;
    background: rgba(255, 230, 240, 0.3);
    right: 5%; bottom: 5%;
    animation-duration: 18s;
    animation-delay: -6s;
}

@keyframes floatBubble {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, 40px) scale(1.15); }
    100% { transform: translate(-40px, 80px) scale(0.9); }
}

/* Dedicated Layer Wallpaper Background */
#theme-wallpaper-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    z-index: -2;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease-in-out;
    transform: translateZ(0);
    will-change: opacity, background-image;
}

body.has-theme #theme-wallpaper-bg {
    opacity: 1;
}

/* Theme active overlay */
body.has-theme {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

body.has-theme .background-animation {
    opacity: 0.15 !important;
}

body.has-color-theme .background-animation {
    opacity: 0 !important;
}

body.has-theme .app-container {
    background: rgba(255, 255, 255, 0.42) !important;
    backdrop-filter: blur(10px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(10px) saturate(140%) !important;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.28) !important;
    border: 4px solid rgba(255, 255, 255, 0.75) !important;
}

body.has-theme .main-header {
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

body.has-theme .subnav-bar {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

body.has-color-theme .app-container {
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2) !important;
}

/* Confetti Canvas */
#confetti-canvas {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* Main Container */
.app-container {
    width: 100%;
    max-width: 960px;
    min-height: 94vh;
    margin: 10px auto;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 248, 255, 0.95) 100%);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 15px 45px rgba(30, 144, 255, 0.22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 4px solid #70a1ff;
    transition: all 0.3s;
}

/* Header */
.main-header {
    background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.9) 100%);
    border-bottom: 3px solid #f1f2f6;
    padding: 1rem 1.25rem 0.75rem;
    position: relative;
    z-index: 10;
}

/* Submodule Active: Hide big category tabs and shrink header for distraction-free learning */
body.in-submodule .title-container,
body.in-submodule .category-tabs {
    display: none !important;
}

body.in-submodule .main-header {
    padding: 0.5rem 1.25rem 0.4rem;
}

body.in-submodule .header-top-bar {
    margin-bottom: 0;
}

.header-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.star-badge {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(253, 203, 110, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.8);
    border-radius: 50px;
    padding: 0.35rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Fredoka One', cursive;
    font-size: 1.3rem;
    color: #d35400;
    cursor: pointer;
    animation: pulseStar 3s infinite ease-in-out;
    flex-shrink: 0;
}

@keyframes pulseStar {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.star-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.header-actions {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

.ctrl-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 0.9rem;
    padding: 0.45rem 0.9rem;
    border: none;
    border-radius: 50px;
    background: #f1f2f6;
    color: #57606f;
    cursor: pointer;
    box-shadow: 0 3px 0 #ced6e0;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.ctrl-btn:hover {
    background: #dfe4ea;
    transform: translateY(-2px);
}

.ctrl-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #ced6e0;
}

.ctrl-btn.active {
    background: #2ed573;
    color: white;
    box-shadow: 0 3px 0 #218c53;
}

.ctrl-btn.theme-highlight {
    background: linear-gradient(135deg, #ff7675, #e84393);
    color: white;
    box-shadow: 0 3px 0 #c0392b;
}

/* Logo Title */
.title-container {
    text-align: center;
    margin: 0.4rem 0 1rem;
    cursor: pointer;
}

.logo-mascot {
    font-size: 2.5rem;
    display: inline-block;
    animation: wiggle 3s infinite ease-in-out;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-8deg); }
    75% { transform: rotate(8deg); }
}

.glow-text {
    font-family: 'Fredoka One', cursive;
    font-size: 2.3rem;
    background: linear-gradient(45deg, #ff4757, #ff6b81, #ffa502, #2ed573, #1e90ff);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbowShift 6s ease infinite;
    letter-spacing: 1px;
    margin-top: -5px;
    text-shadow: 0 2px 10px rgba(255, 71, 87, 0.2);
}

@keyframes rainbowShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.sub-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #747d8c;
    letter-spacing: 0.5px;
}

/* Big Tabs (7 Kategori Lengkap) */
.category-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.cat-tab {
    border: none;
    border-radius: var(--border-radius-md);
    padding: 0.65rem 0.35rem;
    cursor: pointer;
    font-family: 'Fredoka One', cursive;
    font-size: 0.95rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: white;
    position: relative;
    box-shadow: 0 5px 0 rgba(0,0,0,0.15);
}

.cat-tab .tab-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.15));
}

.cat-tab.tab-klasik {
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    box-shadow: 0 5px 0 #c0392b;
}

.cat-tab.tab-iqro {
    background: linear-gradient(135deg, #10ac84, #00b894);
    box-shadow: 0 5px 0 #0b8061;
}

.cat-tab.tab-membaca {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    box-shadow: 0 5px 0 #0050b3;
}
.cat-tab.tab-menulis {
    background: linear-gradient(135deg, #ff758c, #ff7eb3);
    box-shadow: 0 5px 0 #d6336c;
}
.cat-tab.tab-bermain {
    background: linear-gradient(135deg, #f7971e, #ffd200);
    box-shadow: 0 5px 0 #d35400;
}
.cat-tab.tab-montessori {
    background: linear-gradient(135deg, #8e2de2, #4a00e0);
    box-shadow: 0 5px 0 #3a00b0;
}
.cat-tab.tab-ai {
    background: linear-gradient(135deg, #00cec9, #6c5ce7);
    box-shadow: 0 5px 0 #4834d4;
    animation: glowAiTab 2.5s infinite alternate ease-in-out;
}

@keyframes glowAiTab {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.15) drop-shadow(0 0 8px rgba(108, 92, 231, 0.5)); }
}

.cat-tab:hover {
    transform: translateY(-3px);
    filter: brightness(1.08);
}

.cat-tab:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.2) !important;
}

.cat-tab.active {
    transform: scale(1.04) translateY(-2px);
    outline: 4px solid #fff;
    box-shadow: 0 8px 18px rgba(0,0,0,0.2) !important;
    filter: brightness(1.1);
}

/* Subnav Bar (Inside Submodule) */
.subnav-bar {
    background: linear-gradient(90deg, #ffffff, #f8f9fa);
    padding: 0.6rem 1.25rem;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.back-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 1rem;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.5rem 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 0 #c0392b;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.15s;
}

.back-btn:hover {
    background: #ff6b81;
    transform: translateY(-2px);
}

.back-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #c0392b;
}

.subnav-title-wrap {
    flex: 1;
    text-align: center;
}

.subnav-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.4rem;
    color: #2f3542;
    letter-spacing: 0.5px;
}

/* Content Wrapper */
.content-wrapper {
    flex: 1;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}

/* Menu Grid Section */
.menu-grid-section {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1.2rem;
    width: 100%;
}

/* Solite Kids Style Menu Cards */
.menu-card {
    border-radius: var(--border-radius-md);
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    color: white;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 7px 0 rgba(0, 0, 0, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.4);
    min-height: 155px;
}

.menu-card:hover {
    transform: translateY(-6px) scale(1.02);
    filter: brightness(1.1);
    box-shadow: 0 12px 15px rgba(0,0,0,0.18);
}

.menu-card:active {
    transform: translateY(4px) scale(0.98);
    box-shadow: 0 2px 0 rgba(0,0,0,0.2);
}

.menu-card-icon {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
    transition: transform 0.2s ease;
}

.menu-card:hover .menu-card-icon {
    transform: scale(1.15) rotate(5deg);
}

.menu-card-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.15rem;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.menu-card-sub {
    font-size: 0.8rem;
    font-weight: 800;
    opacity: 0.9;
    margin-top: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Study Content View */
.study-view-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Sub-header Filter / Segmented Pills */
.filter-pill-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    background: #f1f2f6;
    padding: 0.4rem;
    border-radius: 50px;
}

.filter-pill {
    border: none;
    background: transparent;
    padding: 0.45rem 1.1rem;
    border-radius: 50px;
    font-family: 'Fredoka One', cursive;
    font-size: 0.95rem;
    color: #57606f;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-pill:hover {
    background: rgba(255,255,255,0.8);
}

.filter-pill.active {
    background: #ff4757;
    color: white;
    box-shadow: 0 3px 8px rgba(255, 71, 87, 0.3);
}

/* Flashcards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1.1rem;
    width: 100%;
}

.flashcard {
    background: #ffffff;
    border-radius: var(--border-radius-md);
    padding: 1.1rem 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 3.5px solid #70a1ff;
    box-shadow: 0 7px 0 #5352ed, 0 10px 20px rgba(83, 82, 237, 0.15);
    position: relative;
    transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-height: 140px;
}

.flashcard:hover {
    transform: translateY(-5px);
    border-color: #ff6b81;
    box-shadow: 0 10px 0 #ee5253, 0 14px 24px rgba(255, 107, 129, 0.25);
}

.flashcard:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #5352ed;
}

.flashcard-main {
    font-family: 'Fredoka One', cursive;
    font-size: 2.8rem;
    line-height: 1;
    color: #2f3542;
    margin-bottom: 0.3rem;
}

.flashcard-img {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 0.3rem;
    filter: drop-shadow(0 3px 5px rgba(0,0,0,0.12));
}

.flashcard-word {
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    color: #ff4757;
    text-transform: uppercase;
}

.flashcard-sub {
    font-size: 0.8rem;
    font-weight: 800;
    color: #747d8c;
}

/* Suku Kata Segmented Cards */
.syllable-card {
    background: #ffffff;
    border-radius: var(--border-radius-md);
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    border: 3.5px solid #2ed573;
    box-shadow: 0 7px 0 #20bf6b, 0 10px 20px rgba(32, 191, 107, 0.15);
    width: 100%;
}

.syllable-segments {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
}

.syllable-chip {
    font-family: 'Fredoka One', cursive;
    font-size: 1.6rem;
    padding: 0.5rem 1rem;
    border-radius: 14px;
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 0 rgba(0,0,0,0.2);
    transition: all 0.15s;
}

.syllable-chip:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.2);
}

.chip-red { background: #ff4757; box-shadow: 0 4px 0 #c0392b; }
.chip-blue { background: #1e90ff; box-shadow: 0 4px 0 #0984e3; }
.chip-green { background: #2ed573; box-shadow: 0 4px 0 #218c53; }
.chip-purple { background: #9b59b6; box-shadow: 0 4px 0 #8e44ad; }
.chip-orange { background: #ffa502; box-shadow: 0 4px 0 #d35400; }

.full-word-action-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 1.3rem;
    background: linear-gradient(135deg, #2ed573, #1abc9c);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.6rem 1.8rem;
    cursor: pointer;
    box-shadow: 0 5px 0 #16a085;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.full-word-action-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.full-word-action-btn:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 #16a085;
}

/* ========================================================
   TRACING & DRAWING ENGINE STYLES (MENULIS)
   ======================================================== */
.tracing-arena {
    width: 100%;
    max-width: 650px;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 4px solid #fff;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.tracing-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 0.5rem;
}

.tracing-target-badge {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.target-char-display {
    font-family: 'Fredoka One', cursive;
    font-size: 3rem;
    color: #ff4757;
    background: #ffeaa7;
    width: 65px; height: 65px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 0 #fdcb6e;
    cursor: pointer;
}

.target-word-hint {
    text-align: left;
}

.target-word-hint h3 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.3rem;
    color: #2f3542;
}

.target-word-hint p {
    font-size: 0.85rem;
    font-weight: 800;
    color: #747d8c;
}

/* Horizontal Character Carousel Bar (Solite Kids Style) */
.trace-carousel-strip {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    padding: 0.4rem 0.2rem;
    scrollbar-width: thin;
    margin-bottom: 0.4rem;
}

.trace-carousel-strip::-webkit-scrollbar {
    height: 6px;
}
.trace-carousel-strip::-webkit-scrollbar-thumb {
    background: #ced6e0;
    border-radius: 10px;
}

.carousel-char-chip {
    font-family: 'Fredoka One', cursive;
    font-size: 1.25rem;
    min-width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 3px solid #dfe4ea;
    background: #f8f9fa;
    color: #2f3542;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    touch-action: manipulation;
    transition: all 0.15s;
}

.carousel-char-chip:active {
    transform: scale(0.9);
}

.carousel-char-chip.active {
    background: #ff4757;
    color: white;
    border-color: #c0392b;
    box-shadow: 0 4px 10px rgba(255, 71, 87, 0.4);
    transform: scale(1.08);
}

/* Tracing Canvas Container with strict touch-action */
.canvas-wrapper {
    position: relative;
    width: 340px;
    height: 340px;
    background: #fffdf7;
    border-radius: 24px;
    border: 5px dashed #fed330;
    box-shadow: inset 0 3px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    touch-action: none !important;
    cursor: crosshair;
}

#tracing-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    touch-action: none !important;
}

/* Bottom Card Preview (Solite Kids Screenshot 1) */
.trace-bottom-preview-card {
    background: #fdf2f4;
    border: 3px solid #ffccd5;
    border-radius: 20px;
    padding: 0.8rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 0.5rem;
}

.trace-preview-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.trace-preview-emoji {
    font-size: 2.8rem;
}

.trace-preview-word {
    font-family: 'Fredoka One', cursive;
    font-size: 1.4rem;
    color: #ff4757;
    text-transform: uppercase;
}

.trace-preview-sub {
    font-size: 0.85rem;
    font-weight: 800;
    color: #747d8c;
}

/* Tracing Toolbar */
.tracing-toolbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.color-palette {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.color-dot {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.15s;
}

.color-dot:hover {
    transform: scale(1.2);
}

.color-dot.active {
    transform: scale(1.25);
    border-color: #2f3542;
    box-shadow: 0 0 0 3px #fff, 0 4px 8px rgba(0,0,0,0.3);
}

.brush-sizes {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.brush-size-btn {
    border: 2px solid #ced6e0;
    background: white;
    border-radius: 50px;
    padding: 0.35rem 0.8rem;
    font-family: 'Fredoka One', cursive;
    font-size: 0.85rem;
    color: #57606f;
    cursor: pointer;
}

.brush-size-btn.active {
    background: #1e90ff;
    color: white;
    border-color: #1e90ff;
}

.tracing-actions {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.btn-nav-trace {
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    color: white;
    transition: all 0.15s;
}

.btn-prev { background: #747d8c; box-shadow: 0 4px 0 #57606f; }
.btn-next { background: #2ed573; box-shadow: 0 4px 0 #218c53; }
.btn-clear { background: #ffa502; box-shadow: 0 4px 0 #d35400; }
.btn-sound { background: #1e90ff; box-shadow: 0 4px 0 #0984e3; }

.btn-nav-trace:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.2);
}

/* Free Draw Board Extras */
.stamp-picker {
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.4rem;
}

.stamp-btn {
    font-size: 1.5rem;
    background: #f1f2f6;
    border: 2px solid #dfe4ea;
    border-radius: 12px;
    padding: 0.3rem 0.5rem;
    cursor: pointer;
    transition: transform 0.15s;
}

.stamp-btn:hover {
    transform: scale(1.2);
    background: #ffeaa7;
}

/* ========================================================
   GAMES ENGINE STYLES (BERMAIN)
   ======================================================== */
.game-container {
    width: 100%;
    max-width: 680px;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 4px solid #fff;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.game-prompt-box {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    border: 3px solid #fff;
    box-shadow: 0 5px 15px rgba(253, 203, 110, 0.4);
    border-radius: 20px;
    padding: 1rem 1.5rem;
    text-align: center;
    width: 100%;
}

.game-prompt-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.4rem;
    color: #d35400;
}

.game-prompt-sub {
    font-size: 0.95rem;
    font-weight: 800;
    color: #634a00;
    margin-top: 0.2rem;
}

/* Tebak Huruf Cards */
.letter-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    width: 100%;
    max-width: 450px;
}

.letter-choice-card {
    background: white;
    border-radius: 22px;
    padding: 1.5rem;
    border: 4px solid #e4e7eb;
    box-shadow: 0 8px 0 #ced6e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fredoka One', cursive;
    font-size: 4rem;
    color: #2f3542;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.letter-choice-card:hover {
    transform: translateY(-5px);
    border-color: #1e90ff;
    box-shadow: 0 12px 0 #0984e3;
    color: #1e90ff;
}

.letter-choice-card:active {
    transform: translateY(5px);
    box-shadow: 0 2px 0 #ced6e0;
}

/* Susun Balok Kata */
.word-puzzle-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.puzzle-image-preview {
    font-size: 5rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
    animation: gentleBounce 2s infinite ease-in-out;
}

@keyframes gentleBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.word-target-slots {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
}

.target-slot {
    width: 55px; height: 60px;
    border-radius: 16px;
    border: 3px dashed #a4b0be;
    background: #f1f2f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fredoka One', cursive;
    font-size: 2rem;
    color: #2f3542;
    transition: all 0.2s;
}

.target-slot.filled {
    border-style: solid;
    border-color: #2ed573;
    background: #2ed573;
    color: white;
    box-shadow: 0 5px 0 #218c53;
}

.jumbled-letter-tiles {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.5rem;
}

.letter-tile {
    width: 55px; height: 60px;
    border-radius: 16px;
    background: #1e90ff;
    color: white;
    border: none;
    box-shadow: 0 5px 0 #0984e3;
    font-family: 'Fredoka One', cursive;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.letter-tile:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 #0984e3;
}

.letter-tile.used {
    opacity: 0.25;
    pointer-events: none;
    transform: scale(0.9);
}

/* Hubungkan Garis (Matching Pairs) */
.matching-board {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
}

.matching-column {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.match-item-card {
    background: #f8f9fa;
    border: 3px solid #dfe4ea;
    box-shadow: 0 4px 0 #ced6e0;
    border-radius: 18px;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    font-family: 'Fredoka One', cursive;
    font-size: 1.3rem;
    color: #2f3542;
    transition: all 0.15s;
}

.match-item-card .match-icon {
    font-size: 2.2rem;
}

.match-item-card:hover {
    border-color: #ffa502;
    transform: translateY(-2px);
}

.match-item-card.selected {
    border-color: #ff4757;
    background: #ffeaa7;
    box-shadow: 0 4px 0 #e17055;
    transform: scale(1.03);
}

.match-item-card.matched {
    border-color: #2ed573;
    background: #dff9fb;
    color: #27ae60;
    box-shadow: 0 4px 0 #2ed573;
    pointer-events: none;
}

/* Balloon Pop Game Arena */
.balloon-arena {
    position: relative;
    width: 100%;
    max-width: 520px;
    height: 380px;
    background: linear-gradient(180deg, #74b9ff 0%, #81ecec 100%);
    border-radius: 24px;
    border: 4px solid #fff;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1), 0 8px 25px rgba(0,0,0,0.1);
    overflow: hidden;
}

.balloon-item {
    position: absolute;
    width: 65px;
    height: 80px;
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fredoka One', cursive;
    font-size: 1.9rem;
    color: white;
    cursor: pointer;
    box-shadow: inset -4px -4px 10px rgba(0,0,0,0.2), 0 5px 12px rgba(0,0,0,0.15);
    transition: transform 0.1s;
}

.balloon-item::after {
    content: "";
    position: absolute;
    bottom: -8px;
    width: 2px;
    height: 14px;
    background: rgba(255, 255, 255, 0.7);
}

.balloon-item:active {
    transform: scale(1.2);
}

/* ========================================================
   MONTESSORI ROADMAP LEVEL STYLES
   ======================================================== */
.montessori-path-container {
    width: 100%;
    max-width: 680px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.chapter-node-card {
    background: white;
    border-radius: 22px;
    border: 4px solid #e4e7eb;
    box-shadow: 0 8px 0 #ced6e0;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chapter-node-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: #8e44ad;
    box-shadow: 0 12px 0 #6c5ce7;
}

.chapter-node-card:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #ced6e0;
}

.chapter-badge-num {
    font-family: 'Fredoka One', cursive;
    font-size: 2rem;
    width: 65px; height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 0 #574b90;
    flex-shrink: 0;
}

.chapter-info-body {
    flex: 1;
}

.chapter-info-body h3 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.3rem;
    color: #2f3542;
    margin-bottom: 0.2rem;
}

.chapter-info-body p {
    font-size: 0.9rem;
    font-weight: 700;
    color: #747d8c;
    line-height: 1.4;
}

.chapter-stars-pill {
    font-size: 1.3rem;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeInModal 0.25s ease-out;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #fff;
    margin: 6vh auto;
    padding: 1.8rem;
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 650px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    text-align: center;
    border: 4px solid #fff;
}

.close-btn {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f2f6;
    border: 2px solid #dfe4ea;
    color: #747d8c;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 25;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.close-btn:hover {
    background: #ff4757;
    border-color: #ff4757;
    color: #ffffff;
    transform: rotate(90deg) scale(1.08);
}


.theme-modal-content {
    max-width: 680px !important;
    width: 92% !important;
    padding: 1.5rem !important;
    border-radius: 28px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3) !important;
    border: 4px solid #fff !important;
    background: #ffffff !important;
    position: relative !important;
    max-height: 88vh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.theme-modal-header {
    flex-shrink: 0;
    padding-bottom: 0.8rem;
    border-bottom: 2px dashed #f1f2f6;
    margin-bottom: 0.9rem;
    position: relative;
    text-align: center;
}

.theme-modal-header h2 {
    font-family: 'Fredoka One', cursive;
    color: #2f3542;
    font-size: 1.5rem;
    margin: 0 0 0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.theme-modal-header p {
    font-size: 0.9rem;
    color: #747d8c;
    font-weight: 700;
    margin: 0;
}

.theme-tab-bar {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    margin-bottom: 0.9rem;
    flex-shrink: 0;
}

.theme-tab-btn {
    flex: 1;
    padding: 0.65rem 1rem;
    font-family: 'Fredoka One', cursive;
    font-size: 1rem;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    background: #f1f2f6;
    color: #57606f;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 0 #dcdde1;
}

.theme-tab-btn.active {
    background: linear-gradient(135deg, #1e90ff, #00cec9);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(30, 144, 255, 0.35);
    transform: translateY(-2px);
}

.theme-tab-btn:hover:not(.active) {
    background: #e4e7eb;
    transform: translateY(-1px);
}

.theme-tab-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: 0.8rem;
    -webkit-overflow-scrolling: touch;
}

.theme-tab-body::-webkit-scrollbar {
    width: 6px;
}
.theme-tab-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.theme-panel {
    display: none;
    width: 100%;
}
.theme-panel.active {
    display: block;
    animation: fadeInTab 0.25s ease-out;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Color Palette Grid inside panel */
.color-palette-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.8rem;
    width: 100%;
    padding: 4px 2px;
}

.color-palette-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.85rem 1rem;
    border-radius: 18px;
    cursor: pointer;
    border: 3px solid #ffffff;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.color-palette-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}

.color-palette-card.active-theme {
    border-color: #ffd32a;
    box-shadow: 0 0 0 3px #ffa502, 0 8px 20px rgba(255, 165, 2, 0.35);
}

.color-palette-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.color-palette-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.color-palette-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.color-palette-sub {
    font-size: 0.72rem;
    font-weight: 800;
    opacity: 0.9;
}

/* Cartoon Wallpaper Grid inside panel */
.wallpaper-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 0.9rem;
    width: 100%;
    padding: 4px 2px;
}

.wallpaper-card {
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid #f1f2f6;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.wallpaper-card:hover {
    transform: translateY(-4px) scale(1.04);
    border-color: #1e90ff;
    box-shadow: 0 10px 22px rgba(30, 144, 255, 0.28);
}

.wallpaper-card.active-theme {
    border-color: #ff4757;
    box-shadow: 0 0 0 3px #ff4757, 0 8px 20px rgba(255, 71, 87, 0.35);
}

.wallpaper-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: white;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 2px 7px;
    border-radius: 50px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    display: none;
}

.wallpaper-card.active-theme .wallpaper-badge {
    display: block;
}

.wallpaper-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-bottom: 2px solid #f1f2f6;
    display: block;
    background: #dfe4ea;
}

.wallpaper-card p {
    font-family: 'Fredoka One', cursive;
    font-size: 0.92rem;
    margin: 8px 0;
    color: #2f3542;
    text-align: center;
    padding: 0 4px;
}

/* Footer Reset Button */
.theme-modal-footer {
    flex-shrink: 0;
    padding-top: 0.8rem;
    border-top: 2px dashed #f1f2f6;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.remove-theme-btn {
    background: linear-gradient(135deg, #747d8c, #57606f) !important;
    color: white !important;
    font-family: 'Fredoka One', cursive !important;
    font-size: 0.95rem !important;
    padding: 0.65rem 1.6rem !important;
    border: none !important;
    border-radius: 50px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 10px rgba(87, 96, 111, 0.25) !important;
    transition: all 0.2s !important;
}

.remove-theme-btn:hover {
    transform: scale(1.03) !important;
    background: linear-gradient(135deg, #ff4757, #ee5253) !important;
    box-shadow: 0 6px 16px rgba(255, 71, 87, 0.35) !important;
}

/* Letter Picker Grid inside Modal */
.letter-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 0.6rem;
    margin-top: 1rem;
}

.letter-picker-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 1.5rem;
    background: #f1f2f6;
    border: 3px solid #dfe4ea;
    border-radius: 14px;
    padding: 0.5rem 0;
    color: #2f3542;
    cursor: pointer;
    transition: all 0.15s;
}

.letter-picker-btn:hover {
    background: #ff4757;
    color: white;
    border-color: #c0392b;
    transform: scale(1.1);
}

/* Celebration Modal */
.celebration-modal .celebration-content {
    max-width: 440px;
    padding: 2.5rem 1.5rem;
    background: linear-gradient(180deg, #fff 0%, #fffdfa 100%);
    animation: popModal 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popModal {
    from { transform: scale(0.6); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.celebration-trophy {
    font-size: 4.5rem;
    animation: bounceTrophy 1.5s infinite ease-in-out;
}

@keyframes bounceTrophy {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.celebration-content h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 2rem;
    color: #ff4757;
    margin-top: 0.5rem;
}

.celeb-stars {
    font-size: 2.4rem;
    margin: 0.5rem 0;
    letter-spacing: 5px;
}

.celebration-content p {
    font-size: 1.05rem;
    font-weight: 800;
    color: #57606f;
    margin-bottom: 1.5rem;
}

.primary-action-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 1.3rem;
    background: linear-gradient(135deg, #2ed573, #10ac84);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.8rem 2.2rem;
    cursor: pointer;
    box-shadow: 0 6px 0 #1b8a5a;
    transition: all 0.15s;
}

.primary-action-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.primary-action-btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #1b8a5a;
}

/* Coloring Book Styles */
.sketch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
    width: 100%;
    margin-bottom: 1rem;
}

.sketch-card {
    background: white;
    border: 3px solid #dfe4ea;
    border-radius: var(--border-radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 5px 0 #ced6e0;
    touch-action: manipulation;
    transition: all 0.15s;
}

.sketch-card:hover, .sketch-card.active {
    border-color: #ff4757;
    box-shadow: 0 8px 0 #c0392b;
    transform: translateY(-3px);
}

.sketch-icon {
    font-size: 3.5rem;
    margin-bottom: 0.3rem;
}

.sketch-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    color: #2f3542;
}

/* Touch Action Optimization across all interactive components */
button, 
.menu-card, 
.flashcard, 
.syllable-chip, 
.letter-tile, 
.target-slot, 
.match-item-card, 
.balloon-item, 
.cat-tab, 
.ctrl-btn, 
.back-btn {
    touch-action: manipulation !important;
}

/* App Footer */
.app-footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.85rem;
    font-weight: 800;
    color: #a4b0be;
    border-top: 2px solid #f1f2f6;
    margin-top: auto;
}

/* Floating Emoji Popups on Click */
.floating-emoji {
    position: fixed;
    font-size: 3rem;
    pointer-events: none;
    z-index: 10000;
    animation: floatEmojiUp 0.8s ease-out forwards;
}

@keyframes floatEmojiUp {
    0% { transform: translate(-50%, 0) scale(0.5); opacity: 1; }
    50% { transform: translate(-50%, -40px) scale(1.3); opacity: 1; }
    100% { transform: translate(-50%, -90px) scale(1); opacity: 0; }
}

/* ========================================================
   RESPONSIVE DESIGN SYSTEM: TABLET, HP & PC MULTI-DEVICE
   ======================================================== */

/* 1. TABLET SCREENS (iPad, Galaxy Tab, 601px - 1024px) */
@media (min-width: 601px) and (max-width: 1024px) {
    .app-container {
        width: 98% !important;
        max-width: 980px !important;
        margin: 6px auto !important;
        border-radius: 24px !important;
        padding: 0.6rem !important;
        min-height: 96vh !important;
    }

    .main-header {
        padding: 0.6rem 0.9rem 0.5rem !important;
    }

    .header-top-bar {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: wrap !important;
        gap: 0.45rem !important;
        margin-bottom: 0.35rem !important;
    }

    .star-badge {
        padding: 0.28rem 0.85rem !important;
        font-size: 1.05rem !important;
        flex-shrink: 0 !important;
    }

    .header-actions {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: flex-end !important;
        align-items: center !important;
        gap: 0.35rem !important;
        overflow-x: visible !important;
    }

    .ctrl-btn {
        padding: 0.35rem 0.65rem !important;
        font-size: 0.78rem !important;
        border-radius: 18px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    .title-container {
        margin: 0.2rem 0 0.4rem !important;
        gap: 8px !important;
    }

    .glow-text {
        font-size: 1.45rem !important;
    }

    .sub-title {
        font-size: 0.88rem !important;
    }

    .category-tabs {
        display: flex !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        gap: 0.45rem !important;
        padding: 4px 2px 8px !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
    }

    .category-tabs::-webkit-scrollbar {
        display: none !important;
    }

    .cat-tab {
        flex: 0 0 auto !important;
        padding: 0.45rem 0.75rem !important;
        font-size: 0.86rem !important;
        border-radius: 14px !important;
    }

    .cat-tab .tab-icon {
        font-size: 1.15rem !important;
    }

    .subnav-bar {
        padding: 0.45rem 0.9rem !important;
        gap: 0.6rem !important;
    }

    .subnav-title {
        font-size: 1.2rem !important;
    }

    .back-btn {
        padding: 0.35rem 0.85rem !important;
        font-size: 0.9rem !important;
    }

    .menu-grid-section {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.85rem !important;
        padding: 0.6rem 0.2rem !important;
    }

    .menu-card {
        min-height: 125px !important;
        padding: 0.85rem 0.6rem !important;
        border-radius: 20px !important;
    }

    .menu-card-icon {
        font-size: 2.3rem !important;
    }

    .menu-card-title {
        font-size: 1rem !important;
    }

    .menu-card-desc {
        font-size: 0.74rem !important;
    }

    .modal-content,
    .voice-modal-content,
    .theme-modal-content,
    .leaderboard-modal-content,
    .polyglot-modal-content {
        max-width: 640px !important;
        width: 90% !important;
        padding: 1.3rem !important;
        border-radius: 26px !important;
        max-height: 86vh !important;
    }

    .voice-characters-grid {
        max-height: 52vh !important;
        gap: 0.6rem !important;
    }

    .wallpaper-container {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.8rem !important;
    }

    .color-palette-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
}

/* Tablet Portrait Mode (601px - 879px) */
@media (min-width: 601px) and (max-width: 879px) {
    .header-top-bar {
        gap: 0.35rem !important;
        flex-wrap: nowrap !important;
    }

    .star-badge {
        padding: 0.25rem 0.65rem !important;
        font-size: 0.95rem !important;
    }

    .header-actions {
        justify-content: flex-start !important;
        gap: 0.25rem !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        scrollbar-width: none !important;
    }

    .header-actions::-webkit-scrollbar {
        display: none !important;
    }

    .header-actions .ctrl-btn {
        padding: 0.28rem 0.48rem !important;
        font-size: 0.72rem !important;
    }
}

/* Tablet Landscape Mode (880px - 1024px) */
@media (min-width: 880px) and (max-width: 1024px) {
    .category-tabs {
        display: grid !important;
        grid-template-columns: repeat(7, 1fr) !important;
        gap: 5px !important;
        overflow-x: visible !important;
    }

    .cat-tab {
        padding: 0.45rem 0.4rem !important;
        font-size: 0.82rem !important;
        justify-content: center !important;
    }

    .header-actions .ctrl-btn {
        padding: 0.32rem 0.58rem !important;
        font-size: 0.76rem !important;
    }
}

/* Base Responsive Visibility Controls */
.show-mobile {
    display: none !important;
}

/* 2. SMARTPHONE MOBILE (All Mobile Screens <= 600px) */
@media (max-width: 600px) {
    .hide-mobile {
        display: none !important;
    }
    .show-mobile {
        display: inline !important;
    }
    .full-label {
        display: none !important;
    }

    .app-container {
        margin: 0 !important;
        border-radius: 0 !important;
        min-height: 100dvh !important;
        border: none !important;
        box-shadow: none !important;
        width: 100% !important;
    }

    .main-header {
        padding: 0.28rem 0.45rem 0.2rem !important;
    }

    .header-top-bar {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 0.3rem !important;
        flex-wrap: nowrap !important;
        margin-bottom: 0.15rem !important;
        width: 100% !important;
    }

    .star-badge {
        padding: 0.2rem 0.48rem !important;
        font-size: 0.82rem !important;
        flex-shrink: 0 !important;
        border-width: 2px !important;
        gap: 0.25rem !important;
    }

    .star-icon {
        font-size: 1.0rem !important;
    }

    /* ANTI-CLIPPING: Use flex-start and safe horizontal scroll */
    .header-actions {
        display: flex !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        gap: 0.28rem !important;
        padding: 2px 2px 4px !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        touch-action: pan-x pinch-zoom !important;
        overscroll-behavior-x: contain !important;
    }

    .header-actions::-webkit-scrollbar {
        display: none !important;
    }

    .ctrl-btn {
        padding: 0.26rem 0.5rem !important;
        font-size: 0.72rem !important;
        font-weight: 800 !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        border-radius: 12px !important;
        gap: 2px !important;
    }

    .title-container {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 5px !important;
        margin: 0.05rem 0 0.18rem !important;
        cursor: pointer;
    }

    .logo-mascot {
        font-size: 1.15rem !important;
        animation: none !important;
    }

    .glow-text {
        font-size: 1.05rem !important;
        margin: 0 !important;
    }

    .sub-title {
        display: none !important;
    }

    .category-tabs {
        display: flex !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        gap: 0.3rem !important;
        padding: 2px 2px 5px !important;
        margin-top: 0.1rem !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        touch-action: pan-x pinch-zoom !important;
        overscroll-behavior-x: contain !important;
    }

    .category-tabs::-webkit-scrollbar {
        display: none !important;
    }

    .cat-tab {
        flex: 0 0 auto !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.25rem !important;
        padding: 0.32rem 0.6rem !important;
        font-size: 0.78rem !important;
        font-weight: 800 !important;
        height: 35px !important;
        border-radius: 14px !important;
        box-shadow: 0 3px 0 rgba(0,0,0,0.15) !important;
    }

    .cat-tab .tab-icon {
        font-size: 0.95rem !important;
    }

    .subnav-bar {
        padding: 0.35rem 0.55rem !important;
        gap: 0.35rem !important;
    }

    .subnav-title {
        font-size: 0.95rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .back-btn {
        padding: 0.3rem 0.65rem !important;
        font-size: 0.82rem !important;
    }

    .subnav-extra-action {
        display: flex !important;
        gap: 0.3rem !important;
    }

    .subnav-extra-action .ctrl-btn {
        padding: 0.3rem 0.55rem !important;
        font-size: 0.75rem !important;
    }

    .menu-grid-section {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.65rem !important;
        padding: 0.35rem 0.4rem 6.5rem !important;
    }

    .menu-card {
        min-height: 88px !important;
        padding: 0.65rem 0.45rem !important;
        border-radius: 20px !important;
        box-shadow: 0 5px 0 rgba(0, 0, 0, 0.14) !important;
        border-width: 2.5px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.35rem !important;
    }

    .menu-card-icon {
        font-size: 2.5rem !important;
        margin-bottom: 0 !important;
        line-height: 1 !important;
        filter: drop-shadow(0 3px 5px rgba(0,0,0,0.18)) !important;
    }

    .menu-card-title {
        font-size: 0.95rem !important;
        font-weight: 900 !important;
        line-height: 1.2 !important;
        letter-spacing: 0.2px !important;
        text-shadow: 0 1px 3px rgba(0,0,0,0.2) !important;
    }

    .menu-card-sub {
        display: none !important; /* Hapus teks kecil berjejal agar kartu sangat lega, bersih, dan ramah anak! */
    }

    .menu-card-desc {
        display: none !important;
    }

    /* Khusus Smartphone <= 420px: Bikin Lega Total & Bebas Desak-Desakan */
    @media (max-width: 420px) {
        .menu-grid-section {
            gap: 0.5rem !important;
            padding: 0.25rem 0.3rem 6.5rem !important;
        }

        .menu-card {
            min-height: 80px !important;
            padding: 0.55rem 0.35rem !important;
            border-radius: 18px !important;
        }

        .menu-card-icon {
            font-size: 1.85rem !important;
            margin-bottom: 0.15rem !important;
        }

        .menu-card-title {
            font-size: 0.82rem !important;
            line-height: 1.15 !important;
        }

        .menu-card-sub {
            display: none !important; /* Hapus teks desak-desakan di HP kecil agar super bersih! */
        }
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.65rem !important;
    }

    .canvas-wrapper {
        width: 280px !important;
        height: 280px !important;
    }

    .letter-choice-grid {
        grid-template-columns: 1fr !important;
    }

    .matching-board {
        grid-template-columns: 1fr !important;
    }

    /* ALL MODALS ON MOBILE: Super Sleek & Anti-Overlap */
    .modal-content,
    .voice-modal-content,
    .theme-modal-content,
    .leaderboard-modal-content,
    .polyglot-modal-content {
        padding: 0.9rem 0.75rem !important;
        width: 95% !important;
        max-height: 92vh !important;
        border-radius: 20px !important;
        border-width: 3px !important;
    }

    .close-btn {
        top: 10px !important;
        right: 12px !important;
        width: 32px !important;
        height: 32px !important;
        font-size: 18px !important;
    }

    .voice-modal-header,
    .theme-modal-header,
    .polyglot-header,
    .letter-picker-content h2,
    #trophy-modal h2,
    #leaderboard-modal h2 {
        padding-right: 36px !important;
    }

    .voice-modal-header h2,
    .theme-modal-header h2 {
        font-size: 1.15rem !important;
        margin-bottom: 0.2rem !important;
    }

    .voice-modal-header p,
    .theme-modal-header p {
        font-size: 0.78rem !important;
    }

    /* Voice Switcher & Cards on Mobile */
    .voice-engine-switch-box {
        padding: 0.45rem 0.6rem !important;
        margin-bottom: 0.55rem !important;
        border-radius: 14px !important;
    }

    .engine-mode-title {
        font-size: 0.78rem !important;
    }

    .engine-toggle-group {
        gap: 0.3rem !important;
    }

    .engine-toggle-btn {
        font-size: 0.72rem !important;
        padding: 0.32rem 0.55rem !important;
        border-radius: 10px !important;
    }

    .voice-characters-grid {
        gap: 0.45rem !important;
        max-height: 48vh !important;
        padding-right: 2px !important;
    }

    .voice-character-card {
        padding: 0.5rem 0.65rem !important;
        border-radius: 14px !important;
        border-width: 2px !important;
    }

    .voice-char-left {
        gap: 0.55rem !important;
    }

    .voice-char-avatar {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.6rem !important;
        border-radius: 12px !important;
    }

    .voice-char-name {
        font-size: 0.9rem !important;
    }

    .voice-gender-badge {
        font-size: 0.6rem !important;
        padding: 1px 5px !important;
        border-radius: 6px !important;
    }

    .voice-char-desc {
        font-size: 0.72rem !important;
        line-height: 1.2 !important;
    }

    .voice-char-actions {
        gap: 0.35rem !important;
    }

    .voice-test-btn {
        font-size: 0.72rem !important;
        padding: 0.32rem 0.55rem !important;
        border-radius: 10px !important;
        gap: 2px !important;
    }

    .voice-select-badge {
        width: 24px !important;
        height: 24px !important;
        font-size: 0.8rem !important;
    }

    .voice-modal-footer,
    .theme-modal-footer {
        padding-top: 0.6rem !important;
        margin-top: 0.6rem !important;
    }

    .voice-modal-footer .primary-action-btn {
        padding: 0.6rem 1.4rem !important;
        font-size: 0.95rem !important;
    }

    /* Theme Tab & Wallpapers on Mobile */
    .theme-tab-bar {
        gap: 0.35rem !important;
        margin-bottom: 0.65rem !important;
    }

    .theme-tab-btn {
        padding: 0.45rem 0.6rem !important;
        font-size: 0.82rem !important;
        border-radius: 12px !important;
    }

    .color-palette-container {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }

    .color-palette-card {
        padding: 0.55rem 0.75rem !important;
        border-radius: 14px !important;
    }

    .color-palette-title {
        font-size: 0.88rem !important;
    }

    .wallpaper-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.55rem !important;
    }

    .wallpaper-card img {
        height: 75px !important;
    }

    .wallpaper-card p {
        font-size: 0.78rem !important;
        margin: 4px 0 !important;
    }

    .remove-theme-btn {
        font-size: 0.8rem !important;
        padding: 0.5rem 1rem !important;
    }

    .leaderboard-filter-tabs {
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        padding-bottom: 4px !important;
    }

    .lb-filter-btn {
        flex: 0 0 auto !important;
        padding: 0.3rem 0.6rem !important;
        font-size: 0.75rem !important;
    }
}

/* 3. EXTRA SMALL SMARTPHONES (<= 380px) */
@media (max-width: 380px) {
    .ctrl-btn {
        padding: 0.25rem 0.45rem !important;
        font-size: 0.7rem !important;
    }

    .glow-text {
        font-size: 1.05rem !important;
    }

    .cat-tab {
        padding: 0.32rem 0.55rem !important;
        font-size: 0.76rem !important;
    }

    .menu-card {
        min-height: 90px !important;
        padding: 0.55rem 0.3rem !important;
    }

    .menu-card-title {
        font-size: 0.82rem !important;
    }

    .iqro-arabic-char {
        font-size: 2rem !important;
    }
}


/* ========================================================
   TROPHY CABINET & REPORT CARD STYLES
   ======================================================== */
.trophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.trophy-card {
    background: #f8f9fa;
    border: 3px solid #dfe4ea;
    border-radius: var(--border-radius-md);
    padding: 1rem 0.6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 0 #ced6e0;
    transition: all 0.2s;
}

.trophy-card.unlocked {
    background: linear-gradient(135deg, #fff9e6, #fff3cd);
    border-color: #f1c40f;
    box-shadow: 0 6px 0 #d4ac0d, 0 6px 15px rgba(241, 196, 15, 0.3);
    transform: scale(1.03);
}

.trophy-icon {
    font-size: 3rem;
    margin-bottom: 0.3rem;
    filter: drop-shadow(0 3px 5px rgba(0,0,0,0.15));
}

.trophy-title {
    font-family: 'Fredoka One', cursive;
    font-size: 0.95rem;
    color: #2f3542;
}

.trophy-desc {
    font-size: 0.75rem;
    font-weight: 700;
    color: #747d8c;
    margin-top: 0.2rem;
}

.report-card-summary {
    background: #f1f2f6;
    border-radius: var(--border-radius-md);
    padding: 1rem;
    font-family: 'Fredoka One', cursive;
    color: #2f3542;
    font-size: 1.1rem;
}

/* ========================================================
   MINI PIANO & MUSICAL LEARNING LAB STYLES
   ======================================================== */
.piano-wrapper {
    width: 100%;
    max-width: 680px;
    background: #2f3542;
    border-radius: 26px;
    padding: 1.5rem 0.8rem 1.2rem;
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
    border: 4px solid #fff;
    display: flex !important;
    flex-direction: row !important;
    gap: 0.45rem;
    justify-content: center;
    align-items: flex-end;
}

.piano-key {
    flex: 1;
    min-width: 0;
    height: 190px;
    border-radius: 0 0 16px 16px;
    border: 3px solid rgba(255,255,255,0.7);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 0.8rem;
    font-family: 'Fredoka One', cursive;
    color: white;
    cursor: pointer;
    touch-action: manipulation;
    box-shadow: inset 0 -6px 0 rgba(0,0,0,0.25), 0 6px 10px rgba(0,0,0,0.3);
    transition: transform 0.1s, filter 0.1s;
    user-select: none;
}

.piano-key:active, .piano-key.pressed {
    transform: translateY(6px);
    filter: brightness(1.2);
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.2);
}

.piano-key.glow {
    animation: keyGlow 0.8s infinite alternate;
    border-color: #ffd32a;
    box-shadow: 0 0 25px #ffd32a, inset 0 0 15px #fff;
}

@keyframes keyGlow {
    from { transform: scale(1); filter: brightness(1.1); }
    to { transform: scale(1.05) translateY(-4px); filter: brightness(1.4); }
}

.piano-key-label, .piano-key-note {
    font-size: 1.6rem;
    font-family: 'Fredoka One', cursive;
}

.piano-key-solfege {
    font-size: 0.95rem;
    opacity: 0.95;
    font-weight: 800;
}

.song-selector-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.song-chip-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 0.95rem;
    background: #747d8c;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.5rem 1.1rem;
    cursor: pointer;
    box-shadow: 0 3px 0 #57606f;
    transition: all 0.15s;
}

.song-chip-btn:hover, .song-chip-btn.active {
    background: #ff4757;
    box-shadow: 0 3px 0 #c0392b;
    transform: translateY(-2px);
}

/* ========================================================
   VOICE READING COACH (LABORATORIUM SUARA)
   ======================================================== */
.voice-lab-box {
    width: 100%;
    max-width: 580px;
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 1.75rem 1.25rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 4px solid #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
}

.voice-target-display {
    font-family: 'Fredoka One', cursive;
    font-size: 3.2rem;
    color: #ff4757;
    margin: 0.5rem 0;
}

.mic-pulse-btn {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: white;
    border: 4px solid #fff;
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4);
    font-size: 2.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
    transition: all 0.2s;
}

.mic-pulse-btn:hover {
    transform: scale(1.08);
}

.mic-pulse-btn.listening {
    animation: micPulse 1.2s infinite ease-in-out;
    background: linear-gradient(135deg, #2ed573, #2bcbba);
    box-shadow: 0 0 25px rgba(46, 213, 115, 0.7);
}

@keyframes micPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.voice-status-text {
    font-size: 1.1rem;
    font-weight: 800;
    color: #57606f;
}

/* ========================================================
   AI STORY MAKER & GURU CILIK STYLES
   ======================================================== */
.ai-story-container {
    width: 100%;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.ai-chips-group {
    background: #f8f9fa;
    border-radius: var(--border-radius-md);
    padding: 1rem;
    width: 100%;
    border: 2px dashed #ced6e0;
}

.ai-chips-group h4 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    color: #2f3542;
    margin-bottom: 0.5rem;
}

.ai-chip-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ai-choice-chip {
    font-family: 'Fredoka One', cursive;
    font-size: 0.95rem;
    background: white;
    border: 2px solid #dfe4ea;
    border-radius: 50px;
    padding: 0.4rem 1rem;
    cursor: pointer;
    transition: all 0.15s;
    touch-action: manipulation;
}

.ai-choice-chip.active {
    background: #6c5ce7;
    color: white;
    border-color: #5f27cd;
    box-shadow: 0 3px 8px rgba(108, 92, 231, 0.4);
}

.ai-generate-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 1.3rem;
    background: linear-gradient(135deg, #00cec9, #6c5ce7);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.85rem 2.4rem;
    cursor: pointer;
    box-shadow: 0 5px 0 #4834d4;
    transition: all 0.2s;
    touch-action: manipulation;
}

.ai-generate-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.ai-generate-btn:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 #4834d4;
}

.story-book-frame {
    background: linear-gradient(180deg, #fffdf8, #fff8e7);
    border: 4px solid #fdcb6e;
    box-shadow: 0 10px 30px rgba(253, 203, 110, 0.35);
    border-radius: var(--border-radius-lg);
    padding: 1.8rem 1.5rem;
    width: 100%;
    text-align: center;
    position: relative;
}

.story-book-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.6rem;
    color: #d35400;
    margin-bottom: 1rem;
}

.story-paragraph-text {
    font-size: 1.3rem;
    line-height: 1.8;
    color: #2f3542;
    font-weight: 800;
    margin-bottom: 1.25rem;
    word-spacing: 2px;
}

.story-word-clickable {
    cursor: pointer;
    border-radius: 6px;
    padding: 2px 4px;
    transition: background 0.15s;
}

.story-word-clickable:hover {
    background: #ffeaa7;
    color: #d35400;
}

/* AI Loading Spinner */
.ai-loading-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    padding: 1.5rem;
}

.ai-spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #dfe4ea;
    border-top-color: #6c5ce7;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================================
   MEMORY MATCH GAME (KARTU INGATAN AJAIB)
   ======================================================== */
.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
    width: 100%;
    max-width: 480px;
    perspective: 1000px;
}

.memory-card {
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #0984e3, #74b9ff);
    border-radius: 18px;
    border: 3px solid #fff;
    box-shadow: 0 6px 12px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s;
}

.memory-card.flipped {
    background: white;
    transform: rotateY(180deg);
    border-color: #fdcb6e;
    box-shadow: 0 4px 10px rgba(253, 203, 110, 0.4);
}

.memory-card.matched {
    background: #e8f8f5;
    border-color: #2ed573;
    pointer-events: none;
    animation: matchPulse 0.5s ease;
}

@keyframes matchPulse {
    0% { transform: scale(0.9); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ========================================================
   LAWAN KATA (ANTONIM) DUAL CARDS
   ======================================================== */
.antonim-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    width: 100%;
    max-width: 900px;
}

.antonim-pair-card {
    background: white;
    border-radius: var(--border-radius-md);
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    border: 3px solid #f1f2f6;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 0.75rem;
    position: relative;
}

.antonim-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 0.6rem;
    border-radius: 14px;
    transition: transform 0.15s, background 0.15s;
}

.antonim-side:hover {
    background: #f8f9fa;
    transform: scale(1.08);
}

.antonim-emoji {
    font-size: 3rem;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.12));
}

.antonim-word {
    font-family: 'Fredoka One', cursive;
    font-size: 1.3rem;
    color: #2f3542;
    margin-top: 0.3rem;
}

.antonim-vs {
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    color: #ff4757;
    background: #ffeaa7;
    padding: 0.3rem 0.6rem;
    border-radius: 50px;
}

/* ========================================================
   SUARA ALAM & HEWAN SOUNDBOARD
   ======================================================== */
.soundboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
    width: 100%;
    max-width: 780px;
}

.soundboard-card {
    background: white;
    border-radius: 20px;
    border: 3px solid #dfe4ea;
    box-shadow: 0 6px 0 #ced6e0;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    touch-action: manipulation;
    transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.soundboard-card:hover {
    transform: translateY(-4px);
    border-color: #2ed573;
    box-shadow: 0 10px 0 #20bf6b;
}

.soundboard-card:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #ced6e0;
}

.soundboard-card .sb-icon {
    font-size: 3.2rem;
}

.soundboard-card .sb-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    color: #2f3542;
}

.soundboard-card .sb-sound {
    font-size: 0.85rem;
    font-weight: 800;
    color: #0984e3;
    background: #e1f5fe;
    padding: 0.15rem 0.6rem;
    border-radius: 50px;
}

/* ========================================================
   TROPHY CABINET & GOLDEN CERTIFICATE
   ======================================================== */
.trophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
    gap: 1rem;
    width: 100%;
    margin-top: 1rem;
}

.trophy-badge-card {
    background: #f8f9fa;
    border: 3px solid #dfe4ea;
    border-radius: 18px;
    padding: 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.3rem;
    transition: all 0.2s;
}

.trophy-badge-card.unlocked {
    background: linear-gradient(180deg, #fffcf0, #fff7d6);
    border-color: #f1c40f;
    box-shadow: 0 6px 14px rgba(241, 196, 15, 0.35);
}

.trophy-badge-icon {
    font-size: 2.8rem;
    filter: grayscale(100%);
    opacity: 0.4;
    transition: all 0.2s;
}

.trophy-badge-card.unlocked .trophy-badge-icon {
    filter: none;
    opacity: 1;
    transform: scale(1.1);
}

.trophy-badge-name {
    font-family: 'Fredoka One', cursive;
    font-size: 0.95rem;
    color: #2f3542;
}

.trophy-badge-status {
    font-size: 0.75rem;
    font-weight: 800;
    color: #95a5a6;
}

.trophy-badge-card.unlocked .trophy-badge-status {
    color: #27ae60;
    font-weight: 900;
}

.certificate-box {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #fffdf5;
    border: 4px double #d4af37;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.2);
}

.certificate-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.5rem;
    color: #b78103;
    letter-spacing: 1px;
}

.certificate-subtitle {
    font-size: 0.95rem;
    color: #57606f;
    font-weight: 800;
    margin: 0.4rem 0 1rem;
}

.certificate-child-name {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    color: #2c3e50;
    border-bottom: 2px dashed #b78103;
    display: inline-block;
    padding: 0 1.5rem 0.2rem;
    margin-bottom: 0.5rem;
}

/* ========================================================
   LEADERBOARD & PAPAN SKOR JUARA
   ======================================================== */
.leaderboard-entry-box {
    background: linear-gradient(135deg, #f8f9fa, #fff8e7);
    border: 2px dashed #f39c12;
    border-radius: 18px;
    padding: 1rem 1.2rem;
    margin: 1rem 0 0.5rem;
    width: 100%;
    text-align: center;
}

.ip-badge-pill {
    display: inline-block;
    background: #e1f5fe;
    color: #0288d1;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    margin-bottom: 0.35rem;
    border: 1px solid #b3e5fc;
}

.name-input-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.6rem;
    justify-content: center;
}

.name-input-group input {
    flex: 1;
    padding: 0.7rem 1.1rem;
    border-radius: 50px;
    border: 2px solid #ced6e0;
    font-family: 'Fredoka One', cursive;
    font-size: 1.05rem;
    color: #2f3542;
    outline: none;
    transition: border-color 0.2s;
}

.name-input-group input:focus {
    border-color: #ff4757;
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.2);
}

.submit-score-btn {
    padding: 0.7rem 1.4rem !important;
    font-size: 1rem !important;
    white-space: nowrap;
    background: #2ed573 !important;
    box-shadow: 0 4px 0 #218c53 !important;
}

.user-ip-banner {
    background: #e8f4f8;
    border: 2px solid #81ecec;
    border-radius: 50px;
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    font-weight: 800;
    color: #006266;
    display: inline-block;
    margin-bottom: 0.8rem;
}

.leaderboard-filter-tabs {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 0.8rem;
    scrollbar-width: none;
    justify-content: flex-start;
}

.leaderboard-filter-tabs::-webkit-scrollbar {
    display: none;
}

.lb-filter-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 0.85rem;
    background: #f1f2f6;
    border: 2px solid #dfe4ea;
    border-radius: 50px;
    padding: 0.4rem 0.9rem;
    color: #57606f;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    touch-action: manipulation;
}

.lb-filter-btn:hover, .lb-filter-btn.active {
    background: #ff4757;
    color: white;
    border-color: #ff4757;
    box-shadow: 0 3px 8px rgba(255, 71, 87, 0.35);
}

.leaderboard-list-wrap {
    max-height: 380px;
    overflow-y: auto;
    border-radius: 16px;
    background: #f8f9fa;
    border: 2px solid #e4e7eb;
    padding: 0.6rem;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.leaderboard-item {
    background: white;
    border-radius: 14px;
    padding: 0.75rem 1rem;
    border: 2px solid #eef0f3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    box-shadow: 0 3px 6px rgba(0,0,0,0.03);
    transition: transform 0.15s;
}

.leaderboard-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.06);
}

.leaderboard-item.rank-1 {
    background: linear-gradient(135deg, #fffdf0, #fff8d6);
    border: 2px solid #f1c40f;
    box-shadow: 0 4px 12px rgba(241, 196, 15, 0.3);
}

.leaderboard-item.rank-2 {
    background: linear-gradient(135deg, #fbfcfc, #f1f2f6);
    border: 2px solid #bdc3c7;
}

.leaderboard-item.rank-3 {
    background: linear-gradient(135deg, #fff9f5, #fdedec);
    border: 2px solid #e67e22;
}

.leaderboard-item.current-user-highlight {
    outline: 3px solid #00cec9;
    animation: userPulse 1.5s infinite alternate;
}

@keyframes userPulse {
    from { outline-color: #00cec9; }
    to { outline-color: #0984e3; }
}

.lb-rank-badge {
    font-family: 'Fredoka One', cursive;
    font-size: 1.3rem;
    min-width: 42px;
    text-align: center;
}

.lb-player-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.lb-player-name {
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    color: #2f3542;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-player-meta {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.78rem;
    color: #747d8c;
    font-weight: 800;
}

.lb-game-tag {
    background: #ffeaa7;
    color: #d35400;
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    font-size: 0.75rem;
}

.lb-ip-tag {
    background: #eef2f7;
    color: #57606f;
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    font-size: 0.72rem;
}

.lb-score-pill {
    font-family: 'Fredoka One', cursive;
    font-size: 1.25rem;
    color: #ffa502;
    background: #fff9e6;
    border: 2px solid #fed330;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    white-space: nowrap;
}

.leaderboard-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    gap: 0.75rem;
}

.clear-lb-btn {
    background: none;
    border: none;
    color: #a4b0be;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.15s;
}

.clear-lb-btn:hover {
    color: #ff4757;
}

.empty-lb-notice {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #a4b0be;
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
}

/* ========================================================
   MODUL ABC CERIA KLASIK & ANIMASI MEMBACA BERJEDA
   ======================================================== */

/* Reading Syllable & Word Highlights */
.reading-active-suku {
    transform: scale(1.18) !important;
    background: #ffeaa7 !important;
    color: #d35400 !important;
    border: 3px solid #f39c12 !important;
    box-shadow: 0 0 25px rgba(243, 156, 18, 0.9), 0 0 10px #f1c40f !important;
    animation: pulseSukuGlow 0.6s infinite alternate !important;
    z-index: 10 !important;
}

@keyframes pulseSukuGlow {
    0% { transform: scale(1.12); box-shadow: 0 0 15px rgba(243, 156, 18, 0.7); }
    100% { transform: scale(1.24); box-shadow: 0 0 30px rgba(243, 156, 18, 1); }
}

.reading-active-word {
    transform: scale(1.1) !important;
    background: linear-gradient(135deg, #0984e3, #1e90ff) !important;
    color: #ffffff !important;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.6) !important;
    box-shadow: 0 0 35px rgba(30, 144, 255, 0.95), 0 6px 0 #0767b1 !important;
    border: 3px solid #74b9ff !important;
    animation: pulseWordGlow 0.5s infinite alternate !important;
    z-index: 10 !important;
}

@keyframes pulseWordGlow {
    0% { transform: scale(1.04); }
    100% { transform: scale(1.1); }
}

.suku-tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.05);
    transition: all 0.25s ease;
}

.suku-tag.reading-active-suku {
    background: #ffeaa7 !important;
    color: #d35400 !important;
    font-weight: 900;
}

/* Action Buttons for Spelling with Pauses */
.action-buttons-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    margin-top: 0.5rem;
}

.full-word-action-btn.spell-btn {
    background: linear-gradient(135deg, #ff9f43, #ee5253);
    color: #fff;
    border: none;
    border-radius: 16px;
    padding: 10px 18px;
    font-family: 'Fredoka One', cursive;
    font-size: 1.05rem;
    cursor: pointer;
    box-shadow: 0 5px 0 #c0392b, 0 8px 15px rgba(238, 82, 83, 0.3);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.full-word-action-btn.spell-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 0 #c0392b, 0 12px 20px rgba(238, 82, 83, 0.4);
}

.full-word-action-btn.spell-btn:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #c0392b;
}

.full-word-action-btn.instant-btn {
    background: linear-gradient(135deg, #10ac84, #1dd1a1);
    color: #fff;
    border: none;
    border-radius: 16px;
    padding: 10px 18px;
    font-family: 'Fredoka One', cursive;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 5px 0 #10ac84, 0 8px 15px rgba(29, 209, 161, 0.3);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mini-spell-btn {
    background: #ff7675;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 5px 12px;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 3px 0 #d63031;
    transition: all 0.15s;
}

.mini-spell-btn:hover {
    transform: translateY(-2px);
    background: #ff5252;
}

.mini-spell-btn:active {
    transform: translateY(2px);
    box-shadow: none;
}

/* Classic Sub-Tab Bar */
.classic-subtab-bar {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    padding: 0.5rem;
    border-radius: 50px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 650px;
}

.classic-tab-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 1.05rem;
    padding: 0.65rem 1.4rem;
    border: none;
    border-radius: 50px;
    background: transparent;
    color: #576574;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.classic-tab-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #ff4757;
    transform: translateY(-2px);
}

.classic-tab-btn.active {
    background: #fff;
    color: #ff4757;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.25);
    transform: scale(1.06);
}

/* Classic 3D Cards Grid */
.classic-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
    gap: 1.2rem;
    width: 100%;
    max-width: 820px;
    padding: 0.5rem;
}

.classic-card {
    border-radius: 22px;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.5);
    min-height: 110px;
}

.classic-card:hover {
    transform: translateY(-6px) scale(1.06);
    filter: brightness(1.08);
}

.classic-card:active {
    transform: scale(0.92);
}

.classic-card-text {
    font-family: 'Fredoka One', cursive;
    font-size: 3.8rem;
    color: white;
    text-shadow: 3px 3px 0px rgba(0, 0, 0, 0.22);
    z-index: 1;
    line-height: 1;
}

.classic-card-subtext {
    font-size: 0.95rem;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    margin-top: 0.4rem;
    opacity: 0.95;
    text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.2);
}

/* Classic Sentence Cards (Budi SD) */
.sentence-card {
    background: #ffffff;
    border: 3px solid #70a1ff;
    border-radius: 22px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 25px rgba(112, 161, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    width: 100%;
}

.words-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    width: 100%;
}

.word-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: rgba(112, 161, 255, 0.08);
    padding: 0.75rem 1rem;
    border-radius: 16px;
    border: 2px dashed rgba(112, 161, 255, 0.4);
}

.syllables-row {
    display: flex;
    gap: 0.4rem;
}

.syllable-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 1.4rem;
    padding: 0.4rem 0.9rem;
    border: 2px solid #ff4757;
    background: #ff6b81;
    color: #fff;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 0 #ee5253;
    transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.syllable-btn:hover {
    transform: translateY(-2px);
    background: #ff4757;
}

.syllable-btn:active {
    transform: translateY(2px);
    box-shadow: none;
}

.word-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 1.55rem;
    padding: 0.55rem 1.35rem;
    border: 2px solid #0984e3;
    background: linear-gradient(135deg, #1e90ff, #0984e3);
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.45) !important;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 5px 0 #0767b1, 0 8px 16px rgba(30, 144, 255, 0.3);
    transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.word-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #70a1ff, #1e90ff);
    box-shadow: 0 7px 0 #0767b1, 0 12px 20px rgba(30, 144, 255, 0.4);
}

.word-btn:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #0767b1;
}

.sentence-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 1.35rem;
    padding: 0.8rem 1.8rem;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, #2ed573, #10ac84);
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35) !important;
    cursor: pointer;
    box-shadow: 0 6px 0 #218c53, 0 10px 20px rgba(46, 213, 115, 0.35);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.sentence-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 9px 0 #218c53, 0 15px 25px rgba(46, 213, 115, 0.45);
}

.sentence-btn:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #218c53;
}

/* ========================================================
   KLIK PER KATA & INTERACTIVE WORD READING CHIPS
   ======================================================== */
.click-word-guide-banner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #fff3cd, #ffeaa7) !important;
    border: 2px dashed #f39c12 !important;
    border-radius: 50px;
    padding: 0.75rem 1.6rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: #78350f !important;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.2);
    animation: gentlePulseBanner 3s infinite ease-in-out;
    margin: 0 auto;
    text-align: center;
    max-width: 95%;
}

.click-word-guide-banner strong {
    color: #451a03 !important;
}

.interactive-words-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0.4rem 0;
}

.interactive-word-chip {
    font-family: 'Fredoka One', cursive;
    font-size: 1.6rem;
    padding: 0.6rem 1.3rem;
    border-radius: 18px;
    border: 3px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #1e90ff, #0984e3);
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.45) !important;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: all 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 6px 0 #0767b1, 0 8px 18px rgba(30, 144, 255, 0.35);
}

.interactive-word-chip:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 0 rgba(0, 0, 0, 0.2), 0 12px 24px rgba(0, 0, 0, 0.12);
}

.interactive-word-chip:active {
    transform: translateY(3px) scale(0.96);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}

.word-chip-text {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
    font-weight: 900;
}

.word-chip-sound-icon {
    font-size: 0.95rem;
    opacity: 0.95;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

/* Palette Warna Ceria Chip Kata */
.interactive-word-chip.chip-blue {
    background: linear-gradient(135deg, #1e90ff, #0984e3) !important;
    border-color: #74b9ff !important;
    box-shadow: 0 6px 0 #0767b1, 0 8px 18px rgba(30, 144, 255, 0.35) !important;
}
.interactive-word-chip.chip-green {
    background: linear-gradient(135deg, #2ed573, #10ac84) !important;
    border-color: #7bed9f !important;
    box-shadow: 0 6px 0 #1b8a5a, 0 8px 18px rgba(46, 213, 115, 0.35) !important;
}
.interactive-word-chip.chip-orange {
    background: linear-gradient(135deg, #ffa502, #e67e22) !important;
    border-color: #fed330 !important;
    box-shadow: 0 6px 0 #c0392b, 0 8px 18px rgba(255, 165, 2, 0.35) !important;
}
.interactive-word-chip.chip-purple {
    background: linear-gradient(135deg, #9b59b6, #8e44ad) !important;
    border-color: #be2edd !important;
    box-shadow: 0 6px 0 #6c3483, 0 8px 18px rgba(155, 89, 182, 0.35) !important;
}
.interactive-word-chip.chip-red {
    background: linear-gradient(135deg, #ff4757, #ee5253) !important;
    border-color: #ff6b81 !important;
    box-shadow: 0 6px 0 #c0392b, 0 8px 18px rgba(255, 71, 87, 0.35) !important;
}

/* Efek Denyut & Highlight Ketika Kata Diklik (Active Clicked Word) */
.active-clicked-word {
    animation: wordPopGlow 0.85s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    outline: 4px solid #ffd32a !important;
    box-shadow: 0 0 30px #ffd32a, 0 8px 0 #e1b12c !important;
    z-index: 10 !important;
}

@keyframes wordPopGlow {
    0% {
        transform: scale(1);
    }
    35% {
        transform: scale(1.18);
        filter: brightness(1.15);
    }
    70% {
        transform: scale(1.08);
    }
    100% {
        transform: scale(1);
    }
}

/* Tombol Eja Mini untuk Klasik */
.mini-spell-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 0.9rem;
    padding: 0.35rem 0.8rem;
    border: 2px solid #ffa502;
    background: #fed330;
    color: #2f3542;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 3px 0 #e1b12c;
    transition: all 0.15s ease;
    margin-top: 4px;
}

.mini-spell-btn:hover {
    transform: translateY(-2px);
    background: #ffa502;
    color: #fff;
}

.mini-spell-btn:active {
    transform: translateY(2px);
    box-shadow: none;
}

/* Chip Kata pada Teks Dongeng AI & Membaca Cerita */
.story-word-chip {
    font-family: 'Fredoka One', cursive;
    font-size: 1.25rem !important;
    padding: 0.35rem 0.75rem !important;
    margin: 3px 2px !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    color: #2f3542 !important;
    border: 2px solid #dcdde1 !important;
    box-shadow: 0 3px 0 #bdc3c7 !important;
    display: inline-block !important;
    transition: all 0.15s ease !important;
}

.story-word-chip:hover {
    background: #70a1ff !important;
    color: #ffffff !important;
    border-color: #1e90ff !important;
    box-shadow: 0 4px 0 #0984e3 !important;
    transform: translateY(-2px) scale(1.06) !important;
}

/* ========================================================
   KAMUS SUARA 50 BAHASA DUNIA & BILINGUAL FLASHCARDS
   ======================================================== */
.polyglot-modal-content {
    max-width: 900px !important;
    max-height: 88vh;
    overflow-y: auto;
    padding: 1.8rem 1.4rem;
    border-radius: 26px;
    background: #fdfdfd;
}

.polyglot-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    background: linear-gradient(135deg, rgba(112, 161, 255, 0.15), rgba(255, 71, 87, 0.12));
    padding: 1rem 1.4rem;
    border-radius: 20px;
    border: 2px dashed #70a1ff;
    margin-bottom: 1.2rem;
}

.polyglot-big-icon {
    font-size: 4.2rem;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.12));
    animation: gentlePulseBanner 2.5s infinite ease-in-out;
}

.polyglot-title-info h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    color: #2f3542;
    margin: 0;
}

.polyglot-title-info p {
    margin: 0.3rem 0 0 0;
    color: #57606f;
    font-weight: 700;
    font-size: 0.95rem;
}

.polyglot-search-wrap {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    margin-bottom: 1.2rem;
}

.polyglot-search-wrap input {
    flex: 1;
    padding: 0.75rem 1.2rem;
    border-radius: 50px;
    border: 3px solid #dfe4ea;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    outline: none;
    transition: all 0.2s;
}

.polyglot-search-wrap input:focus {
    border-color: #1e90ff;
    box-shadow: 0 0 12px rgba(30, 144, 255, 0.25);
}

.polyglot-count-badge {
    background: #ff4757;
    color: #fff;
    font-family: 'Fredoka One', cursive;
    font-size: 0.95rem;
    padding: 0.6rem 1.1rem;
    border-radius: 50px;
    white-space: nowrap;
    box-shadow: 0 3px 0 #c0392b;
}

.polyglot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 0.9rem;
}

.polyglot-lang-card {
    background: #ffffff;
    border: 2px solid #e4e7eb;
    border-radius: 18px;
    padding: 1rem;
    box-shadow: 0 5px 0 #dfe4ea;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.polyglot-lang-card:hover {
    transform: translateY(-3px) scale(1.02);
    border-color: #1e90ff;
    box-shadow: 0 8px 0 #0984e3, 0 10px 20px rgba(30, 144, 255, 0.15);
}

.polyglot-lang-card:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #dfe4ea;
}

.polyglot-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1f2f6;
    padding-bottom: 0.4rem;
}

.polyglot-flag {
    font-size: 1.8rem;
    line-height: 1;
}

.polyglot-lang-meta {
    text-align: right;
}

.polyglot-lang-name {
    font-family: 'Fredoka One', cursive;
    font-size: 0.95rem;
    color: #2f3542;
}

.polyglot-lang-native {
    font-size: 0.75rem;
    color: #747d8c;
    font-weight: 700;
}

.polyglot-card-body {
    text-align: center;
    padding: 0.4rem 0;
}

.polyglot-target-word {
    font-family: 'Fredoka One', cursive;
    font-size: 1.5rem;
    color: #ff4757;
    line-height: 1.2;
}

.polyglot-target-phonetic {
    font-size: 0.85rem;
    color: #747d8c;
    font-weight: 800;
    margin-top: 0.2rem;
}

.polyglot-card-action {
    display: flex;
    justify-content: center;
}

.polyglot-btn-speak {
    font-family: 'Fredoka One', cursive;
    font-size: 0.88rem;
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, #1e90ff, #0984e3);
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 3px 0 #0767b1;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    justify-content: center;
}

.polyglot-btn-speak:hover {
    filter: brightness(1.1);
}

/* Bilingual Flashcard Styling */
.catalog-bilingual-grid,
.cards-grid:has(.catalog-bilingual-card) {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 1.5rem !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto;
    padding: 0.5rem;
    box-sizing: border-box;
}

@media (max-width: 650px) {
    .catalog-bilingual-grid,
    .cards-grid:has(.catalog-bilingual-card) {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
        gap: 1rem !important;
    }
}

.catalog-bilingual-card {
    background: #ffffff;
    border: 3px solid #e2e8f0;
    border-radius: 26px;
    padding: 1.25rem 1.15rem;
    box-shadow: 0 10px 0 #cbd5e1, 0 16px 30px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    transition: all 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.catalog-bilingual-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 0 #cbd5e1, 0 22px 35px rgba(0,0,0,0.1);
    border-color: #38bdf8;
}

.bilingual-card-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 0.5rem;
    box-sizing: border-box;
}

.bilingual-cat-badge {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    background: #f1f5f9;
    color: #475569;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
}

.bilingual-50lang-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 0.82rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0.35rem 0.85rem;
    cursor: pointer;
    box-shadow: 0 3px 0 #b45309;
    white-space: nowrap;
    transition: all 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.bilingual-50lang-btn:hover {
    transform: scale(1.06);
    filter: brightness(1.08);
}

.bilingual-lang-panel {
    width: 100%;
    box-sizing: border-box;
    border-radius: 18px;
    padding: 0.8rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    align-items: center;
    overflow: hidden;
    min-width: 0;
    transition: all 0.2s;
}

.panel-id {
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.09), rgba(14, 165, 233, 0.04));
    border: 2px solid rgba(14, 165, 233, 0.3);
}

.panel-en {
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.09), rgba(16, 185, 129, 0.04));
    border: 2px solid rgba(16, 185, 129, 0.3);
}

.bilingual-word-title {
    font-family: 'Fredoka One', cursive;
    font-size: clamp(1.2rem, 3.2vw, 1.55rem);
    line-height: 1.15;
    text-align: center;
    width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
    letter-spacing: 0.5px;
}

.bilingual-spelling-line {
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-align: center;
    width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 5px;
    min-height: 32px;
    box-sizing: border-box;
}

.suku-tag, .en-letter-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.22rem 0.55rem;
    border-radius: 9px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    color: #1e293b;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 0 #cbd5e1;
}

.suku-tag:hover, .en-letter-tag:hover {
    transform: translateY(-2px) scale(1.08);
    border-color: #38bdf8;
    box-shadow: 0 4px 8px rgba(56, 189, 248, 0.25);
}

.reading-active-suku {
    background: linear-gradient(135deg, #f59e0b, #ef4444) !important;
    color: #ffffff !important;
    transform: scale(1.25) translateY(-3px) !important;
    box-shadow: 0 6px 14px rgba(239, 68, 68, 0.45) !important;
    border-color: #ffffff !important;
    z-index: 2;
}

.bilingual-btn-row {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
    align-items: center;
    margin-top: 0.25rem;
}

.bilingual-btn-row button {
    font-family: 'Fredoka One', cursive;
    font-size: 0.85rem;
    padding: 0.42rem 0.75rem;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    flex: 1 1 0;
    min-width: 0;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
    transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bilingual-btn-row button:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.bilingual-btn-row button:active {
    transform: translateY(2px);
}

.btn-id-speak {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: white;
    box-shadow: 0 3px 0 #075985;
}

.btn-id-eja {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 3px 0 #b45309;
}

.btn-en-speak {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 3px 0 #047857;
}

.btn-en-spell {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    box-shadow: 0 3px 0 #6d28d9;
}

/* ========================================================
 * EVALUASI GORESAN PINTAR (AI EDGE & GEMINI SWARM)
 * ======================================================== */
.btn-evaluate-ai {
    background: linear-gradient(135deg, #10ac84, #1dd1a1) !important;
    box-shadow: 0 4px 0 #0d8264, 0 0 15px rgba(29, 209, 161, 0.45) !important;
    position: relative;
    overflow: hidden;
    animation: pulseEvaluateBtn 2.2s infinite ease-in-out;
}

.btn-evaluate-ai:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 0 #0d8264, 0 0 25px rgba(29, 209, 161, 0.7) !important;
}

.btn-evaluate-ai:active {
    transform: translateY(3px) scale(0.98);
}

@keyframes pulseEvaluateBtn {
    0%, 100% {
        box-shadow: 0 4px 0 #0d8264, 0 0 10px rgba(29, 209, 161, 0.35);
    }
    50% {
        box-shadow: 0 4px 0 #0d8264, 0 0 24px rgba(29, 209, 161, 0.85);
    }
}

/* Badge Skor Akurasi Dinamis di Celebration Modal */
.celeb-score-badge {
    display: inline-block;
    background: linear-gradient(135deg, #0984e3, #00cec9);
    color: #ffffff;
    font-family: 'Fredoka One', cursive;
    font-size: 1.05rem;
    padding: 0.35rem 1.1rem;
    border-radius: 50px;
    margin: 0.3rem auto 0.5rem auto;
    box-shadow: 0 3px 8px rgba(0, 206, 201, 0.35);
    letter-spacing: 0.5px;
    animation: bounceInBadge 0.5s ease-out;
}

@keyframes bounceInBadge {
    0% { transform: scale(0.3); opacity: 0; }
    70% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); }
}

/* Ulasan Pedagogis Bu Guru AI */
.ai-teacher-box {
    background: #f8f1ff;
    border: 2px solid #dcd0ff;
    border-radius: 16px;
    padding: 0.85rem 1rem;
    margin: 0.6rem 0;
    text-align: left;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.08);
    animation: fadeInDown 0.4s ease-out;
}

.ai-teacher-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.ai-teacher-icon {
    font-size: 1.5rem;
    background: #ffffff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.ai-teacher-name {
    font-family: 'Fredoka One', cursive;
    color: #6c5ce7;
    font-size: 0.95rem;
    flex: 1;
}

.ai-teacher-audio-btn {
    background: #a29bfe;
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.ai-teacher-audio-btn:hover {
    background: #6c5ce7;
    transform: scale(1.15);
}

.ai-teacher-bubble {
    font-size: 0.92rem;
    line-height: 1.45;
    color: #2d3436;
    background: #ffffff;
    padding: 0.6rem 0.8rem;
    border-radius: 12px;
    border-left: 4px solid #6c5ce7;
    font-style: italic;
}

/* Tombol Tanya Bu Guru AI */
.btn-ask-guru-ai {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #ffffff;
    font-family: 'Fredoka One', cursive;
    font-size: 0.95rem;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 0 #574b90, 0 4px 10px rgba(108, 92, 231, 0.3);
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-ask-guru-ai:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #574b90, 0 6px 15px rgba(108, 92, 231, 0.4);
}

.btn-ask-guru-ai:active {
    transform: translateY(2px);
}

/* ========================================================
 * MODUL KLASIK CERIA (HURUF A-Z, ANGKA 1-20, SUKU KATA)
 * ======================================================== */
.classic-subtab-bar {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.25rem;
    width: 100%;
    max-width: 760px;
}

.classic-tab-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 0.95rem;
    padding: 0.55rem 1.15rem;
    border-radius: 50px;
    border: 2px solid #ced6e0;
    background: #ffffff;
    color: #57606f;
    cursor: pointer;
    box-shadow: 0 4px 0 #ced6e0;
    transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.classic-tab-btn:hover {
    transform: translateY(-2px);
    border-color: #70a1ff;
    color: #1e90ff;
}

.classic-tab-btn.active {
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: #ffffff;
    border-color: #ff4757;
    box-shadow: 0 4px 0 #c0392b;
}

.classic-grid-container {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    gap: 1.2rem !important;
    width: 100% !important;
    max-width: 820px !important;
    padding: 0.5rem !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
}

.classic-card {
    border-radius: 22px;
    padding: 1.25rem 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 3px solid rgba(255, 255, 255, 0.7);
    color: #ffffff;
    min-height: 135px;
    box-sizing: border-box;
    position: relative;
    user-select: none;
    transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.classic-card:hover {
    transform: translateY(-6px) scale(1.04);
    filter: brightness(1.12);
}

.classic-card:active {
    transform: translateY(4px) scale(0.98);
}

.classic-card-text {
    font-family: 'Fredoka One', cursive;
    font-size: 3.2rem;
    line-height: 1.05;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
    margin-bottom: 0.25rem;
}

.classic-card-subtext {
    font-size: 0.85rem;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.22);
    padding: 0.22rem 0.75rem;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ========================================================
 * KARTU MEMBACA KALIMAT BUDI & KELUARGA (BERJENJANG LEVEL)
 * ======================================================== */
.level-selector-strip {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    margin-bottom: 1rem;
}

.level-tab-chip {
    font-family: 'Fredoka One', cursive;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 2px solid #dfe4ea;
    background: #ffffff;
    color: #57606f;
    cursor: pointer;
    box-shadow: 0 3px 0 #ced6e0;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.level-tab-chip:hover {
    transform: translateY(-2px);
    border-color: #1e90ff;
}

.level-tab-chip.active {
    background: linear-gradient(135deg, #1e90ff, #00cec9);
    color: #ffffff;
    border-color: #1e90ff;
    box-shadow: 0 4px 0 #0984e3;
}

.sentence-card {
    background: linear-gradient(180deg, #ffffff 0%, #f0f7ff 100%) !important;
    border-radius: 26px !important;
    padding: 1.6rem 1.4rem !important;
    border: 3.5px solid #1e90ff !important;
    box-shadow: 0 10px 0 #0984e3, 0 16px 35px rgba(30, 144, 255, 0.2) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 1.25rem !important;
    width: 100% !important;
    max-width: 740px !important;
    box-sizing: border-box !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease !important;
}

.sentence-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 14px 0 #0984e3, 0 22px 40px rgba(30, 144, 255, 0.3) !important;
}

.words-container {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1.2rem !important;
    justify-content: center !important;
    align-items: flex-end !important;
    width: 100% !important;
}

.word-block {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.55rem !important;
    background: linear-gradient(180deg, #ffffff 0%, #eef5ff 100%) !important;
    padding: 0.85rem 1.15rem !important;
    border-radius: 22px !important;
    border: 2.5px solid #70a1ff !important;
    box-shadow: 0 5px 0 #3867d6, 0 8px 15px rgba(56, 103, 214, 0.12) !important;
    transition: all 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.word-block:hover {
    transform: translateY(-3px) scale(1.03) !important;
    background: #e3f2fd !important;
    border-color: #0984e3 !important;
    box-shadow: 0 8px 0 #0984e3, 0 12px 20px rgba(9, 132, 227, 0.2) !important;
}

.syllables-row {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.syllable-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 1.45rem;
    padding: 0.35rem 0.75rem;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #ffa502, #ff7f50);
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 3px 0 #d35400;
    transition: all 0.12s;
}

.syllable-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.syllable-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #d35400;
}

.mini-spell-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 0.8rem;
    background: #2ed573;
    color: white;
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 2px 0 #218c53;
    transition: all 0.12s;
    margin-top: 0.2rem;
}

.mini-spell-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.action-buttons-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    margin-top: 0.3rem;
}

.sentence-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 1.05rem;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.65rem 1.4rem;
    cursor: pointer;
    box-shadow: 0 4px 0 #574b90;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
}

.sentence-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
}

.sentence-btn:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #574b90;
}

/* ========================================================
 * BENTENG PERLINDUNGAN ANAK (CHILD SAFETY SHIELD ALERT)
 * ======================================================== */
.safety-warning-card {
    background: #fff0f0;
    border: 2px solid #ff7675;
    border-radius: 18px;
    padding: 1.1rem 1.3rem;
    text-align: left;
    margin: 0.8rem 0;
    box-shadow: 0 6px 15px rgba(235, 77, 75, 0.12);
    animation: shakeAlert 0.4s ease-in-out;
}

@keyframes shakeAlert {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.safety-warning-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.safety-warning-title {
    font-family: 'Fredoka One', cursive;
    color: #d63031;
    font-size: 1.15rem;
}

.safety-warning-body {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #2d3436;
    background: #ffffff;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border-left: 4px solid #d63031;
}

/* Tab Filter Perangkat pada Leaderboard */
.device-filter-pill {
    background: #f1f2f6;
    border: 2px solid #ced6e0;
    border-radius: 50px;
    padding: 0.4rem 1rem;
    font-family: 'Fredoka One', cursive;
    font-size: 0.85rem;
    color: #2d3436;
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 800;
}

.device-filter-pill.active {
    background: #1e90ff;
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
    border-color: #0984e3;
    box-shadow: 0 3px 0 #0984e3;
}

/* ========================================================
   HIGH CONTRAST ENHANCEMENTS (ANTI-HILANG & ANTI-PUTIH PUDAR)
   ======================================================== */
.classic-card-text {
    color: #ffffff !important;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.75) !important;
}

.classic-card-subtext {
    color: #ffffff !important;
    background: rgba(0, 0, 0, 0.38) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
}

.level-tab-chip {
    color: #2d3436 !important;
    font-weight: 800 !important;
    background: #ffffff !important;
    border: 2px solid #b2bec3 !important;
}

.level-tab-chip.active {
    background: linear-gradient(135deg, #0984e3, #1e90ff) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45) !important;
    border-color: #0767b1 !important;
    box-shadow: 0 4px 0 #0767b1 !important;
}

.syllable-btn {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
}

.mini-spell-btn {
    background: #10ac84 !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4) !important;
    box-shadow: 0 3px 0 #0e7d60 !important;
}

/* ========================================================
   MODE LAYAR PENUH 100% (NATIVE APK EXPERIENCE)
   Semua perangkat (HP Android, iPhone iOS, Tablet, & PC)
   ======================================================== */
.fullscreen-toggle-btn {
    background: linear-gradient(135deg, #00b894, #00cec9) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    border: none !important;
    border-radius: 50px !important;
    box-shadow: 0 4px 0 #008f72 !important;
    font-weight: 900 !important;
    letter-spacing: 0.3px;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.fullscreen-toggle-btn:hover {
    transform: translateY(-2px) scale(1.04) !important;
    box-shadow: 0 6px 0 #008f72, 0 8px 16px rgba(0, 184, 148, 0.3) !important;
}

.fullscreen-toggle-btn:active {
    transform: translateY(2px) scale(0.98) !important;
    box-shadow: 0 1px 0 #008f72 !important;
}

.fullscreen-toggle-btn.is-active-fs {
    background: linear-gradient(135deg, #e17055, #d63031) !important;
    box-shadow: 0 4px 0 #b71540 !important;
}

/* Saat Mode Fullscreen Aktif: Layar Penuh 100% Tanpa Frame */
body.is-fullscreen {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    touch-action: manipulation !important;
}

body.is-fullscreen .app-container {
    width: 100% !important;
    max-width: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    padding-top: env(safe-area-inset-top, 0px) !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    padding-left: env(safe-area-inset-left, 0px) !important;
    padding-right: env(safe-area-inset-right, 0px) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    touch-action: manipulation !important;
}

body.is-fullscreen .main-header {
    flex: 0 0 auto !important;
    border-radius: 0 !important;
    padding: 0.35rem 0.6rem !important;
}

body.is-fullscreen .category-tabs,
body.is-fullscreen .header-actions {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pinch-zoom !important;
    overscroll-behavior-x: contain !important;
}

body.is-fullscreen .content-wrapper {
    flex: 1 1 0% !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y pinch-zoom !important;
    padding: 0.5rem 0.5rem !important;
}

body.is-fullscreen.in-submodule .content-wrapper {
    flex: 1 1 0% !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
}

body.is-fullscreen .app-footer {
    flex: 0 0 auto !important;
    padding: 0.25rem 0.5rem !important;
    font-size: 0.7rem !important;
}

body.is-fullscreen .pwa-install-banner {
    display: none !important;
}

/* Landscape Mode di HP (Ketinggian Layar Terbatas) */
@media (max-height: 500px) {
    .title-container {
        display: none !important;
    }
    .app-footer {
        display: none !important;
    }
    .main-header {
        padding: 0.2rem 0.5rem 0.15rem !important;
    }
    .header-top-bar {
        margin-bottom: 0.1rem !important;
        flex-wrap: nowrap !important;
    }
    .header-actions {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-x pinch-zoom !important;
        overscroll-behavior-x: contain !important;
        gap: 0.25rem !important;
        scrollbar-width: none !important;
    }
    .header-actions::-webkit-scrollbar {
        display: none !important;
    }
    .ctrl-btn {
        padding: 0.25rem 0.45rem !important;
        font-size: 0.72rem !important;
        flex-shrink: 0 !important;
    }
    .category-tabs {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-x pinch-zoom !important;
        overscroll-behavior-x: contain !important;
        gap: 0.28rem !important;
        padding: 2px 2px 4px !important;
        margin-top: 0.1rem !important;
        scrollbar-width: none !important;
    }
    .category-tabs::-webkit-scrollbar {
        display: none !important;
    }
    .cat-tab {
        flex: 0 0 auto !important;
        height: 32px !important;
        padding: 0.25rem 0.55rem !important;
        font-size: 0.76rem !important;
    }
}

/* ========================================================
   15. GAME PESAWAT TERBANG KATA (SKY PILOT VOYAGER)
   ======================================================== */
.sky-stage-container {
    width: 100%;
    max-width: 950px;
    background: linear-gradient(180deg, #2980b9 0%, #6dd5fa 50%, #ffffff 100%);
    border: 4px solid #0984e3;
    border-radius: 28px;
    box-shadow: 0 12px 0 #0767b1, 0 16px 35px rgba(0,0,0,0.15);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 0.5rem auto;
}

.sky-hud-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    padding: 0.8rem 1.2rem;
    border-bottom: 3px solid #dfe4ea;
    gap: 0.8rem;
    flex-wrap: wrap;
    z-index: 20;
}

.sky-pilot-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Fredoka One', cursive;
    font-size: 1.05rem;
    color: #2f3542;
    background: #f1f2f6;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
}

.sky-target-box {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: white;
    padding: 0.4rem 1.1rem;
    border-radius: 50px;
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    box-shadow: 0 3px 0 #c0392b;
    animation: gentlePulseBanner 2s infinite ease-in-out;
}

.sky-score-badge {
    background: #ffa502;
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-family: 'Fredoka One', cursive;
    font-size: 1rem;
    box-shadow: 0 3px 0 #d35400;
}

.sky-flight-arena {
    height: 360px;
    position: relative;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    background: transparent;
}

.sky-parallax-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
}

.sky-bg-cloud {
    position: absolute;
    color: rgba(255, 255, 255, 0.65);
    font-size: 4rem;
    pointer-events: none;
    animation: floatBgCloud linear infinite;
}

@keyframes floatBgCloud {
    from { transform: translateX(950px); }
    to { transform: translateX(-150px); }
}

.sky-airplane-craft {
    position: absolute;
    width: 90px;
    height: 60px;
    left: 45px;
    top: 140px;
    z-index: 15;
    transition: top 0.12s ease-out, transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 8px 12px rgba(0,0,0,0.22));
    cursor: grab;
}

.sky-airplane-craft.barrel-roll {
    animation: planeBarrelRoll 0.75s ease-in-out;
}

@keyframes planeBarrelRoll {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.25); }
    100% { transform: rotate(360deg) scale(1); }
}

.sky-cloud-target {
    position: absolute;
    background: #ffffff;
    border: 3px solid #70a1ff;
    border-radius: 50px;
    padding: 0.6rem 1.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 0 #5352ed, 0 10px 20px rgba(0,0,0,0.12);
    cursor: pointer;
    font-family: 'Fredoka One', cursive;
    font-size: 1.6rem;
    color: #2f3542;
    z-index: 10;
    transition: transform 0.15s, border-color 0.15s;
    user-select: none;
}

.sky-cloud-target:hover {
    transform: scale(1.08);
    border-color: #ff4757;
}

.sky-cloud-target.correct-hit {
    animation: cloudPopExplode 0.5s forwards;
}

@keyframes cloudPopExplode {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5) rotate(15deg); opacity: 0.8; filter: brightness(1.5); }
    100% { transform: scale(2) rotate(30deg); opacity: 0; }
}

.sky-controls-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.95);
    border-top: 3px solid #dfe4ea;
    flex-wrap: wrap;
    z-index: 20;
}

.sky-ctrl-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    padding: 0.65rem 1.4rem;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    transition: all 0.15s;
    user-select: none;
}

.sky-btn-up {
    background: #1e90ff;
    box-shadow: 0 4px 0 #0767b1;
}

.sky-btn-down {
    background: #ff4757;
    box-shadow: 0 4px 0 #c0392b;
}

.sky-btn-turbo {
    background: #ffa502;
    box-shadow: 0 4px 0 #d35400;
}

.sky-ctrl-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.sky-ctrl-btn:active {
    transform: translateY(2px);
    box-shadow: none;
}

.sky-mission-tracker {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 0.4rem 1rem;
    background: rgba(241, 242, 246, 0.9);
    border-top: 1px solid #dfe4ea;
    flex-wrap: wrap;
}

.sky-slot-pill {
    padding: 0.35rem 0.8rem;
    border-radius: 12px;
    background: #dfe4ea;
    color: #747d8c;
    font-family: 'Fredoka One', cursive;
    font-size: 1rem;
    border: 2px dashed #a4b0be;
    transition: all 0.25s;
}

.sky-slot-pill.filled {
    background: #2ed573;
    color: white;
    border-color: #26af5f;
    border-style: solid;
    box-shadow: 0 3px 0 #1e824c;
    transform: scale(1.08);
}

/* ========================================================
   16. GAME DINOSAURUS PURBA (JURASSIC WORLD & FOSSIL DIG)
   ======================================================== */
.dino-stage-container {
    width: 100%;
    max-width: 1050px;
    background: #ffffff;
    border: 4px solid #10ac84;
    border-radius: 28px;
    box-shadow: 0 12px 0 #0d8264, 0 16px 35px rgba(0,0,0,0.12);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 0.5rem auto;
}

.dino-hero-header {
    width: 100%;
    height: 220px;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 1.2rem;
}

.dino-hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.75) 100%);
}

.dino-hero-caption {
    position: relative;
    z-index: 5;
    color: #ffffff;
}

.dino-hero-caption h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.9rem;
    margin: 0;
    text-shadow: 0 3px 8px rgba(0,0,0,0.6);
}

.dino-hero-caption p {
    font-size: 0.95rem;
    margin: 0.3rem 0 0 0;
    font-weight: 800;
    color: #e0f2fe;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.dino-tabs-row {
    display: flex;
    background: #f8fafc;
    border-bottom: 3px solid #e2e8f0;
    padding: 0.6rem 1rem;
    gap: 0.6rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.dino-tab-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 0.95rem;
    padding: 0.55rem 1.1rem;
    border: 2px solid #cbd5e1;
    border-radius: 50px;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.dino-tab-btn.active {
    background: linear-gradient(135deg, #10ac84, #1dd1a1);
    color: #ffffff;
    border-color: #0d8264;
    box-shadow: 0 3px 0 #0d8264;
}

/* Tab 1: Ensiklopedia Grid */
.dino-encyclopedia-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1.4rem;
    padding: 1.2rem;
    background: #f8fafc;
}

.dino-card {
    background: #ffffff;
    border: 3px solid #e2e8f0;
    border-radius: 22px;
    padding: 1.2rem;
    box-shadow: 0 8px 0 #cbd5e1, 0 12px 24px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.dino-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 0 #cbd5e1, 0 18px 30px rgba(0,0,0,0.12);
}

.dino-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    color: white;
}

.dino-badge-carnivore {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.dino-badge-herbivore {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.dino-card-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.35rem;
    color: #1e293b;
    margin: 0.2rem 0 0 0;
}

.dino-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 0.5rem 0.7rem;
    font-size: 0.78rem;
    color: #475569;
    font-weight: 700;
}

.dino-fact-text {
    font-size: 0.85rem;
    color: #334155;
    line-height: 1.4;
    background: rgba(255, 234, 167, 0.3);
    padding: 0.5rem 0.7rem;
    border-radius: 12px;
    border-left: 3px solid #f39c12;
}

.dino-action-row {
    display: flex;
    gap: 0.45rem;
    margin-top: auto;
}

.dino-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 0.82rem;
    padding: 0.45rem 0.7rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: white;
    transition: all 0.15s;
}

.dino-btn-roar {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 3px 0 #962d22;
}

.dino-btn-spell {
    background: linear-gradient(135deg, #3498db, #2980b9);
    box-shadow: 0 3px 0 #1f618d;
}

/* Tab 2: Fossil Dig Sandbox */
.fossil-dig-area {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    background: #fdf6e2;
}

.fossil-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    width: 100%;
    max-width: 550px;
}

.fossil-pit-card {
    height: 130px;
    border-radius: 20px;
    background: #e2c99f;
    border: 3px solid #c7a76c;
    box-shadow: inset 0 4px 8px rgba(0,0,0,0.15), 0 5px 0 #b08d51;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.18s;
}

.fossil-pit-card:hover {
    transform: scale(1.03);
}

.fossil-pit-card.uncovered {
    background: #ffffff;
    border-color: #2ed573;
    box-shadow: 0 6px 0 #218c53, 0 10px 20px rgba(46, 213, 115, 0.2);
}

/* Tab 3: Dino Run Canvas Stage */
.dino-run-stage {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    background: #f0fdf4;
}

.dino-run-canvas-box {
    width: 100%;
    max-width: 750px;
    height: 280px;
    border-radius: 20px;
    border: 3px solid #10ac84;
    overflow: hidden;
    position: relative;
    background: linear-gradient(180deg, #70a1ff 0%, #a4b0be 70%, #2ed573 70%, #1e824c 100%);
    box-shadow: 0 8px 0 #0d8264;
}

.dino-run-btn-jump {
    font-family: 'Fredoka One', cursive;
    font-size: 1.4rem;
    padding: 0.8rem 2.8rem;
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, #10ac84, #2ecc71);
    color: white;
    cursor: pointer;
    box-shadow: 0 6px 0 #0d8264, 0 10px 25px rgba(16, 172, 132, 0.4);
    transition: all 0.15s;
    user-select: none;
}

.dino-run-btn-jump:hover {
    transform: translateY(-3px) scale(1.05);
}

.dino-run-btn-jump:active {
    transform: translateY(3px) scale(0.97);
    box-shadow: 0 2px 0 #0d8264;
}


/* ========================================================
   15. TAMPILAN KARTU BACA CERIA & TEMA WARNA DINAMIS
   ======================================================== */
.sentence-interactive-card {
    background: linear-gradient(180deg, #ffffff 0%, #f0f7ff 100%) !important;
    border: 3.5px solid #70a1ff !important;
    border-radius: 24px !important;
    box-shadow: 0 8px 0 #54a0ff, 0 14px 28px rgba(84, 160, 255, 0.22) !important;
    padding: 1.35rem 1.15rem !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sentence-interactive-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 11px 0 #54a0ff, 0 18px 32px rgba(84, 160, 255, 0.26) !important;
}



/* ========================================================
   PAGINATION NAVIGATION BAR (SULTAN LEVEL UI)
   ======================================================== */
.kalimat-page-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 720px;
    padding: 0.75rem 1.15rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 248, 255, 0.96));
    border: 3px solid #70a1ff;
    border-radius: 22px;
    box-shadow: 0 7px 0 #3867d6, 0 12px 28px rgba(56, 103, 214, 0.16);
    margin: 0.65rem 0;
    box-sizing: border-box;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.page-nav-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 1.05rem;
    padding: 0.55rem 1.35rem;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #1e90ff, #0984e3);
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 5px 0 #0767b1, 0 6px 14px rgba(9, 132, 227, 0.25);
    transition: all 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.page-nav-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 7px 0 #0767b1, 0 10px 20px rgba(9, 132, 227, 0.35);
    filter: brightness(1.08);
}

.page-nav-btn:active:not(:disabled) {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #0767b1;
}

.page-nav-btn:disabled,
.page-nav-btn.disabled {
    background: #cbd5e1 !important;
    color: #94a3b8 !important;
    box-shadow: 0 3px 0 #94a3b8 !important;
    cursor: not-allowed !important;
    transform: none !important;
    opacity: 0.65;
}

.page-nav-info {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: 0.95rem;
    color: #1e3799;
    background: rgba(30, 144, 255, 0.1);
    padding: 0.45rem 0.95rem;
    border-radius: 14px;
    border: 1.5px solid rgba(30, 144, 255, 0.28);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-align: center;
}

/* Responsive Mobile Navigation */
@media (max-width: 580px) {
    .kalimat-page-nav {
        padding: 0.5rem 0.65rem;
        gap: 0.35rem;
    }
    .page-nav-btn {
        font-size: 0.88rem;
        padding: 0.45rem 0.8rem;
    }
    .page-nav-info {
        font-size: 0.8rem;
        padding: 0.3rem 0.55rem;
    }
    .full-word-action-btn.spell-btn,
    .full-word-action-btn.instant-btn {
        font-size: 0.92rem !important;
        padding: 8px 14px !important;
        width: 100% !important;
        justify-content: center !important;
    }
}

/* ========================================================
   IQRO JILID 1: ISLAMIC SULTAN & CLASSIC BOOK STYLING
   ======================================================== */
.iqro-main-container {
    width: 100%;
    max-width: 780px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.3rem;
}

.iqro-header-banner {
    width: 100%;
    background: linear-gradient(135deg, #05c46b 0%, #0be881 50%, #05c46b 100%);
    border-radius: 24px;
    padding: 1.15rem 1.4rem;
    box-shadow: 0 8px 0 #048a4b, 0 14px 28px rgba(5, 196, 107, 0.28);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 3.5px solid #ffffff;
    box-sizing: border-box;
}

.iqro-emblem-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.iqro-dome-icon {
    font-size: 2.8rem;
    background: #ffffff;
    border-radius: 20px;
    padding: 0.3rem 0.6rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.iqro-title-texts {
    display: flex;
    flex-direction: column;
}

.iqro-title-main {
    font-family: 'Fredoka One', cursive;
    font-size: 1.6rem;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.iqro-title-sub {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 0.92rem;
    color: #f1f2f6;
    margin: 0.2rem 0 0 0;
}

/* Iqro Mode Switcher Tabs */
.iqro-mode-toggle-group {
    display: flex;
    gap: 0.6rem;
    background: rgba(0, 0, 0, 0.18);
    padding: 0.35rem;
    border-radius: 16px;
    width: 100%;
    box-sizing: border-box;
}

.iqro-mode-btn {
    flex: 1;
    font-family: 'Fredoka One', cursive;
    font-size: 0.95rem;
    padding: 0.65rem 0.8rem;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
}

.iqro-mode-btn.active {
    background: #ffffff;
    color: #05c46b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    transform: scale(1.02);
}

.iqro-page-info-box {
    width: 100%;
    background: #ffffff;
    border: 2.5px solid #2ed573;
    border-radius: 18px;
    padding: 0.85rem 1.25rem;
    box-shadow: 0 5px 0 #20bf6b;
    box-sizing: border-box;
}

.iqro-info-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.2rem;
    color: #2ed573;
    margin-bottom: 0.3rem;
}

.iqro-info-desc {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: #57606f;
}

/* --- TAMPILAN BUKU IQRO ASLI (KH. AS'AD HUMAM) --- */
.iqro-classic-book {
    width: 100%;
    background: #fdfaf2;
    border: 5px solid #16a085;
    border-radius: 26px;
    padding: 1.4rem;
    box-shadow: 0 10px 0 #0e6655, 0 18px 35px rgba(22, 160, 133, 0.2);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.iqro-guide-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 0.88rem;
    color: #0e6655;
    background: #e8f8f5;
    padding: 0.6rem 1rem;
    border-radius: 12px;
    border: 1.5px dashed #1abc9c;
    text-align: center;
}

.iqro-rows-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    width: 100%;
}

.iqro-classic-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: #ffffff;
    border: 3px solid #16a085;
    border-radius: 18px;
    padding: 0.6rem 0.8rem;
    box-shadow: 0 4px 0 #138d75;
    transition: all 0.2s ease;
}

.iqro-row-play-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 0.85rem;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    box-shadow: 0 3px 0 #d35400;
    white-space: nowrap;
    transition: transform 0.15s;
    flex-shrink: 0;
}

.iqro-row-play-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.iqro-cells-container {
    display: flex;
    flex-direction: row-reverse; /* RTL Order (Kanan ke Kiri) */
    justify-content: space-around;
    align-items: center;
    flex: 1;
    gap: 0.5rem;
}

.iqro-classic-cell {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 2.5px solid #27ae60;
    border-radius: 14px;
    padding: 0.5rem 0.3rem;
    cursor: pointer;
    box-shadow: 0 4px 0 #1e8449;
    transition: all 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.iqro-classic-cell:hover {
    transform: translateY(-3px) scale(1.04);
    border-color: #f1c40f;
    box-shadow: 0 7px 0 #d4ac0d;
    background: #fef9e7;
}

.iqro-classic-cell:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #1e8449;
}

.iqro-arabic-char {
    font-family: 'Amiri', 'Traditional Arabic', 'Scheherazade', 'Segoe UI', 'Noto Naskh Arabic', 'Tahoma', 'Arial', sans-serif;
    font-size: 2.9rem;
    font-weight: 700;
    color: #1a5276;
    line-height: 1.25;
    direction: rtl;
    unicode-bidi: isolate;
}

.iqro-latin-hint {
    font-family: 'Fredoka One', cursive;
    font-size: 0.82rem;
    color: #e67e22;
    margin-top: -0.1rem;
}

/* Highlight Karaoke saat Memutar Baris */
.active-iqro-karaoke {
    background: #f9e79f !important;
    border-color: #f39c12 !important;
    box-shadow: 0 0 25px rgba(243, 156, 18, 0.8), 0 5px 0 #d35400 !important;
    transform: scale(1.08) !important;
    z-index: 5;
}

/* --- TAMPILAN MODE CERIA EJA BERJEDA --- */
.iqro-interactive-grid {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    width: 100%;
}

.iqro-interactive-card {
    background: #ffffff;
    border: 3.5px solid #05c46b;
    border-radius: 24px;
    padding: 1.2rem 1.4rem;
    box-shadow: 0 8px 0 #048a4b, 0 14px 28px rgba(5, 196, 107, 0.18);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    box-sizing: border-box;
}

.iqro-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.iqro-card-badge {
    font-family: 'Fredoka One', cursive;
    font-size: 0.92rem;
    background: #e8f8f5;
    color: #16a085;
    padding: 0.3rem 0.75rem;
    border-radius: 12px;
    border: 1.5px solid #1abc9c;
}

.iqro-card-full-ar {
    font-family: 'Amiri', 'Traditional Arabic', 'Scheherazade', 'Segoe UI', 'Noto Naskh Arabic', 'Tahoma', 'Arial', sans-serif;
    font-size: 2.6rem;
    font-weight: 700;
    color: #2c3e50;
    direction: rtl;
    unicode-bidi: isolate;
}

.iqro-card-full-latin {
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    color: #e67e22;
}

.iqro-segments-box {
    display: flex;
    flex-direction: row-reverse; /* RTL Order */
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.iqro-letter-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.3rem;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.iqro-letter-chip:hover {
    transform: translateY(-3px) scale(1.05);
}

.iqro-letter-chip:active {
    transform: translateY(3px);
}

.iqro-chip-green {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    box-shadow: 0 5px 0 #1e8449, 0 8px 16px rgba(39, 174, 96, 0.3);
}
.iqro-chip-gold {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    box-shadow: 0 5px 0 #d68910, 0 8px 16px rgba(243, 156, 18, 0.3);
}
.iqro-chip-cyan {
    background: linear-gradient(135deg, #1abc9c, #16a085);
    box-shadow: 0 5px 0 #117a65, 0 8px 16px rgba(22, 160, 133, 0.3);
}
.iqro-chip-purple {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    box-shadow: 0 5px 0 #76448a, 0 8px 16px rgba(142, 68, 173, 0.3);
}

.chip-ar {
    font-family: 'Amiri', 'Traditional Arabic', 'Scheherazade', 'Segoe UI', 'Noto Naskh Arabic', 'Tahoma', 'Arial', sans-serif;
    font-size: 2.8rem;
    color: #ffffff;
    font-weight: 700;
    line-height: 1.1;
    direction: rtl;
    unicode-bidi: isolate;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.chip-latin {
    font-family: 'Fredoka One', cursive;
    font-size: 1rem;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    margin-top: 0.1rem;
}

.iqro-spell-btn {
    background: linear-gradient(135deg, #10ac84, #1dd1a1) !important;
    box-shadow: 0 5px 0 #0d8566 !important;
}

.iqro-direct-btn {
    background: linear-gradient(135deg, #0984e3, #74b9ff) !important;
    box-shadow: 0 5px 0 #0767b1 !important;
}

/* Responsif Mobile Iqro Super Halus & Sultan */
.iqro-classic-cell {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

@media (max-width: 600px) {
    .iqro-classic-book {
        padding: 0.85rem 0.5rem;
    }
    .iqro-classic-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    .iqro-row-play-btn {
        width: 100%;
        text-align: center;
        padding: 0.55rem;
        font-size: 0.95rem;
    }
    .iqro-cells-container {
        gap: 0.4rem;
        width: 100%;
    }
    .iqro-classic-cell {
        padding: 0.4rem 0.2rem;
    }
    .iqro-arabic-char {
        font-size: 2.3rem;
    }
    .iqro-latin-hint {
        font-size: 0.85rem;
    }
    .chip-ar {
        font-size: 2.2rem;
    }
    .iqro-letter-chip {
        padding: 0.45rem 0.85rem;
    }
    .iqro-mode-toggle-group {
        flex-direction: column;
    }
}

@media (max-width: 400px) {
    .iqro-arabic-char {
        font-size: 1.95rem;
    }
    .iqro-classic-cell {
        padding: 0.35rem 0.15rem;
        border-radius: 10px;
    }
    .iqro-cells-container {
        gap: 0.25rem;
    }
    .chip-ar {
        font-size: 1.9rem;
    }
    .iqro-letter-chip {
        padding: 0.35rem 0.65rem;
    }
}

/* ========================================================
   VOICE SELECTOR MODAL (5 KARAKTER SUARA WANITA & PRIA)
   ======================================================== */
#voice-modal {
    display: none;
    align-items: center;
    justify-content: center;
}

.voice-modal-content {
    max-width: 660px !important;
    width: 92% !important;
    padding: 1.5rem !important;
    border-radius: 28px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3) !important;
    border: 4px solid #fff !important;
    background: #ffffff !important;
    position: relative !important;
    max-height: 88vh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.voice-modal-header {
    flex-shrink: 0;
    padding-bottom: 0.8rem;
    border-bottom: 2px dashed #f1f2f6;
    margin-bottom: 0.8rem;
    text-align: center;
}

.voice-modal-header h2 {
    font-family: 'Fredoka One', cursive;
    color: #2f3542;
    font-size: 1.45rem;
    margin: 0 0 0.3rem;
}

.voice-modal-header p {
    font-size: 0.88rem;
    color: #747d8c;
    font-weight: 700;
    margin: 0;
}

.voice-engine-switch-box {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 0.6rem 0.85rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.engine-mode-title {
    font-family: 'Fredoka One', cursive;
    font-size: 0.88rem;
    color: #2f3542;
}

.engine-toggle-group {
    display: flex;
    gap: 0.4rem;
}

.engine-toggle-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    border: 2px solid #dfe4ea;
    border-radius: 12px;
    background: white;
    color: #57606f;
    cursor: pointer;
    transition: all 0.2s;
}

.engine-toggle-btn.active {
    background: linear-gradient(135deg, #10ac84, #00b894);
    color: white;
    border-color: #10ac84;
    box-shadow: 0 3px 10px rgba(16, 172, 132, 0.35);
}

/* Voice Filter Tabs (Semua 10 • 5 Wanita • 5 Pria) */
.voice-filter-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.voice-filter-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 0.85rem;
    padding: 0.42rem 0.95rem;
    border: 2px solid #dfe4ea;
    border-radius: 14px;
    background: #f8f9fa;
    color: #57606f;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.voice-filter-btn:hover {
    transform: translateY(-2px);
    border-color: #a4b0be;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.voice-filter-btn.active {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    border-color: #6c5ce7;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.35);
}

.voice-characters-grid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    overflow-y: auto;
    padding-right: 0.3rem;
    max-height: 52vh;
}

.voice-character-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 2.5px solid #dfe4ea;
    border-radius: 20px;
    padding: 0.75rem 1rem;
    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.03);
}

.voice-character-card:hover {
    transform: translateY(-2px);
    border-color: #a4b0be;
    box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.voice-character-card.active {
    border-color: #2ed573;
    background: #f0fff4;
    box-shadow: 0 6px 16px rgba(46, 213, 115, 0.25);
}

.voice-char-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.voice-char-avatar {
    font-size: 2.2rem;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f2f6;
    flex-shrink: 0;
}

.voice-char-info {
    text-align: left;
}

.voice-char-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.voice-char-name {
    font-family: 'Fredoka One', cursive;
    font-size: 1.05rem;
    color: #2f3542;
}

.voice-gender-badge {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gender-female {
    background: #ffeaa7;
    color: #d63031;
}

.gender-male {
    background: #dff9fb;
    color: #0984e3;
}

.gender-robot {
    background: #e8daef;
    color: #8e44ad;
}

.voice-char-desc {
    font-size: 0.82rem;
    color: #747d8c;
    margin-top: 2px;
    font-weight: 700;
}

.voice-char-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.voice-test-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 0.82rem;
    padding: 0.45rem 0.85rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #0984e3, #74b9ff);
    color: white;
    cursor: pointer;
    box-shadow: 0 3px 0 #0767b1;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s;
}

.voice-test-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.voice-select-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #ced6e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: transparent;
    transition: all 0.2s;
}

.voice-character-card.active .voice-select-badge {
    background: #2ed573;
    border-color: #2ed573;
    color: white;
}

.voice-modal-footer {
    flex-shrink: 0;
    padding-top: 0.8rem;
    border-top: 2px dashed #f1f2f6;
    margin-top: 0.8rem;
    text-align: center;
}

.voice-highlight-btn {
    background: linear-gradient(135deg, #e84393, #fd79a8) !important;
    color: #fff !important;
    box-shadow: 0 3px 0 #d63031 !important;
}

/* ========================================================
   MODUL MATEMATIKA CERIA: PENJUMLAHAN SATUAN-PULUHAN & PERKALIAN 1-10
   ======================================================== */
.math-main-container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0.6rem 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeInTab 0.3s ease-out;
}

/* Tab Bar Level Matematika */
.math-subtab-bar {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem;
    border-radius: 20px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    border: 2px solid #e9ecef;
}

.math-tab-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 0.92rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    background: #f1f2f6;
    color: #57606f;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 3px 0 #dcdde1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.math-tab-btn:hover {
    transform: translateY(-2px);
    background: #e4e7eb;
}

.math-tab-btn.active {
    background: linear-gradient(135deg, #0984e3, #74b9ff);
    color: white;
    box-shadow: 0 4px 12px rgba(9, 132, 227, 0.35);
    transform: translateY(-2px);
}

/* Kartu Penjumlahan */
.math-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.math-add-card {
    background: #ffffff;
    border: 3px solid #dfe4ea;
    border-radius: 22px;
    padding: 1.1rem;
    box-shadow: 0 6px 16px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.math-add-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: #0984e3;
    box-shadow: 0 10px 24px rgba(9, 132, 227, 0.18);
}

.math-equation-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    padding: 0.5rem 0.8rem;
    border-radius: 14px;
    border: 2px dashed #ced6e0;
}

.math-equation-text {
    font-family: 'Fredoka One', cursive;
    font-size: 1.7rem;
    color: #2f3542;
    letter-spacing: 1px;
}

.math-result-highlight {
    color: #2ed573;
    background: #e8f8f5;
    padding: 0.15rem 0.6rem;
    border-radius: 10px;
    border: 2px solid #2ed573;
}

.math-visual-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    background: #fef9e7;
    border: 2px solid #f9e79f;
    border-radius: 14px;
    padding: 0.6rem 0.4rem;
    font-size: 1.5rem;
}

.math-visual-item {
    display: inline-block;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.15));
    transition: transform 0.15s;
    user-select: none;
}

.math-visual-item:hover {
    transform: scale(1.3) rotate(10deg);
}

.math-audio-play-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.2rem;
}

.math-speak-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 0.82rem;
    padding: 0.4rem 0.85rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #10ac84, #00b894);
    color: white;
    cursor: pointer;
    box-shadow: 0 3px 0 #0d8566;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s;
}

.math-speak-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.math-level-tag {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    text-transform: uppercase;
    background: #dfe4ea;
    color: #57606f;
}

/* TABEL PERKALIAN DASAR 1 - 10 */
.mult-number-selector {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding: 4px 2px 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    justify-content: center;
    flex-wrap: wrap;
}

.mult-number-selector::-webkit-scrollbar {
    display: none;
}

.mult-num-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    min-width: 58px;
    height: 48px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    background: #f1f2f6;
    color: #2f3542;
    box-shadow: 0 3px 0 #ced6e0;
    transition: all 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
}

.mult-num-btn:hover {
    transform: translateY(-2px);
    background: #e4e7eb;
}

.mult-num-btn.active {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.4);
    transform: translateY(-2px) scale(1.05);
}

.mult-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.85rem;
}

.mult-item-card {
    background: #ffffff;
    border: 3px solid #dfe4ea;
    border-radius: 18px;
    padding: 0.85rem 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mult-item-card:hover {
    transform: translateY(-3px);
    border-color: #6c5ce7;
    box-shadow: 0 8px 20px rgba(108, 92, 231, 0.18);
}

.mult-equation-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mult-eq-text {
    font-family: 'Fredoka One', cursive;
    font-size: 1.55rem;
    color: #2f3542;
}

.mult-res-badge {
    font-family: 'Fredoka One', cursive;
    font-size: 1.45rem;
    color: #6c5ce7;
    background: #f3f0ff;
    padding: 0.15rem 0.65rem;
    border-radius: 12px;
    border: 2px solid #a29bfe;
}

.mult-concept-hint {
    font-size: 0.82rem;
    color: #747d8c;
    font-weight: 700;
    background: #f8f9fa;
    padding: 0.35rem 0.6rem;
    border-radius: 10px;
    border-left: 3px solid #6c5ce7;
}

/* ARENA KUIS MATEMATIKA CERIA */
.math-quiz-container {
    background: #ffffff;
    border: 3.5px solid #fff;
    border-radius: 28px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    position: relative;
}

.math-quiz-question-box {
    background: linear-gradient(135deg, #0984e3, #6c5ce7);
    color: white;
    border-radius: 24px;
    padding: 1.5rem 2rem;
    box-shadow: 0 8px 24px rgba(9, 132, 227, 0.35);
    width: 90%;
    max-width: 500px;
}

.math-quiz-q-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.math-quiz-q-math {
    font-family: 'Fredoka One', cursive;
    font-size: 3rem;
    letter-spacing: 2px;
    text-shadow: 0 3px 6px rgba(0,0,0,0.25);
}

.math-quiz-choices-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    width: 100%;
    max-width: 480px;
}

.math-quiz-choice-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 2rem;
    padding: 1rem 0.5rem;
    border: 3.5px solid #dfe4ea;
    border-radius: 20px;
    background: #ffffff;
    color: #2f3542;
    cursor: pointer;
    box-shadow: 0 6px 0 #ced6e0;
    transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.math-quiz-choice-btn:hover {
    transform: translateY(-3px);
    border-color: #0984e3;
    background: #f0f8ff;
}

.math-quiz-choice-btn:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #ced6e0;
}

.math-quiz-score-pill {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(253, 203, 110, 0.5);
    border-radius: 50px;
    padding: 0.35rem 1.2rem;
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    color: #d35400;
}

/* Responsif Mobile & Tablet untuk Matematika */
@media (max-width: 600px) {
    .math-cards-grid,
    .mult-cards-grid {
        grid-template-columns: 1fr !important;
        gap: 0.65rem !important;
    }

    .math-equation-text {
        font-size: 1.4rem !important;
    }

    .mult-eq-text {
        font-size: 1.35rem !important;
    }

    .mult-res-badge {
        font-size: 1.25rem !important;
    }

    .math-quiz-q-math {
        font-size: 2.2rem !important;
    }

    .math-quiz-choice-btn {
        font-size: 1.6rem !important;
        padding: 0.75rem 0.3rem !important;
    }

    .mult-num-btn {
        min-width: 48px !important;
        height: 42px !important;
        font-size: 0.95rem !important;
    }
}

/* Download & Install Modal Sultan Styles */
.install-app-btn {
    box-shadow: 0 4px 14px rgba(46, 213, 115, 0.45);
    transition: all 0.25s ease;
}

.install-app-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 213, 115, 0.65);
}

.download-modal-content {
    animation: zoomInModal 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes zoomInModal {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.download-tab-btn {
    transition: all 0.2s ease;
}

.download-tab-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

/* Floating PWA Pin & Install Banner (Like YouTube/Spotify) */
.pwa-install-banner {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 640px;
    background: rgba(47, 53, 66, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 0.75rem 1.1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    z-index: 99998;
    animation: slideUpBanner 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUpBanner {
    from { transform: translate(-50%, 100px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.pwa-banner-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.pwa-banner-icon {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    flex-shrink: 0;
}

.pwa-banner-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pwa-banner-title {
    font-family: 'Fredoka One', cursive;
    color: #fff;
    font-size: 1.05rem;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-banner-sub {
    font-family: 'Nunito', sans-serif;
    color: #ced6e0;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.pwa-btn-pin {
    background: linear-gradient(135deg, #2ed573 0%, #10ac84 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 0.55rem 1.1rem;
    font-family: 'Fredoka One', cursive;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(46, 213, 115, 0.4);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.pwa-btn-pin:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 16px rgba(46, 213, 115, 0.6);
}

.pwa-btn-close {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.pwa-btn-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 580px) {
    .pwa-install-banner {
        bottom: 12px;
        width: 95%;
        padding: 0.65rem 0.85rem;
    }
    .pwa-banner-icon {
        font-size: 1.6rem;
    }
    .pwa-banner-title {
        font-size: 0.92rem;
    }
    .pwa-banner-sub {
        font-size: 0.72rem;
    }
    .pwa-btn-pin {
        font-size: 0.85rem;
        padding: 0.5rem 0.85rem;
    }
}

/* ========================================================
   16. TOUCH SWIPE GESTURE & TRANSITION ANIMATIONS (V58)
   ======================================================== */
@keyframes swipeInFromRight {
    0% { opacity: 0.25; transform: translateX(38px) scale(0.98); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes swipeInFromLeft {
    0% { opacity: 0.25; transform: translateX(-38px) scale(0.98); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

.swipe-next-anim {
    animation: swipeInFromRight 0.28s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}

.swipe-prev-anim {
    animation: swipeInFromLeft 0.28s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}

/* Floating Swipe Gesture Toast Indicator */
.swipe-feedback-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    background: rgba(30, 39, 46, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    font-family: 'Fredoka One', cursive;
    font-size: 1.05rem;
    padding: 0.6rem 1.3rem;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.38), 0 0 15px rgba(255, 234, 167, 0.35);
    border: 2px solid rgba(255, 255, 255, 0.35);
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.swipe-feedback-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}




