/* ── Pre-Nursery Playground Visual Redesign Styles ── */
:root {
    --bg-light: #f7f9fc;
    --card-bg-light: #ffffff;
    --text-light: #1e293b;
    --border-light: #e2e8f0;
    --shadow-premium: 0 20px 40px rgba(108, 77, 246, 0.06), 0 1px 3px rgba(0,0,0,0.02);
    --accent-color: #3fa34d;
    --accent-color-rgb: 63,163,77;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.dashboard {
    font-family: 'Poppins', 'Nunito', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--muted);
    transition: background 0.3s, color 0.3s;
    min-height: 100vh;
    position: relative;
    background: url('../../assets/backgrounds/light.png') center/cover fixed no-repeat, linear-gradient(135deg, #f0f4ff 0%, #ffffff 50%, #f5f3ff 100%);
}

@supports not (zoom: 1) {
    body.dashboard {
        width: 125%;
        min-height: 125vh;
        transform: scale(0.8);
        transform-origin: top left;
    }
}

/* .page styles handled by sidebar.css */

/* ── Hero Section Redesign (matching main page premium-hero) ── */
.playground-hero {
    position: relative;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: left;
    background: none !important;
    border-radius: 0 !important;
    border-bottom-left-radius: 40px !important;
    border-bottom-right-radius: 40px !important;
    padding: 24px 32px !important;
    text-align: center;
    box-shadow: 0 20px 45px rgba(31, 38, 135, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    margin-top: 15px !important;
    margin-bottom: 25px !important;
    overflow: hidden;
    z-index: 1;
}

.hero-logo-img {
    width: 100%;
    max-width: clamp(200px, 60vw, 420px);
    height: auto;
    aspect-ratio: 940.5 / 640.5;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
    animation: premiumFloat 6s ease-in-out infinite;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s ease;
}
.hero-logo-img:hover {
    animation-play-state: paused;
    transform: translateY(-8px) scale(1.05) rotate(2deg);
    filter: drop-shadow(0 25px 50px rgba(255, 107, 0, 0.3));
}
@keyframes premiumFloat {
  0% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.1));
  }
  50% {
    transform: translateY(-10px) scale(1.02);
    filter: drop-shadow(0 30px 45px rgba(67, 56, 202, 0.25));
  }
  100% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.1));
  }
}

