:root {
  --primary-color: #ffb300;
  --secondary-color: #4dd5fa;
  --accent-color: #ff60a8;
  --tertiary-color: #44d07b;
  --success-color: #71e060;
  --warning-color: #ffd43b;
  --error-color: #fa5e5b;
  --text-primary: #233872;
  --text-secondary: #338d94;
  --bg-primary: linear-gradient(128deg, #ffd644 0%, #ffe29f 60%, #ffa751 100%);
  --bg-card: linear-gradient(130deg, rgba(255,255,255,0.99) 0%, rgba(255,255,220,0.94) 100%);
  --shadow-light: 0 6px 16px #ffb30029;
  --shadow-medium: 0 12px 24px #4dd5fa3b;
  --shadow-heavy: 0 24px 56px #ff60a81a;
  --border-radius: 28px;
  --transition: all 0.35s cubic-bezier(0.34, 1.3, 0.26, 0.96);
}

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@700&family=Baloo+2:wght@700&display=swap');

body {
    background: linear-gradient(128deg, rgba(255,214,68,0.8) 0%, rgba(255,226,159,0.8) 60%, rgba(255,167,81,0.8) 100%), url('/media/misc/bg.png') no-repeat center center;
    background-size: cover;
    color: var(--text-primary);
    font-family: 'Fredoka', 'Baloo 2', Arial, sans-serif;
    margin: 0;
    min-height: 100vh;
    overflow: auto; /* Allow scrolling by default */
    user-select: none;
    text-align: center;
    position: relative;
    touch-action: manipulation !important; /* Prevent double-tap zoom globally */
}
body::after {
  content: '';
  pointer-events: none;
  position: fixed;
  z-index: 0;
  inset: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="18" cy="28" r="3.5" fill="rgba(255,176,0,0.10)"/><circle cx="70" cy="80" r="2.3" fill="rgba(77,213,250,0.10)"/><circle cx="50" cy="14" r="3" fill="rgba(255,96,168,0.09)"/><circle cx="88" cy="42" r="2.7" fill="rgba(68,208,123,0.10)"/></svg>');
  animation: grainAnim 2s infinite linear alternate;
}
@keyframes grainAnim {
  0% {background-position: 0 0;}
  100% {background-position: 30px 40px;}
}

/* Disable grain animation on low-end devices */
@media (prefers-reduced-motion: reduce), (max-resolution: 1dppx) {
  body::after {
    animation: none;
  }
}

/* POP ANIMATION (only on non-container, non-gameframe elements) */
@keyframes popin {
  0% { opacity: 0; transform: translateY(60px);}
  60% { opacity: 1; transform: translateY(-5px);}
  100% { opacity: 1; transform: translateY(0);}
}

/* --- Text & UI elements that can (safely) pop in --- */
.game-link, .back-button, .level-loading {
  font-family: 'Fredoka', Arial, sans-serif;
  font-weight: 700;
  text-shadow: 0 2px 16px #fff9, 0 1px 1px #ffd43b77, 0 0 2px #23387233;
  letter-spacing: 0.02em;
  animation: popin 0.8s cubic-bezier(0.21,1.16,0.34,0.98) backwards;
}

.logo-top {
    display: block;
    margin: 20px auto 0 auto;
    max-width: 50%;
    height: auto;
    z-index: 1;
    position: relative;
}
.logo-bottom {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 150px;
    height: auto;
    z-index: 1000;
}
.mascot {
    position: fixed;
    z-index: 10;
    pointer-events: none;
}

/* Modernized UI Buttons */
.music-btn {
    background: white;
    border: none;
    border-radius: 12px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border: 2px solid rgba(77, 213, 250, 0.3);
}

.music-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(77, 213, 250, 0.2);
}

.music-btn.muted {
    background: #f1f5f9;
    filter: grayscale(1);
    opacity: 0.7;
    box-shadow: none;
}

.sticker-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sticker-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

