* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cascadia Code', monospace;
}

:root {
    --primary-color: #333;
    --secondary-color: #4a9d75;
    --accent-color: #eefff2;
    --light-bg: #f0f9f5;
    --dark-text: #2d3e3f;
    --white: #ffffff;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
/* Thêm vào đầu file, ngay sau phần :root */
body {
    transition: background-color 0.5s ease, color 0.5s ease;
}

.lesson-header,
.lesson-footer,
.objective-card,
.concept-card,
.video-wrapper,
.practice-wrapper {
    transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

h1, h2, h3, p, .subtitle {
    transition: color 0.5s ease;
}

/* Thêm hiệu ứng pulse cho nút toggle */
/* @keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
} */

#toggle-theme {
    animation: pulse 4s infinite ease-in-out;
}


body.dark-mode, 
body.dark-mode * {
    animation: fadeIn 0.5s ease-in-out;
}
body {
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--light-bg);
}
h3 {
    font-size: 1.5rem;
}
p{
    color: #f0f9f5;
}

/* Header */
.lesson-header {
    background: linear-gradient(#4b8561, #78b38f);
    color: var(--white);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    box-shadow: var(--shadow);
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #90c4a5;
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.back-button:hover {
    background-color: #8ebb9d;
    transform: translateY(-2px);
}

.header-content {
    flex: 1;
}

.header-content h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-style: italic;
    opacity: 0.9;
}

/* Main container */
.lesson-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* Video section */
.video-section {
    margin-bottom: 3rem;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Learning objectives */
.learning-objectives {
    margin-bottom: 3rem;
}

.learning-objectives h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.objectives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.objective-card {
    background: #93c9a8;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.objective-card:hover {
    transform: translateY(-5px);
}

.objective-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.objective-card h3 {
    color: #1c422d;
    margin-bottom: 1rem;
}
.objective-card p {
    color: #335e46;
    font-size: 1.3rem;
}
/* Key concepts */
.key-concepts {
    margin-bottom: 3rem;
}

.key-concepts h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.concept-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.concept-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--accent-color);
}

.concept-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.concept-card ul {
    padding-left: 1.5rem;
}

.concept-card li {
    margin-bottom: 0.5rem;
}

/* Practice section */
.practice-section {
    margin-bottom: 3rem;
}

.practice-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.practice-wrapper {
    background: #93c9a8;
    position: relative;
    padding-bottom: 150%; /* Adjust based on form height */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.practice-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Footer */
.lesson-footer {
    text-align: center;
    padding: 6rem;
    background: linear-gradient(#78b38f, #4b8561);
    color: var(--white);
    margin-top: 2rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .lesson-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .back-button {
        align-self: flex-start;
    }
    
    .header-content h1 {
        font-size: 1.5rem;
    }
    
    .objectives-grid,
    .concept-cards {
        grid-template-columns: 1fr;
    }
    
    .practice-wrapper {
        padding-bottom: 200%; /* Taller aspect ratio for mobile */
    }
}

@media (max-width: 480px) {
    .lesson-container {
        padding: 0 1rem;
    }
    
    .objective-card,
    .concept-card {
        padding: 1.5rem 1rem;
    }
}
/* Thêm vào cuối file style_inpage.css */
/* Dark mode styles */
body.dark-mode {
    background-color: #1a2e22;
    color: #e0f7e9;
}

body.dark-mode .lesson-header,
body.dark-mode .lesson-footer {
    background: #2d4a3a;
}

body.dark-mode .objective-card {
    background-color: #2d4a3a;
}

body.dark-mode .practice-wrapper,
body.dark-mode .video-wrapper {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

body.dark-mode h2,
body.dark-mode h3 {
    color: #e0f7e9;
}

body.dark-mode p {
    color: #e0f7e9;
}
body.dark-mode .back-button {
    background-color: #4d7a62;
    color: #ffffff;
}
body.dark-mode .back-button:hover {
    background-color: #3a5a4a;
}
body.dark-mode .practice-wrapper{
    background-color: #2d4a3a;
    color: #e0f7e9
}

/* Nút toggle theme */
#toggle-theme {
    position: fixed;
    left: 10px;
    bottom: 19px;
    z-index: 100;
    padding: 15px 20px;
    background-color: #89a293;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

#toggle-theme:hover {
    background-color: #78ae8d;
    transform: translateY(-2px);
}

body.dark-mode #toggle-theme {
    background-color: #4d7a62;
    color: white;
}
