/* ===== DESIGN SYSTEM ===== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --bg-input: #1a1a25;
    --border: #2a2a3a;
    --border-light: #333348;
    --text-primary: #e8e8f0;
    --text-secondary: #9898b0;
    --text-muted: #6868808;
    --accent: #6c5ce7;
    --accent-light: #a29bfe;
    --accent-glow: rgba(108, 92, 231, 0.3);
    --success: #00d2a0;
    --success-bg: rgba(0, 210, 160, 0.1);
    --warning: #ffa94d;
    --warning-bg: rgba(255, 169, 77, 0.1);
    --danger: #ff6b6b;
    --danger-bg: rgba(255, 107, 107, 0.1);
    --info: #74b9ff;
    /* Syntax palette (Atom/IDE-style) */
    --syntax-comment: #5c6370;
    --syntax-key: #61afef;
    --syntax-string: #98c379;
    --syntax-number: #d19a66;
    --syntax-boolean: #c678dd;
    --syntax-null: #e06c75;
    --syntax-punctuation: #abb2bf;
    --syntax-keyword: #c678dd;
    --syntax-url: #56b6c2;
    --gradient-primary: linear-gradient(135deg, #6c5ce7, #a29bfe);
    --gradient-bg: linear-gradient(180deg, #0a0a0f 0%, #12121a 100%);
    --gradient-card: linear-gradient(145deg, rgba(108, 92, 231, 0.05), rgba(162, 155, 254, 0.02));
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px var(--accent-glow);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --transition: all 0.2s ease;
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }

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

/* ===== NAVBAR ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 18px;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 24px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
}

.nav-close {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    position: absolute;
    top: 20px;
    right: 20px;
}

.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    display: block;
    opacity: 1;
}

.nav-link {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover { color: var(--text-primary); }
.nav-link-muted { color: var(--text-muted); font-size: 13px; }

.nav-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.credits-badge {
    background: var(--success-bg);
    color: var(--success);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(0, 210, 160, 0.2);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    font-family: var(--font-sans);
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 30px var(--accent-glow);
    color: white;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

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

.btn-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(255, 107, 107, 0.2);
}

.btn-danger:hover { background: rgba(255, 107, 107, 0.2); color: var(--danger); }

.btn-sm { padding: 6px 16px; font-size: 13px; }
.btn-lg { padding: 14px 36px; font-size: 16px; }
.btn-block { width: 100%; }

.btn:disabled,
.btn[disabled] {
    background: #2a2a3a;
    color: #9898b0;
    border: 1px solid #333348;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 1;
    transform: none;
}

.btn-primary:disabled:hover,
.btn-primary[disabled]:hover {
    background: #2a2a3a;
    color: #9898b0;
    box-shadow: none;
    transform: none;
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: var(--transition);
}

.card:hover { border-color: var(--border-light); }

.card-glass {
    background: linear-gradient(145deg, rgba(22, 22, 31, 0.8), rgba(18, 18, 26, 0.6));
    backdrop-filter: blur(10px);
}

.card-featured {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.15);
    position: relative;
}

.card-featured::before {
    content: 'Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* ===== FORMS ===== */
.form-group { margin-bottom: 20px; }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder { color: var(--text-muted); }

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239898b0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-help {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 4px;
}

/* ===== HERO ===== */
.hero {
    padding: 100px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

.hero h1 {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    position: relative;
}

.hero h1 .gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== CODE BLOCK ===== */
.code-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    margin: 40px auto;
    max-width: 700px;
    text-align: left;
    position: relative;
    overflow-x: auto;
}

.code-block pre {
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-secondary);
    white-space: pre;
    margin: 0;
}

.code-block .code-comment { color: var(--syntax-comment); }
.code-block .code-string { color: var(--syntax-string); }
.code-block .code-keyword { color: var(--syntax-keyword); }
.code-block .code-url { color: var(--syntax-url); }

.code-copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.code-copy-btn:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.code-copy-btn.is-copied {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.45);
    color: #86efac;
}
.code-copy-btn.is-copy-failed {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.45);
    color: #fca5a5;
}

.btn.is-copied {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.45);
    color: #86efac;
}
.btn.is-copy-failed {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.45);
    color: #fca5a5;
}