/* Reduced size mascots for a cleaner look */
.mascot1 {
    bottom: 30px;
    left: 30px;
    max-width: 80px;
    height: auto;
    animation: mascotFloat 3s ease-in-out infinite;
}
.mascot2 {
    top: 80px;
    right: 30px;
    max-width: 80px;
    height: auto;
    animation: mascotFloat 4s ease-in-out infinite reverse;
}
.mascot3 {
    top: 120px;
    left: 30px;
    max-width: 60px;
    height: auto;
    animation: mascotFloat 3.5s ease-in-out infinite;
}

/* Mascot Bubble Styles */
.mascot-bubble {
    position: fixed;
    bottom: 110px;
    left: 60px;
    background: white;
    padding: 12px 20px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 9;
    max-width: 200px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    border: 3px solid var(--secondary-color);
}

.mascot-bubble.show {
    opacity: 1;
    transform: translateY(0);
}

.mascot-bubble-arrow {
    position: absolute;
    bottom: -15px;
    left: 30px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 15px solid var(--secondary-color);
}

.mascot-bubble-arrow::after {
    content: '';
    position: absolute;
    top: -18px;
    left: -7px;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 12px solid white;
}

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

/* Refined Progress Bar */
.progress-stats {
    max-width: 500px;
    margin: 0 auto 30px auto;
    padding: 0 20px;
}

.progress-container {
    position: relative;
    width: 100%;
    height: 14px; /* Slimmer, more modern */
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A, #CDDC39);
    border-radius: 10px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Shine effect for progress bar */
.progress-bar::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.3) 50%,
        rgba(255,255,255,0) 100%
    );
    animation: barShine 3s infinite;
}

@keyframes barShine {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

.progress-text {
    display: block;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* Modernized Game Grid and Cards */
.game-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(150px, 25vw, 200px), 1fr));
    gap: 24px;
    margin-top: 20px;
    padding: 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.game-card {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    padding: 16px;
    border-radius: 24px;
    text-align: center;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 10px 15px -3px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--primary-color);
}

.game-card img {
    width: 100%;
    border-radius: 16px;
    height: 140px;
    object-fit: cover;
    margin-bottom: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.game-link {
    background: transparent;
    color: var(--text-primary) !important;
    font-weight: 800;
    font-size: 1.1rem;
    padding: 10px;
    margin-top: 0;
    box-shadow: none;
    text-transform: none;
}

.game-card:hover .game-link {
    color: var(--primary-color) !important;
}


.game-frame {
  width: 100vw !important;
  height: 100vh !important;
  border: none;
  display: none;
  position: fixed;
  top: 0; left: 0;
  z-index: 9999;
  background: #fff;
}
.game-frame.active {
  display: block;
}

/* Sticker Book Styles */
.sticker-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: #f1f5f9;
    color: #64748b;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    z-index: 10;
}

.close-btn:hover {
    background: #ef4444;
    color: white;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

.sticker-content {
    background: white;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    border-radius: 32px; /* Increased radius */
    padding: 40px 30px; /* More padding */
    position: relative;
    overflow-y: auto;
    text-align: center;
    border: 5px solid var(--primary-color);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.sticker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 90px));
    gap: 12px;
    margin-top: 20px;
    justify-content: center;
}

.sticker-item {
    width: 90px;
    height: 90px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 2px dashed #e2e8f0;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.sticker-item.unlocked {
    background: white;
    border: 2px solid #8b5cf6;
}

.sticker-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%) brightness(0.5);
    opacity: 0.15;
}

.sticker-item.unlocked img {
    filter: none;
    opacity: 1;
}

