/* ALICE API Landing Page Styles */
/* Brand: Primary #1667a6, Accent #ff6000, Font: Open Sans */

:root,
[data-theme="light"] {
    --alice-blue: #1667a6;
    --alice-blue-dark: #124f7f;
    --alice-blue-light: #e8f1f8;
    --alice-orange: #ff6000;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #8888a0;
    --bg-page: #ffffff;
    --bg-card: #f8f9fc;
    --bg-code: #f4f5f7;
    --border-color: #e2e4ea;
    --radius: 8px;
    --header-bg: var(--alice-blue);
    --hero-gradient-start: var(--alice-blue);
    --hero-gradient-end: var(--alice-blue-dark);
    --table-header-bg: #f0f2f5;
    --table-row-hover: #f8f9fb;
}

[data-theme="dark"] {
    --alice-blue: #3b9ade;
    --alice-blue-dark: #2d7ab8;
    --alice-blue-light: #1a2a3a;
    --text-primary: #e4e4e8;
    --text-secondary: #a0a0b8;
    --text-muted: #707088;
    --bg-page: #13131a;
    --bg-card: #1a1a24;
    --bg-code: #1e1e2a;
    --border-color: #2a2a3a;
    --header-bg: #1a1a24;
    --hero-gradient-start: #1a2a3a;
    --hero-gradient-end: #0f1a28;
    --table-header-bg: #1e1e2a;
    --table-row-hover: #22222e;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    background: var(--bg-page);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    background: var(--header-bg);
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    height: 36px;
    width: auto;
}

.nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--radius);
    transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
}

.nav-link-secondary {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

.nav-link-secondary:hover {
    color: #ffffff;
}

/* Theme Toggle */
.theme-toggle {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.15s;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
}

[data-theme="light"] .theme-icon-dark,
[data-theme="dark"] .theme-icon-light {
    display: none;
}

[data-theme="light"] .theme-icon-light,
[data-theme="dark"] .theme-icon-dark {
    display: inline;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    color: #ffffff;
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.125rem;
    max-width: 640px;
    margin: 0 auto 32px;
    opacity: 0.9;
    line-height: 1.7;
}

.cta-button {
    display: inline-block;
    padding: 14px 32px;
    background: #ffffff;
    color: var(--alice-blue);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: var(--radius);
    transition: transform 0.15s, box-shadow 0.15s;
}

.cta-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Content Sections */
.content {
    padding: 64px 0;
}

.content-alt {
    background: var(--bg-card);
}

.section-heading {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--alice-blue);
}

.section-intro {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 720px;
    line-height: 1.7;
}

.section-note {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-top: 24px;
    font-style: italic;
}

.section-note a {
    color: var(--alice-blue);
    text-decoration: none;
}

.section-note a:hover {
    text-decoration: underline;
}

/* Steps */
.step {
    margin-bottom: 40px;
}

.step h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.step p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* Code Blocks */
.code-block {
    background: var(--bg-code);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 16px;
    overflow: hidden;
}

.code-block-inline {
    margin-top: 8px;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.code-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.copy-btn {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    font-family: inherit;
}

.copy-btn:hover {
    color: var(--alice-blue);
    border-color: var(--alice-blue);
}

.copy-btn.copied {
    color: #22c55e;
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.code-block pre {
    padding: 16px;
    margin: 0;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Menlo', 'Monaco', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Inline code */
code {
    background: var(--alice-blue-light);
    color: var(--alice-blue);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    font-family: 'Menlo', 'Monaco', 'Consolas', monospace;
}

.code-block code {
    background: none;
    padding: 0;
    border-radius: 0;
    color: var(--text-primary);
}

/* Auth Flow */
.auth-flow {
    margin-bottom: 32px;
}

.flow-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.flow-step:last-child {
    border-bottom: none;
}

.flow-number {
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: var(--alice-blue);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.flow-step strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.flow-step p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
    margin-bottom: 16px;
}

.data-table thead {
    background: var(--table-header-bg);
}

.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    vertical-align: top;
}

.data-table tbody tr:hover {
    background: var(--table-row-hover);
}

.data-table td code {
    font-size: 0.8em;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.card {
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 28px;
}

.content-alt .card {
    background: var(--bg-page);
}

.card h2,
.card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--alice-blue);
}

.card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.card p:last-child {
    margin-bottom: 0;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 32px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer a {
    color: var(--alice-blue);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.footer p {
    margin-bottom: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 48px 0;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .header-content {
        height: 56px;
    }

    .logo {
        height: 28px;
    }

    .section-heading {
        font-size: 1.375rem;
    }

    .data-table {
        font-size: 0.85rem;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }

    .flow-step {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .nav {
        gap: 4px;
    }

    .nav-link {
        padding: 6px 10px;
        font-size: 13px;
    }

    .data-table {
        display: block;
        overflow-x: auto;
    }
}
