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

body {
    min-height: 100vh;
    font-family: 'Fredoka', sans-serif;
    background: linear-gradient(180deg, #dff4ff 0%, #fff7d9 100%);
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1100px;

    margin: 0 auto;

    background: rgba(255, 255, 255, .75);
    backdrop-filter: blur(18px);

    border-radius: 40px;
    padding: 24px;

    border: 1px solid rgba(255, 255, 255, .5);

    box-shadow: 0 25px 70px rgba(0, 0, 0, .12);
}

.screen {
    display: none
}

.screen.active {
    display: block
}

.hero-section {
    text-align: center;
    margin-bottom: 15px;
}

.logo-badge {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 4rem);
    color: #5b36ff;
    margin-bottom: 12px;
}

.hero-subtitle {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 999px;
    background: #ffe36c;
    margin-bottom: 20px;
}

.hero-scene {
    position: relative
}

.hero-image {
    width: 100%;
    max-width: 550px;
    display: block;
    margin: auto;
}

.floating {
    position: absolute;
    font-size: 2.5rem;
    animation: float 4s ease-in-out infinite;
}

.book {
    left: 8%;
    top: 10%
}

.pencil {
    right: 8%;
    top: 18%
}

.star {
    left: 50%;
    top: 0
}

@keyframes float {

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

    50% {
        transform: translateY(-15px)
    }
}

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

.menu button {
    background: #fff;
    border: none;
    border-radius: 30px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .08);
    transition: .3s;
}

.menu button:hover {
    transform: translateY(-8px);
}

.card-icon {
    font-size: 4rem
}

.menu span {
    font-size: 1.5rem;
    font-weight: 700
}

#category {
    width: 100%;
}

#category.active {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ---- Category Header ---- */
.cat-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 6px;
}

.cat-back-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.08);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .2s;
}

.cat-back-btn:hover {
    background: rgba(0, 0, 0, 0.15);
}

.cat-header-icon {
    font-size: 2rem;
}

.cat-header-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #5b36ff;
}

/* ---- Game Mode Cards ---- */
.cat-card {
    width: 100%;
    border: none;
    border-radius: 22px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    font-family: inherit;
    transition: transform .25s, box-shadow .25s;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
}

.cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.cat-card-icon {
    font-size: 2.2rem;
    min-width: 50px;
    text-align: center;
}

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

.cat-card-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 3px;
}

.cat-card-desc {
    font-size: 0.85rem;
    opacity: 0.7;
    font-weight: 400;
}

.cat-card-arrow {
    font-size: 1.4rem;
    opacity: 0.4;
    margin-left: auto;
}

/* English theme — blue */
.cat-card.theme-eng {
    background: #e8f0fe;
}

.cat-card.theme-eng .cat-card-name {
    color: #1a56cc;
}

/* Hindi theme — saffron */
.cat-card.theme-hin {
    background: #fff3e0;
}

.cat-card.theme-hin .cat-card-name {
    color: #c65e00;
}

/* Math theme — green */
.cat-card.theme-mat {
    background: #e8f5e9;
}

.cat-card.theme-mat .cat-card-name {
    color: #2a7d2e;
}

/* EVS theme — nature green/teal */
.cat-card.theme-evs {
    background: #e0f2f1;
}

.cat-card.theme-evs .cat-card-name {
    color: #00695c;
}

/* Activity theme — playful orange */
.cat-card.theme-act {
    background: #fff3e0;
}

.cat-card.theme-act .cat-card-name {
    color: #e65100;
}

/* ---- Back to Home button ---- */
.category-home-bottom {
    background: #444 !important;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 18px;
    border-radius: 20px;
    border: none;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    transition: transform .2s, background .2s;
    margin-top: 4px;
}

.category-home-bottom:hover {
    transform: translateY(-3px);
    background: #333 !important;
}

.score-board {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    align-items: center;
}

/* Home button stays neutral */
.homeBtn {
    padding: 12px 20px;
    border: none;
    border-radius: 999px;
    background: #444;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .2s;
    white-space: nowrap;
}

.homeBtn:hover {
    background: #222;
    transform: translateY(-2px);
}

/* Score chip — golden yellow */
.score-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff8e1;
    border: 2px solid #ffe082;
    border-radius: 999px;
    padding: 8px 20px;
    min-width: 90px;
}

.score-chip .chip-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #b8860b;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1;
}

.score-chip .chip-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #e65c00;
    line-height: 1.2;
}

