:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --code-bg: #1e293b;
    --gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

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

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

header {
    background: var(--gradient-bg);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-100px);
    }
}

.hero {
    position: relative;
    z-index: 1;
}

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

header.page-header {
    padding: 2.5rem 0;
}

.page-header .hero h1 {
    font-size: 2.75rem;
    margin-bottom: 0.5rem;
}

.page-header .hero p {
    margin-bottom: 0;
}

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

.cta-button {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cta-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

nav {
    background: white;
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    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 {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.nav-links a.active {
    font-weight: 600;
}

/* Keep anchored headings visible below the sticky nav */
[id] {
    scroll-margin-top: 5rem;
}

main {
    padding: 4rem 0;
}

.section {
    margin-bottom: 4rem;
}

.section h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    position: relative;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 4rem;
    height: 3px;
    background: var(--gradient-bg);
    border-radius: 2px;
}

.section h3 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: var(--text-primary);
}

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

.code-block {
    background: var(--code-bg);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
    overflow-x: auto;
    box-shadow: var(--shadow-md);
}

.code-block::before {
    content: '';
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff5f56;
    box-shadow: 20px 0 0 #ffbd2e, 40px 0 0 #27ca3f;
}

pre {
    font-family: 'JetBrains Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-top: 1.5rem;
}

code {
    font-family: 'JetBrains Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

.inline-code {
    background: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--primary-color);
}

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

.parameter-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.parameter-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.parameter-card h3 {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.2rem;
    margin: 0 0 0.5rem 0;
    overflow-wrap: anywhere;
}

.parameter-type {
    background: #e0f2fe;
    color: #0277bd;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
    display: inline-block;
}

.parameter-card p,
.guide-card p {
    font-size: 1rem;
    margin-bottom: 0;
}

.section li {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0 0 0.75rem 1.5rem;
}

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

.guide-card {
    display: block;
    text-decoration: none;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.guide-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.guide-card h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin: 0 0 0.5rem 0;
}

.page-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.page-nav a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.page-nav .next {
    margin-left: auto;
    text-align: right;
}

.example-section {
    background: var(--secondary-color);
    border-radius: 16px;
    padding: 3rem;
    margin: 3rem 0;
}

.best-practices {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 16px;
    padding: 3rem;
    margin: 3rem 0;
}

.best-practices h3 {
    color: var(--primary-color);
}

.best-practices ul {
    list-style: none;
    padding-left: 0;
}

.best-practices li {
    margin-left: 0;
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.best-practices li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: bold;
    font-size: 1.2rem;
}

.deprecation-notice {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
}

.deprecation-notice h3 {
    color: #92400e;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.deprecation-notice p {
    color: #78350f;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

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

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .container {
        padding: 0 1rem;
    }

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

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem 1rem;
        font-size: 0.95rem;
    }

    .page-header .hero h1 {
        font-size: 2rem;
    }

    .parameter-grid {
        grid-template-columns: 1fr;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-bg);
    transform-origin: left;
    transform: scaleX(0);
    z-index: 1000;
    transition: transform 0.1s ease;
}
