/* Preload fonts to prevent layout shifts */
@font-face {
    font-family: 'Noto Sans SC';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: local('Noto Sans SC Regular'), local('NotoSansSC-Regular'),
         url('https://fonts.gstatic.com/s/notosanssc/v12/k3kXo84MPvpLmixcA63oeALhLOCT-xWNm8Hqd37g1OkDRZe7lR4sg1IzSy-MNbE9VH8V.119.woff2') format('woff2');
    unicode-range: U+4E00-9FFF;
}

:root {
    --primary-color: #1a2733;
    --secondary-color: #f8f9fa;
    --accent-color: #1a5c8f;
    --text-color: #1a2733;
    --hover-color: #134166;
    --success-color: #1e8449;
    --warning-color: #996600;
    --danger-color: #c0392b;
}

body {
    font-family: 'Poppins', 'Noto Sans SC', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
    padding-bottom: 60px;
}

header {
    background: linear-gradient(135deg, var(--primary-color), #34495e);
    color: white;
    padding: 2em 0;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

header h1 {
    margin: 0;
    font-size: 2.5em;
    font-weight: 700;
    letter-spacing: 1px;
}

header p {
    margin: 10px 0 0;
    font-size: 1.2em;
    opacity: 0.9;
}

.hero-section {
    background-color: var(--primary-color);
    min-height: 400px;
    padding: 100px 20px;
    text-align: center;
    color: white;
    position: relative;
    content-visibility: auto;
    contain-intrinsic-size: 400px;
}

/* Load hero image after page load to prevent layout shift */
.hero-section.loaded {
    background: url('https://images.unsplash.com/photo-1546410531-89436e5b419a?auto=format&fit=crop&w=900&q=75') center/cover;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 62, 80, 0.7); /* Reduced opacity for better visibility */
}

.hero-content {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h2 {
    font-size: 2.8em;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2em;
    margin-bottom: 30px;
}
main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative; /* For positioning the return to top button */
}

/* Visual anchor pattern - subtle dots pattern that repeats throughout sections */
.visual-anchor {
    position: absolute;
    width: 200px;
    height: 200px;
    background-image: radial-gradient(circle, var(--accent-color) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.1;
    z-index: -1;
    border-radius: 50%;
}

.language-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.language-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
}

.language-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.language-card::after {
    content: attr(title);
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(44, 62, 80, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    opacity: 0;
    transition: opacity 0.3s ease, bottom 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    z-index: 10;
}

.language-card:hover::after {
    opacity: 1;
    top: -50px;
}

.card-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--accent-color), var(--hover-color));
    color: white;
}

.card-header h3 {
    margin: 0;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.flag {
    font-size: 1.2em;
}

.card-content {
    padding: 20px;
}

.progress-container {
    margin: 15px 0;
}

.progress-bar {
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--success-color);
    width: 0%;
    transition: width 1s ease;
}

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

.stat-item {
    text-align: center;
    padding: 10px;
    background: var(--secondary-color);
    border-radius: 8px;
}

.stat-number {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--accent-color);
}

.stat-label {
    font-size: 0.9em;
    color: #444;
}

/* Section dividers */
.section-divider {
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    margin: 20px auto 40px;
    width: 80%;
    max-width: 800px;
    opacity: 0.5;
    position: relative;
}

.section-divider::before {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background: white;
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.8;
}

.course-overview {
    padding: 40px 0;
    position: relative;
    overflow: hidden;
}

.course-overview h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
    font-size: 2em;
}

.course-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 0 20px;
}

.section-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid var(--accent-color);
}

.section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.section-card h3 {
    color: var(--accent-color);
    margin: 0 0 15px 0;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-card h3 i {
    font-size: 1.2em;
    opacity: 0.9;
}

.section-card p {
    margin: 0;
    color: #444;
    font-size: 0.95em;
    line-height: 1.5;
}

#day-selection {
    margin: 40px 0;
    position: relative;
    overflow: hidden;
}

#day-selection h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
    font-size: 2em;
}

/* Day grid pagination controls */
.day-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px;
}

.day-controls button {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.day-controls button:hover {
    background: var(--hover-color);
    transform: translateY(-2px);
}

.day-controls .day-range {
    display: flex;
    align-items: center;
    background: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.day-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    padding: 20px;
}

.day-grid a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 15px;
    background: white;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.day-grid a:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
    background: var(--accent-color);
    color: white;
}

.day-grid a:hover::after {
    content: attr(title);
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(44, 62, 80, 0.9);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    white-space: nowrap;
    z-index: 10;
}

.day-number {
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 5px;
}

.day-status {
    font-size: 0.8em;
    color: #444;
}

