/* --- Design Tokens & Variables --- */
:root {
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --brand-color: #6366f1;
    --brand-hover: #4f46e5;
    --border-color: #e2e8f0;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05);
    --transition-smooth: all 0.2s ease-in-out;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* --- Top Navigation Bar --- */
.top-bar {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--brand-color);
}

/* --- Buttons --- */
.btn {
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-login {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.btn-login:hover {
    background-color: var(--bg-base);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.btn-primary {
    background-color: var(--brand-color);
    color: #ffffff;
}

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

/* --- Hero Banner --- */
.hero-banner {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    color: #ffffff;
    padding: 60px 24px;
    text-align: center;
}

.banner-content {
    max-width: 600px;
    margin: 0 auto;
}

.hero-banner h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.hero-banner p {
    color: #c7d2fe;
    font-size: 1.1rem;
    font-weight: 400;
}

/* --- Main Layout Grid --- */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
}

/* --- API Interactive Card --- */
.api-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.api-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    background-color: #f1f5f9;
    overflow-y:hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.card-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

/* --- Status Badges --- */
.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-active {
    background-color: #dcfce7;
    color: #166534;
}
/* --- Docs Layout Grid Architecture --- */
        .docs-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 40px 24px;
            display: grid;
            grid-template-columns: 1fr;
            gap: 48px;
        }

        @media (min-width: 968px) {
            .docs-container {
                grid-template-columns: 7fr 5fr;
                align-items: start;
            }
        }

        /* --- Documentation Typographical Structural Scopes --- */
        .docs-header .endpoint-url {
            font-family: 'Fira Code', monospace;
            background-color: #e2e8f0;
            padding: 4px 8px;
            border-radius: var(--radius-sm);
            font-size: 0.9rem;
            color: var(--text-primary);
            margin-left: 8px;
            vertical-align: middle;
        }

        .docs-header h1 {
            font-size: 2.25rem;
            font-weight: 700;
            margin: 16px 0 8px 0;
            letter-spacing: -0.5px;
        }

        .docs-header p {
            color: var(--text-secondary);
            font-size: 1.05rem;
        }

        .section-divider {
            border: 0;
            height: 1px;
            background-color: var(--border-color);
            margin: 32px 0;
        }

        .docs-main h2 {
            font-size: 1.5rem;
            font-weight: 600;
            margin-bottom: 4px;
        }

        .section-desc {
            color: var(--text-secondary);
            font-size: 0.95rem;
            margin-bottom: 16px;
        }

        /* --- Specification Visual Tables --- */
        .spec-table {
            width: 100%;
            border-collapse: collapse;
            text-align: left;
            font-size: 0.95rem;
            margin-bottom: 40px;
        }

        .spec-table th,
        .spec-table td {
            padding: 12px 16px;
            border-bottom: 1px solid var(--border-color);
        }

        .spec-table th {
            background-color: #f1f5f9;
            font-weight: 600;
            color: var(--text-secondary);
        }

        .spec-table code {
            font-family: 'Fira Code', monospace;
            background-color: #f1f5f9;
            padding: 2px 6px;
            border-radius: 4px;
            font-size: 0.85rem;
            color: #be185d;
        }

        .req-tag.explicit {
            color: #b91c1c;
            font-weight: 600;
            font-size: 0.85rem;
        }

        /* --- Sidebar Interactive Widgets --- */
        .playground-card,
        .code-card {
            background-color: var(--bg-surface);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-md);
            padding: 24px;
            box-shadow: var(--shadow-sm);
            margin-bottom: 24px;
        }

        .playground-card h3 {
            margin-bottom: 16px;
            font-size: 1.2rem;
        }

        .form-group {
            margin-bottom: 16px;
        }

        .form-group label {
            display: block;
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-secondary);
            margin-bottom: 6px;
        }

        .form-group input[type="text"],
        .form-group input[type="file"] {
            width: 100%;
            padding: 10px;
            border: 1px solid var(--border-color);
            border-radius: var(--radius-sm);
            font-family: inherit;
            font-size: 0.9rem;
        }

        .btn-full {
            width: 100%;
            padding: 12px;
        }

        /* --- Code & Output Terminals --- */
        .terminal-wrapper {
            margin-top: 20px;
            background-color: #0f172a;
            border-radius: var(--radius-sm);
            overflow: hidden;
        }

        .terminal-header {
            background-color: #1e293b;
            padding: 8px 16px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            color: #94a3b8;
            font-size: 0.8rem;
            font-weight: 500;
        }

        .status-indicator {
            padding: 2px 6px;
            border-radius: 4px;
            font-weight: 600;
        }

        .status-indicator.success {
            background-color: #166534;
            color: #bbf7d0;
        }

        .status-indicator.failure {
            background-color: #991b1b;
            color: #fecaca;
        }

        .terminal-wrapper pre,
        .code-card pre {
            padding: 16px;
            overflow-x: auto;
            margin: 0;
        }

        .terminal-wrapper code,
        .code-card code {
            font-family: 'Fira Code', monospace;
            font-size: 0.85rem;
            color: #e2e8f0;
            line-height: 1.5;
        }

        /* --- Code Language Switchers --- */
        .code-tabs {
            display: flex;
            border-bottom: 1px solid var(--border-color);
            margin-bottom: 16px;
        }

        .tab-btn {
            background: none;
            border: none;
            padding: 8px 16px;
            font-family: inherit;
            font-size: 0.9rem;
            font-weight: 500;
            cursor: pointer;
            color: var(--text-secondary);
            border-bottom: 2px solid transparent;
        }

        .tab-btn.active {
            color: var(--brand-color);
            border-bottom-color: var(--brand-color);
        }

        .code-card .code-block-wrapper {
            background-color: #1e293b;
            border-radius: var(--radius-sm);
        }