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

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --code-bg: #1e293b;
    --code-text: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --max-width: 1200px;
}

html {
    scroll-behavior: smooth;
}

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

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.navbar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

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

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

.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 20px;
    text-align: center;
}

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

.hero-content p {
    font-size: 1.25rem;
    opacity: 0.9;
}

.tutorials-section {
    padding: 3rem 0;
}

.tutorials-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.tutorials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.tutorial-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.card-image {
    height: 180px;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.25rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.card-content {
    padding: 1.5rem;
}

.category {
    display: inline-block;
    background: #dbeafe;
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.card-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

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

.about-section {
    padding: 3rem 0;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.about-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.about-section p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

footer {
    background: var(--text-primary);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

.tutorial-page {
    display: flex;
    gap: 3rem;
    padding: 2rem 0;
}

.tutorial-main {
    flex: 1;
    min-width: 0;
}

.tutorial-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.toc {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    position: sticky;
    top: 100px;
    box-shadow: var(--shadow);
}

.toc h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.toc ul {
    list-style: none;
}

.toc li {
    margin-bottom: 0.5rem;
}

.toc a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    padding: 0.25rem 0;
    transition: color 0.2s;
}

.toc a:hover {
    color: var(--primary-color);
}

.tutorial-content {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.tutorial-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.tutorial-header .category {
    margin-bottom: 0.5rem;
}

.tutorial-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.tutorial-meta {
    color: var(--text-secondary);
    display: flex;
    gap: 1.5rem;
}

.tutorial-content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

.tutorial-content h3 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem;
}

.tutorial-content p {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.tutorial-content ul, .tutorial-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

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

.code-block {
    background: var(--code-bg);
    border-radius: var(--radius);
    margin: 1.5rem 0;
    overflow: hidden;
}

.code-header {
    background: #0f172a;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #334155;
}

.code-language {
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
}

.copy-btn {
    background: transparent;
    border: 1px solid #475569;
    color: #94a3b8;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: #334155;
    color: white;
}

.code-block pre {
    padding: 1rem;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--code-text);
}

.code-block .keyword {
    color: #c084fc;
}

.code-block .string {
    color: #86efac;
}

.code-block .function {
    color: #60a5fa;
}

.code-block .comment {
    color: #64748b;
}

.code-block .number {
    color: #fcd34d;
}

.code-block .variable {
    color: #f472b6;
}

.code-block .operator {
    color: #94a3b8;
}

.callout {
    background: #eff6ff;
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 1.5rem 0;
}

.callout.warning {
    background: #fef3c7;
    border-left-color: #f59e0b;
}

.callout.success {
    background: #dcfce7;
    border-left-color: #22c55e;
}

.callout-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.next-step {
    background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-top: 2rem;
}

.next-step h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.next-step a {
    color: var(--primary-color);
    font-weight: 500;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.back-link:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .tutorials-grid {
        grid-template-columns: 1fr;
    }
    
    .tutorial-page {
        flex-direction: column;
    }
    
    .tutorial-sidebar {
        width: 100%;
        order: -1;
    }
    
    .toc {
        position: static;
    }
    
    .tutorial-content {
        padding: 1.5rem;
    }
    
    .tutorial-header h1 {
        font-size: 1.5rem;
    }
}