@keyframes welcomeShine {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes lineGlow {
  0%, 100% { width: clamp(20px, 3vw, 40px); opacity: 0.7; }
  50% { width: clamp(30px, 5vw, 60px); opacity: 1; filter: drop-shadow(0 0 5px rgba(255,107,0,0.5)); }
}

.class-title {
    position: relative;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    cursor: default;
    user-select: none;
    outline-offset: 6px;
    display: inline-block;
    margin: 15px auto 25px;
}
.class-title:focus-visible {
    outline: 2px solid var(--accent-color);
}

@media (prefers-reduced-motion: reduce) {
    .class-title, .class-title * {
        animation: none !important;
        transition: none !important;
    }
}

@keyframes waveX {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

/* ---- Nature Theme ---- */
.style-12 {
    font-family: 'Nunito', 'Segoe UI', sans-serif;
    font-weight: 800;
    font-size: clamp(20px, 3.8vw, 28px);
    color: var(--text);
    padding: 16px 36px;
    background: linear-gradient(160deg, #eafbea, #d7f2df);
    border-radius: 22px 8px 22px 8px;
    border: 2px solid color-mix(in srgb, var(--accent-color) 55%, #2f6f4a);
    box-shadow: 0 10px 22px rgba(47, 111, 74, 0.18);
    transition: transform 0.3s ease;
}
.style-12:hover, .style-12:focus-visible {
    transform: translateY(-3px);
}

.style-12 .leaf {
    position: absolute;
    font-size: 18px;
    animation: waveX 3s ease-in-out infinite;
}
.style-12 .leaf.l1 { top: -10px; left: 14px; }
.style-12 .leaf.l2 { bottom: -10px; right: 14px; animation-delay: 0.4s; }

/* Drifting clouds & hot air balloons in hero background */
.decor {
    position: absolute;
    user-select: none;
    pointer-events: none;
    z-index: -1;
}

.float-cloud-1 {
    font-size: 5rem;
    top: 15%;
    left: -10%;
    opacity: 0.25;
    animation: floatCloud 25s linear infinite;
}

.float-cloud-2 {
    font-size: 6rem;
    bottom: 20%;
    right: -15%;
    opacity: 0.2;
    animation: floatCloudReverse 30s linear infinite;
}

.float-balloon-1 {
    font-size: 4.5rem;
    top: 25%;
    right: 15%;
    opacity: 0.8;
    filter: drop-shadow(0 15px 25px rgba(239, 68, 68, 0.15));
    animation: floatBalloon 7s ease-in-out infinite;
}

.float-star-1 {
    font-size: 2.2rem;
    top: 45%;
    left: 12%;
    opacity: 0.7;
    animation: floatStar 5s ease-in-out infinite;
}

.hero-content {
    max-width: 600px;
    z-index: 2;
    color: #ffffff;
    padding: 0;
}

.welcome {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    font-size: clamp(1.2rem, 2.5vw, 2.2rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #ff6b00, #ff1493, #4338ca, #ff6b00);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: welcomeShine 4s ease infinite;
    margin-bottom: 16px;
}

.welcome .line {
    width: clamp(20px, 3vw, 40px);
    height: 4px;
    border-radius: 20px;
    background: linear-gradient(90deg, #ff6b00, #ff1493);
    animation: lineGlow 3s ease-in-out infinite;
}

.hero-title {
    font-family: 'Fredoka One', 'Poppins', sans-serif;
    margin: 0 0 20px;
    font-size: 64px;
    font-weight: 900;
    line-height: 1.1;
    color: #818cf8;
    text-shadow: 3px 3px 0 #1e1b4b, 0 0 20px rgba(99, 102, 241, 0.4);
    letter-spacing: -2px;
}

.hero-title span {
    color: var(--muted);
}

.hero-mascot-container {
    position: relative;
    height: 150px;
    margin: 30px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mascot-emoji {
    font-size: 6rem;
    animation: mascotBounce 3.5s ease-in-out infinite;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.1));
    cursor: pointer;
    transition: transform 0.2s;
}

.mascot-emoji:hover {
    transform: scale(1.15) rotate(10deg);
}

.mascot-emoji.toggled {
    animation: mascotSpin 0.6s ease-out;
}

.toy-emoji {
    position: absolute;
    font-size: 2.8rem;
    filter: drop-shadow(0 8px 15px rgba(0,0,0,0.06));
}

.toy-emoji.t1 {
    top: 10px;
    left: calc(50% - 130px);
    animation: floatToy1 4.5s ease-in-out infinite;
}

.toy-emoji.t2 {
    bottom: 10px;
    right: calc(50% - 130px);
    animation: floatToy2 5.5s ease-in-out infinite;
}

.toy-emoji.t3 {
    top: 50px;
    right: calc(50% - 170px);
    animation: floatToy3 6.5s ease-in-out infinite;
}

.hero-points {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.hero-badge {
    background: linear-gradient(160deg, #eafbea, #d7f2df);
    border: 1px solid color-mix(in srgb, var(--accent-color) 30%, #d7f2df);
    padding: 8px 14px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    color: var(--muted);
    box-shadow: 0 4px 12px rgba(47, 111, 74, 0.1);
}

.hero-points .hero-badge:nth-child(2) {
    color: #16a34a;
}

.hero-points .hero-badge:nth-child(3) {
    color: #f97316;
}

.hero-desc {
    margin: 0 0 32px;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.6;
    opacity: 0.95;
    color: #F3F4F6;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

.hero-btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 900;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hero-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2) !important;
}

/* Glass Button Styling (matching main page) */
.glass-btn {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
}
.glass-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2) !important;
}

/* Distinct Glass Colors for Hero Buttons */
.premium-hero .hero-buttons .hero-btn.learn-btn {
    background: rgba(37, 99, 235, 0.22) !important;
    border: 1.5px solid rgba(37, 99, 235, 0.45) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.premium-hero .hero-buttons .hero-btn.learn-btn:hover {
    background: rgba(37, 99, 235, 0.42) !important;
    border-color: rgba(37, 99, 235, 0.7) !important;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.45) !important;
}

.premium-hero .hero-buttons .hero-btn.practice-btn {
    background: rgba(16, 185, 129, 0.22) !important;
    border: 1.5px solid rgba(16, 185, 129, 0.45) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.premium-hero .hero-buttons .hero-btn.practice-btn:hover {
    background: rgba(16, 185, 129, 0.42) !important;
    border-color: rgba(16, 185, 129, 0.7) !important;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.45) !important;
}

.premium-hero .hero-buttons .hero-btn.evs-btn {
    background: rgba(245, 158, 11, 0.22) !important;
    border: 1.5px solid rgba(245, 158, 11, 0.45) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.premium-hero .hero-buttons .hero-btn.evs-btn:hover {
    background: rgba(245, 158, 11, 0.42) !important;
    border-color: rgba(245, 158, 11, 0.7) !important;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.45) !important;
}

.premium-hero .hero-buttons .hero-btn.activity-btn {
    background: rgba(139, 92, 246, 0.22) !important;
    border: 1.5px solid rgba(139, 92, 246, 0.45) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.premium-hero .hero-buttons .hero-btn.activity-btn:hover {
    background: rgba(139, 92, 246, 0.42) !important;
    border-color: rgba(139, 92, 246, 0.7) !important;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.45) !important;
}


/* ── Subjects Section ── */
.subjects {
    margin-bottom: 50px;
}

.section-title {
    font-family: 'Fredoka One', 'Poppins', sans-serif;
    font-size: 2.1rem;
    font-weight: 800;
    text-align: center;
    color: var(--muted);
    background: none !important;
    -webkit-text-fill-color: initial !important;
    -webkit-background-clip: initial !important;
    margin: 45px auto;
    padding: 10px 32px;
    position: relative;
    display: flex;
    width: fit-content;
    max-width: 90%;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 3px dashed #818cf8;
    border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
    background-color: rgba(255, 255, 255, 0.4) !important;
    text-shadow: 2px 2px 0px #c7d2fe;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
}

/* Floating decorative sparkles & stars on sides */
.section-title::before {
    content: '🖍️';
    position: absolute;
    left: -28px;
    font-size: 1.35rem;
    animation: SnFloatSparkle 3s ease-in-out infinite alternate;
}

.section-title::after {
    content: '🎨';
    position: absolute;
    right: -28px;
    font-size: 1.35rem;
    animation: SnFloatSparkle 3s ease-in-out infinite alternate 1.5s;
}

@keyframes SnFloatSpace {
    0% { transform: translateY(0) scale(1) rotate(-10deg); }
    50% { transform: translateY(-8px) scale(1.1) rotate(15deg); }
    100% { transform: translateY(4px) scale(0.95) rotate(-5deg); }
}

@keyframes SnFloatSparkle {
    0% { transform: translateY(0) scale(1) rotate(0deg); filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05)); }
    50% { transform: translateY(-6px) scale(1.12) rotate(15deg); filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1)); }
    100% { transform: translateY(4px) scale(0.92) rotate(-10deg); filter: drop-shadow(0 1px 2px rgba(0,0,0,0.05)); }
}

.section-title:hover {
    transform: scale(1.04);
    border-color: var(--muted);
    background-color: rgba(255, 255, 255, 0.6) !important;
    text-shadow: 3px 3px 0px #818cf8;
}

.subject-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

@media (min-width: 1025px) {
    .subject-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.subject-card-link {
    text-decoration: none;
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

.subject-card {
    border-radius: 40px;
    padding: 0;
    text-align: left;
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 12px 30px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 1;
    cursor: pointer;
}

.subject-card-banner {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.subject-card-banner img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.subject-card:hover .subject-card-banner img {
    transform: scale(1.05);
}

.subject-card-content {
    padding: 20px 20px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
}

.subject-card-content > a {
    margin-top: auto;
}

.chapter-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chapter-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card);
    border-radius: 14px;
    padding: 8px 14px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    cursor: pointer;
}

.chapter-item:hover {
    transform: translateX(4px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.04);
}

.chapter-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-family: 'Fredoka One', sans-serif;
    font-size: 0.95rem;
    font-weight: bold;
    color: #ffffff;
    flex-shrink: 0;
}

.chapter-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text);
    flex: 1;
}