/* Return to top button */
.return-to-top {
    position: fixed;
    bottom: 80px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
}

.return-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.return-to-top:hover {
    background: var(--accent-color);
    transform: translateY(-5px);
}

footer {
    text-align: center;
    padding: 1.5em 0;
    background: var(--primary-color);
    color: white;
    width: 100%;
    z-index: 100;
    position: relative; /* Changed from fixed to relative */
}

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 20px;
    }

    .hero-content h2 {
        font-size: 2em;
    }

    .language-cards {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .course-sections {
        grid-template-columns: 1fr;
    }

    .day-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 10px;
    }

    .day-grid a {
        padding: 15px 10px;
    }

    .day-number {
        font-size: 1.2em;
    }

    .section-card {
        padding: 20px;
    }

    .section-card h3 {
        font-size: 1.2em;
    }
}

/* Core Skills Section Styles */
.core-skills-section {
    padding: 40px 0;
    position: relative;
    overflow: hidden;
}

.core-skills-section h2 {
    text-align: center;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 2em;
}

.section-description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 30px;
    color: #444;
    font-size: 1.1em;
    line-height: 1.5;
}

.core-skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

.core-skill-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: var(--text-color);
    position: relative;
    overflow: hidden;
    border-left: 5px solid var(--accent-color);
    display: flex;
    flex-direction: column;
}

.core-skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

.core-skill-card .card-icon {
    width: 70px;
    height: 70px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: white;
    font-size: 1.8em;
    position: relative;
    z-index: 1;
}

.core-skill-card h3 {
    color: var(--primary-color);
    margin: 0 0 15px 0;
    font-size: 1.5em;
    position: relative;
    z-index: 1;
}

.core-skill-card p {
    margin: 0;
    color: #555;
    font-size: 1em;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.core-skill-card::before {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    background-image: radial-gradient(circle, var(--accent-color) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.1;
    z-index: 0;
    border-radius: 50%;
    right: -125px;
    top: -125px;
}

@media (max-width: 768px) {
    .core-skills-grid {
        grid-template-columns: 1fr;
    }
    
    .core-skill-card {
        padding: 25px;
    }
    
    .core-skill-card .card-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5em;
    }
    
    .core-skill-card h3 {
        font-size: 1.3em;
    }
}

/* Supplementary Section Styles */
.supplementary-section {
    padding: 40px 0;
    position: relative;
    overflow: hidden;
}

.supplementary-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
    font-size: 2em;
}

.supplementary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding: 0 20px;
}

.supplementary-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-decoration: none;
    color: var(--text-color);
    position: relative;
    overflow: hidden;
}

/* Language-specific text display */
[lang="en"] .zh {
    display: none;
}

[lang="zh-CN"] .en {
    display: none;
}

/* Chinese text styling */
.zh {
    font-family: 'Noto Sans SC', sans-serif;
}

/* Language selector styles */
.language-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.language-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
}

.language-btn:hover,
.language-btn.active {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    font-weight: 600;
}

/* Media queries for language selector */
@media (max-width: 768px) {
    .language-selector {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .language-btn {
        padding: 6px 10px;
        font-size: 0.85em;
    }
}

.supplementary-card::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background-image: radial-gradient(circle, var(--accent-color) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.1;
    z-index: 0;
    border-radius: 50%;
    right: -100px;
    top: -100px;
}

.supplementary-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: white;
    font-size: 1.5em;
    position: relative;
    z-index: 1;
}

.supplementary-card h3 {
    color: var(--accent-color);
    margin: 0 0 10px 0;
    font-size: 1.3em;
    position: relative;
    z-index: 1;
}

.supplementary-card p {
    margin: 0;
    color: #444;
    font-size: 0.95em;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

/* Benefits Section Styles */
.benefits-section {
    padding: 40px 0;
    background: var(--secondary-color);
    position: relative;
    overflow: hidden;
}

/* Visual storytelling journey path */
.journey-path {
    position: absolute;
    top: 0;
    left: 50%;
    height: 100%;
    width: 4px;
    background: linear-gradient(to bottom, transparent, var(--accent-color), transparent);
    opacity: 0.2;
    z-index: 0;
}

.journey-path::before,
.journey-path::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-color);
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.4;
}

.journey-path::before {
    top: 10%;
}

.journey-path::after {
    bottom: 10%;
}

.benefits-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
    font-size: 2em;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    padding: 0 20px;
}

