/* General styles */
:root {
    --primary: #4a6bff;
    --primary-light: #6b86ff;
    --primary-dark: #3955d8;
    --secondary: #00c896;
    --secondary-light: #3ddcb1;
    --secondary-dark: #00a57c;
    --accent: #ff5757;
    --accent-light: #ff7b7b;
    --accent-dark: #e13b3b;
    --dark: #2d3748;
    --light: #f7f9fc;
    --bg: #f0f4ff;
    --menu-bg: rgba(255, 255, 255, 0.95);
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(74, 107, 255, 0.08);
    --code-bg: #282c34;
    --material-bg: rgba(240, 244, 255, 0.7);
    --article-color: #4a6bff;
    --video-color: #ff5757;
    --exercise-color: #00c896;
    --quiz-color: #9953e3;
    --cheatsheet-color: #ff9d2f;
    --resource-color: #00b8c8;
    --tutorial-color: #4a4fdf;
    --modal-overlay: rgba(45, 55, 72, 0.8);
    --gradient-hero: linear-gradient(135deg, #4a6bff 0%, #a259ff 100%);
    --gradient-primary: linear-gradient(135deg, #4a6bff 0%, #6b86ff 100%);
    --gradient-secondary: linear-gradient(135deg, #00c896 0%, #3ddcb1 100%);
    --gradient-accent: linear-gradient(135deg, #ff5757 0%, #ff7b7b 100%);
    --gradient-light: linear-gradient(135deg, #f0f4ff 0%, #ffffff 100%);
    font-size: 16px;
}

@media (min-width: 768px) {
    :root {
        font-size: calc(14px + 0.4vw);
    }
}

@media (max-width: 767px) {
    :root {
        font-size: 15px;
    }
}

/* Navigation buttons styling */
.nav-btn {
    background: none;
    border: 2px solid var(--accent);
    color: var(--primary);
    border-radius: var(--radius);
    padding: 0.5vw 1.5vw;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.nav-btn.active,
.nav-btn:hover {
    background: var(--accent);
    color: white;
}

/* Privacy Policy Page Styles */
.policy-content {
    padding: 2rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.policy-content article {
    background: var(--light);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.policy-content h2 {
    color: var(--primary);
    margin: 1.5em 0 0.5em;
    font-size: 1.6rem;
}

.policy-content h3 {
    color: var(--dark);
    margin: 1.2em 0 0.5em;
    font-size: 1.3rem;
}

.policy-content p, 
.policy-content ul,
.policy-content address {
    margin-bottom: 1em;
    line-height: 1.6;
}

.policy-content ul {
    padding-left: 1.5em;
    list-style-type: disc;
}

.policy-content li {
    margin-bottom: 0.5em;
}

* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    background: var(--bg);
    background-image: radial-gradient(circle at top right, rgba(74, 107, 255, 0.05) 0%, rgba(0, 200, 150, 0.03) 100%);
    font-family: 'Poppins', 'Noto Sans Bengali', Arial, sans-serif;
    color: var(--dark);
    min-height: 100vh;
    position: relative;
    font-weight: 400;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', 'Noto Sans Bengali', Arial, sans-serif;
    letter-spacing: -0.02em;
    line-height: 1.3;
    font-weight: 600;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    right: 0;
    width: 40%;
    height: 30%;
    background: radial-gradient(circle, rgba(74, 107, 255, 0.15), transparent 70%);
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: "";
    position: fixed;
    bottom: 0;
    left: 0;
    width: 40%;
    height: 30%;
    background: radial-gradient(circle, rgba(0, 200, 150, 0.1), transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* Main content container */
#main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 0 1rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--menu-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.5vw 3vw;
    box-shadow: var(--shadow);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Header right section with language selector */
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Main navigation styling */
nav#menu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 3vw;
    background-color: var(--menu-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

nav#menu a {
    color: var(--dark);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
}

nav#menu a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(to right, var(--primary-light), var(--primary));
    opacity: 0.1;
    transition: height 0.3s ease;
    z-index: -1;
}

nav#menu a:hover {
    color: var(--primary);
}

nav#menu a:hover::before {
    height: 100%;
}

nav#menu a.active {
    color: var(--primary);
    font-weight: 600;
}

nav#menu a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 3px;
    background-image: var(--gradient-primary);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(74, 107, 255, 0.3);
}

/* Footer styling */
#footer {
    background: linear-gradient(135deg, var(--dark) 0%, #1a202c 100%);
    color: #fff;
    text-align: center;
    padding: 4vw 3vw 1.5vw;
    font-size: 1em;
    margin-top: 4vw;
    border-radius: 25px 25px 0 0;
    box-shadow: 0 -4px 30px rgba(26, 32, 44, 0.15);
    position: relative;
    overflow: hidden;
    z-index: 5; /* Lower z-index than the editor section */
}

#footer::before {
    content: '';
    position: absolute;
    top: -150px;
    right: -100px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74, 107, 255, 0.08), transparent 70%);
    pointer-events: none;
}

#footer::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 87, 87, 0.05), transparent 70%);
    pointer-events: none;
}

#footer p {
    margin: 0;
    letter-spacing: 1px;
}

.logo {
    font-weight: bold;
    font-size: 28px;
    letter-spacing: 2px;
    color: var(--primary);
    transition: all 0.3s;
}

.logo h1 {
    margin: 0;
    padding: 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0;
    background-image: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    display: inline;
    position: relative;
    z-index: 1001;
    text-shadow: 0px 2px 10px rgba(74, 107, 255, 0.2);
}

.logo h1::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    right: -10px;
    top: 5px;
    box-shadow: 0 0 0 3px rgba(255, 87, 87, 0.2);
}

.header-right {
    display: flex;
    align-items: center;
}



/* Hamburger menu icon styles */
.menu-icon {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: auto;
    z-index: 1001;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.menu-icon:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.menu-icon span {
    display: block;
    width: 24px;
    height: 3px;
    margin: 3px 0;
    background: var(--accent);
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* Add menu icon animation */
.menu-icon.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-icon.active span:nth-child(2) {
    opacity: 0;
}

.menu-icon.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Mobile menu styles */
@media (max-width: 768px) {
    header {
        padding: 2vw 4vw;
    }
    
    .menu-icon {
        display: flex;
    }
    
    .logo {
        font-size: 22px;
    }
    
    .header-right {
        gap: 0.5rem;
    }
    
    .mode-btn {
        flex: 1;
        font-size: 0.95em;
        padding: 1.5vw 0;
        min-width: 26px;
        min-height: 26px;
    }
    
    nav#menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--menu-bg);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        padding: 0.5rem 0;
        gap: 0;
        transform: translateY(-10px);
        opacity: 0;
        transition: all 0.3s ease;
        border-bottom-left-radius: var(--radius);
        border-bottom-right-radius: var(--radius);
    }

    nav#menu.open {
        display: flex;
        transform: translateY(0);
        opacity: 1;
    }
    
    nav#menu a {
        padding: 0.8rem 1.5rem;
        width: 100%;
        text-align: left;
        border-radius: 0;
        border-bottom: 1px solid var(--border);
        font-size: 0.95rem;
    }
    
    nav#menu a.active::after {
        display: none;
    }
    
    nav#menu a.active {
        background-color: rgba(231, 76, 60, 0.1);
    }
    
    nav#menu a:last-child {
        border-bottom: none;
    }
}

/* Extra small mobile optimization */
@media (max-width: 480px) {
    header {
        padding: 3vw 4vw;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .menu-icon {
        width: 36px;
        height: 36px;
    }
    
    .menu-icon span {
        width: 22px;
    }
    
    nav#menu {
        top: 65px;
    }
    
    nav#menu a {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Course section styles */
.courses-grid {
    padding: 40px 0;
}

.courses-grid h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2em;
}

.course-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin: 0 auto;
    max-width: 1200px;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.course-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    overflow: hidden;
    height: 100%;
    width: 300px;
    max-width: 100%;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.course-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.course-image {
    height: 160px;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 10px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.course-card:nth-child(3n+1) .course-image {
    background-image: linear-gradient(135deg, var(--primary), var(--quiz-color));
}

.course-card:nth-child(3n+2) .course-image {
    background-image: linear-gradient(135deg, var(--secondary), var(--resource-color));
}

.course-card:nth-child(3n+3) .course-image {
    background-image: linear-gradient(135deg, var(--accent), var(--cheatsheet-color));
}

.course-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill="none" width="100" height="100"/><circle fill="white" fill-opacity="0.05" cx="25" cy="25" r="12"/><circle fill="white" fill-opacity="0.05" cx="75" cy="75" r="20"/></svg>');
    background-size: 90px 90px;
    opacity: 0.5;
}