.chapter-item.chapter-completed {
    background: linear-gradient(135deg, #EFF6FF, #F0FDF4);
    border: 1.5px solid #93C5FD;
}
body[data-theme="dark"] .chapter-item.chapter-completed {
    background: linear-gradient(135deg, #1e1b45, #122822);
    border-color: #3B82F6;
}
.chapter-item .verified-blue-tick svg {
    fill: #3B82F6;
}
body[data-theme="dark"] .chapter-item .verified-blue-tick svg {
    fill: #60A5FA;
}

.start-learning-btn {
    margin-top: auto;
    width: 100%;
    font-family: 'Fredoka One', sans-serif;
    font-size: 1.15rem;
    font-weight: bold;
    color: #ffffff;
    border: none;
    padding: 14px 28px;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.start-learning-btn .arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

.start-learning-btn:hover .arrow {
    transform: translateX(4px);
}

/* Custom subject card palettes */
.sc-english {
    background-color: #FFEAF2;
    border: 2px solid #FFD3E3;
}
.sc-english:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 45px rgba(233, 30, 99, 0.15);
    border-color: #F8BBD0;
}
.sc-english .chapter-icon {
    background-color: var(--muted);
}
.sc-english .start-learning-btn {
    background-color: var(--muted);
}
.sc-english .start-learning-btn:hover {
    background-color: var(--muted);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(233, 30, 99, 0.25);
}

.sc-maths {
    background-color: #EBF8F7;
    border: 2px solid #C4ECE8;
}
.sc-maths:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 45px rgba(0, 137, 123, 0.15);
    border-color: #B2DFDB;
}
.sc-maths .chapter-icon {
    background-color: var(--muted);
}
.sc-maths .start-learning-btn {
    background-color: var(--muted);
}
.sc-maths .start-learning-btn:hover {
    background-color: var(--muted);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0, 137, 123, 0.25);
}