.benefit-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.benefit-card h3 {
    color: var(--accent-color);
    margin: 0 0 20px 0;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.benefit-card h3 i {
    font-size: 1.2em;
    opacity: 0.9;
}

.benefit-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefit-card ul li {
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
}

.benefit-card ul li:before {
    content: "•";
    color: var(--accent-color);
    position: absolute;
    left: 0;
}

.combo-table {
    margin-top: 15px;
}

.combo-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.combo-row:last-child {
    border-bottom: none;
}

.combo {
    font-weight: 600;
    color: var(--primary-color);
}

.benefit {
    color: var(--accent-color);
    text-align: right;
}

@media (max-width: 768px) {
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .combo-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .benefit {
        text-align: left;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2em;
    }

    .hero-content h2 {
        font-size: 1.8em;
    }

    .hero-content p {
        font-size: 1em;
    }

    body {
        padding-bottom: 80px;
    }

    .language-card::after {
        display: none;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-slide-right {
    animation: slideInRight 0.8s ease forwards;
}

.animate-slide-left {
    animation: slideInLeft 0.8s ease forwards;
}

/* Micro-interactions */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Media query adjustments for the return to top button */
/* Day Page Styles */
.lesson-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: 20px 0;
    position: relative;
    animation: fadeIn 0.8s ease forwards;
}

.lesson-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.lesson-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lesson-title .flag {
    font-size: 1.5em;
}

.language-selector {
    display: flex;
    gap: 10px;
}

.language-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 8px;
    background: var(--secondary-color);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.language-btn:hover,
.language-btn.active {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

.audio-player {
    width: 100%;
    margin: 20px 0;
    padding: 15px;
    background: var(--secondary-color);
    border-radius: 10px;
    animation: fadeIn 0.8s ease forwards;
}

.audio-player audio {
    width: 100%;
}

#audio-fallback {
    margin-top: 10px;
}

#audio-fallback .note {
    background-color: rgba(52, 152, 219, 0.1);
    border-left: 4px solid var(--accent-color);
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.text-content {
    margin: 20px 0;
    line-height: 1.8;
    font-size: 1.1em;
    animation: fadeIn 0.8s ease forwards;
}

.phrase-section {
    margin-bottom: 30px;
    background: var(--secondary-color);
    padding: 20px;
    border-radius: 10px;
    animation: fadeIn 0.8s ease forwards;
    position: relative;
    overflow: hidden;
}

.phrase-section::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background-image: radial-gradient(circle, var(--accent-color) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.1;
    z-index: 0;
    border-radius: 50%;
    right: -100px;
    top: -100px;
}

.phrase-section h3 {
    color: var(--accent-color);
    margin: 0 0 15px 0;
    font-size: 1.3em;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 5px;
    position: relative;
    z-index: 1;
}

.phrase-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    position: relative;
    z-index: 1;
}

.phrase-item {
    background: white;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.phrase-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.copy-btn {
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    padding: 5px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.navigation {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    animation: fadeIn 0.8s ease forwards;
}

.navigation:last-child {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--secondary-color);
}

.nav-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: var(--hover-color);
    transform: translateY(-2px);
}

.nav-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.home-btn {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.home-btn:hover {
    background: #34495e;
    transform: translateY(-2px);
}

.section-info {
    background: var(--secondary-color);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    animation: fadeIn 0.8s ease forwards;
    position: relative;
    overflow: hidden;
}

.section-info::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background-image: radial-gradient(circle, var(--accent-color) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.1;
    z-index: 0;
    border-radius: 50%;
    left: -100px;
    bottom: -100px;
}

.section-info h3 {
    color: var(--accent-color);
    margin: 0 0 10px 0;
    position: relative;
    z-index: 1;
}

.section-info p {
    margin: 0;
    color: #444;
    position: relative;
    z-index: 1;
}

.lesson-actions {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    animation: fadeIn 0.8s ease forwards;
}

.complete-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    background: var(--success-color);
    color: white;
    font-size: 1.1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.complete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.complete-btn.completed {
    background: var(--accent-color);
    cursor: default;
}

.copy-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--success-color);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    display: none;
    animation: fadeInOut 2s ease;
    z-index: 1000;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(20px); }
    20% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); }
}

@media (max-width: 768px) {
    .language-selector {
        gap: 5px;
    }
    
    .language-btn {
        padding: 6px 10px;
        font-size: 0.9em;
    }

    .lesson-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .language-selector {
        width: 100%;
        justify-content: flex-start;
    }

    .navigation {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .nav-btn, .home-btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .language-selector {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 8px;
    }
    
    .language-btn {
        padding: 5px 8px;
        font-size: 0.8em;
    }
}

@media (max-width: 768px) {
    .return-to-top {
        bottom: 70px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
    
    body {
        padding-bottom: 0; /* Remove padding since footer is no longer fixed */
    }
}
