@media (min-width: 1200px) {
    .auth-modal-content {
        min-width: 400px;
        max-width: 420px;
    }
}

@media (max-width: 600px) {
    .container {
        max-width: 100vw;
        padding: 0 5px;
    }
    .header {
        padding: 10px 0;
    }
    .logo {
        font-size: 20px;
    }
    .nav {
        margin-left: 0;
    }
    .nav-link {
        font-size: 16px;
        margin: 0 4px;
    }
    .btn {
        font-size: 14px;
        padding: 8px 14px;
    }
    .hero-title {
        font-size: 28px;
    }
    .hero-subtitle {
        font-size: 16px;
    }
    .search-bar {
        max-width: 95vw;
        padding: 2px;
    }
    .age-grid {
        gap: 6px;
    }
    .age-box {
        font-size: 13px;
        padding: 10px 10px;
    }
    .section-title {
        font-size: 22px;
    }
    .section-subtitle {
        font-size: 14px;
    }
    .course-card {
        width: 220px;
        min-width: 220px;
    }
    .card-header img {
        height: 110px;
    }
    .category-card {
        width: 100px;
        padding: 10px;
    }
    .category-card img {
        width: 50px;
        height: 50px;
    }
    .teacher-card {
        width: 120px;
        padding: 10px;
    }
    .teacher-card img {
        width: 60px;
        height: 60px;
    }
    .time-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 20px;
    }
    .time-filter-box {
        min-width: unset;
        width: 100%;
        padding: 10px 8px;
        font-size: 13px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }
    .time-filter-box img {
        width: 32px;
        height: 32px;
    }
}
.auth-form-group input {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #b2bff6;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    background: #f7f9fc;
    transition: border 0.2s;
}
.auth-form-group input:focus {
    border: 1.5px solid #2575FC;
    outline: none;
}
#authSubmitBtn {
    width: 100%;
    margin-top: 10px;
    font-size: 1rem;
    padding: 12px 0;
    border-radius: 25px;
    font-weight: 600;
    letter-spacing: 0.2px;
}
@media (max-width: 600px) {
    .auth-modal-content {
        min-width: 95vw;
        max-width: 98vw;
        padding: 24px 8px 16px 8px;
    }
    #authModalTitle {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    .auth-form-group input {
        font-size: 15px;
        padding: 8px 8px;
    }
    #authSubmitBtn {
        font-size: 0.95rem;
        padding: 10px 0;
    }
}
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
/* Toggle Auth Button for Mobile */
.auth-toggle-mobile {
    display: none;
    background: #2575FC;
    color: #fff;
    border: none;
    font-weight: 600;
    border-radius: 25px;
    padding: 10px 20px;
    margin-left: 10px;
    transition: background 0.2s, color 0.2s;
}
.auth-toggle-mobile:active {
    background: #6A11CB;
}

@media (max-width: 600px) {
    .auth-toggle-desktop {
        display: none !important;
    }
    .auth-toggle-mobile {
        display: inline-block !important;
    }
}
/* General Styles and Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
    background: linear-gradient(120deg, #f7f9fc 0%, #e0e7ff 50%, #dbeafe 100%);
    animation: bg-move 12s ease-in-out infinite alternate;
    transition: background 0.5s;
    overflow-x: hidden;
}
@keyframes bg-move {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* Floating Decorative Icons */
.floating-icon {
    position: absolute;
    z-index: 0;
    opacity: 0.13;
    pointer-events: none;
    animation: floatY 7s ease-in-out infinite alternate;
}
.floating-icon.icon1 { top: 8%; left: 4%; width: 60px; animation-delay: 0s; }
.floating-icon.icon2 { top: 70%; left: 90%; width: 48px; animation-delay: 2s; }
.floating-icon.icon3 { top: 40%; left: 80%; width: 72px; animation-delay: 1s; }
.floating-icon.icon4 { top: 85%; left: 10%; width: 54px; animation-delay: 3s; }
.floating-icon.icon5 { top: 20%; left: 60%; width: 40px; animation-delay: 4s; }
@keyframes floatY {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-30px) scale(1.08); }
}

