/* ==================== GLOBAL STYLES & RESET ==================== */
:root {
    --primary: #4a90e2;
    --primary-grad: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
    --bg-grad: linear-gradient(135deg, #e0f2fe 0%, #e0e7ff 100%);
    --text-color: #2e3a59;
    --text-light: #64748b;
    --white-glass: rgba(255, 255, 255, 0.75);
    --border-glass: rgba(255, 255, 255, 0.4);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Fredoka', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--bg-grad);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* ==================== FLOATING BACKGROUND BUBBLES ==================== */
.bubble-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    animation: floatUp 25s infinite linear;
    bottom: -150px;
}

.bubble:nth-child(1) { left: 10%; width: 80px; height: 80px; animation-delay: 0s; animation-duration: 20s; }
.bubble:nth-child(2) { left: 25%; width: 120px; height: 120px; animation-delay: 2s; animation-duration: 28s; }
.bubble:nth-child(3) { left: 40%; width: 60px; height: 60px; animation-delay: 5s; animation-duration: 18s; }
.bubble:nth-child(4) { left: 55%; width: 150px; height: 150px; animation-delay: 1s; animation-duration: 35s; }
.bubble:nth-child(5) { left: 70%; width: 90px; height: 90px; animation-delay: 8s; animation-duration: 24s; }
.bubble:nth-child(6) { left: 85%; width: 50px; height: 50px; animation-delay: 3s; animation-duration: 16s; }
.bubble:nth-child(7) { left: 90%; width: 110px; height: 110px; animation-delay: 11s; animation-duration: 30s; }

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-110vh) rotate(360deg) scale(1.2);
        opacity: 0;
    }
}

/* ==================== CONFETTI CANVAS ==================== */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999;
    pointer-events: none;
}

/* ==================== APP CONTAINER & GLASS CARDS ==================== */
.app-container {
    width: 100%;
    max-width: 900px;
    padding: 20px;
    z-index: 10;
}

.glass {
    background: var(--white-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 2px solid var(--border-glass);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
}

.screen {
    display: none;
    animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.screen.active {
    display: block;
}

@keyframes scaleIn {
    0% {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* ==================== TYPOGRAPHY ==================== */
h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: #ef476f;
    text-shadow: 2px 2px 0px #fff, 4px 4px 0px rgba(0,0,0,0.05);
    margin-bottom: 5px;
}

.bounce-text {
    animation: bounceSlow 3s infinite ease-in-out;
    display: inline-block;
}

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

h2.title-select-game {
    text-align: center;
    font-size: 1.8rem;
    color: #118ab2;
    margin: 20px 0;
    text-shadow: 1px 1px 0px #fff;
}

/* ==================== BUTTONS ==================== */
.btn {
    border: none;
    border-radius: 50px;
    padding: 12px 28px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    outline: none;
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: scale(0.93) !important;
}

.btn-primary {
    background: var(--primary-grad);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px -5px rgba(255, 126, 95, 0.5);
}

.btn-secondary {
    background: white;
    color: #4b6584;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    background: #f8fafc;
}

.btn-back {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    padding: 0;
    background: white;
    color: var(--text-color);
    border: 2px solid #e2e8f0;
}

.btn-back:hover {
    background: #f8fafc;
    transform: translateX(-3px);
}

.btn-voice {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    padding: 0;
    background: white;
    color: #118ab2;
    border: 2px solid #e2e8f0;
}

.btn-voice:hover {
    background: #f1f5f9;
    transform: rotate(15deg);
}

.pulse {
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 126, 95, 0.7); }
    70% { transform: scale(1.03); box-shadow: 0 0 0 10px rgba(255, 126, 95, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 126, 95, 0); }
}

/* ==================== WELCOME SCREEN ==================== */
.welcome-card {
    padding: 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-svg {
    animation: rotateLogo 8s infinite linear;
}

@keyframes rotateLogo {
    0% { transform: rotate(0); }
    50% { transform: rotate(5deg); }
    100% { transform: rotate(0); }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-top: 5px;
}

.login-form {
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-form label {
    font-size: 1.1rem;
    font-weight: 600;
    text-align: left;
    color: var(--text-color);
}

.login-form input {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1.1rem;
    outline: none;
    text-align: center;
    background: white;
    transition: all 0.3s;
}

.login-form input:focus {
    border-color: #ff7e5f;
    box-shadow: 0 0 10px rgba(255, 126, 95, 0.15);
}

.welcome-mascot {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.6);
    padding: 15px 25px;
    border-radius: 20px;
    border: 1px dashed rgba(0,0,0,0.1);
    max-width: 450px;
    margin-top: 15px;
}

.mascot-svg {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    animation: floatMascot 4s infinite ease-in-out;
}

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

.speech-bubble {
    font-size: 1rem;
    line-height: 1.4;
    text-align: left;
    color: var(--text-color);
    position: relative;
}

/* ==================== GAME MAP SCREEN ==================== */
.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    margin-bottom: 20px;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

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

.user-greeting strong {
    color: #ff7e5f;
    font-weight: 700;
}

.stats {
    display: flex;
    gap: 10px;
}

.stat-badge {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    padding: 6px 14px;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: var(--shadow-sm);
}

/* ==================== GRADE FILTER STYLES ==================== */
.grade-filter-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    margin: 0 auto 30px auto;
    max-width: 650px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

.filter-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
}

.grade-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.tab-btn {
    background: white;
    color: var(--text-color);
    border: 2px solid #e2e8f0;
    padding: 10px 18px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-sm);
}