.course-level {
    background: var(--dark);
    color: white;
    font-size: 0.8em;
    padding: 5px 12px;
    border-radius: 30px;
    font-weight: 500;
}

.course-card h3 {
    padding: 16px 20px 0;
    margin: 0;
    font-size: 1.2em;
    line-height: 1.4;
    color: var(--dark);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    font-weight: 600;
}

.course-details {
    padding: 8px 20px 10px;
    display: flex;
    gap: 15px;
    color: #777;
    font-size: 0.85em;
    flex-wrap: wrap;
    align-items: center;
}

.course-card p {
    padding: 0 20px 15px;
    margin: 0;
    color: #555;
    font-size: 0.9em;
    line-height: 1.5;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.course-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-weight: 700;
    font-size: 1.2em;
    color: var(--dark);
}

.price.free-badge {
    background-color: #27ae60;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 1em;
}

.enroll-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.enroll-btn:hover {
    background: var(--secondary);
}

/* Features section */
.features {
    padding: 80px 0;
    background: linear-gradient(180deg, var(--bg) 0%, rgba(240, 244, 255, 0.5) 100%);
    margin: 60px 0 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.features::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 35%;
    height: 70%;
    background: radial-gradient(circle, rgba(74, 107, 255, 0.05), transparent 70%);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
}

.features h2 {
    margin-bottom: 40px;
    font-size: 2em;
}

.features-grid {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.feature {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(74, 107, 255, 0.06);
    padding: 40px 30px;
    flex: 1 0 220px;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.4s ease;
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: hidden;
    position: relative;
}

.feature::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
    opacity: 0;
    transition: all 0.4s ease;
}

.feature:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(74, 107, 255, 0.1);
}

.feature:hover::after {
    opacity: 1;
}

.feature-icon {
    font-size: 2em;
    margin-bottom: 20px;
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    overflow: hidden;
    z-index: 1;
}

.feature-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    transition: transform 0.6s ease;
}

.feature:nth-child(1) .feature-icon::before {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.feature:nth-child(2) .feature-icon::before {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
}

.feature:nth-child(3) .feature-icon::before {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
}

.feature:nth-child(4) .feature-icon::before {
    background: linear-gradient(135deg, var(--tutorial-color), var(--quiz-color));
}

.feature-icon i {
    font-size: 1.5em;
}

.feature:hover .feature-icon {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.feature h3 {
    margin-top: 0;
    font-size: 1.2em;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--dark);
}

.feature p {
    color: #666;
    font-size: 0.9em;
    line-height: 1.6;
    font-weight: 400;
}

/* Hero section */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 90px 20px 100px;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 50% 50% / 15%;
    background-image: var(--gradient-hero);
    box-shadow: 0 10px 30px rgba(74, 107, 255, 0.2);
    color: white;
    gap: 1.5rem;
}

.hero::before {
    content: "";
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill="none" width="100" height="100"/><rect fill-opacity="0.05" fill="white" x="25" y="25" width="50" height="50" transform="rotate(45 50 50)"/></svg>');
    background-size: 30px 30px;
    z-index: 1;
    opacity: 0.3;
    pointer-events: none;
}

.hero h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    text-shadow: 0px 2px 5px rgba(0,0,0,0.15);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.hero p {
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 35px;
    position: relative;
    z-index: 2;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
    letter-spacing: 0.01em;
}

.cta-btn {
    background-image: var(--gradient-accent);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 30px;
    font-size: 1.05em;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 20px rgba(255, 87, 87, 0.25);
    text-decoration: none;
    display: inline-block;
    position: relative;
    z-index: 2;
    overflow: hidden;
    letter-spacing: 0.01em;
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 87, 87, 0.35);
}

.cta-btn:hover::before {
    opacity: 1;
}

