/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #475569;
    --accent-color: #0ea5e9;
    --text-color: #1e293b;
    --text-light: #64748b;
    --bg-color: #ffffff;
    --bg-alt: #f8fafc;
    --border-color: #e2e8f0;
    --code-bg: #1e293b;
    --code-text: #e2e8f0;
    --success-color: #10b981;
    --header-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

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

/* Header */
.header {
    background: var(--header-gradient);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.tagline {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 2rem;
}

.badges {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.badges img {
    height: 20px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: white;
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Navigation */
.nav {
    background-color: var(--bg-alt);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(248, 250, 252, 0.95);
}

.nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0;
}

.nav li {
    margin: 0;
}

.nav a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Main Content */
.main {
    padding: 3rem 0;
}

.section {
    margin-bottom: 4rem;
}

.section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

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

.section p {
    margin-bottom: 1rem;
    color: var(--text-light);
    font-size: 1.05rem;
}

.section ul, .section ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

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

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

.feature-card {
    background: var(--bg-alt);
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Code Blocks */
pre {
    background-color: var(--code-bg);
    color: var(--code-text);
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid #334155;
}

code {
    background-color: var(--code-bg);
    color: var(--code-text);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

pre code {
    background-color: transparent;
    padding: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Tables */
.api-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--bg-alt);
    border-radius: 0.5rem;
    overflow: hidden;
}

.api-table thead {
    background-color: var(--primary-color);
    color: white;
}

.api-table th,
.api-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.api-table th {
    font-weight: 600;
}

.api-table tbody tr:hover {
    background-color: var(--bg-color);
}

.api-table tbody tr:last-child td {
    border-bottom: none;
}

/* Best Practices List */
.best-practices-list {
    list-style: none;
    margin-left: 0;
}

.best-practices-list li {
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--bg-alt);
    border-left: 4px solid var(--success-color);
    border-radius: 0.25rem;
}

.best-practices-list strong {
    color: var(--text-color);
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background-color: var(--code-bg);
    color: var(--code-text);
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

.footer p {
    margin: 0;
    color: var(--code-text);
}

.footer a {
    color: var(--accent-color);
    margin: 0 0.5rem;
}

.footer a:hover {
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .nav ul {
        flex-direction: column;
        align-items: center;
    }

    .nav a {
        padding: 0.75rem 1rem;
    }

    .container {
        padding: 0 1rem;
    }

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

    .section h2 {
        font-size: 1.5rem;
    }

    pre {
        padding: 1rem;
        font-size: 0.85rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Section Anchors */
.section {
    scroll-margin-top: 60px;
}