.tab-btn:hover {
    border-color: #ff7e5f;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(255, 126, 95, 0.3);
}

/* Recommended Badges and Faded Card States */
.gate-card {
    position: relative;
    overflow: hidden;
}

.gate-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #06d6a0;
    color: white;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    animation: pulseBadge 2s infinite alternate;
}

@keyframes pulseBadge {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.gate-card.faded {
    opacity: 0.55;
    filter: grayscale(40%);
}

.gate-card.faded:hover {
    opacity: 0.85;
    filter: grayscale(0%);
}

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

@media (max-width: 600px) {
    .gates-grid {
        grid-template-columns: 1fr;
    }
}

.gate-card {
    padding: 30px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 255, 255, 0.7);
}

.gate-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-md);
    animation: floatMascot 4s infinite ease-in-out;
}

.bg-gradient-yellow { background: linear-gradient(135deg, #ffe066 0%, #fec84d 100%); }
.bg-gradient-pink { background: linear-gradient(135deg, #fec5bb 0%, #ffb5a7 100%); }
.bg-gradient-blue { background: linear-gradient(135deg, #a0c4ff 0%, #90e0ef 100%); }
.bg-gradient-purple { background: linear-gradient(135deg, #ffc6ff 0%, #e8a5ff 100%); }
.bg-gradient-orange { background: linear-gradient(135deg, #ff9f43 0%, #ff6b6b 100%); }
.bg-gradient-mint { background: linear-gradient(135deg, #00d2d3 0%, #1dd1a1 100%); }
.bg-gradient-purple-blue { background: linear-gradient(135deg, #5f27cd 0%, #341f97 100%); }
.bg-gradient-red-yellow { background: linear-gradient(135deg, #ee5253 0%, #feca57 100%); }

.gate-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-color);
}

.gate-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.4;
    min-height: 40px;
}

.btn-gate {
    background: white;
    color: var(--text-color);
    border: 2px solid #e2e8f0;
    padding: 8px 20px;
    font-size: 0.95rem;
    border-radius: 20px;
}

.gate-card:hover .btn-gate {
    background: var(--primary-grad);
    color: white;
    border-color: transparent;
    transform: scale(1.05);
}

/* ==================== LEVEL SELECT SCREEN ==================== */
.levels-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.level-card {
    flex: 1;
    min-width: 240px;
    max-width: 280px;
    padding: 30px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    position: relative;
    cursor: pointer;
}

.level-badge {
    position: absolute;
    top: -15px;
    padding: 6px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    box-shadow: var(--shadow-sm);
}

.level-badge.easy { background: linear-gradient(135deg, #06d6a0, #2a9d8f); }
.level-badge.medium { background: linear-gradient(135deg, #ffd166, #f4a261); }
.level-badge.hard { background: linear-gradient(135deg, #ef476f, #e76f51); }

.level-card h3 {
    font-size: 1.25rem;
    margin-top: 10px;
}

.level-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    min-height: 50px;
    line-height: 1.4;
}

.btn-level {
    width: 100%;
    color: white;
}

.btn-easy { background: linear-gradient(135deg, #06d6a0, #2a9d8f); }
.btn-medium { background: linear-gradient(135deg, #ffd166, #f4a261); }
.btn-hard { background: linear-gradient(135deg, #ef476f, #e76f51); }

/* ==================== GAME PLAY ARENA ==================== */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    margin-bottom: 15px;
}

.game-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.game-info-text {
    font-size: 0.95rem;
    color: var(--text-light);
}

.game-info-text strong {
    color: var(--text-color);
}

.progress-stars {
    display: flex;
    gap: 6px;
}

.star-slot {
    font-size: 1.4rem;
    opacity: 0.2;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: scale(0.9);
}

.star-slot.filled {
    opacity: 1;
    transform: scale(1.2);
    text-shadow: 0 0 8px rgba(255, 209, 102, 0.8);
    animation: starJump 0.4s ease-out;
}

@keyframes starJump {
    0% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.4) translateY(-10px); }
    100% { transform: scale(1.2) translateY(0); }
}

.game-arena {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.visual-board {
    width: 100%;
    min-height: 250px;
    padding: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 24px;
}

.question-prompt {
    font-size: 1.4rem;
    font-weight: 600;
    text-align: center;
    padding: 8px 20px;
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
}

.answers-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 10px;
}

/* Answer option styling */
.ans-tile {
    min-width: 65px;
    height: 65px;
    border-radius: 16px;
    background: white;
    color: var(--text-color);
    font-size: 1.8rem;
    font-weight: 700;
    border: 3px solid #cbd5e1;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ans-tile:hover {
    transform: translateY(-4px);
    border-color: #ff7e5f;
    box-shadow: 0 8px 16px rgba(255, 126, 95, 0.2);
}

.ans-tile.selected {
    background: var(--primary-grad);
    color: white;
    border-color: transparent;
    transform: scale(1.05);
}

/* Success / Error animations on tiles */
.ans-tile.correct {
    animation: correctPulse 0.4s ease-out;
    background: #06d6a0;
    color: white;
    border-color: transparent;
}

.ans-tile.wrong {
    animation: wrongWiggle 0.4s ease-out;
    background: #ef476f;
    color: white;
    border-color: transparent;
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

@keyframes wrongWiggle {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

/* ==================== MASCOT SPEECH BUBBLE ==================== */
.game-mascot-container {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.6);
    padding: 10px 20px;
    border-radius: 20px;
    border: 1px dashed rgba(0,0,0,0.1);
    max-width: 550px;
    margin: 15px auto 0 auto;
    box-shadow: var(--shadow-sm);
}

.mascot-clickable {
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.mascot-clickable:hover {
    transform: scale(1.08) rotate(5deg);
}

.mini-mascot-svg {
    width: 60px;
    height: 60px;
    animation: floatMascot 3s infinite ease-in-out;
}

.game-speech-bubble {
    font-size: 0.95rem;
    line-height: 1.4;
    text-align: left;
}

/* ==================== VICTORY CELEBRATION ==================== */
.victory-card {
    padding: 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.trophy-svg {
    animation: trophySpin 6s infinite ease-in-out;
}

@keyframes trophySpin {
    0%, 100% { transform: rotate(0) scale(1); }
    25% { transform: rotate(-5deg) scale(1.05); }
    75% { transform: rotate(5deg) scale(1.05); }
}

.victory-title {
    font-size: 2.6rem;
    font-weight: 700;
}

.text-rainbow {
    background: linear-gradient(to right, #ef476f, #ffd166, #06d6a0, #118ab2, #ff7e5f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbowShift 6s linear infinite;
    background-size: 200% auto;
    text-shadow: none;
}

@keyframes rainbowShift {
    to { background-position: 200% center; }
}

.victory-message {
    font-size: 1.15rem;
    line-height: 1.5;
    max-width: 500px;
    color: var(--text-color);
}

.victory-stats {
    display: flex;
    gap: 20px;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.victory-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 600;
}

.victory-stat-emoji {
    font-size: 1.4rem;
}

.victory-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ==================== GAME SPECIFIC ELEMENTS ==================== */

/* Gate 1: Enumerate SVGs */
.count-items-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    max-width: 500px;
}

.clickable-count-item {
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.clickable-count-item.counted {
    transform: scale(0.9);
    filter: drop-shadow(0 0 8px rgba(74,144,226,0.5));
}

/* Gate 2: Comparator Alligator scale */
.comparator-arena {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    width: 100%;
}

.num-plate {
    min-width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 3px solid #cbd5e1;
    font-size: 2.2rem;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-md);
    color: var(--text-color);
}

.comparison-box {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    border: 3px dashed #94a3b8;
    background: rgba(255, 255, 255, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.6rem;
    font-weight: 700;
    color: #ef476f;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
}

.alligator-svg {
    width: 70px;
    height: 70px;
    animation: bounceSlow 2s infinite ease-in-out;
}

/* Gate 3: Operations visual representation */
.operation-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.visual-items-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-height: 60px;
}

.operation-symbol-text {
    font-size: 2.2rem;
    font-weight: 700;
    color: #475569;
    margin: 0 10px;
}

.operation-popped-item {
    opacity: 0.25;
    transform: scale(0.9);
    filter: grayscale(1);
    position: relative;
}

/* Gate 4: Train cars representing number line */
.train-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 5px;
    overflow-x: auto;
    width: 100%;
    padding: 10px 0;
}

.train-engine {
    width: 90px;
    height: 85px;
    flex-shrink: 0;
}

.train-car {
    width: 70px;
    height: 65px;
    background: linear-gradient(to top, #fee440, #fffae0);
    border: 3px solid #264653;
    border-radius: 8px 8px 0 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.train-car:nth-child(even) {
    background: linear-gradient(to top, #a0c4ff, #e2efff);
}

.train-car-number {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-color);
}

.train-car-question {
    font-size: 1.6rem;
    font-weight: 700;
    color: #ef476f;
    animation: blinkQuestion 1s infinite alternate;
}

@keyframes blinkQuestion {
    0% { opacity: 0.3; }
    100% { opacity: 1; }
}

.train-wheels {
    display: flex;
    justify-content: space-around;
    width: 100%;
    position: absolute;
    bottom: -10px;
}

.train-wheel {
    width: 16px;
    height: 16px;
    background: #333;
    border: 2px solid white;
    border-radius: 50%;
}

.train-connector {
    width: 10px;
    height: 6px;
    background: #264653;
    margin-bottom: 8px;
    flex-shrink: 0;
}

/* ==================== MULTIPLICATION GAME STYLES ==================== */
.multiplication-stars-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    border: 1px dashed rgba(0,0,0,0.1);
}

.stars-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.stars-row-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
    margin-right: 5px;
}

/* ==================== CLOCK GAME STYLES ==================== */
.clock-display-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.clock-interactive-area {
    display: flex;
    align-items: center;
    gap: 20px;
}

.clock-adjust-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.clock-adjust-btn {
    background: white;
    border: 2px solid #cbd5e1;
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.clock-adjust-btn:hover {
    background: #f1f5f9;
    border-color: #ff7e5f;
    transform: translateY(-2px);
}

.clock-digital-box {
    background: #1e293b;
    color: #38bdf8;
    font-family: monospace;
    font-size: 2.2rem;
    font-weight: 700;
    padding: 10px 25px;
    border-radius: 12px;
    border: 3px solid #475569;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.4);
}

/* ==================== FRACTIONS GAME STYLES ==================== */
.fraction-visual-container {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.fraction-display-math {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-color);
}

.fraction-numerator {
    border-bottom: 4px solid var(--text-color);
    padding: 0 10px;
    min-width: 40px;
    text-align: center;
}

.fraction-denominator {
    padding: 0 10px;
    min-width: 40px;
    text-align: center;
}

.fraction-equals-sign {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-color);
}

/* ==================== GEOMETRY GAME STYLES ==================== */
.geometry-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    width: 100%;
}

.geometry-shape-box {
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    border-radius: 20px;
    padding: 15px;
    box-shadow: var(--shadow-md);
    animation: shapeFloat 6s infinite ease-in-out;
}

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

/* ==================== MASCOT INTERACTIVE ANIMATIONS ==================== */
#game-mascot-svg.happy .mascot-ear-l {
    transform-origin: 39px 48px;
    animation: wiggleEarL 0.4s infinite alternate;
}

#game-mascot-svg.happy .mascot-ear-r {
    transform-origin: 61px 48px;
    animation: wiggleEarR 0.4s infinite alternate;
}

#game-mascot-svg.happy .mascot-eyes {
    animation: happyEyes 0.4s infinite alternate;
}

#game-mascot-svg.happy #mascot-mouth {
    d: path("M46,67 Q50,73 54,67"); /* Happy smile */
    stroke-width: 2.2px;
}

@keyframes wiggleEarL {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-8deg); }
}

@keyframes wiggleEarR {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(8deg); }
}

@keyframes happyEyes {
    0% { transform: scaleY(1); }
    100% { transform: scaleY(0.2); }
}

#game-mascot-svg.sad {
    animation: mascotShy 0.6s ease;
}

#game-mascot-svg.sad .mascot-ear-l {
    transform-origin: 39px 48px;
    transform: rotate(-5deg);
}

#game-mascot-svg.sad .mascot-ear-r {
    transform-origin: 61px 48px;
    transform: rotate(5deg);
}

#game-mascot-svg.sad #mascot-mouth {
    d: path("M48,70 Q50,67 52,70"); /* Sad face */
}

@keyframes mascotShy {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

/* ==================== STICKER SHELF STYLES ==================== */
.sticker-shelf {
    margin-top: 40px;
    padding: 25px;
    border-radius: 24px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: var(--shadow-sm);
}

.sticker-shelf h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 5px;
}

.sticker-info {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.sticker-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

@media (max-width: 768px) {
    .sticker-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.sticker-card {
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sticker-card:not(.locked):hover {
    transform: scale(1.08) translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #ff7e5f;
    background: white;
}

.sticker-icon {
    font-size: 2.5rem;
    transition: all 0.3s;
}

.sticker-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-color);
}

/* Locked sticker state */
.sticker-card.locked {
    opacity: 0.4;
    filter: grayscale(100%);
    border-style: dashed;
    background: rgba(255, 255, 255, 0.2);
}

.sticker-card.locked .sticker-icon {
    transform: scale(0.9);
}

.sticker-card.locked::after {
    content: "🔒 Lock";
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 10px;
}