.hero .cta-btn {
    background-image: linear-gradient(135deg, white 0%, rgba(255, 255, 255, 0.85) 100%);
    color: var(--primary);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.hero .cta-btn::before {
    background-image: linear-gradient(135deg, white 0%, white 100%);
}

.hero .cta-btn:hover {
    color: var(--primary-dark);
}

/* Code demo section */
.code-demo {
    padding: 80px 0;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

.code-demo::before {
    content: '';
    position: absolute;
    top: 0;
    left: -30%;
    width: 60%;
    height: 100%;
    background: radial-gradient(circle, rgba(74, 107, 255, 0.05), transparent 60%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.code-demo::after {
    content: '';
    position: absolute;
    top: 30%;
    right: -20%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(0, 200, 150, 0.05), transparent 60%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.code-demo h2 {
    margin-bottom: 30px;
    font-size: 2em;
}

.code-editor {
    background: var(--code-bg);
    border-radius: 15px;
    overflow: hidden;
    text-align: left;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    width: 100%;
    max-width: 100%;
}

.code-editor pre {
    margin: 0;
    padding: 20px;
    font-family: 'Fira Code', monospace;
    font-size: 0.95em;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.code-editor code {
    font-family: 'Fira Code', monospace;
}

.run-btn {
    background-image: var(--gradient-accent);
    color: white;
    border: none;
    padding: 12px 24px;
    width: 100%;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    font-size: 1rem;
}

.run-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 200%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%) rotate(45deg) translateX(-150%);
    transition: transform 0.6s ease;
}

.run-btn:hover {
    background-image: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 100%);
}

.run-btn:hover::after {
    transform: translate(-50%, -50%) rotate(45deg) translateX(150%);
}

.code-output {
    background: #1a1d24;
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-family: 'Fira Code', monospace;
    color: #56e36a;
    display: none;
    font-weight: 500;
    overflow-x: auto;
    word-wrap: break-word;
    width: 100%;
    box-sizing: border-box;
}

.code-output.active {
    display: block;
}

/* Footer content styles */
.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.footer-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 200px;
    text-align: left;
}

.footer-column h4 {
    color: white;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.2em;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--accent);
    border-radius: 2px;
}

.footer-column p {
    color: #bbb;
    font-size: 0.95em;
    margin-bottom: 20px;
    line-height: 1.6;
}

.social-icons {
    display: flex;
    gap: 18px;
    font-size: 1.2em;
    margin-top: 20px;
}

.social-icons a {
    color: white;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.08);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icons a:nth-child(1):before {
    background: linear-gradient(135deg, #3b5998 0%, #5d7dc4 100%);
}

.social-icons a:nth-child(2):before {
    background: linear-gradient(135deg, #1da1f2 0%, #5eb9f5 100%);
}

.social-icons a:nth-child(3):before {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-icons a:nth-child(4):before {
    background: linear-gradient(135deg, #0077b5 0%, #00a0dc 100%);
}

.social-icons a:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transform: scale(0);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: -1;
}

.social-icons a:hover {
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.social-icons a:hover:before {
    transform: scale(1);
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul a {
    color: #bbb;
    text-decoration: none;
    transition: all 0.2s;
    display: block;
    position: relative;
    padding-left: 15px;
}

.footer-column ul a::before {
    content: '›';
    position: absolute;
    left: 0;
    transition: transform 0.2s;
}

.footer-column ul a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-column ul a:hover::before {
    color: var(--accent);
}

.copyright {
    text-align: center;
    color: #999;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-bottom: 0;
    font-size: 0.9em;
}

/* Footer responsiveness */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .footer-column h4::after {
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .footer-column ul a {
        padding-left: 0;
    }
    
    .footer-column ul a::before {
        display: none;
    }
}

/* Mobile responsiveness for programming platform */
@media (max-width: 600px) {
    .hero h1 {
        font-size: 1.8em;
    }
    
    .hero p {
        font-size: 1em;
    }
    
    .hero {
        width: 100%;
        padding: 2rem 1rem;
    }
    
    .cta-btn {
        padding: 10px 20px;
        font-size: 1em;
    }
    
    .logo {
        font-size: 18px;
        letter-spacing: 1px;
    }
    
    #main {
        padding: 0 0.5rem;
    }
    
    .featured-section {
        padding: 1.5em 2%;
        margin: 1em 0;
        width: 100%;
        max-width: 100%;
        border-radius: 8px;
    }
    
    .course-cards,
    .projects-preview {
        gap: 20px;
        padding: 0;
        width: 100%;
        flex-direction: column;
        align-items: center;
    }
    
    .course-card,
    .project-preview-card {
        width: 100%;
        max-width: 100%;
    }
    
    .course-card h3,
    .project-preview-card h3 {
        font-size: 1.15em;
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }
    
    .course-card p,
    .project-preview-card p {
        font-size: 0.85em;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .course-image,
    .project-preview-image {
        height: 140px;
    }
    
    .course-details {
        justify-content: space-between;
    }
    
    .feature {
        flex: 1 0 100%;
        max-width: 300px;
        padding: 20px;
    }
    
    .code-editor pre {
        font-size: 0.85em;
    }
    
    .intro-grid {
        flex-direction: column;
    }
}

/* Tablet responsive styles */
@media (min-width: 601px) and (max-width: 900px) {
    .logo {
        font-size: 22px;
    }
    
    .course-cards,
    .projects-preview {
        gap: 20px;
        padding: 0 20px;
        justify-content: center;
    }
    
    .featured-section {
        padding: 1.8em 4%;
        margin: 1.8em 15px;
    }
    
    .course-card,
    .project-preview-card {
        width: 260px;
        margin: 0 10px;
        flex: 0 0 auto;
    }
    
    .course-card h3,
    .project-preview-card h3 {
        font-size: 1.1em;
        padding-top: 14px;
    }
    
    .course-image,
    .project-preview-image {
        height: 150px;
    }
    
    .intro-grid {
        flex-wrap: wrap;
    }
    
    .intro-content {
        flex: 1 0 100%;
        margin-bottom: 1em;
    }
    
    .intro-image {
        flex: 1 0 100%;
        min-height: 200px;
    }
}

/* New styles for JavaScript rendered content */
.featured-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3em 5%;
    margin: 1em 0;
    background-color: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.featured-section h2 {
    text-align: center;
    margin-bottom: 0.5em;
    color: var(--dark);
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.featured-section p {
    text-align: center;
    margin-bottom: 2em;
    color: #666;
    font-size: clamp(0.9rem, 2vw, 1rem);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-container {
    display: flex;
    justify-content: center;
    margin-top: 2.5em;
    padding-bottom: 0.5em;
}

/* Home page styles */
.home-intro {
    padding: 3em 5%;
    background: linear-gradient(135deg, #f5f9ff 0%, rgba(240, 244, 255, 0.7) 100%);
    border-radius: var(--radius);
    margin: 0 5% 2em;
    box-shadow: var(--shadow);
}

.intro-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 3em;
    align-items: center;
    justify-content: space-between;
}

.intro-content {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.intro-image {
    flex: 1;
    min-width: 280px;
    min-height: 300px;
    background-image: linear-gradient(135deg, rgba(74, 107, 255, 0.1) 0%, rgba(0, 200, 150, 0.1) 100%);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
}

.intro-content h2 {
    margin-bottom: 0.75em;
    color: var(--dark);
    font-size: 1.5rem;
}

.intro-content p {
    margin-bottom: 1em;
    font-size: 0.95rem;
    line-height: 1.5;
}

.intro-benefits {
    list-style-type: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em 1em;
    margin-top: 0.5em;
}

.intro-benefits li {
    flex: 1 0 45%;
    min-width: 200px;
}

.intro-benefits li {
    padding: 0.3em 0;
    position: relative;
    padding-left: 1.2em;
    font-size: 0.9rem;
}

.intro-benefits li::before {
    content: "✓";
    color: var(--primary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.intro-image {
    background-color: #e1e8f0;
    border-radius: var(--radius);
    min-height: 220px;
    background-image: url('https://placehold.co/400x300/e1e8f0/4a6fa5?text=Learn+Programming');
    background-size: cover;
    background-position: center;
}

/* Large screens */
@media (min-width: 1200px) {
    .course-cards,
    .projects-preview {
        max-width: 1300px;
        justify-content: center;
    }
    
    .course-card,
    .project-preview-card {
        width: 280px;
        margin: 0 10px;
    }
    
    .featured-section {
        padding: 2.5em 5%;
        margin: 2.5em auto;
        max-width: 1400px;
    }
    
    .features-grid {
        justify-content: space-between;
    }
    
    .feature {
        flex: 0 0 220px;
    }
}

/* Extra small screens */
@media (max-width: 400px) {
    body {
        padding: 0;
    }
    
    #main {
        padding: 0;
    }
    
    .featured-section {
        padding: 1.2em 1%;
        border-radius: 6px;
        margin: 0.8em 0;
    }
    
    .course-cards,
    .projects-preview {
        padding: 0;
        flex-direction: column;
        align-items: center;
    }
    
    .course-card,
    .project-preview-card {
        width: 100%;
        max-width: 100%;
    }
    
    .course-image,
    .project-preview-image {
        height: 130px;
    }
    
    .featured-section {
        margin: 1em 0;
        padding: 1.2em 3%;
        width: 100%;
    }
    
    .code-demo {
        padding: 40px 10px;
        width: 100%;
    }
    
    .code-editor {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        border-radius: 10px;
        margin-bottom: 15px;
    }
    
    .code-editor pre {
        padding: 15px;
        font-size: 0.85em;
    }
    
    .code-output {
        padding: 12px 15px;
        font-size: 0.85em;
    }
    
    .run-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .intro-grid {
        flex-direction: column;
    }
    
    .intro-content, 
    .intro-image {
        width: 100%;
    }
    
    .intro-benefits li {
        flex: 1 0 100%;
    }
}

/* Project preview cards for homepage */
.projects-preview {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 1.5em;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.project-preview-card {
    background-color: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    transition: all 0.4s ease;
    height: 100%;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
}

.project-preview-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(74, 107, 255, 0.15);
    border-color: rgba(74, 107, 255, 0.2);
}

.project-preview-image {
    height: 180px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5em;
    overflow: hidden;
    transition: all 0.4s ease;
}

.project-preview-card:nth-child(3n+1) .project-preview-image {
    background-image: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.project-preview-card:nth-child(3n+2) .project-preview-image {
    background-image: linear-gradient(135deg, var(--secondary), var(--secondary-light));
}

.project-preview-card:nth-child(3n+3) .project-preview-image {
    background-image: linear-gradient(135deg, var(--accent), var(--accent-light));
}

.project-preview-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill="none" width="100" height="100"/><rect fill="white" fill-opacity="0.1" x="0" y="0" width="50" height="50"/><rect fill="white" fill-opacity="0.1" x="50" y="50" width="50" height="50"/></svg>');
    background-size: 30px 30px;
    opacity: 0.3;
}

.project-preview-card h3 {
    padding: 20px 24px 10px;
    margin: 0;
    font-size: 1.25em;
    line-height: 1.4;
    color: var(--dark);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.project-preview-card p {
    padding: 0 24px 20px;
    margin: 0;
    color: #555;
    font-size: 0.95em;
    line-height: 1.6;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.preview-skills {
    padding: 5px 24px 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.preview-skills span {
    background: var(--light);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
    display: inline-block;
    border: 1px solid rgba(74, 107, 255, 0.15);
}

.view-project-link {
    display: block;
    text-align: center;
    background-image: var(--gradient-primary);
    color: white;
    padding: 1em;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}

.view-project-link::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: transform 0.6s ease;
    transform: skewX(-15deg);
}

.view-project-link:hover {
    background-image: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.view-project-link:hover::before {
    transform: translateX(200%) skewX(-15deg);
}

/* Project Filters Styling */
.project-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(74, 107, 255, 0.08);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.project-filters::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    z-index: 2;
}

.filter-group {
    flex: 1;
    min-width: 250px;
}

.filter-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.filter-btn {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--dark);
    padding: 8px 16px;
    margin: 0 8px 8px 0;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(74, 107, 255, 0.08);
    border-color: var(--primary-light);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(74, 107, 255, 0.2);
}

/* Projects Container Styling */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
    position: relative;
}

.projects-container::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -100px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(74, 107, 255, 0.08), transparent 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.projects-container::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -150px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 200, 150, 0.05), transparent 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

/* Project Card Styling */
.project-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(74, 107, 255, 0.15);
}

.project-header {
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
    background: var(--gradient-primary);
}

.project-header h3 {
    font-size: 1rem;
    margin: 0;
    font-weight: 600;
    text-align: center;
}

.project-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.difficulty-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
    position: absolute;
    top: 10px;
    right: 10px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
}

.difficulty-badge.beginner {
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
}

.difficulty-badge.intermediate {
    background: linear-gradient(135deg, #FF9800, #FFB74D);
}

.difficulty-badge.advanced {
    background: linear-gradient(135deg, #F44336, #FF5252);
}

.project-card p {
    font-size: 0.85rem;
    margin: 10px 0;
    line-height: 1.4;
    height: 3em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.project-meta {
    font-size: 0.8rem;
    margin: 8px 0;
    color: var(--dark);
}

.project-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 10px 0;
    min-height: 40px;
    overflow: hidden;
}

.skill-tag {
    font-size: 0.7rem;
    padding: 3px 6px;
    background: var(--bg);
    border-radius: 12px;
    color: var(--primary);
}

.view-project-btn {
    padding: 8px 12px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    margin-top: auto;
    transition: all 0.2s ease;
}

.view-project-btn:hover {
    background: var(--gradient-secondary);
    transform: translateY(-2px);
}



/* Course page sections */
.course-page-layout {
    /* Base layout for courses section */
    margin: 2em 0;
    padding: 0 5%;
}

/* Course intro section styles */
.course-intro {
    background-color: #f5f9ff;
    padding: 3em 5%;
    margin: 2em 0;
    text-align: center;
}

.course-intro h2 {
    margin-bottom: 2em;
    color: var(--dark);
    font-size: 1.8em;
}

.course-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2em;
}

.benefit-item {
    background-color: white;
    padding: 2em;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.benefit-item:hover {
    transform: translateY(-5px);
}

.benefit-icon {
    font-size: 1.8em;
    margin-bottom: 0.8em;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    transform: rotate(-5deg);
}

.benefit-item:hover .benefit-icon {
    transform: rotate(0deg) scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.benefit-item h3 {
    margin-bottom: 0.5em;
    color: var(--primary);
}

.benefit-item p {
    color: #666;
    line-height: 1.5;
}

/* Course CTA section styles */
.course-cta {
    background-color: #2c3e50;
    color: white;
    padding: 3em 5%;
    text-align: center;
    margin-top: 3em;
}

.course-cta h2 {
    margin-bottom: 0.5em;
    font-size: 1.8em;
}

.course-cta p {
    font-size: 1.1em;
    max-width: 700px;
    margin: 0 auto;
}

.cta-subtitle {
    margin-top: 1em;
    opacity: 0.8;
    font-size: 0.9em !important;
}



/* Course page styles */
.course-page-layout {
    padding: 2em;
}

.courses-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2em;
    margin-top: 2em;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.course-list-container {
    padding-right: 1em;
}

.section-header {
    margin-bottom: 1.5em;
    text-align: center;
}

.course-details-container {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2em;
    position: sticky;
    top: 2em;
    height: fit-content;
}

.select-course-message {
    color: #999;
    text-align: center;
    padding: 4em 2em;
    font-size: 1.1em;
}

.course-card {
    cursor: pointer;
    margin-bottom: 2em;
}

.course-card.active {
    border: 2px solid var(--primary);
}

.course-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1em;
    margin: 1.5em 0;
    background: #f9f9f9;
    padding: 1em;
    border-radius: var(--radius);
}

.course-description {
    margin-bottom: 2em;
    line-height: 1.6;
}

.lessons-list {
    margin-top: 2em;
}

.lessons-list h3 {
    margin-bottom: 1em;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5em;
}

.lessons-progress {
    margin-bottom: 2em;
    background-color: #f9f9f9;
    padding: 1em;
    border-radius: var(--radius);
}

.progress-bar {
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin-bottom: 0.5em;
    overflow: hidden;
}

.progress-indicator {
    height: 100%;
    background-color: #4CAF50;
    border-radius: 5px;
    transition: width 0.3s ease;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
    color: #666;
}

.lessons-list ul {
    list-style: none;
    padding: 0;
}

.lesson-item {
    display: flex;
    align-items: center;
    padding: 1em;
    border: 1px solid #eee;
    margin-bottom: 0.5em;
    border-radius: var(--radius);
    transition: background-color 0.2s;
}

.lesson-item:hover {
    background-color: #f9f9f9;
}

.lesson-item.completed {
    background-color: #f0fff4;
    border-color: #c6f6d5;
}

.lesson-number {
    background: var(--primary);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 1em;
}

.lesson-content {
    flex: 1;
}

.lesson-content h4 {
    margin: 0 0 0.5em 0;
}

.lesson-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 0.85em;
    margin-bottom: 0.5em;
}

.lesson-status {
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.3em;
}

.status-icon, .duration-icon, .btn-icon {
    display: inline-block;
    margin-right: 0.2em;
}

.lesson-preview {
    font-size: 0.85em;
    color: #666;
    margin-top: 0.5em;
    padding-top: 0.5em;
    border-top: 1px dashed #eee;
}

.lesson-preview-text {
    display: block;
    opacity: 0.8;
}

.completed .lesson-status {
    color: #38a169;
}

.start-lesson-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5em 1em;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.start-lesson-btn:hover {
    background-color: #2980b9;
}

.completed .start-lesson-btn {
    background-color: #38a169;
}

.enrollment-actions {
    margin-top: 2em;
    display: flex;
    justify-content: center;
}

.primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.2);
    text-align: center;
    display: inline-block;
    letter-spacing: 0.5px;
}

.primary-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(52, 152, 219, 0.3);
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-lessons-btn {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.5em 1em;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    margin-right: 0.5em;
}

.view-lessons-btn:hover {
    background-color: var(--primary);
    color: white;
}

/* Responsive adjustments for new elements */
@media screen and (max-width: 992px) {
    .courses-container {
        grid-template-columns: 1fr;
    }
    
    .course-details-container {
        position: static;
        margin-top: 2em;
    }
}

@media screen and (max-width: 992px) {
    .intro-grid {
        grid-template-columns: 1fr;
        gap: 1.5em;
    }
    
    .intro-benefits {
        grid-template-columns: 1fr 1fr;
    }
    
    .intro-image {
        min-height: 180px;
        order: -1;
    }
}

@media screen and (max-width: 768px) {
    .home-intro {
        padding: 1.5em 4%;
        margin: 0 2% 1.5em;
    }
    
    .intro-grid {
        grid-template-columns: 1fr;
        gap: 1em;
    }
}

@media screen and (max-width: 480px) {
    .intro-benefits {
        grid-template-columns: 1fr;
    }
    
    .intro-content h2 {
        font-size: 1.3rem;
    }
    
    .intro-content p {
        font-size: 0.9rem;
    }
    
    .intro-image {
        min-height: 150px;
    }
}

@media screen and (max-width: 768px) {
    .lesson-meta {
        flex-direction: column;
        gap: 0.5em;
    }
    
    .course-benefits {
        grid-template-columns: 1fr;
        gap: 1.5em;
    }
    
    .benefit-item {
        padding: 1.5em;
    }
    
    .course-intro h2,
    .course-cta h2 {
        font-size: 1.5em;
        margin-bottom: 1em;
    }
    
    .lesson-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .lesson-number {
        margin-bottom: 1em;
    }
    
    .start-lesson-btn {
        margin-top: 1em;
        width: 100%;
    }
}

/* Code Editor Styles */
.editor-page {
    padding-bottom: 50px; /* Additional padding for editor page */
    position: relative;
    z-index: 10; /* Ensure main content stays above footer */
    margin-bottom: 30px; /* Space between content and footer */
}

/* Footer positioning for editor page */
.editor-page + #footer {
    margin-top: 100px; /* Extra margin when following editor page */
}

.editor-section {
    display: flex;
    flex-direction: column;
    margin: 20px 0 50px 0; /* Added bottom margin to prevent footer overlap */
    height: calc(100vh - 180px); /* Optimized height for better screen utilization */
    min-height: 500px;
    background: var(--menu-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    width: 100%;
    max-width: 1600px; /* Limit max-width for very large screens */
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    position: relative; /* Added position relative */
    z-index: 10; /* Added z-index to ensure it stays above footer */
}

.editor-header {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    background-color: var(--bg);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.editor-header h1 {
    margin: 0 0 4px 0;
    font-size: 1.6rem;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

.editor-header p {
    margin: 0 0 8px 0;
    color: var(--dark);
    font-size: 0.9rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Header info wrapper for better layout */
.editor-header-info {
    flex: 1;
    min-width: 250px;
    padding-right: 20px;
}

.editor-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    min-width: 300px;
    box-sizing: border-box;
    margin: 0;
}

.editor-controls select, 
.editor-controls button {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background-color: white;
    font-size: 0.85rem;
    min-width: 90px;
    cursor: pointer;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    flex: 1 1 auto;
    min-width: 80px;
}

.editor-controls .run-btn {
    background-color: var(--secondary);
    color: white;
    border: none;
    min-width: 90px;
    max-width: none;
    text-align: center;
}

.editor-controls .save-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    min-width: 80px;
    max-width: none;
    text-align: center;
}

.editor-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
    min-height: 400px; /* Ensure minimum height */
    position: relative; /* Ensure proper stacking context */
    z-index: 15; /* Higher than parent to ensure visibility */
    height: 100%;
}

@media (min-width: 768px) {
    .editor-container {
        flex-direction: row;
        height: calc(100vh - 270px); /* Dynamic height based on viewport */
        min-height: 500px;
    }
}

#code-editor {
    flex: 1;
    height: 100%;
    min-height: 350px;
    width: 100%;
    font-size: 1rem;
    overflow: auto;
    border-radius: 8px 8px 0 0;
}

.editor-output {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #1e1e1e;
    color: #ddd;
    border-left: 1px solid #333;
    height: 100%;
    min-height: 200px;
    width: 100%;
    overflow: auto;
    font-family: 'Fira Code', monospace;
    border-radius: 0 0 8px 8px;
    position: relative;
    z-index: 20; /* Higher z-index to ensure visibility */
    resize: vertical; /* Allow vertical resizing for better user control */
}

/* Laptop and Desktop styles (992px and up) */
@media (min-width: 992px) {
    .editor-section {
        display: grid;
        grid-template-areas:
            "header header"
            "editor output";
        grid-template-columns: 55% 45%;
        grid-template-rows: auto 1fr;
        height: calc(100vh - 170px);
    }
    
    .editor-header {
        grid-area: header;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 25px;
    }
    
    .editor-container {
        grid-area: editor;
        height: 100%;
    }
    
    .editor-output {
        grid-area: output;
        height: 100%;
        overflow: auto;
    }
}

/* Large Desktop styles (1200px and up) */
@media (min-width: 1200px) {
    .editor-section {
        grid-template-columns: 60% 40%;
        max-width: 1800px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .editor-header {
        padding: 15px 30px;
    }
    
    #output-console {
        font-size: 1rem;
    }
}

/* Ultra-wide screen optimization (1800px and up) */
@media (min-width: 1800px) {
    .editor-section {
        grid-template-columns: 65% 35%;
        max-width: 2000px;
        height: calc(100vh - 160px);
    }
    
    .editor-header {
        padding: 18px 35px;
    }
    
    .editor-header h1 {
        font-size: 1.8rem;
    }
    
    .editor-controls {
        gap: 15px;
    }
    
    .editor-controls select, 
    .editor-controls button {
        padding: 10px 15px;
        font-size: 0.95rem;
    }
}

/* Tablet and Mobile output console styles */
@media (max-width: 992px) and (min-width: 768px) {
    /* Tablet-specific output console styles */
    .editor-output {
        border-left: none;
        border-top: 2px solid #444;
        height: 250px !important;
        min-height: 250px !important;
        max-height: 300px !important;
        position: relative !important;
        z-index: 45 !important;
        display: block !important;
        visibility: visible !important;
        background-color: #1e1e1e !important;
        width: 100% !important;
    }
    
    #output-console {
        padding: 15px !important;
        font-size: 0.9rem !important;
        height: calc(100% - 40px) !important;
        min-height: 200px !important;
        overflow: auto !important;
        display: block !important;
        visibility: visible !important;
        white-space: pre-wrap !important;
        color: #f8f8f8 !important;
        font-family: 'Fira Code', monospace !important;
    }
    
    /* Style for the editor output section on tablets */
    #editor-output-section {
        display: block !important;
        position: relative !important;
        height: 250px !important;
        min-height: 250px !important;
        visibility: visible !important;
        z-index: 45 !important;
    }
}

/* Mobile specific output console styles */
@media (max-width: 767px) {
    .editor-output {
        border-left: none;
        border-top: 2px solid #444;
        height: 250px !important; /* Fixed height for mobile */
        min-height: 250px !important;
        max-height: 250px !important;
        position: relative !important; /* Ensure proper positioning */
        z-index: 100 !important; /* Very high z-index to ensure it's on top */
        display: block !important; /* Force display */
        visibility: visible !important; /* Force visibility */
        background-color: #1e1e1e !important; /* Ensure background color */
    }
    
    /* Ensure the output console content is visible */
    #output-console {
        padding: 15px !important;
        font-size: 0.9rem !important;
        height: calc(100% - 40px) !important; /* Account for header height */
        min-height: 180px !important; /* Ensure minimum height */
        overflow: auto !important; /* Enable scrolling */
        display: block !important; /* Force display */
        visibility: visible !important; /* Force visibility */
        white-space: pre-wrap !important; /* Wrap text */
        color: #f8f8f8 !important; /* Ensure text is visible */
        font-family: 'Fira Code', monospace !important;
    }
    
    /* Make the output header more visible */
    .output-header {
        background-color: #333 !important;
        padding: 8px 15px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        border-bottom: 1px solid #444 !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 101 !important;
    }
    
    .output-header h3 {
        margin: 0 !important;
        color: #f8f8f8 !important;
        font-size: 1rem !important;
    }
}

@media (max-width: 767px) {
    .editor-section {
        margin: 10px 0 150px 0 !important; /* Increased bottom margin for mobile */
        height: auto !important; /* Changed to auto to allow natural content flow */
        max-height: none !important; /* Remove max height restriction */
        padding-bottom: 50px !important; /* More padding at bottom */
        overflow: visible !important; /* Allow content to be visible outside */
        position: relative !important; /* Ensure proper positioning context */
    }
    
    /* Force stacked layout for mobile */
    .editor-container {
        flex-direction: column !important;
        height: auto !important;
        margin-bottom: 120px !important; /* Add space after container */
    }
    
    .editor-controls {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .editor-controls select, 
    .editor-controls button {
        padding: 6px 10px;
        font-size: 0.8rem;
        flex-grow: 1;
    }
    
    #code-editor {
        height: 45vh !important; /* Reduced height to leave space for output */
        min-height: 300px !important; /* Minimum height */
        font-size: 0.9rem;
        border-radius: 8px 8px 0 0;
    }
    
    #editor-output-section {
        display: block !important;
        position: relative !important;
        z-index: 100 !important;
        height: 250px !important;
        min-height: 250px !important;
        visibility: visible !important;
    }
    
    .editor-header h1 {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }
    
    .editor-header p {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    /* Additional spacing before footer */
    #footer {
        margin-top: 100px !important;
        position: relative !important;
        z-index: 50 !important;
    }
    
    /* Make sure main has enough space */
    #main.editor-page {
        padding-bottom: 120px !important;
    }
}

