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

body {
    font-family: 'Cal Sans', 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

.header {
    background: #fff;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
}

.accent {
    color: #007bff;
}

.nav {
    display: flex;
}

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

.nav-list a {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    white-space: nowrap;
}

.nav-list a:hover {
    color: #007bff;
    background: #f8f9fa;
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.main {
    margin-top: 80px;
}

.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    background: #fff;
    color: #667eea;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.lesson-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

#lesson-title {
    grid-column: 1 / -1;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.lesson-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.lesson-text h4 {
    color: #007bff;
    margin: 1.5rem 0 0.5rem;
}

.lesson-text p {
    margin-bottom: 1rem;
}

.lesson-text ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.code-example {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.code-tabs {
    display: flex;
    background: #e9ecef;
}

.tab-button {
    flex: 1;
    padding: 1rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tab-button.active {
    background: #fff;
    color: #007bff;
}

.code-content {
    position: relative;
    min-height: 300px;
}

.tab-panel {
    display: none;
    padding: 1.5rem;
}

.tab-panel.active {
    display: block;
}

pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', monospace;
    line-height: 1.5;
}

#preview-frame {
    width: 100%;
    height: 250px;
    border: none;
    background: white;
    border-radius: 8px;
}

@media (max-width: 1024px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        padding: 1rem 2rem;
    }

    .nav.active {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        gap: 0.5rem;
    }

    .hamburger {
        display: flex;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-content h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 1rem;
    }

    .hero {
        padding: 3rem 1rem;
    }

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

    .lesson-content {
        padding: 2rem 1rem;
    }
}