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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #f7f9fc 0%, #eff4ff 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(15px, 3vw, 20px);
    width: 100%;
}


/* Header */
header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: clamp(0.8rem, 2vw, 1rem) 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

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

/* Header logo image */
.logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: clamp(32px, 5vw, 40px);
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: clamp(1rem, 3vw, 2rem);
}

.nav-links a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.18);
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.nav-links a:hover {
    color: #264aa3;
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #2c3e50;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.22);
    padding: clamp(80px, 15vh, 120px) clamp(15px, 3vw, 20px);
}

.hero h1 {
    font-size: clamp(2rem, 6vw, 4rem);
    margin-bottom: clamp(0.8rem, 2vh, 1rem);
    animation: slideInDown 1s ease-out;
    line-height: 1.2;
}

.hero p {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    margin-bottom: clamp(1.5rem, 3vh, 2rem);
    animation: slideInUp 1s ease-out 0.3s both;
}

.cta-button {
    display: inline-block;
    padding: clamp(12px, 2vh, 15px) clamp(25px, 4vw, 30px);
    background: linear-gradient(45deg, #4f86ff, #2563eb);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.35);
    background: linear-gradient(45deg, #2563eb, #4f86ff);
}

/* Main Content */
.main-content {
    background: white;
    position: relative;
    z-index: 2;
    padding: clamp(3rem, 6vh, 4rem) 0;
    margin-top: clamp(-30px, -5vh, -50px);
    border-radius: clamp(30px, 5vw, 50px) clamp(30px, 5vw, 50px) 0 0;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.06);
}

.section-title {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: clamp(2rem, 4vh, 3rem);
    color: #2c3e50;
    position: relative;
    padding: 0 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(60px, 10vw, 80px);
    height: 4px;
    background: linear-gradient(45deg, #4f86ff, #2563eb);
    border-radius: 2px;
}

/* Course Cards */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 3rem;
}

.course-card {
    background: white;
    padding: clamp(1.2rem, 3vw, 2rem);
    border-radius: clamp(15px, 2.5vw, 20px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(37, 99, 235, 0.12);
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.12), transparent);
    transition: left 0.6s ease;
}

.course-card:hover::before {
    left: 100%;
}

.course-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.15);
}

.course-icon {
    font-size: clamp(2.5rem, 5vw, 3rem);
    text-align: center;
    margin-bottom: 1rem;
    color: #2563eb;
}

.course-card h3 {
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    margin-bottom: 1rem;
    color: #2563eb;
    text-align: center;
}

.course-card p {
    color: #667a8a;
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    line-height: 1.6;
}

.course-button {
    display: block;
    width: 100%;
    padding: clamp(12px, 2vh, 15px);
    background: linear-gradient(45deg, #4f86ff, #2563eb);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    text-align: center;
    font-weight: bold;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.course-button:hover {
    background: linear-gradient(45deg, #2563eb, #4f86ff);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.28);
}

/* Grade Selection Page */
.grade-selection {
    display: none;
    padding: 2rem 0;
}

.grade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr));
    gap: clamp(0.8rem, 2vw, 1rem);
    margin-top: 2rem;
}

.grade-card {
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    color: white;
    padding: clamp(1rem, 2.5vw, 1.5rem);
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.20);
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grade-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.22) 0%, transparent 70%);
    transition: opacity 0.3s ease;
    opacity: 0;
}

.grade-card:hover::before {
    opacity: 1;
}

.grade-card:hover {
    transform: translateY(-5px) rotate(2deg);
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.28);
}

.grade-card h4 {
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-bottom: 0.5rem;
}

.back-button {
    background: #3b82f6;
    color: white;
    padding: clamp(10px, 2vh, 12px) clamp(18px, 3vw, 20px);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.18);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.back-button:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.28);
}

/* Game Platform */
.game-platform {
    display: none;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    color: white;
    padding: clamp(1.5rem, 3vw, 2rem);
    border-radius: clamp(15px, 2.5vw, 20px);
    margin: 2rem 0;
    text-align: center;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.22);
}

.game-interface {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: clamp(1.5rem, 3vw, 2rem);
    margin: 2rem 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.game-button {
    background: #60a5fa;
    color: white;
    padding: clamp(12px, 2vh, 15px) clamp(25px, 4vw, 30px);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    margin: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.20);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.game-button:hover {
    background: #3b82f6;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.28);
}

/* Footer */
footer {
    background: #1f2937;
    color: white;
    padding: clamp(2rem, 4vh, 3rem) 0 clamp(0.8rem, 2vh, 1rem);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #cfe0ff;
    font-size: clamp(1rem, 2vw, 1.2rem);
}

.footer-section p {
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    line-height: 1.8;
}

.footer-section a {
    color: #93c5fd;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-section a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Animations */
@keyframes slideInDown {
    from { transform: translateY(-100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(79, 134, 255, 0.60); }
    70% { box-shadow: 0 0 0 20px rgba(79, 134, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(79, 134, 255, 0); }
}

@keyframes loading {
    from { width: 0%; }
    to { width: 100%; }
}

/* Mobile Menu Styles */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    gap: 4px;
    z-index: 1001;
    min-height: 44px;
    min-width: 44px;
    align-items: center;
    justify-content: center;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: #2c3e50;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Responsive Design - Tablet and Below */
@media (max-width: 1024px) {
    .courses-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    }
}

@media (max-width: 768px) {
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Hide desktop navigation */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(280px, 80vw);
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 80px;
        gap: 2rem;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }
    
    .nav-links.mobile-menu-open {
        right: 0;
    }
    
    .nav-links li {
        width: 100%;
        text-align: center;
    }
    
    .nav-links a {
        display: block;
        padding: 15px 20px;
        font-size: 1.2rem;
        width: 100%;
        border-radius: 10px;
        margin: 0 20px;
        transition: all 0.3s ease;
    }
    
    .nav-links a:hover {
        background: rgba(37, 99, 235, 0.1);
        transform: translateY(0);
    }
    
    /* Single column layout for courses on mobile */
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    /* Two column layout for grades */
    .grade-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 100px), 1fr));
    }
}

@media (max-width: 480px) {
    /* Ensure single column on very small screens */
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .grade-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-links {
        width: 100%;
    }
}

@media (max-width: 360px) {
    /* Very small screens - single column for grades */
    .grade-grid {
        grid-template-columns: 1fr;
    }
}

/* Blur subject under development */
.course-button[aria-disabled="true"] {
    opacity: 0.6;
    cursor: not-allowed;
}

.course-button[aria-disabled="true"]:hover {
    transform: none;
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.28);
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Prevent horizontal scroll */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Improve touch targets for mobile */
@media (hover: none) and (pointer: coarse) {
    a, button, .course-card, .grade-card {
        min-height: 44px;
        min-width: 44px;
    }
}