@media (max-width: 480px) {
    .editor-section {
        margin: 5px 0 170px 0 !important; /* Further increased bottom margin for smallest screens */
        height: auto !important; /* Use auto height for natural content flow */
        max-height: none !important; /* No max-height restriction */
        overflow: visible !important;
    }

    .editor-header {
        padding: 10px;
    }

    .editor-header h1 {
        font-size: 1.3rem;
        margin-bottom: 3px;
    }
    
    .editor-header p {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }

    .editor-controls {
        flex-direction: row; /* Changed to row for better space usage */
        flex-wrap: wrap;
        align-items: stretch;
        gap: 5px;
    }
    
    .editor-controls select, 
    .editor-controls button {
        flex: 0 0 calc(50% - 5px); /* Two controls per row */
        margin: 0;
        padding: 6px 4px;
        font-size: 0.75rem;
    }
    
    /* Specific adjustments for output console on very small screens */
    #editor-output-section {
        height: 200px !important; /* Slightly smaller height */
    }
    
    #output-console {
        font-size: 0.8rem !important; /* Smaller font */
    }
    
    /* Even more space before footer */
    #footer {
        margin-top: 150px !important;
    }
    
    /* Add scroll indicator for output console */
    .output-header h3::after {
        content: " (scroll for more)";
        font-size: 0.7rem;
        opacity: 0.7;
        font-style: italic;
        margin-left: 5px;
    }
}
    
    #code-editor {
        min-height: 45vh; /* Further reduced to make more space for output */
        font-size: 0.85rem;
    }
    
    .editor-output {
        height: 40vh; /* Significantly increased for better output visibility */
        margin-bottom: 20px; /* Extra space after output */
        display: block !important; /* Force display */
        visibility: visible !important; /* Ensure visibility */
        min-height: 200px; /* Minimum height to ensure visibility */
    }
    
    .output-header {
        padding: 6px 8px;
    }
    
    .output-header h3 {
        font-size: 0.8rem;
        max-width: 70%;
    }
    
    .output-header button {
        font-size: 0.75rem;
        padding: 3px 6px;
    }
    
    #output-console {
        padding: 8px;
        font-size: 0.75rem;
    }
    
    /* Improved code editor for extra small screens */
    .code-demo {
        padding: 30px 5px;
    }
    
    .code-editor {
        border-radius: 8px;
    }
    
    .code-editor pre {
        padding: 12px;
        font-size: 0.75em;
    }
    
    .code-output {
        padding: 10px 12px;
        font-size: 0.75em;
    }
    
    .run-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }


.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #2a2a2a;
    border-bottom: 1px solid #444;
    width: 100%;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 10;
}

.output-header h3 {
    margin: 0;
    font-size: 0.9rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.output-header button {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 4px 8px;
}

.output-header button:hover {
    color: #fff;
}

#output-console {
    flex: 1;
    padding: 15px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    overflow-y: auto;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    width: 100%;
    height: calc(100% - 40px); /* Account for header height */
    box-sizing: border-box;
    background-color: #1a1a1a; /* Slightly darker for contrast */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    min-height: 120px; /* Ensure minimum height */
    line-height: 1.5;
}

.output-log {
    margin-bottom: 5px;
    color: #ddd;
}

.output-error {
    margin-bottom: 5px;
    color: #ff5f5f;
}

.output-result {
    margin-top: 10px;
    padding-top: 5px;
    border-top: 1px solid #444;
    color: #66c2ff;
}

.output-timestamp {
    color: #666;
    font-size: 0.7rem;
    margin-bottom: 8px;
}

.output-compilation {
    color: #4caf50;
    margin-top: 10px;
    padding-top: 5px;
    border-top: 1px solid #444;
    font-style: italic;
}

.running-indicator {
    display: flex;
    align-items: center;
    margin: 10px 0;
    color: #ddd;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.editor-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--dark);
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
}

