:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --card-bg: rgba(30, 41, 59, 0.7);
    --card-border: rgba(255, 255, 255, 0.1);
    --get-color: #10b981;
    --pending-color: #f59e0b;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding-left: 280px;
    transition: padding-left 0.3s ease;
}

body.sidebar-closed {
    padding-left: 0;
}

/* Background gradient animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%),
                radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%);
    filter: blur(60px);
    animation: bgMove 15s infinite alternate ease-in-out;
}

@keyframes bgMove {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border-right: 1px solid var(--card-border);
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding: 2rem 1.5rem;
}

body.sidebar-closed .sidebar {
    left: -280px;
}

.sidebar-toggle {
    position: fixed;
    top: 20px;
    left: 290px;
    z-index: 1001;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-color);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--accent-color);
}

body.sidebar-closed .sidebar-toggle {
    left: 20px;
}

.sidebar-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--card-border);
}

.sidebar-header h3 {
    color: #e2e8f0;
    font-size: 1.2rem;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 0.8rem;
}

.sidebar-nav a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    display: block;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    color: var(--accent-color);
}

.sidebar-subnav {
    list-style: none;
    padding-left: 1rem;
    margin-top: 0.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-subnav li {
    margin-bottom: 0.5rem;
}

.sidebar-subnav a {
    font-size: 0.85rem;
    font-family: monospace;
}

header {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInDown 1s ease-out;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 1rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    animation: float 3s ease-in-out infinite;
}

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

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.2rem;
    color: #94a3b8;
    margin-bottom: 1.5rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--get-color);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.pulse {
    width: 8px;
    height: 8px;
    background-color: var(--get-color);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulsing 2s infinite;
}

@keyframes pulsing {
    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 10px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.intro h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #e2e8f0;
}

.endpoints-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #f8fafc;
}

.endpoint-card {
    padding: 0;
    overflow: hidden;
    cursor: pointer;
}

.endpoint-header {
    display: flex;
    align-items: center;
    padding: 1.2rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--card-border);
}

.method {
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 6px;
    margin-right: 1rem;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.method.get {
    background: rgba(16, 185, 129, 0.15);
    color: var(--get-color);
}

.method.pending-method {
    background: rgba(245, 158, 11, 0.15);
    color: var(--pending-color);
}

.path {
    font-family: monospace;
    font-size: 1.1rem;
    color: #cbd5e1;
}

.endpoint-body {
    padding: 1.5rem;
    display: none;
}

.code-block {
    background: #0f172a;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

code {
    font-family: 'Consolas', 'Monaco', monospace;
    color: #60a5fa;
    font-size: 0.95rem;
}

.endpoint-card.pending {
    opacity: 0.7;
    border: 1px dashed rgba(255, 255, 255, 0.2);
}

footer {
    text-align: center;
    margin-top: 4rem;
    color: #64748b;
    font-size: 0.9rem;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Top Navigation */
.top-nav {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2rem;
}

/* Custom Language Selector */
.custom-lang-selector {
    position: relative;
    z-index: 100;
}

.lang-selector-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(30, 41, 59, 0.6);
    color: var(--text-color);
    border: 1px solid var(--card-border);
    padding: 10px 18px;
    border-radius: 20px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    user-select: none;
}

.lang-selector-btn:hover, .lang-selector-btn.active {
    background-color: rgba(59, 130, 246, 0.2);
    border-color: var(--accent-color);
}

.flag-img {
    width: 20px;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 0 2px rgba(0,0,0,0.3);
}

.chevron {
    transition: transform 0.3s ease;
    margin-left: 4px;
}

.lang-selector-btn.active .chevron {
    transform: rotate(180deg);
}

.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 8px;
    min-width: 160px;
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lang-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-weight: 500;
}

.lang-option:hover {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-color);
}

.lang-option.active {
    background: rgba(59, 130, 246, 0.25);
    color: var(--text-color);
    font-weight: 600;
}

/* Tabs & Copy Buttons Styling */
.tabs-container, .response-tabs {
    margin-top: 1rem;
}

.tabs-header {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 8px;
    margin-bottom: 1rem;
    overflow-x: auto;
}

.tabs-header.small-tabs .tab-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid transparent;
    color: #94a3b8;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: var(--text-color);
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.tab-btn.success-tab.active {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.tab-btn.error-tab.active {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.tab-btn.limit-tab.active {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

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

.code-block {
    position: relative;
    background: #0f172a !important;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #cbd5e1;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: all 0.2s ease;
    z-index: 10;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Prism.js override for seamless integration */
pre[class*="language-"] {
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

code[class*="language-"], pre[class*="language-"] {
    font-size: 0.9rem !important;
}

/* Params Table Styling */
.params-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--card-border);
}

.params-table th, .params-table td {
    padding: 10px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.params-table th {
    background: rgba(255, 255, 255, 0.03);
    font-weight: 600;
    color: #cbd5e1;
}

.params-table tr:last-child td {
    border-bottom: none;
}

.params-table td:first-child {
    font-family: monospace;
    color: #60a5fa;
    font-weight: 600;
}

.badge {
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.req {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge.opt {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

@media (max-width: 1024px) {
    body, body.sidebar-closed {
        padding-left: 0;
    }
    
    .sidebar {
        left: -280px;
    }
    
    body.sidebar-open-mobile .sidebar {
        left: 0;
    }
    
    .sidebar-toggle {
        left: 20px;
    }
    
    body.sidebar-open-mobile .sidebar-toggle {
        left: 290px;
    }
}