.sticker-progress {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Sleeker Unlock Toast */
.unlock-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 20px;
    display: none;
    align-items: center;
    gap: 16px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border: 1px solid rgba(255, 255, 255, 0.5);
    z-index: 10002;
    animation: slideInUp 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.unlock-toast.show {
    display: flex;
}

.unlock-toast img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.unlock-toast-content h4 {
    margin: 0;
    color: #6366f1;
    font-size: 0.95rem;
    font-weight: 800;
}

.unlock-toast-content p {
    margin: 0;
    font-size: 0.8rem;
    color: #64748b;
}

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

/* Split Corner Header Widgets */

.top-nav {

    position: fixed;

    top: 12px;

    left: 12px;

    right: 12px;

    display: flex;

    justify-content: space-between;

    pointer-events: none; /* Let clicks pass through center */

    z-index: 1000;

}



.nav-widget {

    pointer-events: auto; /* Re-enable clicks for widgets */

    background: rgba(255, 255, 255, 0.6);

    backdrop-filter: blur(10px);

    -webkit-backdrop-filter: blur(10px);

    padding: 6px 12px;

    border-radius: 100px;

    display: flex;

    align-items: center;

    gap: 8px;

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);

    border: 1px solid rgba(255, 255, 255, 0.3);

    transition: var(--transition);

}



.nav-widget:hover {

    background: rgba(255, 255, 255, 0.95);

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);

}



/* Specific Widget Styles */

.rank-stats {

    padding-left: 6px;

}



.header-actions {

    padding-right: 6px;

}



.star-badge {
    background: white;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 900;
    color: #f59e0b;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 4px;
}

.avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: contain;
    background: #f8f9fa;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-greeting {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-primary);
    padding: 0 8px;
    border-right: 1px solid rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.avatar-item {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    cursor: pointer;
    border: 4px solid transparent;
    transition: all 0.2s;
    background: #f8f9fa;
    object-fit: contain;
    padding: 5px;
    box-sizing: border-box;
}

.avatar-item:hover {
    transform: scale(1.1);
}

.avatar-item.selected {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 179, 0, 0.3);
}

.mascot {
    position: fixed;
    z-index: 10;
    pointer-events: none;
    object-fit: contain;
}

/* Compact Components */

.level-container {

    display: flex;

    align-items: center;

    gap: 6px;

    background: white;

    padding: 3px 10px 3px 3px;

    border-radius: 100px;

    box-shadow: 0 2px 4px rgba(0,0,0,0.02);

}



.xp-mini-container {

    width: 45px;

    height: 6px;

    background: #f1f5f9;

    border-radius: 3px;

    overflow: hidden;

}



.xp-mini-bar {

    height: 100%;

    background: linear-gradient(90deg, #6366f1, #818cf8);

    transition: width 0.5s ease;

}



.streak-badge {

    background: white;

    padding: 4px 10px;

    border-radius: 100px;

    font-size: 0.8rem;

    font-weight: 900;

    color: var(--text-primary);

}



.icon-btn, .menu-trigger {

    background: white;

    border: none;

    border-radius: 50%;

    width: 32px;

    height: 32px;

    display: flex;

    align-items: center;

    justify-content: center;

    cursor: pointer;

    font-size: 16px;

    transition: var(--transition);

    box-shadow: 0 2px 4px rgba(0,0,0,0.05);

}



.menu-trigger {

    background: var(--text-primary);

    color: white;

}



/* Mobile Optimizations */

@media (max-width: 768px) {

    .top-nav { top: 8px; left: 8px; right: 8px; }

    .nav-widget { padding: 4px 8px; gap: 6px; }

    .user-greeting { display: none; } /* Hide name on mobile to save space */

    .xp-mini-container { width: 30px; }

    .streak-badge { padding: 2px 8px; font-size: 0.7rem; }

    .icon-btn, .menu-trigger { width: 28px; height: 28px; font-size: 14px; }

    .logo-top { max-width: 70%; margin: 40px auto 20px auto; } /* Give room for widgets */

}



@media (max-width: 480px) {

    .rank-stats { max-width: 120px; }

    .header-actions { max-width: 120px; }

    .level-container span { display: none; } /* Shrink further if needed */

}





.dropdown-menu {

    position: absolute;

    top: 50px;

    right: 0;

    background: white;

    min-width: 180px;

    border-radius: 16px;

    padding: 12px;

    box-shadow: 0 15px 35px rgba(0,0,0,0.15);

    display: none;

    flex-direction: column;

    gap: 8px;

    border: 1px solid #f1f5f9;

    z-index: 1001;

    animation: menuAppear 0.3s cubic-bezier(0.23, 1, 0.32, 1);

}



@keyframes menuAppear {

    from { transform: translateY(10px); opacity: 0; }

    to { transform: translateY(0); opacity: 1; }

}



.dropdown-menu.show {

    display: flex;

}



.menu-section {

    padding: 4px 8px;

}



.menu-label {

    font-size: 0.7rem;

    font-weight: 800;

    color: var(--text-muted);

    text-transform: uppercase;

    margin-bottom: 8px;

}



.menu-item {

    padding: 10px 12px;

    border-radius: 10px;

    font-size: 0.9rem;

    font-weight: 700;

    color: var(--text-primary);

    text-decoration: none;

    transition: all 0.2s;

    display: flex;

    align-items: center;

    gap: 10px;

    background: none;

    border: none;

    width: 100%;

    text-align: left;

    cursor: pointer;

}



.menu-item:hover {

    background: #f8fafc;

    color: var(--primary-color);

}



.logout-link {

    color: #ef4444;

}



.logout-link:hover {

    background: #fef2f2;

    color: #dc2626;

}



.menu-divider {

    height: 1px;

    background: #f1f5f9;

    margin: 4px 0;

}



/* Hide Greeting on Mobile */

@media (max-width: 600px) {

    .user-greeting { display: none; }

    .user-info { padding: 6px 10px; width: 98%; }

    .xp-mini-container { width: 40px; }

}





/* Refined Progress Bar - Higher Contrast */

.progress-stats {

    max-width: 450px;

    margin: 0 auto 25px auto;

    padding: 0 20px;

}



.progress-container {

    position: relative;

    width: 100%;

    height: 20px; /* Slightly taller for text fit */

    background: #e2e8f0; /* Darker track for contrast */

    border-radius: 10px;

    overflow: hidden;

    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);

    border: 2px solid white;

}



