/* ==========================================================================
   WIRA Islamic Quiz - Design System & Modern UI
   ========================================================================== */

:root {
    --bg-dark: #070B14;
    --bg-surface: #0B1120;
    --sidebar-bg: #080C16;
    --text-primary: #FFFFFF;
    --text-secondary: #8E9BAE;
    --text-muted: #64748B;
    --gold: #F5BA31;
    --gold-glow: rgba(245, 186, 49, 0.35);
    
    /* Category Colors */
    --cat-quran: #059669;
    --cat-nabi: #2563EB;
    --cat-sirah: #D97706;
    --cat-akhlak: #7C3AED;
    --cat-ibadah: #E11D48;

    --font-main: 'Outfit', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Master App Container */
.app-wrapper {
    width: 100vw;
    min-height: 100vh;
    display: flex;
    background-color: var(--bg-dark);
    position: relative;
}

/* ==========================================================================
   Sidebar Navigation
   ========================================================================== */
.app-sidebar {
    width: 250px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    padding: 28px 20px;
    z-index: 10;
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding-left: 8px;
    text-decoration: none;
    cursor: pointer;
}

.brand-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(5, 150, 105, 0.3));
    transition: transform 0.3s ease;
}

.brand-header:hover .brand-icon {
    transform: rotate(-6deg) scale(1.08);
}

.brand-text-wrap {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.5px;
    line-height: 1.1;
    color: #FFFFFF;
}

.brand-subtitle {
    font-size: 15px;
    font-weight: 600;
    color: var(--gold);
    line-height: 1.2;
}

/* Sidebar Nav Menu */
.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-nav-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    border-radius: 9999px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    text-align: left;
}

.sidebar-nav-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.sidebar-nav-btn:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(3px);
}

.sidebar-nav-btn:hover svg {
    transform: scale(1.12);
}

/* Active Nav State - Capsule as seen in image */
.sidebar-nav-btn.active {
    background: #1C2434;
    border-color: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.sidebar-nav-btn.active svg {
    color: #FFFFFF;
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px 30px;
    overflow-y: auto;
    position: relative;
    max-width: 1450px;
}

/* View Section Switching */
.app-view {
    display: none;
    flex-direction: column;
    gap: 20px;
    animation: fadeInView 0.3s ease-out forwards;
}

.app-view.active {
    display: flex;
}

@keyframes fadeInView {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Hero Banner Section (Clean Artwork + Vector HTML Typography)
   ========================================================================== */
.hero-card {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 520px;
    min-height: 380px;
    border-radius: 28px;
    overflow: hidden;
    background: #0B1120 url('../assets/extracted/hero_redesign_v1.png') no-repeat right center;
    background-size: cover;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* Atmospheric subtle gradient mask over left half to ensure text readability */
.hero-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, 
        rgba(8, 14, 28, 0.92) 0%, 
        rgba(8, 14, 28, 0.78) 35%, 
        rgba(8, 14, 28, 0.35) 55%, 
        rgba(8, 14, 28, 0.05) 75%, 
        transparent 100%);
    pointer-events: none;
    z-index: 1;
}

/* Left Content: Typography & Action Button */
.hero-content-left {
    position: relative;
    z-index: 3;
    padding: 0 0 0 48px;
    max-width: 540px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-tagline {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #94A3B8;
    margin-bottom: 12px;
}

.hero-title {
    font-size: clamp(26px, 3.8vw, 46px);
    font-weight: 900;
    line-height: 1.15;
    color: #FFFFFF;
    margin-bottom: 12px;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.hero-title-highlight {
    color: #FBBF24;
    text-shadow: 0 0 24px rgba(251, 191, 36, 0.45);
}

.hero-subtitle {
    font-size: clamp(13px, 1.3vw, 15px);
    color: #E2E8F0;
    line-height: 1.55;
    margin-bottom: 24px;
    max-width: 440px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Interactive Button for "Mula Quiz" */
.hero-mula-overlay-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 13px 32px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #F6C138 0%, #EDB024 100%);
    border: none;
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    color: #121826;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(245, 186, 49, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.5);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 5;
    outline: none;
}

.hero-mula-overlay-btn svg {
    width: 18px;
    height: 18px;
    fill: #121826;
}

.hero-mula-overlay-btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 10px 28px rgba(245, 186, 49, 0.65), 0 0 20px rgba(245, 186, 49, 0.5);
    filter: brightness(1.05);
}

.hero-mula-overlay-btn:active {
    transform: scale(0.98);
}

/* Floating animation pulse ring on hero button */
.hero-mula-overlay-btn::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 9999px;
    border: 2px solid var(--gold);
    opacity: 0.6;
    animation: pulseRing 2s infinite cubic-bezier(0.24, 0, 0.38, 1);
    pointer-events: none;
}

@keyframes pulseRing {
    0% {
        transform: scale(0.96);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.08);
        opacity: 0;
    }
    100% {
        transform: scale(0.96);
        opacity: 0.8;
    }
}