.editor-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.editor-sidebar {
    width: 220px; /* Reduced from 250px to give more space to editor */
    background: var(--bg);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 0 10px;
    position: relative;
    z-index: 15; /* Higher z-index to prevent footer overlap */
}

@media (max-width: 1200px) {
    .editor-sidebar {
        width: 180px; /* Even narrower on medium screens */
    }
}

@media (max-width: 992px) and (min-width: 768px) {
    /* Tablet-specific styles */
    .editor-sidebar {
        width: 200px;
        display: flex;
        position: relative;
        z-index: 50;
        border-top: 1px solid var(--border);
        border-left: none;
        padding: 10px;
    }
    
    .editor-container {
        flex-direction: column !important;
    }
    
    .editor-section {
        display: grid;
        grid-template-areas:
            "header header"
            "editor editor"
            "output sidebar";
        grid-template-columns: 1fr 200px;
        grid-template-rows: auto 1fr auto;
        height: auto;
        min-height: 700px;
        overflow: visible;
    }
    
    .editor-header {
        grid-area: header;
    }
    
    .editor-container {
        grid-area: editor;
    }
    
    .editor-output {
        grid-area: output;
        height: 250px !important;
        min-height: 250px !important;
        border-top: 1px solid var(--border);
        border-left: none;
    }
    
    .editor-sidebar {
        grid-area: sidebar;
    }
}

@media (max-width: 767px) {
    .editor-sidebar {
        display: none; /* Hide on mobile screens */
    }
}

.editor-files, 
.saved-projects {
    padding: 10px;
}

.editor-files h3, 
.saved-projects h3 {
    font-size: 0.9rem;
    margin: 0 0 10px 0;
    color: var(--dark);
}

#file-list, 
#project-list {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

#file-list li, 
#project-list li {
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.85rem;
}

#file-list li:hover, 
#project-list li:hover {
    background-color: #e9e9e9;
}

#file-list li.active {
    background-color: #dbeeff;
    color: var(--primary);
    font-weight: bold;
}

#add-file-btn {
    width: 100%;
    padding: 6px;
    background: transparent;
    border: 1px dashed var(--border);
    color: var(--primary);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

#add-file-btn:hover {
    background: #f0f0f0;
}

.html-preview {
    background: white;
}

/* Coding Challenges Styles */
.challenges-header {
    padding: 20px;
    text-align: center;
    background-color: var(--bg);
    border-radius: var(--radius);
    margin: 20px;
}

.challenges-header h1 {
    margin-bottom: 10px;
    color: var(--dark);
}

.challenge-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.challenge-filters select {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background-color: white;
    font-size: 0.85rem;
}

#challenges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    justify-content: center;
}

.challenge-card {
    width: 320px;
    background-color: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
}

.challenge-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(44, 62, 80, 0.15);
}

.challenge-card::after {
    content: "Click for details";
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.05);
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.7rem;
    color: #777;
    opacity: 0;
    transition: opacity 0.3s;
}

.challenge-card:hover::after {
    opacity: 1;
}

.challenge-header {
    padding: 15px;
    color: white;
    position: relative;
}

.challenge-header.beginner {
    background-color: #27ae60;
}

.challenge-header.intermediate {
    background-color: #f39c12;
}

.challenge-header.advanced {
    background-color: #e74c3c;
}

.challenge-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.challenge-difficulty {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 3px 6px;
    font-size: 0.7rem;
    background-color: rgba(0,0,0,0.2);
    border-radius: 3px;
}

.challenge-content {
    padding: 15px;
}

.challenge-description {
    font-size: 0.9rem;
    height: 80px;
    overflow: hidden;
    color: var(--dark);
    position: relative;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.challenge-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 10px 0;
}

.challenge-tag {
    padding: 2px 6px;
    font-size: 0.7rem;
    background-color: #f0f0f0;
    border-radius: 3px;
    color: #555;
}

.challenge-footer {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    border-top: 1px solid #f0f0f0;
    align-items: center;
}

.challenge-language {
    font-size: 0.75rem;
    color: #666;
}

.try-challenge-btn {
    padding: 6px 12px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.2s;
}

.try-challenge-btn:hover {
    background-color: #2980b9;
}

/* Challenge Modal Styles */
.challenge-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.challenge-modal-content {
    width: 80%;
    max-width: 800px;
    max-height: 90vh;
    background-color: white;
    border-radius: var(--radius);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    position: relative;
    padding: 20px;
}

.challenge-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.challenge-modal-header h2 {
    margin: 0;
    color: var(--dark);
}

.challenge-modal-header .difficulty-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    color: white;
    font-size: 0.8rem;
    margin-left: 10px;
}

