@import 'grid.css';

:root {
    --bg-main: #030712;
    --bg-card: #0f172a;
    --bg-sidebar: rgba(15, 23, 42, 0.8);
    
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --accent: #38bdf8;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --border: rgba(255, 255, 255, 0.08);
    --glass-border: 1px solid rgba(255, 255, 255, 0.05);
    
    --success: #10b981;
    --method-get: #3b82f6;
    
    --sidebar-width: 260px;
}

/* --- Theme Overrides --- */

/* Mint / Cyan - Clean & Futuristic */
body.theme-emerald {
    --primary: #2dd4bf;       /* Teal-400 */
    --primary-hover: #14b8a6; /* Teal-500 */
    --accent: #99f6e4;        /* Teal-200 */
    --bg-main: #020617;       /* Slate-950 (Very dark, slightly cool) */
    --bg-card: #0f172a;       /* Slate-900 (Matches default but works well) */
    --bg-sidebar: rgba(15, 23, 42, 0.85);
    --text-muted: #94a3b8;
}

/* Rose / Wine - Elegant & Warm */
body.theme-crimson {
    --primary: #fb7185;       /* Rose-400 */
    --primary-hover: #f43f5e; /* Rose-500 */
    --accent: #fda4af;        /* Rose-300 */
    --bg-main: #0f0505;       /* Almost black with a hint of red */
    --bg-card: #1c0a0f;       /* Deep dark wine */
    --bg-sidebar: rgba(28, 10, 15, 0.85);
    --text-muted: #a1a1aa;    /* Zinc gray to balance the red */
}

/* Gold / Sand - Luxury & Grounded */
body.theme-amber {
    --primary: #fbbf24;       /* Amber-400 */
    --primary-hover: #f59e0b; /* Amber-500 */
    --accent: #fcd34d;        /* Amber-300 */
    --bg-main: #0c0a09;       /* Stone-950 */
    --bg-card: #1c1917;       /* Stone-900 */
    --bg-sidebar: rgba(28, 25, 23, 0.85);
    --text-muted: #a8a29e;    /* Stone gray */
}

/* Vaporwave / Neon - Deep Purple & Pink */
body.theme-cotton-candy {
    --primary: #c084fc;       /* Purple-400 */
    --primary-hover: #a855f7; /* Purple-500 */
    --accent: #e879f9;        /* Fuchsia-400 */
    --bg-main: #0b0216;       /* Very deep purple/black */
    --bg-card: #19052f;       /* Deep purple */
    --bg-sidebar: rgba(25, 5, 47, 0.85);
    --text-muted: #cbd5e1;    /* Cool gray */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

html {
    scroll-behavior: smooth;
}

html, body {
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden; /* Strict no horizontal scroll */
    width: 100%;
    min-height: 100vh;
}

.doc-section {
    scroll-margin-top: 80px; /* Offset for the sticky header */
}

/* Background Gradients (Kept as fallback/overlay) */
.glow-bg {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.1;
    z-index: -1;
    pointer-events: none;
}
.top-left { top: -100px; left: -100px; background: var(--primary); }
.bottom-right { bottom: -100px; right: -100px; background: var(--accent); }

.app-container {
    display: flex;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    backdrop-filter: blur(12px);
    border-right: var(--glass-border);
    position: fixed;
    z-index: 100;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.brand {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.1rem;
    border-bottom: var(--glass-border);
    flex-shrink: 0;
}

.sidebar-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px; /* Matches the SVG's internal rounding visually */
}

.nav-menu {
    padding: 1.5rem 1rem;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.nav-menu::-webkit-scrollbar {
    width: 4px;
}

.nav-menu::-webkit-scrollbar-track {
    background: transparent;
}

.nav-menu::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.nav-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-dim);
    font-weight: 700;
    margin: 1.5rem 0 0.5rem 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
    transition: 0.2s;
}

.nav-item:hover, .nav-item.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

/* Theme Selector */
.theme-selector {
    display: flex;
    gap: 0.8rem;
    padding: 0 1.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.theme-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.theme-btn:hover {
    transform: scale(1.2);
}

.theme-btn.active {
    transform: scale(1.2);
    border-color: #fff;
    box-shadow: 0 0 10px var(--primary);
}

.status-card {
    background: rgba(0, 0, 0, 0.2);
    border: var(--glass-border);
    border-radius: 8px;
    padding: 0.75rem;
    margin-top: 1rem;
}

.status-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--success);
    margin-bottom: 0.5rem;
}