/* Top Right Badges (Live interactive badges over hero) */
.hero-top-badges {
    position: absolute;
    top: 24px;
    right: 32px;
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 5;
}

.hero-badge-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(14, 21, 37, 0.8);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 6px 16px 6px 10px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.hero-badge-pill:hover {
    background: rgba(20, 30, 52, 0.95);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.hero-badge-pill.badge-mata .badge-icon-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.hero-badge-pill.badge-profile .badge-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.badge-text-box {
    display: flex;
    flex-direction: column;
}

.badge-lbl {
    font-size: 11px;
    font-weight: 500;
    color: #94A3B8;
    line-height: 1.1;
}

.badge-num {
    font-size: 15px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.2;
}

/* ==========================================================================
   Category Cards Grid (Exact as image)
   ========================================================================== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    width: 100%;
}

.category-card-item {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    background: #0B1120;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.category-card-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Card Hover Lift & Colorful Glows */
.category-card-item:hover {
    transform: translateY(-8px) scale(1.025);
}

.category-card-item:hover .category-card-img {
    transform: scale(1.03);
}

/* Unique color ambient glow per card */
.category-card-item[data-cat="quran"]:hover {
    box-shadow: 0 16px 36px -4px rgba(5, 150, 105, 0.5), 0 0 12px rgba(5, 150, 105, 0.3);
    border-color: rgba(5, 150, 105, 0.4);
}

.category-card-item[data-cat="nabi"]:hover {
    box-shadow: 0 16px 36px -4px rgba(37, 99, 235, 0.5), 0 0 12px rgba(37, 99, 235, 0.3);
    border-color: rgba(37, 99, 235, 0.4);
}

.category-card-item[data-cat="sirah"]:hover {
    box-shadow: 0 16px 36px -4px rgba(217, 119, 6, 0.5), 0 0 12px rgba(217, 119, 6, 0.3);
    border-color: rgba(217, 119, 6, 0.4);
}

.category-card-item[data-cat="akhlak"]:hover {
    box-shadow: 0 16px 36px -4px rgba(124, 58, 237, 0.5), 0 0 12px rgba(124, 58, 237, 0.3);
    border-color: rgba(124, 58, 237, 0.4);
}

.category-card-item[data-cat="ibadah"]:hover {
    box-shadow: 0 16px 36px -4px rgba(225, 29, 72, 0.5), 0 0 12px rgba(225, 29, 72, 0.3);
    border-color: rgba(225, 29, 72, 0.4);
}

.category-card-item:active {
    transform: translateY(-2px) scale(0.99);
}

/* ==========================================================================
   Quiz Play Modal Screen
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(3, 6, 14, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.modal-backdrop.active {
    display: flex;
    opacity: 1;
}

.quiz-dialog-box {
    background: #0E1626;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    width: 100%;
    max-width: 680px;
    padding: 32px 36px;
    position: relative;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(245, 186, 49, 0.1);
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(24px) scale(0.96);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-close-x {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #94A3B8;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close-x:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #FFFFFF;
    transform: rotate(90deg);
}

/* Modal Top Bar */
.modal-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-right: 40px;
}