.challenge-modal-header .difficulty-badge.beginner { background-color: #2ecc71; }
.challenge-modal-header .difficulty-badge.intermediate { background-color: #f39c12; }
.challenge-modal-header .difficulty-badge.advanced { background-color: #e74c3c; }

.challenge-modal-body {
    padding: 20px;
}

.challenge-modal-body p {
    color: var(--dark);
    line-height: 1.6;
}

.challenge-modal-footer {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    padding: 15px 20px;
}

.challenge-modal .close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}

.challenge-modal .try-btn {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}

.challenge-modal .try-btn:hover {
    background-color: #c0392b;
}

/* Mobile optimizations for editor */
@media (max-width: 600px) {
    .editor-section {
        margin: 10px;
        height: calc(100vh - 150px);
    }
    
    .challenge-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .challenge-filters select {
        width: 100%;
        max-width: 300px;
    }
}

    .editor-controls {
        flex-wrap: wrap;
    }

/* Study materials styles */
.lesson-materials-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--primary);
    font-weight: 500;
    margin-top: 8px;
    padding: 5px;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.lesson-materials-toggle:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.materials-icon {
    margin-right: 5px;
}

.toggle-icon {
    margin-left: 5px;
    font-size: 0.7em;
}

.lesson-materials {
    margin-top: 10px;
    padding: 10px;
    background-color: var(--material-bg);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.lesson-materials h5 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 0.9em;
    color: var(--dark);
}

.materials-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.material-item {
    display: flex;
    margin-bottom: 12px;
    padding: 10px;
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.material-item:last-child {
    margin-bottom: 0;
}

.material-item.article {
    border-left: 3px solid var(--article-color);
}

.material-item.video {
    border-left: 3px solid var(--video-color);
}

.material-item.exercise {
    border-left: 3px solid var(--exercise-color);
}

.material-item.quiz {
    border-left: 3px solid var(--quiz-color);
}

.material-item.cheatsheet {
    border-left: 3px solid var(--cheatsheet-color);
}

.material-item.resource {
    border-left: 3px solid var(--resource-color);
}

.material-item.tutorial {
    border-left: 3px solid var(--tutorial-color);
}

.material-icon {
    font-size: 1.5em;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.material-content {
    flex: 1;
}

.material-content h6 {
    margin: 0 0 5px 0;
    font-size: 0.85em;
}

.material-content p {
    margin: 0 0 8px 0;
    font-size: 0.75em;
    color: #666;
}

.material-link {
    display: inline-block;
    font-size: 0.75em;
    padding: 3px 8px;
    background-color: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.material-link:hover {
    background-color: #2980b9;
}

/* Lesson article styles */
.view-lesson-btn {
    display: inline-block;
    font-size: 0.75em;
    padding: 3px 8px;
    background-color: var(--secondary);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.view-lesson-btn:hover {
    background-color: #27ae60;
}

.lesson-article-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.lesson-article-content {
    width: 80%;
    max-width: 800px;
    max-height: 90vh;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.lesson-article-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lesson-article-header h2 {
    margin: 0;
    color: var(--dark);
    font-size: 1.4rem;
}

.close-lesson-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--dark);
}

.lesson-article-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.lesson-overview {
    margin-bottom: 20px;
}

.lesson-meta-display {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.lesson-materials-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.material-card {
    display: flex;
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.material-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.material-card.article { border-left: 4px solid var(--article-color); }
.material-card.video { border-left: 4px solid var(--video-color); }
.material-card.exercise { border-left: 4px solid var(--exercise-color); }
.material-card.quiz { border-left: 4px solid var(--quiz-color); }
.material-card.cheatsheet { border-left: 4px solid var(--cheatsheet-color); }
.material-card.resource { border-left: 4px solid var(--resource-color); }
.material-card.lesson { border-left: 4px solid var(--primary); }
.material-card.tutorial { border-left: 4px solid var(--tutorial-color); }

.material-card .material-icon {
    font-size: 1.5rem;
    margin-right: 12px;
}

.material-card h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
}

.material-card p {
    font-size: 0.85rem;
    margin: 0 0 12px 0;
    color: #666;
}

.view-lesson-content-btn {
    display: inline-block;
    padding: 6px 12px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.view-lesson-content-btn:hover {
    background-color: #2980b9;
}

.generate-lesson-container {
    background-color: rgba(52, 152, 219, 0.1);
    border-left: 4px solid var(--primary);
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.generate-lesson-container p {
    margin: 0 0 10px 0;
}

.generate-lesson-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--secondary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.generate-lesson-btn:hover {
    background-color: #27ae60;
}

.lesson-article-body h2, 
.lesson-article-body h3 {
    color: var(--dark);
    margin-top: 0;
}

.lesson-article-body p, 
.lesson-article-body ul, 
.lesson-article-body ol {
    color: #333;
    line-height: 1.6;
}

.lesson-article-body pre {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

.lesson-article-body code {
    font-family: 'Courier New', monospace;
}

.lesson-article-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.mark-complete-btn {
    padding: 8px 15px;
    background-color: var(--secondary);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.mark-complete-btn:hover {
    background-color: #27ae60;
}

/* Responsive styles for lesson articles */
@media (max-width: 768px) {
    .lesson-article-content {
        width: 95%;
    }
    
    .lesson-article-header h2 {
        font-size: 1.2rem;
    }
    
    .lesson-article-body {
        padding: 15px;
    }
}
    
    .editor-controls select, 
    .editor-controls button {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: var(--modal-overlay);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    background-color: #fff;
    margin: 5vh auto;
    width: 90%;
    max-width: 800px;
    border-radius: var(--radius);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalOpen 0.4s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

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

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #555;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
    line-height: 1;
}

.close-modal:hover {
    color: var(--accent);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border);
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f9f9f9 0%, #f3f3f3 100%);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8em;
    color: var(--dark);
}

.modal-body {
    padding: 25px;
}

.modal-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius);
    margin-bottom: 20px;
    background-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    font-weight: bold;
}

.modal-description {
    margin-bottom: 25px;
    line-height: 1.6;
    color: #555;
}

.modal-details h3 {
    margin: 0 0 15px 0;
    color: var(--dark);
}

.modal-info {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: var(--radius);
}

.info-item {
    font-size: 0.95rem;
}

.info-item strong {
    color: var(--dark);
}

.modal-footer {
    padding: 25px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    gap: 15px;
    background-color: #f8f9fa;
    justify-content: flex-end;
    background: #f9f9f9;
}

.modal-footer .cta-btn {
    padding: 10px 20px;
}

.secondary-btn {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--dark);
    padding: 10px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.secondary-btn:hover {
    background: #f3f3f3;
    border-color: #ccc;
}

/* Custom styling for the "Explore Lessons" button */
#modal-course-explore {
    min-width: 180px;
    background-image: linear-gradient(to right, var(--primary), #2980b9);
    color: white;
    border: none;
    font-size: 1.05em;
    padding: 12px 24px;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.25);
    position: relative;
    overflow: hidden;
}

#modal-course-explore::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to right, rgba(255,255,255,0.1), rgba(255,255,255,0.2));
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

#modal-course-explore:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.35);
    background-image: linear-gradient(to right, #2980b9, var(--primary));
}

#modal-course-explore:hover::before {
    transform: translateX(100%);
}

#modal-course-explore:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
}

#modal-course-level {
    background: var(--primary);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

#modal-course-topics {
    padding-left: 20px;
}

#modal-course-topics li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 10px;
}

#modal-course-topics li::before,
#modal-project-requirements li::before {
    content: '•';
    position: absolute;
    left: -10px;
    color: var(--primary);
    font-weight: bold;
}

/* Project-specific modal styles */
.project-difficulty {
    background: var(--secondary);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.modal-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.modal-skill-tag {
    background-color: #f1f1f1;
    color: var(--dark);
    padding: 5px 10px;
    border-radius: 16px;
    font-size: 0.85rem;
    display: inline-block;
}

#modal-project-requirements {
    padding-left: 20px;
    margin-bottom: 25px;
}

#modal-project-requirements li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 10px;
}

/* Project guidelines styles */
.project-guidelines {
    padding: 1.5rem 1rem 1rem;
    background-color: var(--bg);
    margin-bottom: -1rem; /* Reduce space between guidelines and projects section */
}

.guidelines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.8rem;
    max-width: 1200px;
    margin: 1rem auto 0.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed #ddd;
}

.guideline-item {
    background-color: white;
    padding: 0.75rem;
    border-radius: var(--radius);
    box-shadow: 0 2px 5px rgba(44, 62, 80, 0.04);
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid #f0f0f0;
}

.guideline-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(44, 62, 80, 0.08);
    border-color: #e5e5e5;
}

.guideline-icon {
    font-size: 1.5rem;
    margin-bottom: 0.4rem;
    color: var(--accent);
}

.guideline-item h3 {
    color: var(--dark);
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.guideline-item p {
    color: #777;
    font-size: 0.75rem;
    line-height: 1.3;
    margin: 0;
}

/* Mobile responsiveness for modals */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .guidelines-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
    }
    
    @media (max-width: 600px) {
        .guidelines-grid {
            grid-template-columns: repeat(2, 1fr);
        }
        
        .guideline-item h3 {
            font-size: 0.8rem;
        }
        
        .guideline-item p {
            font-size: 0.7rem;
        }
    }
    
    .modal-header h2 {
        font-size: 1.4em;
    }
    
    .modal-image {
        height: 150px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-info {
        grid-template-columns: 1fr;
    }
}

/* Community Page Styles */

/* Community Hero Section */
.community-hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
    color: white;
    text-align: center;
    padding: 4rem 2rem;
    margin-bottom: 3rem;
    border-radius: var(--radius);
}

.community-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.community-hero p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Founder Section */
.founder-section {
    padding: 3rem 2rem;
    background: var(--light);
    border-radius: var(--radius);
    margin-bottom: 3rem;
}

.founder-profile {
    display: flex;
    gap: 2.5rem;
    max-width: 1200px;
    margin: 2rem auto;
}

.founder-image {
    flex: 0 0 280px;
}