/* ===== FEATURES GRID ===== */
.section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: 32px; font-weight: 700; margin-bottom: 12px; }
.section-header p { color: var(--text-secondary); font-size: 16px; max-width: 500px; margin: 0 auto; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.feature-card {
    padding: 28px;
    position: relative;
    overflow: hidden;
}

.feature-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
}

.feature-card:hover::after { opacity: 1; }

.feature-icon {
    font-size: 28px;
    margin-bottom: 16px;
    display: block;
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== PRICING ===== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    align-items: start;
}

.pricing-card { text-align: center; padding: 32px 24px; }

.pricing-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.pricing-price {
    font-size: 42px;
    font-weight: 800;
    margin: 16px 0;
}

.pricing-price span { font-size: 16px; color: var(--text-secondary); font-weight: 400; }

.pricing-credits {
    color: var(--accent-light);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
}

.pricing-features {
    list-style: none;
    margin: 24px 0;
    text-align: left;
}

.pricing-features li {
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.pricing-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
    font-size: 13px;
}

/* ===== FAQ ===== */
.faq-section {
    max-width: 860px;
    margin: 0 auto;
}

.faq-list {
    display: grid;
    gap: 14px;
}

.faq-item {
    padding: 0;
    overflow: hidden;
}

.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 22px;
    line-height: 1;
    color: var(--text-secondary);
    transition: transform 0.28s ease, color 0.28s ease;
}

.faq-item[open] summary::after {
    content: '+';
    transform: rotate(45deg);
    color: var(--text-primary);
}

.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    padding: 0 22px;
    transition: grid-template-rows 0.28s ease, opacity 0.22s ease, padding 0.28s ease;
}

.faq-answer p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
    overflow: hidden;
    border-top: 1px solid transparent;
    padding-top: 0;
    transition: border-color 0.28s ease, padding-top 0.28s ease;
}

.faq-item[open] .faq-answer {
    grid-template-rows: 1fr;
    opacity: 1;
    padding: 0 22px 18px;
}

.faq-item[open] .faq-answer p {
    border-top-color: var(--border);
    padding-top: 12px;
}

/* ===== DASHBOARD LAYOUT ===== */
.dash-header {
    padding: 32px 0 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
}

.dash-header h1 {
    font-size: 28px;
    font-weight: 700;
}

.dash-header p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    padding: 20px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
}

.stat-value.text-success { color: var(--success); }
.stat-value.text-accent { color: var(--accent-light); }

/* ===== TABLE ===== */
.table-container {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

td {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(108, 92, 231, 0.03); }

.badge {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: rgba(116, 185, 255, 0.1); color: var(--info); }

/* ===== PLAYGROUND ===== */
.playground-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 24px;
    min-height: calc(100vh - 200px);
}

.playground-sidebar {
    padding: 24px;
    border-right: 1px solid var(--border);
}

.playground-result {
    padding: 24px;
    overflow: auto;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.result-meta {
    font-size: 13px;
    color: var(--text-secondary);
}

.result-json {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-secondary);
    overflow-x: auto;
    word-break: break-word;
    max-height: 70vh;
    overflow-y: auto;
}

.result-json pre {
    margin: 0;
    padding: 0;
    white-space: pre;
    word-break: normal;
}

.result-json code {
    display: block;
    margin: 0;
    padding: 0;
}

.result-json .json-token-key {
    color: var(--syntax-key);
}

.result-json .json-token-string {
    color: var(--syntax-string);
}

.result-json .json-token-number {
    color: var(--syntax-number);
}

.result-json .json-token-boolean {
    color: var(--syntax-boolean);
    font-weight: 600;
}

.result-json .json-token-null {
    color: var(--syntax-null);
    font-style: italic;
}

.result-json .json-token-punctuation {
    color: var(--syntax-punctuation);
}

.result-json-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.result-header-actions {
    margin-left: auto;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(11, 11, 20, 0.5);
}

.result-json-action {
    min-width: 90px;
    min-height: 32px;
    padding: 6px 12px;
    font-size: 12px;
    line-height: 1;
    border-color: transparent;
}

.result-json-action:hover {
    border-color: var(--border-light);
}

.result-json-action:focus-visible {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.2);
}

.result-json-action:active {
    transform: translateY(0);
}

.result-json-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.result-json-action-label {
    letter-spacing: 0.01em;
}

.result-json-action-success {
    color: var(--success) !important;
    border-color: rgba(0, 210, 160, 0.4);
    background: rgba(0, 210, 160, 0.12) !important;
}