/* Level chip — purple */
.level-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ede7f6;
    border: 2px solid #b39ddb;
    border-radius: 999px;
    padding: 8px 20px;
    min-width: 90px;
}

.level-chip .chip-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #5e35b1;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1;
}

.level-chip .chip-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #4527a0;
    line-height: 1.2;
}

/* Progress bar stays as a full-width strip */
.progress {
    flex: 1;
    background: rgba(255, 255, 255, 0.75);
    padding: 10px 16px;
    border-radius: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
    font-weight: 700;
    font-size: 0.85rem;
    color: #555;
    min-width: 120px;
}

.progress-bar {
    height: 10px;
    background: #e0e0e0;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 6px;
}

#progressFill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #00c853, #64dd17);
    border-radius: 999px;
    transition: width 0.4s ease;
}

/* ========== Avatar Picker ========== */

.avatar-screen {
    text-align: center;
    padding: 20px 0;
}

.avatar-title {
    font-size: 2rem;
    font-weight: 700;
    color: #5b36ff;
    margin-bottom: 8px;
}

.avatar-subtitle {
    font-size: 1rem;
    color: #888;
    margin-bottom: 28px;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 500px;
    margin: 0 auto;
}

.avatar-card {
    border: none;
    border-radius: 24px;
    padding: 24px 12px;
    cursor: pointer;
    font-family: inherit;
    transition: transform .25s, box-shadow .25s;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.avatar-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.13);
}

.avatar-card-selected {
    box-shadow: 0 0 0 4px #5b36ff, 0 16px 32px rgba(91, 54, 255, 0.25);
    transform: translateY(-4px);
    position: relative;
}

.avatar-check {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #5b36ff;
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.avatar-emoji {
    font-size: 3.5rem;
    line-height: 1;
}

.avatar-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #333;
}

.avatar-age {
    font-size: 0.78rem;
    color: #888;
}

.avatar-continue-btn {
    margin-top: 24px;
    background: linear-gradient(135deg, #5b36ff 0%, #8b5cf6 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 16px 36px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(91, 54, 255, 0.3);
    transition: transform .2s, box-shadow .2s;
}

.avatar-continue-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(91, 54, 255, 0.38);
}

/* ========== Home Top Bar ========== */

.home-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    gap: 10px;
}

.profile-badge {
    background: #fff;
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform .2s;
}

.profile-badge:hover {
    transform: translateY(-2px);
}

.profile-change {
    font-size: 0.72rem;
    color: #aaa;
    font-weight: 400;
}

.streak-badge {
    background: #fff3e0;
    border: 2px solid #ffcc80;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 700;
    font-size: 1rem;
    color: #e65c00;
    white-space: nowrap;
}

/* ========== Daily Challenge Card ========== */

.daily-card {
    background: linear-gradient(135deg, #5b36ff 0%, #8b5cf6 100%);
    border-radius: 24px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    margin-bottom: 18px;
    box-shadow: 0 10px 28px rgba(91, 54, 255, 0.25);
    transition: transform .25s, box-shadow .25s;
}

.daily-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(91, 54, 255, 0.32);
}

.daily-card.daily-done {
    background: linear-gradient(135deg, #aaa 0%, #bbb 100%);
    box-shadow: none;
    cursor: default;
    opacity: 0.75;
}

.daily-icon {
    font-size: 2.2rem;
    min-width: 44px;
    text-align: center;
}

.daily-info {
    flex: 1;
}

.daily-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 3px;
}

.daily-sub {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.82);
}