.sc-evs {
    background-color: #FFF8EE;
    border: 2px solid #FFE7C4;
}
.sc-evs:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 45px rgba(230, 81, 0, 0.12);
    border-color: #FFE0B2;
}
.sc-evs .chapter-icon {
    background-color: var(--muted);
}
.sc-evs .start-learning-btn {
    background-color: var(--muted);
}
.sc-evs .start-learning-btn:hover {
    background-color: var(--muted);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(230, 81, 0, 0.22);
}

.sc-coding {
    background-color: #F5F2FC;
    border: 2px solid #E1D5F5;
}
.sc-coding:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 45px rgba(124, 77, 255, 0.15);
    border-color: #D1C4E9;
}
.sc-coding .chapter-icon {
    background-color: var(--muted);
}
.sc-coding .start-learning-btn {
    background-color: var(--muted);
}
.sc-coding .start-learning-btn:hover {
    background-color: var(--muted);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(124, 77, 255, 0.25);
}


/* ── Stats Section: Lego Building Blocks ── */
.stats-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 50px;
}

.toy-block {
    position: relative;
    border-radius: 20px;
    padding: 35px 20px 25px 20px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.03);
    border-bottom: 8px solid rgba(0,0,0,0.15);
    transition: all 0.25s ease;
}

.toy-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 35px rgba(0,0,0,0.06);
}

.block-top-peg {
    position: absolute;
    top: -10px;
    left: calc(50% - 18px);
    width: 36px;
    height: 12px;
    border-radius: 8px 8px 0 0;
    box-shadow: inset 0 2px rgba(255,255,255,0.4);
}