.progress-bar {

    height: 100%;

    background: linear-gradient(90deg, #4CAF50, #8BC34A);

    border-radius: 10px;

    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);

}



.progress-text {



    display: inline-block;



    margin-top: 12px;



    font-size: 1.1rem;



    color: var(--text-primary);



    font-weight: 900;



    letter-spacing: 1.5px;



    text-transform: uppercase;



    background: white;



    padding: 4px 16px;



    border-radius: 20px;



    box-shadow: 0 4px 10px rgba(0,0,0,0.05);



}







/* Global Back Button - Fixed Bottom Left */

.back-button {

    position: fixed;

    bottom: 25px;

    left: 25px;

    padding: 12px 24px;

    font-size: 1.1rem;

    background: var(--primary-color);

    color: white;

    border-radius: 50px;

    z-index: 10000;

    box-shadow: 0 8px 20px rgba(255, 179, 0, 0.4);

    outline: none;

    border: 3px solid white;

    cursor: pointer;

    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    font-weight: 900;

    display: flex;

    align-items: center;

    gap: 8px;

}



.back-button:hover {

    transform: translateY(-5px) scale(1.05);

    background: #ffa000;

    box-shadow: 0 12px 25px rgba(255, 179, 0, 0.5);

}









/* Modernized Quiz Styles */









.quiz-card {









    background: white;









    border-radius: 32px;









    padding: clamp(20px, 5vw, 40px);









    width: 100%;









    max-width: 700px;









    margin: 20px auto;









    box-shadow: 0 20px 50px rgba(0,0,0,0.05);









    border: 4px solid white;









    position: relative;









    animation: fadeInUp 0.5s ease-out;









}



















.quiz-progress-wrapper {









    width: 100%;









    height: 10px;









    background: #f1f5f9;









    border-radius: 5px;









    margin-bottom: 30px;









    overflow: hidden;









}



















.quiz-progress-bar {









    height: 100%;









    background: var(--primary-color);









    width: 0%;









    transition: width 0.4s ease;









}



















.quiz-timer-pill {









    position: absolute;









    top: -15px;









    right: 20px;









    background: var(--accent-color);









    color: white;









    padding: 6px 16px;









    border-radius: 20px;









    font-weight: 900;









    font-size: 0.9rem;









    box-shadow: 0 4px 12px rgba(255, 96, 168, 0.3);









    z-index: 10;









}



