.profile-image-placeholder {
    width: 100%;
    height: 320px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-initials {
    font-size: 5rem;
    color: white;
    font-weight: bold;
}

.founder-bio {
    flex: 1;
}

.founder-bio h3 {
    font-size: 2.2rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.founder-title {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.founder-bio p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--dark);
    margin-bottom: 1rem;
}

.founder-connect {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background-color: var(--dark);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--primary);
    transform: translateY(-2px);
}

/* Mission & Goals Section */
.mission-section {
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    background: white;
    border-radius: var(--radius);
}

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

.mission-statement {
    background: var(--light);
    padding: 2rem;
    border-radius: var(--radius);
    margin-bottom: 2.5rem;
    text-align: center;
}

.mission-statement h3 {
    color: var(--dark);
    font-size: 1.8rem;
    margin-top: 0;
}

.mission-statement p {
    font-size: 1.2rem;
    color: var(--dark);
    line-height: 1.7;
    max-width: 900px;
    margin: 1rem auto 0;
}

.goals-container h3 {
    text-align: center;
    font-size: 1.8rem;
    color: var(--dark);
    margin-bottom: 2rem;
}

.goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.goal-card {
    background: var(--light);
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    transition: transform 0.3s ease;
}

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

.goal-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.goal-card h4 {
    color: var(--dark);
    margin: 0.5rem 0;
    font-size: 1.2rem;
}

.goal-card p {
    color: var(--dark);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Community Highlights */
.highlights-section {
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
    border-radius: var(--radius);
    color: white;
    text-align: center;
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 2rem auto 0;
}

.highlight-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem 1rem;
    border-radius: var(--radius);
}

.highlight-card h3 {
    font-size: 2.5rem;
    margin: 0 0 0.5rem 0;
}

.highlight-card p {
    font-size: 1.1rem;
    opacity: 0.8;
    margin: 0;
}

/* Social Media Section */
.social-section {
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    background: white;
    border-radius: var(--radius);
    text-align: center;
}

.social-section p {
    max-width: 800px;
    margin: 1rem auto 2.5rem;
    color: var(--dark);
    font-size: 1.1rem;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto 3rem;
}

.social-card {
    background: var(--light);
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    text-decoration: none;
    color: var(--dark);
    transition: transform 0.3s ease;
    display: block;
}

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

.social-card.facebook:hover {
    background-color: #e6f3ff;
}

.social-card.twitter:hover {
    background-color: #e8f5fd;
}

.social-card.instagram:hover {
    background-color: #fce8f0;
}

.social-card.youtube:hover {
    background-color: #ffe8e8;
}

.social-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.social-card h3 {
    margin: 0.5rem 0;
    font-size: 1.3rem;
}

.social-card p {
    font-size: 0.95rem;
    margin: 0.5rem 0 1rem;
    color: var(--dark);
}

.social-link-text {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--primary);
    color: white;
    border-radius: 50px;
    font-size: 0.9rem;
}

.discord-community {
    background: #7289da;
    color: white;
    padding: 2rem;
    border-radius: var(--radius);
    max-width: 800px;
    margin: 0 auto;
}

.discord-community h3 {
    margin-top: 0;
    font-size: 1.5rem;
}

.discord-community p {
    color: white;
    opacity: 0.9;
}

/* Donate Section */
.donate-section {
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    background: var(--light);
    border-radius: var(--radius);
    text-align: center;
}

.donate-section p {
    max-width: 800px;
    margin: 1rem auto 2.5rem;
    color: var(--dark);
    font-size: 1.1rem;
}

.donate-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto 3rem;
}

.donate-card {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

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

.donate-card.featured {
    border: 2px solid var(--secondary);
    position: relative;
}

.donate-card h3 {
    color: var(--dark);
    font-size: 1.3rem;
    margin-top: 0;
}

.donate-card p {
    color: var(--dark);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.donate-btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 500;
    transition: background 0.3s ease;
}

.donate-btn:hover {
    background: var(--dark);
}

.corporate-sponsors {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--dark);
    color: white;
    border-radius: var(--radius);
}

.corporate-sponsors h3 {
    margin-top: 0;
    font-size: 1.5rem;
}

.corporate-sponsors p {
    color: white;
    opacity: 0.9;
}

.secondary-btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: transparent;
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    border: 1px solid white;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.secondary-btn:hover {
    background: white;
    color: var(--dark);
}

/* Language Selector Styles */
.language-selector {
    position: relative;
    margin-right: 1rem;
}

#language-toggle {
    display: flex;
    align-items: center;
    background: var(--light);
    border: none;
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

#language-toggle:hover {
    background: var(--border);
}

.lang-text {
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

.lang-icon {
    font-size: 1.1rem;
    color: var(--accent);
    transition: transform 0.3s ease;
}

#language-toggle:hover .lang-icon {
    transform: rotate(20deg);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.15s ease;
    z-index: 1000;
}

.language-selector:hover .language-dropdown,
.language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.language-dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.2s ease;
}

.language-dropdown a:hover {
    background: var(--light);
}

.language-dropdown a.active {
    background: var(--primary);
    color: white;
}

/* For RTL languages like Arabic */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

/* Class for Bengali text */
.bn-text {
    font-family: 'Poppins', 'Noto Sans Bengali', 'Tiro Bangla', sans-serif;
}

/* Hide English text when Bengali is active */
html[lang="bn"] .en-text {
    display: none;
}

/* Hide Bengali text when English is active */
html[lang="en"] .bn-text {
    display: none;
}

/* Newsletter Section */
.newsletter-section {
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    background: var(--primary);
    border-radius: var(--radius);
    text-align: center;
    color: white;
}

.newsletter-section h2 {
    margin-top: 0;
}

.newsletter-section p {
    max-width: 600px;
    margin: 1rem auto;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 600px;
    margin: 2rem auto 1rem;
}

.newsletter-form input {
    flex: 1;
    min-width: 260px;
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
}

.newsletter-form .cta-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    cursor: pointer;
}

.newsletter-note {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive styles for Community page */
@media (max-width: 768px) {
    .founder-profile {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    
    .founder-image {
        flex: 0 0 220px;
    }
    
    .profile-image-placeholder {
        height: 220px;
    }
    
    .donate-options {
        grid-template-columns: 1fr;
    }
    
    .goals-grid {
        grid-template-columns: 1fr;
    }
    
    .social-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
}

/* Python Material Styling */
.material-content-section {
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--dark);
}

.material-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: var(--light);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.material-section h3 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.material-section ul, 
.material-section ol {
    padding-left: 25px;
}

.material-section li {
    margin-bottom: 8px;
}

.material-section.code-example {
    background-color: var(--code-bg);
    color: var(--light);
}

.material-section.code-example h3 {
    color: var(--secondary);
}

.material-section pre {
    background-color: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

.material-section code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
}

.material-section a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.material-section a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.close-material-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

/* Additional global styles for output console visibility */
#editor-output-section {
    position: relative;
    z-index: 50;
    visibility: visible;
    display: block;
}

#output-console {
    visibility: visible;
    display: block;
    overflow: auto;
    white-space: pre-wrap;
}


.close-material-btn:hover {
    background-color: var(--secondary);
}

/* Responsive styling for modal buttons */
@media (max-width: 600px) {
    #modal-course-explore {
        min-width: 160px;
        padding: 10px 20px;
        font-size: 1em;
        width: 80%;
    }
    
    .modal-content {
        width: 95%;
        margin: 3vh auto;
    }
    
    .modal-footer {
        padding: 20px 15px;
    }

    /* Mobile footer styles */
    #footer {
        padding: 6vw 3vw 3vw;
        margin-top: 8vw;
        border-radius: 15px 15px 0 0;
        font-size: 0.9em;
    }
    
    #footer::before {
        top: -100px;
        right: -50px;
        width: 200px;
        height: 200px;
    }
    
    #footer::after {
        bottom: -50px;
        left: -25px;
        width: 150px;
        height: 150px;
    }
    
    /* Special footer spacing for editor page on tablet */
    .editor-page + #footer {
        margin-top: 120px; /* Extra space when following editor page */
        position: relative;
    }
}

/* Extra small screens adjustments */
@media (max-width: 400px) {
    #main {
        padding: 0 0.5rem;
        gap: 1.5rem;
    }
    
    #footer {
        padding: 8vw 4vw 4vw;
        border-radius: 10px 10px 0 0;
        font-size: 0.85em;
    }
    
    /* Special footer spacing for editor page on mobile */
    .editor-page + #footer {
        margin-top: 150px; /* Much more margin on mobile */
        position: relative; /* Ensure proper stacking */
    }
}
