:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --background: #ffffff;
    --surface: #f9fafb;
    --border: #e5e7eb;
    --shadow: rgba(0, 0, 0, 0.1);
    --max-width: 1200px;
}

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

body {
    font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
}

header {
    background-color: var(--background);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.9);
}

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

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

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

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

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

main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem;
}

#hero {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--surface) 0%, var(--background) 100%);
    border-radius: 1rem;
    margin-bottom: 4rem;
}

#hero h2 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

#hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

section {
    margin-bottom: 4rem;
}

section h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

section h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 3rem;
    height: 3px;
    background-color: var(--primary-color);
}

section p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

section ul {
    list-style: none;
    margin: 1.5rem 0;
}

section ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
}

section ul li:before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

.pattern-flow {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    padding: 2rem;
    background-color: var(--surface);
    border-radius: 0.5rem;
}

.flow-item {
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 0.5rem;
    font-weight: 600;
    box-shadow: 0 2px 4px var(--shadow);
}

.flow-arrow {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.code-example {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
}

.code-example code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.5;
}

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

.benefit-card {
    background-color: var(--surface);
    padding: 2rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px var(--shadow);
}

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

.benefit-card p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 1rem;
}

footer {
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
    margin-top: 4rem;
}

footer p {
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    #hero h2 {
        font-size: 2rem;
    }
    
    #hero p {
        font-size: 1.1rem;
    }
    
    .pattern-flow {
        flex-direction: column;
    }
    
    .flow-arrow {
        transform: rotate(90deg);
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #60a5fa;
        --secondary-color: #3b82f6;
        --accent-color: #93c5fd;
        --text-primary: #f3f4f6;
        --text-secondary: #9ca3af;
        --background: #111827;
        --surface: #1f2937;
        --border: #374151;
        --shadow: rgba(0, 0, 0, 0.3);
    }
    
    header {
        background-color: rgba(17, 24, 39, 0.9);
    }
    
    .code-example code {
        color: var(--text-primary);
    }
}