.quiz-question-text {









    font-size: clamp(1.2rem, 4vw, 1.8rem);









    font-weight: 800;









    color: var(--text-primary);









    margin-bottom: 25px;









}



















.quiz-image-container {









    width: 100%;









    max-height: 30vh;









    border-radius: 20px;









    overflow: hidden;









    margin-bottom: 30px;









    background: #f8fafc;









    display: flex;









    align-items: center;









    justify-content: center;









}



















.quiz-image-container img {









    max-width: 100%;









    max-height: 100%;









    object-fit: contain;









}



















.quiz-options-grid {









    display: grid;









    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));









    gap: 16px;









}



















.quiz-option-btn {









    background: white;









    border: 2px solid #f1f5f9;









    padding: 16px;









    border-radius: 20px;









    cursor: pointer;









    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);









    display: flex;









    flex-direction: column;









    align-items: center;









    gap: 12px;









    font-family: inherit;









    font-weight: 700;









    color: var(--text-primary);









}



















.quiz-option-btn:hover:not(:disabled) {









    border-color: var(--secondary-color);









    transform: translateY(-3px);









    box-shadow: 0 8px 20px rgba(0,0,0,0.05);









}



















.quiz-option-btn img {









    max-width: 100%;









    height: 80px;









    object-fit: contain;









    border-radius: 12px;









}



















.quiz-option-btn.correct {









    background: #dcfce7;









    border-color: #10b981;









    color: #166534;









}



















.quiz-option-btn.wrong {









    background: #fee2e2;









    border-color: #ef4444;









    color: #991b1b;









}



















.quiz-feedback-badge {









    position: fixed;









    top: 50%;









    left: 50%;









    transform: translate(-50%, -50%) scale(0.5);









    padding: 20px 40px;









    border-radius: 30px;









    font-size: 2rem;









    font-weight: 900;









    color: white;









    z-index: 10000;









    opacity: 0;









    pointer-events: none;









    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);









}



















.quiz-feedback-badge.show {









    transform: translate(-50%, -50%) scale(1);









    opacity: 1;









}



















.quiz-feedback-badge.correct { background: var(--success-color); }









.quiz-feedback-badge.wrong { background: var(--error-color); }



















@media (max-width: 480px) {









    .quiz-options-grid {









        grid-template-columns: 1fr;









    }









}













.close-btn:hover {
    background: #ef4444;
    color: white;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}



.sticker-content h2, .instructions-popup h3 {

    margin-top: 0;

    color: #1e293b;

    font-weight: 800;

}



.new-sticker-badge {

    position: absolute;

    top: -5px;

    right: -5px;

    background: #ef4444;

    color: white;

    font-size: 9px;

    padding: 2px 6px;

    border-radius: 10px;

    font-weight: 800;

    animation: bounce 1s infinite;

}



@keyframes bounce {



    0%, 100% { transform: translateY(0); }



    50% { transform: translateY(-3px); }



}







/* Modern Loading State */



.loading {



  font-family: 'Fredoka', Arial, sans-serif;



  font-size: 1.2rem;



  color: var(--primary-color);



  padding: 16px 32px;



  background: rgba(255, 255, 255, 0.9);



  backdrop-filter: blur(12px);



  border-radius: 16px;



  display: none;



  position: fixed;



  top: 50%;



  left: 50%;



  transform: translate(-50%, -50%);



  box-shadow: 0 10px 40px rgba(0,0,0,0.1);



  z-index: 2000;



  align-items: center;



  gap: 12px;



  font-weight: 800;



  border: 1px solid rgba(255, 255, 255, 0.5);



}







.loading::after {



    content: '';



    width: 20px;



    height: 20px;



    border: 3px solid var(--primary-color);



    border-top-color: transparent;



    border-radius: 50%;



    animation: rotate 0.8s linear infinite;



}







@keyframes rotate {



    to { transform: rotate(360deg); }



}