.status-dot {
    width: 6px; height: 6px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
}

.status-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    width: calc(100% - var(--sidebar-width));
    min-width: 0; /* Important for flex-child wrapping */
}

.top-bar {
    height: 64px;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: rgba(3, 7, 18, 0.8);
    backdrop-filter: blur(8px);
    z-index: 90;
    border-bottom: var(--glass-border);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
}

.github-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 6px;
}

/* Hero */
.hero-section {
    padding: 3rem 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin: 1rem 0;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Typing Effect Cursor */
.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background-color: var(--accent);
    margin-left: 5px;
    vertical-align: middle;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-section p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Version Badge (Enhanced) */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    color: var(--accent); /* Pop color */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2), 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

/* Shine Effect */
.badge::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent
    );
    transform: skewX(-20deg);
    animation: shine 6s infinite;
}

@keyframes shine {
    0% { left: -150%; }
    10% { left: 150%; } /* Fast pass */
    100% { left: 150%; } /* Wait */
}

.badge:hover {
    transform: translateY(-2px) scale(1.05);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.2); /* Cyan glow based on accent */
    background: rgba(255, 255, 255, 0.05);
    text-shadow: 0 0 10px var(--accent);
}

/* Docs Container */
.docs-container {
    padding: 0 1.5rem 1rem 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.section-title i {
    color: var(--primary);
    font-size: 1.5rem;
}

/* Endpoint Card - Holographic Update */
.endpoint-card {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: 12px;
    margin-bottom: 2rem;
    overflow: hidden;
    width: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.endpoint-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    border-color: rgba(139, 92, 246, 0.3);
}

.endpoint-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.endpoint-card:hover::before {
    opacity: 1;
}

.card-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.method {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.path {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    word-break: break-all; /* Prevent overflow */
}

.card-body {
    padding: 1.5rem;
}

.desc {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Parameter Tabs */
.param-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
    gap: 1rem;
}

.param-tab-btn {
    background: none;
    border: none;
    padding: 0.5rem 0;
    color: var(--text-dim);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

.param-tab-btn:hover {
    color: var(--text-main);
}

.param-tab-btn.active {
    color: var(--primary);
}

.param-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    box-shadow: 0 -2px 8px var(--primary);
}

.param-group-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.param-group-content.active {
    display: block;
}

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

/* Inputs */
.params-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.grid-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.param-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.param-input-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dim);
}

.api-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.6rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    width: 100%;
}

.api-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* URL Preview */
.url-preview {
    background: #0d1117;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.url-preview:hover {
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(13, 17, 23, 0.8);
}

.url-preview:active {
    transform: scale(0.99);
}

.url-preview.copied {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.url-preview span {
    display: block;
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    font-weight: 700;
}

.copy-indicator {
    font-size: 0.7rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.2s;
}

.url-preview:hover .copy-indicator {
    color: var(--primary);
}

.url-preview.copied .copy-indicator {
    color: var(--success);
}

.full-url-display {
    color: var(--accent);
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    word-break: break-all;
    display: block;
}

/* Button */
.open-api-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: 0.2s;
}

.open-api-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 3rem 0 1rem 0;
}

.loading-state {
    text-align: center;
    padding: 4rem;
    color: var(--text-muted);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.main-footer {
    padding: 1.5rem 1.5rem 3rem 1.5rem;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.8rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: var(--glass-border);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.contact-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    transition: 0.2s;
}

.contact-item:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
    color: var(--primary);
    transform: translateY(-2px);
}

.contact-item i {
    font-size: 1.2rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-card);
    color: var(--primary);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 999;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: none;
}

/* Gradient Border Effect */
.back-to-top::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    z-index: -1;
    opacity: 0.5;
    transition: opacity 0.3s, transform 0.3s;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.back-to-top:hover::before {
    opacity: 1;
    transform: scale(1.05);
}

/* Rocket Icon */
.btt-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-main);
    z-index: 2;
    transition: transform 0.3s ease;
    padding-top: 2px; 
}

.back-to-top:hover .btt-icon {
    color: var(--primary);
    animation: shake 0.5s ease-in-out infinite;
}

.back-to-top.launching .btt-icon {
    animation: flyOut 0.6s ease-in forwards;
    color: var(--accent);
}

