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

/* Utility Classes */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #06d6a0 0%, #0066cc 100%);
    min-height: 100vh;
    line-height: 1.6;
}

/* ======================
   HERO SECTION
   ====================== */
.hero-section {
    padding: 60px 20px;
    text-align: center;
    color: white;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
}

.hero-title {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 50px;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-cta {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.grade-selector-title {
    font-size: 2rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.grade-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.grade-card {
    background: white;
    border: 4px solid transparent;
    border-radius: 25px;
    padding: 50px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.grade-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.grade-card-featured {
    border-color: #00b4ff;
    background: linear-gradient(135deg, #e6f7ff 0%, #d1f0ff 100%);
}

.grade-card-featured:hover {
    border-color: #0088cc;
}

.grade-number {
    font-size: 5rem;
    font-weight: bold;
    color: #0066cc;
    margin-bottom: 10px;
    line-height: 1;
}

.grade-card-featured .grade-number {
    color: #0088cc;
}

.grade-label {
    font-size: 1.4rem;
    color: #333;
    font-weight: 600;
    margin-bottom: 10px;
}

.grade-status {
    margin-top: 15px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    display: inline-block;
}

.coming-soon-badge {
    background: rgba(255, 107, 107, 0.15);
    color: #FF6B6B;
    border: 2px solid #FF6B6B;
}

.available-badge {
    background: linear-gradient(135deg, #00d4ff 0%, #0088cc 100%);
    color: white;
}

/* ======================
   FEATURES SECTION
   ====================== */
.features-section {
    padding: 60px 20px 40px;
    background: rgba(255, 255, 255, 0.05);
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 30px 25px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: none;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.feature-title {
    font-size: 1.3rem;
    color: white;
    margin-bottom: 12px;
    font-weight: 600;
}

.feature-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

/* ======================
   GAMES SECTION
   ====================== */
.games-section {
    padding: 60px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Select Grade Message */
.select-grade-message {
    text-align: center;
    color: white;
    padding: 80px 20px;
    animation: fadeIn 0.6s ease-out;
}

.message-icon {
    font-size: 6rem;
    margin-bottom: 30px;
    animation: bounce 2s infinite;
}

.select-grade-message h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.select-grade-message p {
    font-size: 1.3rem;
    opacity: 0.95;
}

/* Coming Soon Message */
.coming-soon-message {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 80px 40px;
    max-width: 700px;
    margin: 40px auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.6s ease-out;
}

.coming-soon-icon {
    font-size: 6rem;
    margin-bottom: 30px;
}

.coming-soon-title {
    font-size: 3rem;
    color: #333;
    margin-bottom: 20px;
    font-weight: bold;
}

.coming-soon-text {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 40px;
    line-height: 1.6;
}

.back-btn {
    display: inline-block;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #00b4ff 0%, #0066cc 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.4);
}

.back-btn:hover {
    background: linear-gradient(135deg, #0066cc 0%, #00b4ff 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.6);
}

/* Games Content */
.games-content {
    animation: fadeIn 0.6s ease-out;
}

.games-header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.games-title {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.change-grade-btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.change-grade-btn:hover {
    background: white;
    color: #0066cc;
    transform: translateY(-2px);
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.game-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* Difficulty Badges */
.difficulty-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.difficulty-badge.easy {
    background: linear-gradient(135deg, #38ef7d 0%, #11998e 100%);
    color: white;
}

.difficulty-badge.medium {
    background: linear-gradient(135deg, #FFE66D 0%, #FF6B6B 100%);
    color: #333;
}

.difficulty-badge.hard {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.game-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.game-card h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 15px;
}

.game-card p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 25px;
    line-height: 1.5;
}

.play-btn {
    display: inline-block;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.multiplication .play-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.multiplication .play-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.word-problems .play-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.word-problems .play-btn:hover {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4);
}

.mega-multiply .play-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.mega-multiply .play-btn:hover {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4);
}

.division .play-btn {
    background: linear-gradient(135deg, #FF6B6B 0%, #FFE66D 100%);
}

.division .play-btn:hover {
    background: linear-gradient(135deg, #FFE66D 0%, #FF6B6B 100%);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.decimal .play-btn {
    background: linear-gradient(135deg, #c026d3 0%, #7e22ce 100%);
}

.decimal .play-btn:hover {
    background: linear-gradient(135deg, #7e22ce 0%, #c026d3 100%);
    box-shadow: 0 5px 15px rgba(192, 38, 211, 0.4);
}

.volume .play-btn {
    background: linear-gradient(135deg, #00b4db 0%, #0083b0 100%);
}

.volume .play-btn:hover {
    background: linear-gradient(135deg, #0083b0 0%, #00b4db 100%);
    box-shadow: 0 5px 15px rgba(0, 180, 219, 0.4);
}

.fraction .play-btn {
    background: linear-gradient(135deg, #ff9800 0%, #fa8231 100%);
}

.fraction .play-btn:hover {
    background: linear-gradient(135deg, #fa8231 0%, #ff9800 100%);
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.4);
}

.powers-ten .play-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.powers-ten .play-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.rounders .play-btn {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.rounders .play-btn:hover {
    background: linear-gradient(135deg, #38ef7d 0%, #11998e 100%);
    box-shadow: 0 5px 15px rgba(17, 153, 142, 0.4);
}

.place-value .play-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.place-value .play-btn:hover {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    box-shadow: 0 5px 15px rgba(240, 147, 251, 0.4);
}

/* Grade 3 specific .play-btn overrides (mimic .volume .play-btn but with varied colors) */
.times-tables .play-btn {
    background: linear-gradient(135deg, #6EE7B7 0%, #3B82F6 100%);
}
.times-tables .play-btn:hover {
    background: linear-gradient(135deg, #3B82F6 0%, #6EE7B7 100%);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.35);
}

.add-sub .play-btn {
    background: linear-gradient(135deg, #FFD166 0%, #EF476F 100%);
}
.add-sub .play-btn:hover {
    background: linear-gradient(135deg, #EF476F 0%, #FFD166 100%);
    box-shadow: 0 5px 15px rgba(239, 71, 111, 0.35);
}

.geometry .play-btn {
    background: linear-gradient(135deg, #7F7FD5 0%, #86A8E7 100%);
}
.geometry .play-btn:hover {
    background: linear-gradient(135deg, #86A8E7 0%, #7F7FD5 100%);
    box-shadow: 0 5px 15px rgba(134, 168, 231, 0.35);
}

.fractions .play-btn {
    background: linear-gradient(135deg, #FFB347 0%, #FF7E5F 100%);
}
.fractions .play-btn:hover {
    background: linear-gradient(135deg, #FF7E5F 0%, #FFB347 100%);
    box-shadow: 0 5px 15px rgba(255, 126, 95, 0.35);
}

.time .play-btn {
    background: linear-gradient(135deg, #76B852 0%, #8DC26F 100%);
}
.time .play-btn:hover {
    background: linear-gradient(135deg, #8DC26F 0%, #76B852 100%);
    box-shadow: 0 5px 15px rgba(125, 184, 82, 0.35);
}

.measurement .play-btn {
    background: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
}
.measurement .play-btn:hover {
    background: linear-gradient(135deg, #0072ff 0%, #00c6ff 100%);
    box-shadow: 0 5px 15px rgba(0, 114, 255, 0.35);
}

.graphs .play-btn {
    background: linear-gradient(135deg, #00F260 0%, #0575E6 100%);
}
.graphs .play-btn:hover {
    background: linear-gradient(135deg, #0575E6 0%, #00F260 100%);
    box-shadow: 0 5px 15px rgba(5, 117, 230, 0.35);
}

.shapes-2d .play-btn {
    background: linear-gradient(135deg, #fbc2eb 0%, #a18cd1 100%);
}
.shapes-2d .play-btn:hover {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
    box-shadow: 0 5px 15px rgba(161, 140, 209, 0.35);
}

.shapes-3d .play-btn {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
}
.shapes-3d .play-btn:hover {
    background: linear-gradient(135deg, #fda085 0%, #f6d365 100%);
    box-shadow: 0 5px 15px rgba(253, 160, 133, 0.35);
}

/* ======================
   FOOTER
   ====================== */
.footer {
    padding: 40px 20px;
    text-align: center;
    color: white;
    background: rgba(0, 0, 0, 0.1);
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-tagline {
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: 600;
    opacity: 0.95;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-separator {
    color: white;
    opacity: 0.6;
    font-size: 1.2rem;
}

.footer-link {
    display: inline-block;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    padding: 10px 25px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 25px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
}

.footer-link:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* ======================
   ANIMATIONS
   ====================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* ======================
   RESPONSIVE DESIGN
   ====================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

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

    .grade-selector-title {
        font-size: 1.5rem;
    }

    .grade-cards {
        grid-template-columns: 1fr;
        max-width: 300px;
    }

    .grade-card {
        padding: 40px 25px;
    }

    .grade-number {
        font-size: 4rem;
    }

    .features-container {
        grid-template-columns: 1fr;
    }

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

    .game-card {
        padding: 30px 20px;
    }

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

    .select-grade-message h2 {
        font-size: 2rem;
    }

    .select-grade-message p {
        font-size: 1.1rem;
    }

    .coming-soon-title {
        font-size: 2rem;
    }

    .coming-soon-text {
        font-size: 1.1rem;
    }

    .coming-soon-message {
        padding: 50px 30px;
    }

    .footer-tagline {
        font-size: 1.1rem;
    }
}

/* ======================
   FLOATING FLASH CARDS BUTTON
   ====================== */
.flashcards-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #00b4ff 0%, #0066cc 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
}

.flashcards-float-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 102, 204, 0.6);
}

/* Flash Cards Menu */
.flashcards-menu {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 280px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    z-index: 999;
    animation: slideInUp 0.3s ease-out;
}

.flashcards-menu.hidden {
    display: none;
}

.flashcards-menu-header {
    background: linear-gradient(135deg, #00b4ff 0%, #0066cc 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flashcards-menu-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.flashcards-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    line-height: 1;
}

.flashcards-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.flashcards-menu-item {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.flashcards-menu-item:last-child {
    border-bottom: none;
}

.flashcards-menu-item:hover {
    background: linear-gradient(135deg, #e6f7ff 0%, #d1f0ff 100%);
    padding-left: 25px;
}

.flashcards-icon {
    font-size: 2rem;
    margin-right: 15px;
    min-width: 40px;
    text-align: center;
}

.flashcards-label {
    font-size: 1.1rem;
    font-weight: 600;
}

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

/* Mobile adjustments */
@media (max-width: 768px) {
    .flashcards-float-btn {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
        font-size: 1rem;
    }

    .flashcards-menu {
        right: 20px;
        bottom: 70px;
        width: calc(100vw - 40px);
        max-width: 300px;
    }
}
