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

:root {
    --primary-color: #009688;
    --primary-dark: #00796b;
    --secondary-color: #00bcd4;
    --background: #f5f5f5;
    --surface: #ffffff;
    --text-primary: #212121;
    --text-secondary: #757575;
    --border-color: #e0e0e0;
    --success: #4caf50;
    --error: #f44336;
    --warning: #ff9800;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* Navbar */
.navbar {
    background-color: var(--surface);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

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

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

.subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

/* Features */
.features {
    margin: 4rem 0;
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

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

.feature-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Lessons Grid */
.page-title {
    text-align: center;
    margin: 2rem 0 3rem;
    font-size: 2.5rem;
    color: var(--primary-color);
}

.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.lesson-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.lesson-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.lesson-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.lesson-number {
    display: inline-block;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.lesson-card h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.lesson-tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.tag {
    background: var(--background);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Lesson Page */
.lesson-content {
    background: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.lesson-content h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.lesson-content h3 {
    color: var(--primary-dark);
    margin: 2rem 0 1rem;
}

.lesson-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.lesson-content ul,
.lesson-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.lesson-content li {
    margin-bottom: 0.5rem;
}

/* Code Blocks */
.code-block {
    background: #263238;
    color: #eeffff;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    position: relative;
}

.code-block pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.code-block .copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.3s;
}

.code-block .copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Interactive Exercise */
.exercise {
    background: #fff3e0;
    border-left: 4px solid var(--warning);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.exercise h3 {
    color: var(--warning);
    margin-top: 0;
}

.exercise-form {
    margin-top: 1.5rem;
}

.code-editor {
    width: 100%;
    min-height: 200px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    resize: vertical;
    background: #fafafa;
}

.run-btn {
    margin-top: 1rem;
    padding: 0.75rem 2rem;
}

.output {
    margin-top: 1rem;
    padding: 1rem;
    background: #263238;
    color: #eeffff;
    border-radius: 6px;
    min-height: 100px;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
}

.output.success {
    background: #1b5e20;
}

.output.error {
    background: #b71c1c;
}

/* Navigation */
.lesson-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.nav-btn {
    padding: 0.75rem 1.5rem;
}

/* About Section */
.about {
    background: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin: 4rem 0;
}

.about h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background: var(--surface);
    padding: 2rem 0;
    margin-top: auto;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
    text-align: center;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .lessons-grid {
        grid-template-columns: 1fr;
    }
}