@keyframes shake {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-2px) rotate(-5deg); }
    75% { transform: translateY(2px) rotate(5deg); }
}

@keyframes flyOut {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    40% { transform: translateY(10px) scale(0.8); opacity: 1; } /* Crouch */
    100% { transform: translateY(-100px) scale(0.5); opacity: 0; } /* Blast off */
}

/* Responsive */
@media (max-width: 850px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; width: 100%; }
    .mobile-menu-btn { display: block; }
    h1 { font-size: 2rem; }
}

/* Update Modal Overlay */
.update-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.update-modal {
    background: #0f172a;
    width: 100%;
    max-width: 500px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 30px rgba(139, 92, 246, 0.1);
    animation: modalSlideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalSlideUp {
    from { transform: translateY(40px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-glow {
    position: absolute;
    top: -50px;
    left: -50px;
    width: 150px;
    height: 150px;
    background: var(--primary);
    filter: blur(80px);
    opacity: 0.2;
    pointer-events: none;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

.modal-header {
    padding: 2rem 2rem 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-icon-hex {
    width: 48px;
    height: 48px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    transform: rotate(10deg);
}

.modal-subtitle {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
}

.modal-body {
    padding: 1.5rem 2rem;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.update-item {
    margin-bottom: 1.5rem;
}

.update-item:last-child {
    margin-bottom: 0;
}

.update-badge-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.update-modal-tag {
    font-size: 0.6rem;
    font-weight: 800;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: var(--primary);
    color: white;
}

.update-modal-tag.hotfix { background: #ef4444; }
.update-modal-tag.new { background: var(--success); }

.update-date {
    font-size: 0.7rem;
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
}

.update-content-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.modal-footer {
    padding: 1.5rem 2rem 2rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    color: white;
    padding: 0.8rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.modal-btn:hover {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

@media (max-width: 500px) {
    .update-modal {
        border-radius: 12px;
    }
    .modal-header {
        padding: 1.5rem;
    }
}

.api-result-container {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.api-result-container p {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.api-result-box {
    background: #0d1117;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    color: #e6edf3;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
    max-height: 400px;
}

.hidden {
    display: none !important;
}

/* Animations */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.rotate {
    animation: spin 1s linear infinite;
}

/* POST Method Style */
.method.post {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.3);
}

.inactive-badge {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    text-transform: uppercase;
    margin-left: auto;
}

.endpoint-card.inactive {
    opacity: 0.6;
    pointer-events: none;
    filter: grayscale(0.5);
}

.endpoint-card.inactive .open-api-btn {
    background: var(--text-dim);
    cursor: not-allowed;
}

.open-api-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* Usage Code Block */
.code-preview {
    background: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.code-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-weight: 700;
}

.code-preview pre {
    margin: 0;
    white-space: pre-wrap;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Code Examples Container */
.code-examples-container {
    margin-bottom: 1.5rem;
    background: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.code-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
}

.code-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 0.8rem;
    color: var(--text-dim);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    border-bottom: 2px solid transparent;
}

.code-tab:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.code-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
}

.code-content {
    padding: 1rem;
    display: none;
    position: relative;
}

.code-content.active {
    display: block;
}

.code-content pre {
    margin: 0;
    white-space: pre-wrap;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #e6edf3;
    padding-right: 2rem; /* Make space for copy button */
}

.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}


.toggle-code-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    transition: 0.2s;
}

.toggle-code-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

/* Scroll Animation */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Cute Animations --- */

/* Floating Particles */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    bottom: -10vh;
    font-size: 1.5rem;
    opacity: 0.6;
    animation: floatUp 15s linear infinite;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    user-select: none;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-110vh) rotate(360deg);
        opacity: 0;
    }
}

/* Wiggle Hover Effect for Cards */
.endpoint-card:hover {
    transform: translateY(-5px); /* Keep existing lift */
    animation: wiggle 0.5s ease-in-out;
}

@keyframes wiggle {
    0%, 100% { transform: translateY(-5px) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(-1deg); }
    75% { transform: translateY(-5px) rotate(1deg); }
}

/* Bounce Hover Effect for Buttons */
.open-api-btn:hover {
    animation: bounce 0.4s cubic-bezier(0.36, 0, 0.66, -0.56);
    background: var(--primary-hover);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* Pulse Effect for Status Dot */
.status-dot {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}