:root {
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --secondary: #8b5cf6;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    background-position: center;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Dynamic Background Blobs */
.blob {
    position: absolute;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.5;
    animation: float 10s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 5%) scale(1.1); }
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
    transition: transform 0.3s;
}

.nav-brand:hover .brand-logo {
    transform: rotate(10deg) scale(1.05);
}

.brand-text {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(245, 158, 11, 0.2);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary);
}

.btn {
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-glow:hover {
    box-shadow: 0 0 20px var(--primary-glow);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 1rem 4rem;
    max-width: 800px;
    margin: 0 auto;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.stat i {
    color: var(--success);
    font-size: 1.2rem;
}

/* Main Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem 4rem;
}

/* Glassmorphism Panels */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 2.5rem;
    margin-bottom: 3rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
}

.glass-panel:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 15px 40px -10px rgba(59, 130, 246, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.section-header {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.subtitle {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.2rem;
}

/* Endpoints */
.endpoint {
    display: flex;
    align-items: center;
    background: #0f172a;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin: 1.5rem 0;
    overflow-x: auto;
}

.method {
    font-family: 'Fira Code', monospace;
    font-weight: 700;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    margin-right: 1rem;
}

.method.get {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.url {
    font-family: 'Fira Code', monospace;
    color: var(--text-main);
    flex-grow: 1;
    white-space: nowrap;
}

.param {
    color: var(--primary);
}

.copy-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.copy-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.1);
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin: 1.5rem 0 2.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

th {
    color: var(--text-muted);
    font-weight: 600;
}

td code {
    background: #0f172a;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    color: var(--secondary);
}

.tag {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-weight: 600;
}

.tag-required {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.tag-optional {
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-muted);
}

/* Code Blocks */
.code-block-wrapper {
    background: #0f172a;
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 2rem;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.2rem;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    font-weight: 600;
    position: relative;
}

.code-header::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff5f56;
    box-shadow: 16px 0 0 #ffbd2e, 32px 0 0 #27c93f;
    margin-right: 15px;
    position: absolute;
    left: 15px;
}

.code-header span { margin-left: 45px; }
.code-header-success span { color: var(--success); }
.code-header-error span { color: var(--error); }
.code-header-warning span { color: var(--warning); }

.copy-code {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

pre {
    padding: 1.5rem;
    overflow-x: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: #e2e8f0;
}

pre .string { color: #a5d6ff; }
pre .number { color: #79c0ff; }
pre .boolean { color: #ff7b72; }
pre .key { color: #7ee787; }

/* Alerts */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.alert i {
    font-size: 1.5rem;
}

.alert-tip {
    background: rgba(59, 130, 246, 0.1);
    border-left: 4px solid var(--info);
}

.alert-tip i { color: var(--info); }

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--warning);
}

.alert-warning i { color: var(--warning); }

/* Features */
.features-section h2 {
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.text-center { text-align: center; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    text-align: center;
    margin-bottom: 0;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--primary);
}

/* Utilities */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.grid-responses {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    background: #0f172a;
    padding: 4rem 5% 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 3rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.footer-links a, .footer-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-bottom a {
    color: var(--primary);
    text-decoration: none;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: -100%;
    background: var(--success);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    transition: right 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    font-weight: 600;
}

.toast.show {
    right: 2rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.hamburger {
    display: none;
    font-size: 2.2rem;
    cursor: pointer;
    color: var(--text-main);
    transition: transform 0.3s;
}

.hamburger:hover {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger { display: block; }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
        gap: 2rem;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        clip-path: circle(0% at calc(100% - 2.5rem) -2rem);
        transition: clip-path 0.5s ease-in-out;
    }
    
    .nav-links.active {
        clip-path: circle(150% at top right);
    }
    
    .grid-2, .grid-responses { grid-template-columns: 1fr; }
    .hero { padding: 3rem 1rem 2rem; }
    .hero h1 { font-size: 2.2rem; }
    .hero-stats { flex-direction: column; gap: 1rem; align-items: center; }
    
    .glass-panel { padding: 1.5rem; }
    
    .brand-text { font-size: 1.3rem; }
    .brand-logo { width: 32px; height: 32px; }
    
    .footer-content { flex-direction: column; text-align: center; }
    .footer-links { justify-content: center; }
}