/* Animated border for hero section */
.hero-section {
    position: relative;
    /* border-radius: 24px; */
    box-shadow: 0 8px 32px rgba(37,117,252,0.10);
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    /* border-radius: 24px; */
    padding: 2px;
    background: linear-gradient(120deg, #6A11CB, #2575FC, #e0e7ff, #6A11CB);
    background-size: 300% 300%;
    animation: border-move 8s linear infinite;
    z-index: 1;
    pointer-events: none;
    mask-image: linear-gradient(#fff 0 0);
    -webkit-mask-image: linear-gradient(#fff 0 0);
}
.hero-section > * {
    position: relative;
    z-index: 2;
}
@keyframes border-move {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: color 0.2s;
}
a:hover, a:focus {
    color: #2575FC;
}
a::after {
    content: '';
    display: block;
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 2px;
    background: linear-gradient(90deg, #6A11CB 0%, #2575FC 100%);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
}
a:hover::after, a:focus::after {
    transform: scaleX(1);
}

.btn {
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.1s;
    outline: none;
    border: none;
}
.btn:hover, .btn:focus {
    background: linear-gradient(90deg, #6A11CB 0%, #2575FC 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(37,117,252,0.18);
    transform: translateY(-2px) scale(1.03);
    animation: btn-glow 0.5s;
    outline: 2.5px solid #6A11CB;
    outline-offset: 2px;
}
@keyframes btn-glow {
    0% { box-shadow: 0 0 0 0 #6A11CB44; }
    100% { box-shadow: 0 0 16px 4px #6A11CB44; }
}
.btn:active {
    background: #6A11CB;
    color: #fff;
    transform: scale(0.97);
}

/* Header */

.header-container {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000; 
}


.header {
    background: linear-gradient(to right, #6A11CB, #2575FC);
    color: white;
    padding: 20px 0;
    position: relative;
    z-index: 10;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
}

.nav {
    flex-grow: 1;
    margin-left: 50px;
}

.nav-link {
    font-size: 18px;
    padding: 10px 0;
}

.auth-buttons {
    display: flex;
    align-items: center;
}

.btn-login {
    background-color: transparent;
    border: 1px solid white;
    margin-right: 10px;
}

.btn-register {
    background-color: white;
    color: #2575FC;
    border: none;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(to right, #6A11CB, #2575FC);
    color: white;
    padding: 50px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero-section .container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
}

.hero-content {
    flex: 1;
    text-align: center;
    padding-right: 20px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 48px;
    margin-top: 20px;
}

.hero-subtitle {
    font-size: 24px;
    margin: 10px 0 30px;
}

.search-bar {
    display: flex;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
    background-color: white;
    border-radius: 25px;
    padding: 5px;
}

.search-bar input {
    border: none;
    flex-grow: 1;
    padding: 10px 20px;
    border-radius: 25px;
    outline: none;
}

.btn-search {
    background-color: #6A11CB;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 25px;
    cursor: pointer;
}

.hero-images {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    z-index: 1; 
}

.hero-img-left, .hero-img-right {
    position: absolute;
    height: 350px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.hero-img-left {
    top: 50px;
    left: 100px;
}

.hero-img-right {
    top: 50px;
    right: 100px;
}

.stats {
    position: absolute;
    top: 100px;
    left: 200px;
    z-index: 3;
}

.hero-stats {
    position: absolute;
    bottom: 50px;
    right: 150px;
    z-index: 3;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 10px;
    margin: 10px;
    backdrop-filter: blur(5px);
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
}

.stat-text {
    font-size: 14px;
}

/* Age Selection Section */
.age-selection-section {
    padding: 50px 0;
    text-align: center;
}

.section-title {
    font-size: 36px;
    margin-bottom: 10px;
}

.section-subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
}

.age-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px;

}

.age-box {
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    border: 2px solid;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    user-select: none;
    outline: none;
}
.age-box:hover, .age-box:focus {
    transform: translateY(-5px) scale(1.04);
    box-shadow: 0 5px 16px rgba(0,0,0,0.12);
    z-index: 2;
    outline: 2px solid #6A11CB;
    outline-offset: 2px;
    animation: age-bounce 0.3s;
}
@keyframes age-bounce {
    0% { transform: scale(1); }
    60% { transform: scale(1.08); }
    100% { transform: scale(1.04); }
}
.age-box.active {
    background: linear-gradient(90deg, #6A11CB 0%, #2575FC 100%);
    color: #fff !important;
    border-color: #2575FC !important;
    box-shadow: 0 4px 16px rgba(37,117,252,0.18);
}

.age-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.yellow { border-color: #FFC107; color: #FFC107; }
.orange { border-color: #FF5722; color: #FF5722; }
.magenta { border-color: #E91E63; color: #E91E63; }
.pink { border-color: #FF4081; color: #FF4081; }
.green { border-color: #4CAF50; color: #4CAF50; }
.cyan { border-color: #00BCD4; color: #00BCD4; }

/* New Launches & Filter by Time Sections (Shared styles) */
.new-launches-section, .filter-time-section {
    padding: 50px 0;
    text-align: center;
    background-color: rgb(227, 227, 240);

}

.course-cards-container {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 20px;
    overflow-x: auto;
    padding-top: 20px;
    padding-bottom: 20px;
}

.course-card {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    width: 300px;
    min-width: 300px;
    position: relative;
    transition: transform 0.3s cubic-bezier(.4,0,.2,1), box-shadow 0.3s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
    will-change: transform, box-shadow;
    cursor: pointer;
}
.course-card:hover, .course-card:focus-within {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 8px 24px rgba(37,117,252,0.18);
    z-index: 2;
    animation: card-lift-fade 0.4s;
    border: 2px solid #6A11CB;
    outline: 2px solid #2575FC;
    outline-offset: -4px;
}
@keyframes card-lift-fade {
    0% { opacity: 0.7; transform: translateY(0) scale(1); }
    100% { opacity: 1; transform: translateY(-8px) scale(1.03); }
}
.course-card:active {
    transform: scale(0.98);
}

.course-card:hover {
    transform: translateY(-5px);
}

.course-card.selling-fast {
    border: 2px solid #FFC107;
}

.course-card.highlighted {
    border: 2px solid #2575FC;
    box-shadow: 0 4px 15px rgba(37, 117, 252, 0.4);
}

.badge {
    position: absolute;
    top: 15px;
    left: 0;
    background-color: #FFC107;
    color: white;
    padding: 5px 10px;
    border-radius: 0 10px 10px 0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        
}

.card-header {
    position: relative;
}

.card-header img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 15px 15px 0 0;
}

.rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0,0,0,0.5);
    color: white;
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 12px;
}

.card-body {
    padding: 15px;
    text-align: left;
}

.tags {
    margin-bottom: 10px;
}

.tag {
    background-color: #f0f0f0;
    color: #666;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    margin-right: 5px;
}

.tag-english { background-color: #e0e7ff; color: #4361ee; }
.tag-intermediate { background-color: #e0f2fe; color: #03a9f4; }
.tag-classes { background-color: #e8f5e9; color: #4caf50; }
.tag-morning { background-color: #ffecb3; color: #ffc107; }

.card-body h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.card-body p {
    font-size: 14px;
    color: #999;
}

.course-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.course-info span {
    font-size: 14px;
    font-weight: 600;
}

.add-to-cart {
    background-color: #f0f0f0;
    border: none;
    padding: 8px 12px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(37,117,252,0.08);
    margin-left: 8px;
}
.add-to-cart:hover, .add-to-cart:focus {
    background: #2575FC;
    color: #fff;
    transform: scale(1.1);
}
.add-to-cart:active {
    background: #6A11CB;
    color: #fff;
    transform: scale(0.95);
}


/* Featured Courses Section */
.featured-courses-section {
    padding: 50px 0;
    text-align: center;
}

/* Popular Categories Section */
.popular-categories-section {
    padding: 50px 0;
    text-align: center;
}

.categories-grid {
    display: flex;
    flex-wrap: wrap;
    
    justify-content: center;
    gap: 20px;
}

.category-card {
    background-color: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    width: 150px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, background 0.2s;
}
.category-card:hover, .category-card:focus {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 5px 16px rgba(0,0,0,0.12);
    background: #e0e7ff;
    outline: 2px solid #6A11CB;
    outline-offset: 2px;
    animation: cat-pop 0.3s;
}
@keyframes cat-pop {
    0% { transform: scale(1); }
    80% { transform: scale(1.08); }
    100% { transform: scale(1.03); }
}
.category-card:active {
    transform: scale(0.97);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.category-card.highlighted-category {
    background: linear-gradient(to bottom, #FF8A00, #FFD200);
    box-shadow: 0 5px 15px rgba(255, 138, 0, 0.4);
}

.category-card img {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
    object-fit: contain;
}

/* Filter with Time Section */
.time-filters {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.time-filter-box {
    background-color: white;
    padding: 15px 25px;
    border-radius: 10px;
    border: 1px solid #ddd;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    min-width: 160px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    user-select: none;
    outline: none;
}
.time-filter-box:hover, .time-filter-box:focus {
    border-color: #2575FC;
    background: #e0e7ff;
    color: #2575FC;
    transform: translateY(-4px) scale(1.03);
    outline: 2px solid #2575FC;
    outline-offset: 2px;
    animation: filter-pop 0.3s;
}
@keyframes filter-pop {
    0% { transform: scale(1); }
    80% { transform: scale(1.07); }
    100% { transform: scale(1.03); }
}
.time-filter-box.active {
    background: linear-gradient(90deg, #6A11CB 0%, #2575FC 100%);
    color: #fff;
    border-color: #2575FC;
    box-shadow: 0 4px 16px rgba(37,117,252,0.18);
}

.time-filter-box:hover {
    border-color: #2575FC;
}

.time-range {
    display: block;
    font-size: 12px;
    color: #999;
}

/* Learn from Top Teachers Section */
.top-teachers-section {
    padding: 50px 0;
    text-align: center;
    background-color: #f7f9fc;
}

.teachers-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.teacher-card {
    background-color: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    width: 200px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.teacher-card:hover {
    transform: translateY(-5px);
}

.teacher-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

.teacher-card h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.teacher-card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.teacher-card .tags .tag {
    font-size: 10px;
}