:root {
    --primary: #0078d4;
    --primary-dark: #005a9e;
    --secondary: #00bcf2;
    --accent: #ffb900;
    --success: #107c10;
    --danger: #e81123;
    --text: #1a1a1a;
    --text-light: #5a5a5a;
    --bg: #ffffff;
    --bg-alt: #f5f5f5;
    --border: #e0e0e0;
    --shadow: rgba(0, 0, 0, 0.1);
    --code-bg: #2d2d2d;
    --sidebar-width: 320px;
    --header-height: 60px;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    overflow-y: auto;
    padding: 0;
    z-index: 100;
    box-shadow: 4px 0 20px var(--shadow);
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sidebar-header {
    padding: 2rem 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 2px solid var(--primary);
}

.sidebar-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, #00bcf2 0%, #0078d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-header .subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

.progress-indicator {
    padding: 1.5rem 1.5rem;
    background: rgba(0, 0, 0, 0.15);
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--secondary) 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.nav-section {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-section h3 {
    padding: 1rem 1.5rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-section a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-section a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-left-color: var(--secondary);
}

.nav-section a.active {
    background: rgba(0, 120, 212, 0.2);
    color: white;
    border-left-color: var(--primary);
    font-weight: 500;
}

.home-nav-section {
    border-bottom: 2px solid var(--primary);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.home-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: rgba(0, 188, 242, 0.1);
    border-left: 3px solid var(--accent);
}

.home-link:hover {
    background: rgba(0, 188, 242, 0.2);
    color: var(--secondary);
    transform: translateX(3px);
}

/* Main Content */
.content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #0078d4 0%, #00bcf2 100%);
    color: white;
    padding: 4rem 3rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

/* Content Sections */
section {
    padding: 3rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

section h2 {
    font-size: 2.5rem;
    color: var(--text);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 120, 212, 0.15);
}

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

.feature-card h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Steps */
.steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 120, 212, 0.3);
}

.step-content h3 {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-light);
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8f4ff 100%);
    border-radius: 12px;
    text-align: center;
}

.cta-button {
    display: inline-block;
    padding: 1rem 3rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 120, 212, 0.3);
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 120, 212, 0.4);
}

/* Footer */
footer {
    background: var(--bg-alt);
    padding: 2rem 3rem;
    text-align: center;
    color: var(--text-light);
    border-top: 1px solid var(--border);
}

/* Lesson Specific Styles */
.lesson-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 3rem 3rem 2rem;
}

.lesson-meta {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

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

.lesson-content h2 {
    color: var(--primary);
    margin-top: 3rem;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.lesson-content h3 {
    color: var(--text);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

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

.lesson-content ul,
.lesson-content ol {
    margin: 1rem 0 1rem 2rem;
    line-height: 1.8;
}

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

/* Code Blocks */
.code-example {
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow);
}

.code-header {
    background: #1e1e1e;
    color: white;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.code-header button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.code-header button:hover {
    background: rgba(255, 255, 255, 0.2);
}

pre {
    margin: 0 !important;
    border-radius: 0 !important;
}

pre code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Info Boxes */
.info-box {
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    border-left: 4px solid;
}

.info-box.tip {
    background: #e8f5e9;
    border-color: var(--success);
}

.info-box.warning {
    background: #fff3e0;
    border-color: var(--accent);
}

.info-box.important {
    background: #e3f2fd;
    border-color: var(--primary);
}

.info-box.danger {
    background: #ffebee;
    border-color: var(--danger);
}

.info-box h4 {
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
}

/* Exercise Section */
.exercise {
    background: var(--bg-alt);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    border: 2px solid var(--border);
}

.exercise h3 {
    color: var(--primary);
    margin-top: 0 !important;
    margin-bottom: 1rem;
}

.exercise-task {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    border-left: 3px solid var(--primary);
}

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

.lesson-nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.lesson-nav a:hover {
    background: var(--primary-dark);
    transform: translateX(5px);
}

.lesson-nav a.prev:hover {
    transform: translateX(-5px);
}

/* Responsive */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 280px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    section {
        padding: 2rem 2rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .content {
        margin-left: 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}