.modal-badge {
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.modal-badge.theme-green { background: rgba(5, 150, 105, 0.2); color: #34D399; border: 1px solid rgba(5, 150, 105, 0.3); }
.modal-badge.theme-blue  { background: rgba(37, 99, 235, 0.2); color: #60A5FA; border: 1px solid rgba(37, 99, 235, 0.3); }
.modal-badge.theme-orange{ background: rgba(217, 119, 6, 0.2); color: #FBBF24; border: 1px solid rgba(217, 119, 6, 0.3); }
.modal-badge.theme-purple{ background: rgba(124, 58, 237, 0.2); color: #A78BFA; border: 1px solid rgba(124, 58, 237, 0.3); }
.modal-badge.theme-red   { background: rgba(225, 29, 72, 0.2); color: #FB7185; border: 1px solid rgba(225, 29, 72, 0.3); }
.modal-badge.theme-gold  { background: rgba(245, 186, 49, 0.2); color: #FCD34D; border: 1px solid rgba(245, 186, 49, 0.3); }

.modal-q-tracker {
    font-size: 14px;
    font-weight: 600;
    color: #94A3B8;
}

/* Timer Bar */
.timer-wrapper {
    margin-bottom: 24px;
}

.timer-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #94A3B8;
    margin-bottom: 6px;
    font-weight: 600;
}

.timer-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    overflow: hidden;
}

.timer-fill-bar {
    height: 100%;
    width: 100%;
    background: #10B981;
    border-radius: 9999px;
    transition: width 1s linear, background-color 0.3s ease;
}

/* Question Content */
.question-heading {
    font-size: 21px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.45;
    margin-bottom: 26px;
}

/* Options Grid */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.quiz-option-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    color: #FFFFFF;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.quiz-option-btn .opt-letter {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #94A3B8;
    flex-shrink: 0;
    transition: all 0.2s;
}

.quiz-option-btn .opt-text {
    flex: 1;
}

.quiz-option-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

.quiz-option-btn:hover:not(:disabled) .opt-letter {
    background: var(--gold);
    color: #000;
}

/* Option Feedback States */
.quiz-option-btn.correct {
    background: rgba(16, 185, 129, 0.2) !important;
    border-color: #10B981 !important;
    color: #34D399;
}
.quiz-option-btn.correct .opt-letter {
    background: #10B981;
    color: #FFFFFF;
}

.quiz-option-btn.wrong {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: #EF4444 !important;
    color: #F87171;
    animation: shakeWrong 0.35s ease;
}
.quiz-option-btn.wrong .opt-letter {
    background: #EF4444;
    color: #FFFFFF;
}

@keyframes shakeWrong {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* Fact Box */
.fact-note-box {
    display: none;
    align-items: flex-start;
    gap: 12px;
    background: rgba(245, 186, 49, 0.1);
    border: 1px solid rgba(245, 186, 49, 0.3);
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 20px;
    animation: fadeInView 0.3s ease;
}

.fact-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.fact-body {
    font-size: 14px;
    color: #FEEBC8;
    line-height: 1.5;
}

/* Next / Continue Button */
.modal-action-row {
    display: flex;
    justify-content: flex-end;
}

.modal-next-btn {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 13px 28px;
    background: linear-gradient(135deg, #F5BA31, #E5A817);
    color: #0E1626;
    border: none;
    border-radius: 9999px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(245, 186, 49, 0.4);
    transition: all 0.2s ease;
}

.modal-next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245, 186, 49, 0.6);
}

/* Result Screen in Modal */
.quiz-result-view {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px 0;
}

.result-star-row {
    font-size: 42px;
    margin-bottom: 16px;
    display: flex;
    gap: 8px;
}

.star.filled {
    color: var(--gold);
    text-shadow: 0 0 16px rgba(245, 186, 49, 0.6);
    animation: bounceStar 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.star.empty {
    color: rgba(255, 255, 255, 0.15);
}

@keyframes bounceStar {
    0% { transform: scale(0.4); opacity: 0; }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.result-heading {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #FFFFFF;
}

.result-subhead {
    font-size: 16px;
    color: #94A3B8;
    margin-bottom: 24px;
}

.result-points-pill {
    background: rgba(245, 186, 49, 0.15);
    border: 1px solid var(--gold);
    color: var(--gold);
    font-size: 26px;
    font-weight: 800;
    padding: 10px 32px;
    border-radius: 9999px;
    margin-bottom: 32px;
    box-shadow: 0 0 24px rgba(245, 186, 49, 0.25);
}

.result-buttons-row {
    display: flex;
    gap: 14px;
}

.btn-secondary {
    padding: 13px 24px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
}

.btn-primary-gold {
    padding: 13px 28px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #F5BA31, #E5A817);
    border: none;
    color: #0E1626;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 6px 18px rgba(245, 186, 49, 0.35);
    transition: all 0.2s;
}

.btn-primary-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245, 186, 49, 0.55);
}

/* ==========================================================================
   Alternative Views (Quiz, Kategori, Pencapaian, Profil, Tetapan)
   ========================================================================== */
.view-header {
    margin-bottom: 20px;
}

.view-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 6px;
}

.view-desc {
    color: var(--text-secondary);
    font-size: 15px;
}

.cards-container-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.info-card {
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 24px;
    transition: all 0.25s ease;
}

.info-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

/* Profile Specific */
.profile-card-full {
    display: flex;
    align-items: center;
    gap: 24px;
    background: #0E1626;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 28px;
    margin-bottom: 24px;
}

.profile-avatar-lg {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid var(--gold);
    object-fit: cover;
    box-shadow: 0 0 20px rgba(245, 186, 49, 0.4);
}

.stats-grid-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.stat-metric-box {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 18px;
    text-align: center;
}

.stat-metric-val {
    font-size: 24px;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 4px;
}

.stat-metric-lbl {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Toast Notification */
.app-toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: #1E293B;
    border: 1px solid var(--gold);
    color: #FFFFFF;
    padding: 14px 24px;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 16px var(--gold-glow);
    z-index: 99999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.app-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 1200px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .app-wrapper {
        flex-direction: column;
    }
    .app-sidebar {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
    }
    .brand-header {
        margin-bottom: 0;
    }
    .sidebar-menu {
        flex-direction: row;
        gap: 6px;
        overflow-x: auto;
    }
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Dynamic Badge Cards in Pencapaian */
.badge-item-card {
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

.badge-item-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.badge-item-card.unlocked {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
    border-color: rgba(52, 211, 153, 0.3);
}

.badge-item-card.locked {
    opacity: 0.75;
}

.badge-status-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 14px;
    font-size: 12px;
    font-weight: 700;
}

.badge-status-tag.unlocked {
    color: #34D399;
}

.badge-status-tag.locked {
    color: var(--gold);
}

.badge-progress-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    overflow: hidden;
    margin-top: 10px;
}

.badge-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #F5BA31, #FBBF24);
    border-radius: 9999px;
    transition: width 0.5s ease;
}

.switch-child-quick-btn {
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.switch-child-quick-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(245, 186, 49, 0.3);
}

@media (max-width: 768px) {
    .hero-card {
        min-height: 420px;
    }
    .hero-content-left {
        padding: 0 20px;
        max-width: 100%;
    }
    .hero-top-badges {
        top: 16px;
        right: 16px;
        gap: 8px;
    }
    .hero-badge-pill {
        padding: 4px 10px;
    }
}
