/* ==========================================================================
   DBMVS API Platform - Premium Modern Styling
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --bg-dark: #07090e;
    --bg-card: rgba(16, 21, 35, 0.75);
    --bg-card-hover: rgba(22, 30, 50, 0.9);
    --bg-elevated: #111728;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(99, 102, 241, 0.3);
    
    --accent-primary: #6366f1;
    --accent-secondary: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    --accent-gradient-hover: linear-gradient(135deg, #4f46e5 0%, #0891b2 100%);
    --accent-pink: #ec4899;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-faint: #64748b;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.25);
    --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background Atmosphere Glows */
body::before {
    content: '';
    position: fixed;
    top: -150px;
    left: 20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
    filter: blur(80px);
}

body::after {
    content: '';
    position: fixed;
    bottom: -150px;
    right: 15%;
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
    filter: blur(80px);
}

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

/* Typography */
h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7, 9, 14, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 16px 0;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
}

.logo-badge {
    background: var(--accent-gradient);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.logo-badge svg {
    width: 22px;
    height: 22px;
    fill: white;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: var(--accent-success);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    background: var(--accent-success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--text-main);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.25s ease;
}

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

.btn-primary:hover {
    background: var(--accent-gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-subtle);
}

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

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
    border-radius: 6px;
}

/* Hero Section */
.hero {
    padding: 80px 0 50px;
    text-align: center;
}

.hero-tagline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 6px 16px;
    border-radius: 999px;
    color: #a5b4fc;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.hero h1 {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    line-height: 1.15;
    margin-bottom: 20px;
    font-weight: 800;
}

.hero p {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--text-muted);
    max-width: 720px;
    margin: 0 auto 36px;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

/* Stat Grid */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: left;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
    background: var(--bg-card-hover);
}

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

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
    margin-bottom: 14px;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Section styling */
.section {
    padding: 70px 0;
}

.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 48px;
}

.section-tag {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    display: block;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 14px;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Cards & Glass Containers */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-card);
    position: relative;
}

/* API Playground / Sandbox */
.sandbox-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 900px) {
    .sandbox-card {
        grid-template-columns: 1fr;
    }
}

.sandbox-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.endpoint-tabs {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    padding: 6px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    overflow-x: auto;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-btn.active {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

.form-input {
    width: 100%;
    background: rgba(10, 14, 25, 0.8);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.sample-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.chip {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chip:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-primary);
    color: #c7d2fe;
}

.sandbox-preview {
    display: flex;
    flex-direction: column;
    background: #090c15;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-subtle);
}

.preview-title {
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-badges {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
}

.status-badge.success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.latency-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
}

.code-viewer {
    padding: 18px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #e2e8f0;
    overflow: auto;
    max-height: 380px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Key Generator */
.generator-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    align-items: center;
}

@media (max-width: 850px) {
    .generator-box {
        grid-template-columns: 1fr;
    }
}

.key-result-box {
    background: rgba(10, 14, 25, 0.9);
    border: 1px dashed var(--accent-primary);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
}

.key-display {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    color: #38bdf8;
    background: rgba(0, 0, 0, 0.4);
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    word-break: break-all;
}

/* Integration Guide */
.guide-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 12px;
}

.guide-tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.guide-tab-btn.active {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
}

.code-snippet {
    background: #090c15;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 20px;
}

.snippet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-subtle);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.snippet-content {
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    line-height: 1.6;
    color: #e2e8f0;
    overflow-x: auto;
}

.snippet-content .diff-del {
    color: #f87171;
    background: rgba(239, 68, 68, 0.1);
    display: block;
    margin: 0 -16px;
    padding: 2px 16px;
}

.snippet-content .diff-add {
    color: #34d399;
    background: rgba(16, 185, 129, 0.1);
    display: block;
    margin: 0 -16px;
    padding: 2px 16px;
}

/* Table */
.api-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.api-table th {
    text-align: left;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-subtle);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.api-table td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.9rem;
    vertical-align: middle;
}

.api-table tr:hover td {
    background: rgba(255, 255, 255, 0.015);
}

.method-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
}

.method-get {
    background: rgba(6, 182, 212, 0.15);
    color: #22d3ee;
}

.method-post {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

/* Toast Notification */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #111827;
    border: 1px solid var(--border-glow);
    color: var(--text-main);
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 40px 0;
    margin-top: 60px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer a {
    color: var(--accent-secondary);
    text-decoration: none;
}