.result-json-action-success .result-json-action-icon {
    color: var(--success);
}

/* ===== AUTH PAGES ===== */
.auth-container {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 40px;
}

.auth-card h1 {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===== API KEY DISPLAY ===== */
.key-display {
    background: var(--bg-secondary);
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
}

.key-display code {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--success);
    flex: 1;
    word-break: break-all;
}

/* ===== CHART CONTAINER ===== */
.chart-container {
    position: relative;
    height: 280px;
    padding: 16px 0;
}

/* ===== FOOTER ===== */
.footer {
    border-top: 1px solid var(--border);
    padding: 48px 0 24px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 32px;
}

.footer-brand .logo-icon,
.footer-brand .logo-text {
    font-size: 18px;
    font-weight: 700;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 8px;
}

.footer-col h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    font-size: 14px;
    padding: 4px 0;
}

.footer-col a:hover { color: var(--text-primary); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== TOAST MESSAGES ===== */
.messages-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    animation: slideIn 0.3s ease;
    max-width: 400px;
}

.toast-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(0, 210, 160, 0.2); }
.toast-error, .toast-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(255, 107, 107, 0.2); }
.toast-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(255, 169, 77, 0.2); }
.toast-info { background: rgba(116, 185, 255, 0.1); color: var(--info); border: 1px solid rgba(116, 185, 255, 0.2); }

.toast-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.6;
    margin-left: auto;
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { color: var(--text-primary); margin-bottom: 8px; }

/* ===== ANIMATIONS ===== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.4s ease; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-card);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 24px 24px;
        gap: 24px;
        transition: right 0.3s ease;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
        z-index: 101;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-close {
        display: block;
    }
    
    .nav-user {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 20px;
        margin-top: 12px;
        padding-top: 24px;
        border-top: 1px solid var(--border);
    }

    .nav-links .btn {
        width: 100%;
    }

    .hero { padding: 60px 0 40px; }
    .hero h1 { font-size: 32px; }
    .playground-layout { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .pricing-grid { grid-template-columns: 1fr; max-width: 360px; margin: 0 auto; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== HTMX INDICATOR ===== */
.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: inline-flex;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== DOCS ===== */
.docs-container { max-width: 800px; margin: 0 auto; padding: 40px 24px; }
.docs-container h1 { font-size: 32px; margin-bottom: 24px; }
.docs-container h2 { font-size: 22px; margin: 32px 0 12px; color: var(--accent-light); }
.docs-container h3 { font-size: 16px; margin: 24px 0 8px; }
.docs-container p { color: var(--text-secondary); margin-bottom: 16px; line-height: 1.7; }
.docs-container ul { margin-bottom: 16px; padding-left: 32px; }
.docs-container li { margin-bottom: 8px; color: var(--text-secondary); line-height: 1.7; list-style-type: disc; list-style-position: outside; }
.docs-container code {
    background: var(--bg-input);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent-light);
}

.endpoint-list { list-style: none; margin: 16px 0; }
.endpoint-list li {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
}
.endpoint-list li:hover { border-color: var(--border-light); background: var(--bg-card); }

.method-badge {
    background: var(--accent);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-mono);
}

/* ===== COOKIE MODAL ===== */
.cookie-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cookie-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.cookie-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.cookie-modal-overlay.active .cookie-modal {
    transform: scale(1);
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.cookie-modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.cookie-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-modal-close:hover {
    color: var(--text-primary);
}

.cookie-modal-body {
    padding: 0 24px;
}

.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    gap: 20px;
}

.cookie-option.border-none {
    border-bottom: none;
}

.cookie-option-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.cookie-option-info p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.cookie-details-link {
    margin-top: 12px !important;
}

.always-on {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: var(--text-secondary);
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--success);
    border-color: var(--success);
}

input:focus + .toggle-slider {
    box-shadow: 0 0 1px var(--success);
}

input:checked + .toggle-slider:before {
    transform: translateX(18px);
    background-color: white;
}

.cookie-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.cookie-btn-save {
    background: #2a2a3a;
    color: white;
    border: 1px solid var(--border-light);
}

.cookie-btn-save:hover {
    background: #333348;
}

.cookie-btn-accept {
    background: white;
    color: black;
}

.cookie-btn-accept:hover {
    background: #f0f0f0;
    color: black;
}