.daily-arrow {
    font-size: 1.6rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ========== Category Card Stars ========== */

.cat-card-stars {
    margin-top: 4px;
    font-size: 1rem;
    line-height: 1;
}

/* ========== Sudden Death Button ========== */

.sd-btn {
    width: 100%;
    border: 2px dashed #e74c3c;
    background: #fff5f5;
    color: #c0392b;
    border-radius: 16px;
    padding: 12px 18px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: -8px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background .2s, transform .2s;
}

.sd-btn:hover {
    background: #ffe5e5;
    transform: translateY(-2px);
}

.sd-best {
    margin-left: auto;
    background: #e74c3c;
    color: #fff;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 0.78rem;
}

/* ========== Sudden Death Bar (in game) ========== */

.sd-bar {
    background: linear-gradient(90deg, #c0392b, #e74c3c);
    color: #fff;
    border-radius: 16px;
    padding: 10px 18px;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(231, 76, 60, 0.25);
}

/* ========== Win screen extras ========== */

.win-stars {
    font-size: 2.2rem;
    margin: 6px 0 4px;
    animation: fadeSlideUp 0.5s ease both;
    animation-delay: 0.5s;
}

.win-streak-msg {
    font-size: 1rem;
    font-weight: 700;
    color: #e65c00;
    background: #fff3e0;
    border-radius: 999px;
    padding: 6px 18px;
    margin-bottom: 12px;
    animation: fadeSlideUp 0.5s ease both;
    animation-delay: 0.6s;
}

/* ========== Avatar Picker ========== */

@keyframes trophyDrop {
    0% {
        transform: scale(0) rotate(-20deg);
        opacity: 0;
    }

    60% {
        transform: scale(1.2) rotate(5deg);
        opacity: 1;
    }

    80% {
        transform: scale(0.9) rotate(-3deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes confettiFall {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(160px) rotate(720deg);
        opacity: 0;
    }
}

@keyframes fadeSlideUp {
    0% {
        transform: translateY(24px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.win-screen {
    text-align: center;
    padding: 10px 0 20px;
}

.win-confetti {
    position: relative;
    height: 80px;
    overflow: hidden;
    margin-bottom: 4px;
}

.win-confetti span {
    position: absolute;
    font-size: 1.4rem;
    animation: confettiFall 1.8s ease-in forwards;
}

.win-trophy {
    font-size: 5.5rem;
    display: block;
    animation: trophyDrop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: 0.1s;
    margin-bottom: 8px;
}

.win-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #5b36ff;
    animation: fadeSlideUp 0.5s ease both;
    animation-delay: 0.4s;
    margin-bottom: 6px;
}

.win-subtitle {
    font-size: 1rem;
    color: #888;
    animation: fadeSlideUp 0.5s ease both;
    animation-delay: 0.55s;
    margin-bottom: 20px;
}

.win-badges {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
    animation: fadeSlideUp 0.5s ease both;
    animation-delay: 0.65s;
}

.win-badge {
    border-radius: 20px;
    padding: 14px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.win-badge.gold {
    background: #fff8e1;
    border: 2px solid #ffe082;
}

.win-badge.purple {
    background: #ede7f6;
    border: 2px solid #b39ddb;
}

.win-badge .badge-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.win-badge.gold .badge-label {
    color: #b8860b;
}

.win-badge.purple .badge-label {
    color: #5e35b1;
}

.win-badge .badge-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.win-badge.gold .badge-value {
    color: #e65c00;
}

.win-badge.purple .badge-value {
    color: #4527a0;
}

.win-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeSlideUp 0.5s ease both;
    animation-delay: 0.8s;
}

.win-btn-play {
    background: #5b36ff;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 16px 36px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform .2s, background .2s;
}

.win-btn-play:hover {
    background: #4422dd;
    transform: translateY(-3px);
}

.win-btn-home {
    background: #444;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 16px 28px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform .2s, background .2s;
}

.win-btn-home:hover {
    background: #222;
    transform: translateY(-3px);
}

/* ========== Visual Bounce Animation ========== */

@keyframes visualBounce {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    55% {
        transform: scale(1.15);
        opacity: 1;
    }

    75% {
        transform: scale(0.92);
    }

    90% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.visual.pop {
    animation: visualBounce 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* ========== Game Screen Wallpapers ========== */

/* When banner ad is showing, add padding at bottom so options aren't hidden */
#game.banner-visible {
    padding-bottom: 70px !important;
}

/* English — soft blue notebook ruled lines */
#game.theme-eng {
    border-radius: 24px;
    padding: 16px;
    background-color: #eef4ff;
    background-image: repeating-linear-gradient(transparent, transparent 35px,
            rgba(100, 149, 237, 0.2) 35px, rgba(100, 149, 237, 0.2) 36px);
}

/* Hindi — warm saffron dot pattern */
#game.theme-hin {
    border-radius: 24px;
    padding: 16px;
    background-color: #fff8f0;
    background-image: radial-gradient(circle, rgba(220, 120, 0, 0.2) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
}

/* Math — green graph paper grid */
#game.theme-mat {
    border-radius: 24px;
    padding: 16px;
    background-color: #f0fdf4;
    background-image:
        linear-gradient(rgba(34, 170, 80, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 170, 80, 0.15) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* EVS — nature leaf pattern */
#game.theme-evs {
    border-radius: 24px;
    padding: 16px;
    background-color: #f1f8e9;
    background-image: radial-gradient(circle, rgba(76, 175, 80, 0.18) 2px, transparent 2px);
    background-size: 26px 26px;
}

/* Activity — playful orange dashed grid */
#game.theme-act {
    border-radius: 24px;
    padding: 16px;
    background-color: #fff8f0;
    background-image:
        linear-gradient(rgba(255, 152, 0, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 152, 0, 0.12) 1px, transparent 1px);
    background-size: 28px 28px;
}

/* ========== Visual area ========== */
.visual {
    min-height: 130px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    text-align: center;
    line-height: 1.4;
    font-size: 4rem;
    padding: 16px;
    margin: 20px 0;
    background: rgba(255, 255, 255, 0.65);
    border-radius: 24px;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.question {
    background: rgba(255, 255, 255, 0.85);
    padding: 25px;
    border-radius: 25px;
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .08);
    backdrop-filter: blur(6px);
}

/* ========== EVS Visual (large emoji) ========== */
.visual.evs-visual {
    font-size: 5.5rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(6px);
}

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

.option {
    background: rgba(255, 255, 255, 0.88);
    border: none;
    border-radius: 25px;
    min-height: 110px;
    font-size: 2rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .08);
    transition: transform .15s, box-shadow .15s, background .15s;
    font-family: inherit;
}

.option:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

.option:active {
    transform: scale(0.93);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.10);
}

.correct {
    background: #2ecc71 !important;
    color: #fff
}

.wrong {
    background: #e74c3c !important;
    color: #fff
}



@media(max-width:900px) and (min-width:769px) {
    .menu {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width:768px) {

    .container {
        padding: 12px;
        border-radius: 24px;
    }

    .menu {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .menu button {
        min-height: 90px;
    }

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

    .hero-image {
        max-width: 220px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: .9rem;
    }

    .options {
        grid-template-columns: 1fr;
    }

    .question {
        font-size: 1.2rem;
    }

    .visual {
        font-size: 2.2rem;
        min-height: 100px;
        padding: 12px;
        line-height: 1.5;
    }

    .avatar-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .avatar-emoji {
        font-size: 2.4rem;
    }

    .avatar-name {
        font-size: 0.85rem;
    }

    .avatar-age {
        font-size: 0.7rem;
    }

    .daily-card {
        padding: 14px 16px;
        gap: 12px;
    }

    .daily-title {
        font-size: 1rem;
    }

    .home-top-bar {
        flex-wrap: wrap;
    }

    .sd-btn {
        font-size: 0.85rem;
        padding: 10px 14px;
    }

    #game.theme-eng,
    #game.theme-hin,
    #game.theme-mat,
    #game.theme-evs,
    #game.theme-act {
        padding: 10px;
        border-radius: 16px;
    }

    .menu {
        grid-template-columns: repeat(2, 1fr);
    }

    .score-chip,
    .level-chip {
        min-width: 70px;
        padding: 6px 14px;
    }

    .score-chip .chip-value,
    .level-chip .chip-value {
        font-size: 1.1rem;
    }

    .homeBtn {
        font-size: 0.85rem;
        padding: 10px 14px;
    }

    .score-board {
        display: grid;
        grid-template-columns: auto 1fr 1fr;
        align-items: center;
    }

    .progress {
        grid-column: 1 / -1;
    }
}

/* ========== Activity: Drag & Drop Engine ========== */

.act-board {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Drop zone area */
.act-dropzone-area {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    justify-items: center;
}

.act-dropzone-row {
    grid-template-columns: repeat(4, 1fr);
}

.act-zone {
    width: 100%;
    max-width: 110px;
    aspect-ratio: 1;
    border-radius: 20px;
    border: 3px dashed rgba(0, 0, 0, 0.18);
    background: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    position: relative;
    transition: transform .15s, background .2s;
}

.act-zone-shape .act-zone-outline {
    opacity: 0.28;
    filter: grayscale(1);
}

.act-zone-color {
    border: 3px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.act-zone-color .act-zone-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.act-zone-category {
    flex-direction: column;
    gap: 4px;
    background: rgba(255, 255, 255, 0.8);
}

.act-zone-category .act-zone-emoji {
    font-size: 1.8rem;
}

.act-zone-category .act-zone-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #555;
}

.act-zone-slot {
    background: rgba(255, 255, 255, 0.8);
    flex-direction: column;
}

.act-zone-slot .act-zone-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #888;
}

.act-zone-letterslot {
    background: rgba(255, 255, 255, 0.85);
    border-style: solid;
    max-width: 70px;
}

.act-zone-placeholder {
    font-size: 1.8rem;
    color: #ccc;
    font-weight: 700;
}

.act-zone-placed {
    font-size: 2.2rem;
    animation: zoneSnap 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.act-zone-filled {
    border-style: solid;
    border-color: rgba(46, 204, 113, 0.5);
    background: rgba(46, 204, 113, 0.12);
}

.act-zone-correct-flash {
    animation: zoneFlash 0.5s ease;
}

@keyframes zoneFlash {
    0% {
        background: rgba(46, 204, 113, 0.5);
        transform: scale(1.08);
    }

    100% {
        background: rgba(46, 204, 113, 0.12);
        transform: scale(1);
    }
}

@keyframes zoneSnap {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    60% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
    }
}

/* Basket (counting) */
.act-basket {
    max-width: 140px;
    flex-direction: column;
    gap: 2px;
    background: rgba(255, 255, 255, 0.85);
}

.act-basket-count {
    font-size: 1.3rem;
    font-weight: 700;
    color: #e65100;
}

/* Drag tray */
.act-tray {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 20px;
    min-height: 80px;
}

.act-chip {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.act-chip-emoji {
    font-size: 1.8rem;
}

.act-chip:active {
    cursor: grabbing;
}

.act-dragging {
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.25);
    transform: scale(1.1);
    pointer-events: none;
}

.act-chip-shake {
    animation: chipShake 0.4s ease;
}

@keyframes chipShake {

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

    20% {
        transform: translateX(-8px);
    }

    40% {
        transform: translateX(8px);
    }

    60% {
        transform: translateX(-6px);
    }

    80% {
        transform: translateX(6px);
    }
}

@media(max-width:768px) {
    .act-dropzone-area {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .act-zone {
        max-width: 75px;
        font-size: 1.6rem;
        border-radius: 14px;
    }

    .act-zone-category .act-zone-emoji {
        font-size: 1.3rem;
    }

    .act-chip {
        width: 52px;
        height: 52px;
        font-size: 1.5rem;
    }

    .act-tray {
        gap: 10px;
        padding: 12px;
    }

    .act-basket {
        max-width: 100px;
    }
}


/* ========== Subjects Screen ========== */

#subjects.active {
    background:
        radial-gradient(circle at 15% 20%, rgba(91, 54, 255, 0.06) 0%, transparent 35%),
        radial-gradient(circle at 85% 75%, rgba(255, 200, 50, 0.10) 0%, transparent 35%),
        radial-gradient(circle at 50% 95%, rgba(46, 204, 113, 0.07) 0%, transparent 40%);
    border-radius: 32px;
    padding: 8px;
}

.subj-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.subj-header-text {
    flex: 1;
    min-width: 0;
}

.subj-home-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform .2s;
}

.subj-home-btn:hover {
    transform: translateY(-2px) rotate(-8deg);
}

.subj-greeting {
    font-size: 1.3rem;
    font-weight: 700;
    color: #5b36ff;
    line-height: 1.3;
}

.subj-title {
    font-size: 0.95rem;
    color: #888;
}

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

.subj-tile {
    border: none;
    border-radius: 28px;
    padding: 28px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.10);
    transition: transform .25s, box-shadow .25s;
    animation: subjPopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.subj-tile:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.16);
}

.subj-tile:active {
    transform: translateY(-2px) scale(0.98);
}

.subj-tile::after {
    content: "";
    position: absolute;
    top: -40%;
    right: -30%;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
}

.subj-tile-icon {
    font-size: 3.2rem;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
}

.subj-tile-label {
    font-size: 1.25rem;
    font-weight: 700;
    z-index: 1;
}

.subj-tile-sub {
    font-size: 0.78rem;
    opacity: 0.75;
    z-index: 1;
}

@keyframes subjPopIn {
    0% {
        transform: scale(0.7) translateY(20px);
        opacity: 0;
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Subject tile color themes */
.subj-tile.subj-eng {
    background: linear-gradient(135deg, #e3f0ff 0%, #d4e6ff 100%);
    color: #1a56cc;
}

.subj-tile.subj-hin {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe6c2 100%);
    color: #c65e00;
}

.subj-tile.subj-mat {
    background: linear-gradient(135deg, #e8f5e9 0%, #d4ecd6 100%);
    color: #2a7d2e;
}

.subj-tile.subj-evs {
    background: linear-gradient(135deg, #e0f2f1 0%, #ccebe8 100%);
    color: #00695c;
}

.subj-tile.subj-act {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b8 100%);
    color: #e65100;
    grid-column: span 2;
}

@media(max-width:480px) {
    .subj-tile.subj-act {
        grid-column: span 1;
    }
}

@media(max-width:768px) {
    .subj-grid {
        gap: 12px;
    }

    .subj-tile {
        padding: 20px 12px;
        border-radius: 22px;
    }

    .subj-tile-icon {
        font-size: 2.4rem;
    }

    .subj-tile-label {
        font-size: 1.05rem;
    }

    .subj-tile-sub {
        font-size: 0.7rem;
    }

    .subj-home-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .subj-greeting {
        font-size: 1.1rem;
    }

    .subj-header .streak-badge {
        font-size: 0.85rem;
        padding: 8px 14px;
    }
}

/* ========== Home Tagline ========== */
.home-tagline {
    text-align: center;
    margin-top: 20px;
    padding-bottom: 8px;
    font-size: 0.88rem;
    color: #aaa;
    letter-spacing: 0.3px;
}

/* ========== Revive Card (Lightning Mode rewarded ad) ========== */
.revive-card {
    background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
    border: 2px solid #ffe082;
    border-radius: 20px;
    padding: 16px 20px;
    margin: 16px 0;
    text-align: center;
    animation: fadeSlideUp 0.5s ease both;
    animation-delay: 0.7s;
}

.revive-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e65c00;
    margin-bottom: 4px;
}

.revive-sub {
    font-size: 0.82rem;
    color: #888;
    margin-bottom: 12px;
}

.revive-btn {
    background: linear-gradient(135deg, #ff9800 0%, #e65c00 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(230, 92, 0, 0.3);
    transition: transform .2s, box-shadow .2s;
}

.revive-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(230, 92, 0, 0.4);
}

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


/* ========== Freemium — Locked Games ========== */

/* Locked category card */
.cat-card-locked {
    opacity: 0.72;
    background: #f5f5f5 !important;
    position: relative;
    cursor: pointer;
}

.cat-card-locked .cat-card-name {
    color: #999 !important;
}

.cat-card-locked .cat-card-desc {
    color: #e65c00 !important;
    font-weight: 600;
}

.locked-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    font-size: 1rem;
}

/* Locked lightning mode button */
.sd-btn-locked {
    opacity: 0.6;
    border-color: #ccc !important;
    color: #999 !important;
    background: #fafafa !important;
    cursor: pointer;
}

/* Locked popup overlay */
#locked-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Locked popup card */
.locked-popup {
    background: #fff;
    border-radius: 28px;
    padding: 28px 24px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    animation: popupEntry 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes popupEntry {
    0% {
        transform: scale(0.7) translateY(30px);
        opacity: 0;
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.locked-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: #f0f0f0;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-family: inherit;
}

.locked-close:hover {
    background: #e0e0e0;
}

.locked-icon {
    font-size: 3.2rem;
    margin-bottom: 8px;
    animation: lockWiggle 0.5s ease 0.3s both;
}

@keyframes lockWiggle {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-12deg);
    }

    75% {
        transform: rotate(12deg);
    }
}

.locked-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #5b36ff;
    margin-bottom: 4px;
}

.locked-game-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #e65c00;
    background: #fff3e0;
    border-radius: 999px;
    padding: 4px 14px;
    display: inline-block;
    margin-bottom: 14px;
}

.locked-msg {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
}

.locked-perks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 20px;
}

.locked-perk {
    background: #f8f5ff;
    border: 1px solid #e0d9ff;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #5b36ff;
}

.locked-download-btn {
    display: inline-block;
    margin-bottom: 10px;
    transition: transform .2s, opacity .2s;
}

.locked-download-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.locked-sub {
    font-size: 0.75rem;
    color: #aaa;
    margin-bottom: 16px;
}

.locked-try-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 999px;
    padding: 10px 22px;
    font-size: 0.85rem;
    font-family: inherit;
    color: #888;
    cursor: pointer;
    transition: background .2s;
    width: 100%;
}

.locked-try-btn:hover {
    background: #f5f5f5;
}

@media(max-width:768px) {
    .locked-popup {
        padding: 22px 18px;
        border-radius: 22px;
    }

    .locked-title {
        font-size: 1.3rem;
    }

    .locked-perks {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
}