/* Custom lego block styles */
.block-pink {
    background: #ff7675;
    color: #ffffff;
}
.block-pink .block-top-peg { background: #ff7675; }
.block-pink p { color: #ffe5e5; }
.block-pink h2 { color: #ffffff !important; }

.block-yellow {
    background: #ffeaa7;
    color: var(--muted);
}
.block-yellow .block-top-peg { background: #ffeaa7; }
.block-yellow p { color: var(--muted); }
.block-yellow h2 { color: var(--muted) !important; }

.block-green {
    background: #55efc4;
    color: var(--muted);
}
.block-green .block-top-peg { background: #55efc4; }
.block-green p { color: var(--muted); }
.block-green h2 { color: var(--muted) !important; }

.block-blue {
    background: #74b9ff;
    color: #ffffff;
}
.block-blue .block-top-peg { background: #74b9ff; }
.block-blue p { color: #e6f2ff; }
.block-blue h2 { color: #ffffff !important; }

.stat-card h2 {
    font-family: 'Fredoka One', sans-serif;
    font-size: 2.5rem;
    margin: 0 0 6px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stat-card p {
    font-size: 0.95rem;
    font-weight: 800;
    margin: 0;
}

/* ── Progress Section ── */
.learning-progress {
    background: var(--card);
    border-radius: 35px;
    padding: 40px;
    margin-bottom: 50px;
    box-shadow: var(--shadow-premium);
    border: 1px solid rgba(108,77,246,0.05);
}

.progress-wrapper {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-top: 15px;
}

.progress-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--muted);
}

.progress-bar {
    height: 16px;
    background: #f1f5f9;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.progress-fill {
    height: 100%;
    border-radius: 20px;
    transition: width 1s cubic-bezier(0.175, 0.885, 0.32, 1);
}

.progress-fill.english { background: linear-gradient(90deg, #ff8b94, #ff6b6b); }
.progress-fill.maths { background: linear-gradient(90deg, #feca57, #ff9f43); }
.progress-fill.evs { background: linear-gradient(90deg, #1dd1a1, #10ac84); }
.progress-fill.coding { background: linear-gradient(90deg, #54a0ff, #2e86de); }

/* ── Achievements Section: Medal/Badge Overhaul ── */
.achievement-section {
    margin-bottom: 50px;
}

.achievement-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.badge-item {
    background: var(--card);
    border-radius: 30px;
    padding: 40px 20px 30px;
    text-align: center;
    border: 2px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.01);
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.badge-item:hover {
    transform: translateY(-8px) rotate(2deg);
    box-shadow: 0 20px 40px rgba(108,77,246,0.08);
}

.medal-ribbon {
    position: absolute;
    top: 0;
    left: calc(50% - 15px);
    width: 30px;
    height: 25px;
    background: linear-gradient(90deg, #e74c3c 50%, #c0392b 50%);
    border-radius: 0 0 4px 4px;
    z-index: 1;
}

.badge-item:hover .medal-ribbon {
    height: 30px;
}

.medal-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 12px;
    z-index: 2;
    position: relative;
    animation: SnFloatMedal 4s ease-in-out infinite alternate;
}

/* Custom medal shades */
.medal-gold { border-color: #fde68a; background: linear-gradient(135deg, #ffffff, #fffbeb); }
.medal-gold .medal-ribbon { background: linear-gradient(90deg, #f1c40f 50%, #f39c12 50%); }

.medal-silver { border-color: #e2e8f0; background: linear-gradient(135deg, #ffffff, #f8fafc); }
.medal-silver .medal-ribbon { background: linear-gradient(90deg, #bdc3c7 50%, #95a5a6 50%); }

.medal-bronze { border-color: #fed7aa; background: linear-gradient(135deg, #ffffff, #fff7ed); }
.medal-bronze .medal-ribbon { background: linear-gradient(90deg, #e67e22 50%, #d35400 50%); }

.medal-blue { border-color: #bfdbfe; background: linear-gradient(135deg, #ffffff, #eff6ff); }
.medal-blue .medal-ribbon { background: linear-gradient(90deg, #3498db 50%, #2980b9 50%); }

.achievement-card h3 {
    font-family: 'Fredoka One', sans-serif;
    font-size: 1.25rem;
    color: var(--text);
    margin: 12px 0 6px 0;
}

.achievement-card p {
    font-size: 0.95rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.5;
    font-weight: 600;
}

/* ── Streak Section ── */
.streak-section {
    background: var(--card);
    border-radius: 35px;
    padding: 40px;
    text-align: center;
    margin-bottom: 50px;
    box-shadow: var(--shadow-premium);
    border: 1px solid rgba(255, 107, 0, 0.05);
}

.streak-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
}

.day {
    width: 50px;
    height: 50px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--muted);
    font-size: 1.05rem;
    border: 2px solid #e2e8f0;
    transition: all 0.25s ease;
}

.day.active {
    background: linear-gradient(135deg, #ff9f43, #ff6b00);
    color: #ffffff;
    border-color: #ff6b00;
    box-shadow: 0 8px 20px rgba(255,107,0,0.3);
    transform: scale(1.08) rotate(5deg);
}

.streak-section h2 {
    font-family: 'Fredoka One', sans-serif;
    color: #ff6b00;
    font-size: 1.8rem;
    margin: 10px 0 0 0;
}

/* ── Playground CTA ── */
.playground-cta {
    background: linear-gradient(135deg, #6c4df6 0%, #9f7aea 100%) !important;
    border-radius: 35px;
    padding: 55px 45px;
    position: relative;
    overflow: hidden;
}

.playground-cta::after {
    content: '⭐';
    position: absolute;
    font-size: 8rem;
    right: 20px;
    top: -20px;
    opacity: 0.15;
    animation: sn-float 4s ease-in-out infinite alternate;
}

.cta h2 {
    font-family: 'Fredoka One', sans-serif;
    font-size: 2.2rem;
    margin: 0 0 10px 0;
}

.cta p {
    font-size: 1.15rem;
    opacity: 0.95;
    font-weight: 600;
}

.cta-btn {
    padding: 16px 32px;
    background: var(--card);
    color: var(--muted);
    font-weight: 800;
    font-size: 1.05rem;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.cta-btn:hover {
    transform: translateY(-4px) scale(1.03);
    background: var(--card);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

/* ── Keyframes & Animations ── */
@keyframes floatCloud {
    0% { transform: translateX(0); }
    100% { transform: translateX(120vw); }
}

@keyframes floatCloudReverse {
    0% { transform: translateX(0); }
    100% { transform: translateX(-120vw); }
}

@keyframes floatBalloon {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes floatStar {
    0%, 100% { transform: scale(1) rotate(0); opacity: 0.7; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 1; }
}

@keyframes mascotBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-16px) scale(1.05); }
}

@keyframes mascotSpin {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(180deg); }
    100% { transform: scale(1) rotate(360deg); }
}

@keyframes floatToy1 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(12deg); }
}

@keyframes floatToy2 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-12deg); }
}


@keyframes floatToy3 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(8deg); }
}

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



/* ── Footer ── */
footer {
    background: linear-gradient(135deg, #311b92 0%, #512da8 100%);
    color: #ede7f6;
    padding: 50px 40px 30px 40px;
    border-radius: 35px 35px 0 0;
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

footer h2 {
    font-family: 'Fredoka One', sans-serif;
    font-size: 1.8rem;
    color: #ffffff;
    margin-bottom: 12px;
}

footer h3 {
    font-family: 'Fredoka One', sans-serif;
    font-size: 1.2rem;
    color: #d1c4e9;
    margin-bottom: 14px;
}

footer p {
    font-size: 1rem;
    line-height: 1.7;
    opacity: 0.85;
    font-weight: 500;
}

footer ul {
    list-style: none;
    padding: 0;
}

footer ul li {
    font-size: 1rem;
    padding: 5px 0;
    font-weight: 600;
    opacity: 0.85;
}

.copyright {
    text-align: center;
    font-size: 0.95rem;
    opacity: 0.6;
    padding-top: 25px;
    border-top: 1px solid rgba(255,255,255,0.15);
}

/* ── Responsive Overrides ── */
@media (max-width: 1024px) {
    .subject-grid {
        gap: 20px;
    }
}

@media (max-width: 820px) {
    .playground-hero {
        min-height: 180px !important;
        padding: 16px 24px !important;
        margin-top: 10px !important;
        margin-bottom: 16px !important;
    }
    .stats-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .achievement-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

@media (max-width: 600px) {
    .playground-hero {
        flex-direction: column;
        text-align: center;
        align-items: center;
        padding: 12px 16px !important;
        min-height: auto;
        margin-top: 8px !important;
        margin-bottom: 12px !important;
        box-sizing: border-box;
        width: 100%;
    }
    .hero-content {
        width: 100%;
        max-width: 100%;
        padding: 0 !important;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .welcome {
        justify-content: center !important;
    }
    .hero-title {
        font-size: 3rem;
    }
    .hero-desc {
        font-size: 1.1rem;
    }
    .subject-grid {
        grid-template-columns: 1fr;
    }
    .stats-section {
        grid-template-columns: 1fr;
    }
    .achievement-grid {
        grid-template-columns: 1fr;
    }

    .cta {
        flex-direction: column;
        text-align: center;
        gap: 25px;
        padding: 40px 20px;
    }
    footer {
        padding-bottom: 80px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem !important;
    }
    .stats-section {
        grid-template-columns: 1fr !important;
    }
    .subject-grid {
        grid-template-columns: 1fr !important;
    }
    .section-title {
        font-size: 1.35rem !important;
        padding: 8px 18px !important;
        border-width: 2px !important;
        margin: 30px auto !important;
        white-space: normal !important;
        width: fit-content !important;
        max-width: 90vw !important;
    }
    .section-title::before,
    .section-title::after {
        display: none !important;
    }
}

@media (max-width: 768px) {
    body.dashboard {
        zoom: 100% !important;
    }
    @supports not (zoom: 1) {
        body.dashboard {
            width: 100% !important;
            min-height: 100vh !important;
            transform: none !important;
        }
    }
    .section-title {
        font-size: 1.65rem !important;
        padding: 8px 24px !important;
        gap: 8px !important;
    }
    .section-title::before {
        left: -24px !important;
        font-size: 1.1rem !important;
    }
    .section-title::after {
        right: -24px !important;
        font-size: 1.1rem !important;
    }
}

/* ==========================
   DARK MODE OVERRIDES
   ========================== */
body[data-theme="light"].dashboard {
    color: var(--text) !important;
}

body[data-theme="dark"].dashboard {
    color: #f1f5f9 !important;
    background: url('../../assets/backgrounds/dark.png') center/cover fixed no-repeat, linear-gradient(115deg, #080d1b 0%, #11182b 48%, #0d1525 100%) !important;
}

body[data-theme="dark"] .section-title {
    color: #ffffff !important;
    background: none !important;
    -webkit-text-fill-color: initial !important;
    -webkit-background-clip: initial !important;
    border: 3px dashed #ff9f43 !important;
    border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
    background-color: rgba(30, 41, 59, 0.55) !important;
    text-shadow: 2.5px 2.5px 0px #ff6b00 !important;
    box-shadow: 0 8px 24px rgba(255, 107, 0, 0.15) !important;
}
body[data-theme="dark"] .section-title:hover {
    border-color: #ff6b00 !important;
    background-color: rgba(30, 41, 59, 0.75) !important;
    text-shadow: 3.5px 3.5px 0px #d84b00 !important;
    box-shadow: 0 12px 30px rgba(255, 107, 0, 0.25) !important;
}

body[data-theme="dark"] .hero-title {
    color: #ffa2b6;
    filter: drop-shadow(0 4px 8px rgba(255, 107, 139, 0.15));
}

body[data-theme="dark"] .hero-desc {
    color: #cbd5e1;
}



/* Dark Mode Subject Cards - Solid Colorful Styles */
body[data-theme="dark"] .sc-english {
    background-color: var(--text) !important;
    border-color: var(--text) !important;
}
body[data-theme="dark"] .sc-english:hover {
    box-shadow: 0 25px 45px rgba(233, 30, 99, 0.35);
    border-color: var(--muted) !important;
}

body[data-theme="dark"] .sc-maths {
    background-color: var(--text) !important;
    border-color: var(--muted) !important;
}
body[data-theme="dark"] .sc-maths:hover {
    box-shadow: 0 25px 45px rgba(0, 137, 123, 0.35);
    border-color: var(--muted) !important;
}

body[data-theme="dark"] .sc-evs {
    background-color: var(--text) !important;
    border-color: var(--text) !important;
}
body[data-theme="dark"] .sc-evs:hover {
    box-shadow: 0 25px 45px rgba(230, 81, 0, 0.35);
    border-color: var(--muted) !important;
}

body[data-theme="dark"] .sc-coding {
    background-color: var(--text) !important;
    border-color: var(--text) !important;
}
body[data-theme="dark"] .sc-coding:hover {
    box-shadow: 0 25px 45px rgba(124, 77, 255, 0.35);
    border-color: var(--muted) !important;
}

/* Chapter List items in Dark Mode */
body[data-theme="dark"] .chapter-item {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
}
body[data-theme="dark"] .chapter-item:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.05);
}
body[data-theme="dark"] .chapter-title {
    color: #f1f5f9;
}

/* Progress & Streaks in Dark Mode */
body[data-theme="dark"] .learning-progress,
body[data-theme="dark"] .streak-section {
    background: #111827 !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}
body[data-theme="dark"] .progress-header {
    color: #cbd5e1;
}
body[data-theme="dark"] .progress-bar {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.08);
}
body[data-theme="dark"] .day {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}
body[data-theme="dark"] .day.active {
    color: #ffffff;
    border-color: #ff6b00;
}

/* Achievements in Dark Mode */
body[data-theme="dark"] .badge-item {
    background: #1f2937 !important;
    border: 2px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none;
}
body[data-theme="dark"] .badge-item h3 {
    color: #ffffff;
}
body[data-theme="dark"] .badge-item p {
    color: #cbd5e1;
}

body[data-theme="dark"] .medal-gold {
    background: linear-gradient(135deg, #242217, #1e1b12) !important;
    border-color: #f59e0b !important;
}
body[data-theme="dark"] .medal-silver {
    background: linear-gradient(135deg, #1e222b, #151820) !important;
    border-color: var(--muted) !important;
}
body[data-theme="dark"] .medal-bronze {
    background: linear-gradient(135deg, #241c14, #1d1610) !important;
    border-color: var(--muted) !important;
}
body[data-theme="dark"] .medal-blue {
    background: linear-gradient(135deg, #162035, #101625) !important;
    border-color: #3b82f6 !important;
}

body[data-theme="dark"] .playground-hero {
    background: none !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4) !important;
}

body[data-theme="dark"] .hero-badge {
    background: linear-gradient(160deg, #132018, #0e1712);
    border: 1px solid rgba(63, 163, 77, 0.2);
    color: #f472b6;
}
body[data-theme="dark"] .hero-points .hero-badge:nth-child(2) {
    color: #34d399;
}
body[data-theme="dark"] .hero-points .hero-badge:nth-child(3) {
    color: #fb923c;
}

body[data-theme="dark"] .style-12 {
    background: linear-gradient(160deg, #132018, #0e1712);
    color: #d8f5df;
}




/* Hero Background Images */
body[data-theme^="light"] .hero, 
body:not([data-theme^="dark"]) .hero {
  background-image: url('../../assets/backgrounds/light.png') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

body[data-theme^="dark"] .hero {
  background-image: url('../../assets/backgrounds/dark.png') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}
