/**
 * API Tester - TMDB-Style Professional Developer Documentation
 * 3-Column Layout: Navigation | Content | Credentials/Response
 */

:root {
    /* Core Dimensions */
    --sidebar-width: 280px;
    --right-panel-width: 520px;

    /* Orange Glass Theme (Dark Default) */
    --bg-sidebar: #0a0a0a;
    --bg-main: #0a0a0a;
    --bg-panel: rgba(255, 255, 255, 0.03);
    /* Card background */
    --bg-input: rgba(0, 0, 0, 0.3);
    --bg-code: #000000;

    --border-color: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 102, 0, 0.5);

    --text-primary: #e5e5e5;
    --text-secondary: #a3a3a3;
    --text-muted: #737373;

    /* Accent Colors */
    --accent-primary: #FF6600;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-error: #ef4444;

    /* Method Colors */
    --method-get: #10b981;
    --method-post: #FF6600;
    --method-put: #f59e0b;
    --method-delete: #ef4444;

    /* Product Colors */
    --loyalty-color: #fbbf24;
    --stamps-color: #a855f7;
    --cashback-color: #22c55e;
    --coins-color: #f97316;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'Space Mono', 'Fira Code', monospace;

    /* Effects */
    --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --radius: 0px;
    /* Sharp edges */
}

/* Light Mode */
[data-theme="light"] {
    --bg-sidebar: #f5f5f5;
    --bg-main: #f5f5f5;
    --bg-panel: rgba(0, 0, 0, 0.03);
    --bg-input: #ffffff;
    --bg-code: #f8fafc;

    --border-color: rgba(0, 0, 0, 0.1);
    --border-hover: rgba(255, 102, 0, 0.5);

    --text-primary: #171717;
    --text-secondary: #525252;
    --text-muted: #a3a3a3;
}

/* Logo Visibility */
.logo-light {
    display: none;
}

.logo-dark {
    display: block;
}

[data-theme="light"] .logo-light {
    display: block;
}

[data-theme="light"] .logo-dark {
    display: none;
}

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

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

/* =============================================
   CUSTOM SCROLLBAR - Elegant Modern Design
============================================= */
/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 102, 0, 0.3) transparent;
}

/* WebKit (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.1) 0%,
            rgba(255, 255, 255, 0.02) 50%,
            rgba(0, 0, 0, 0.1) 100%);
    border-radius: 5px;
    margin: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg,
            rgba(255, 102, 0, 0.5) 0%,
            rgba(255, 140, 50, 0.4) 50%,
            rgba(255, 102, 0, 0.5) 100%);
    border-radius: 5px;
    border: 2px solid transparent;
    background-clip: padding-box;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg,
            rgba(255, 102, 0, 0.8) 0%,
            rgba(255, 150, 70, 0.7) 50%,
            rgba(255, 102, 0, 0.8) 100%);
    box-shadow: 0 0 10px rgba(255, 102, 0, 0.5);
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg,
            rgba(255, 102, 0, 1) 0%,
            rgba(255, 160, 80, 0.9) 50%,
            rgba(255, 102, 0, 1) 100%);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* Light Mode Scrollbar */
[data-theme="light"] ::-webkit-scrollbar-track {
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.03) 0%,
            rgba(0, 0, 0, 0.01) 50%,
            rgba(0, 0, 0, 0.03) 100%);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg,
            rgba(255, 102, 0, 0.4) 0%,
            rgba(255, 130, 40, 0.3) 50%,
            rgba(255, 102, 0, 0.4) 100%);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg,
            rgba(255, 102, 0, 0.7) 0%,
            rgba(255, 140, 50, 0.6) 50%,
            rgba(255, 102, 0, 0.7) 100%);
}

[data-theme="light"] * {
    scrollbar-color: rgba(255, 102, 0, 0.4) transparent;
}

/* =============================================
   3-COLUMN LAYOUT
============================================= */
.api-tester-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr var(--right-panel-width);
    min-height: 100vh;
    background: linear-gradient(135deg,
            rgba(10, 10, 10, 1) 0%,
            rgba(15, 12, 10, 1) 50%,
            rgba(10, 10, 10, 1) 100%);
}

[data-theme="light"] .api-tester-layout {
    background: linear-gradient(135deg,
            rgba(245, 245, 245, 1) 0%,
            rgba(250, 248, 245, 1) 50%,
            rgba(245, 245, 245, 1) 100%);
}

/* =============================================
   LEFT SIDEBAR - Premium Navigation
============================================= */
.sidebar-nav {
    background: linear-gradient(180deg,
            rgba(15, 15, 15, 0.98) 0%,
            rgba(10, 10, 10, 0.95) 50%,
            rgba(15, 12, 10, 0.98) 100%);
    border-right: 1px solid rgba(255, 102, 0, 0.1);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    box-shadow:
        inset -1px 0 30px rgba(255, 102, 0, 0.02),
        5px 0 20px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .sidebar-nav {
    background: linear-gradient(180deg,
            rgba(250, 250, 250, 0.98) 0%,
            rgba(245, 245, 245, 0.95) 50%,
            rgba(255, 252, 248, 0.98) 100%);
    border-right: 1px solid rgba(255, 102, 0, 0.15);
    box-shadow:
        inset -1px 0 30px rgba(255, 102, 0, 0.01),
        5px 0 20px rgba(0, 0, 0, 0.03);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 102, 0, 0.1);
    background: linear-gradient(180deg, rgba(255, 102, 0, 0.03) 0%, transparent 100%);
}

.sidebar-header .logo img {
    height: 30px;
    width: auto;
    transition: transform 0.3s ease;
}

.sidebar-header .logo:hover img {
    transform: scale(1.02);
}

.sidebar-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* Language Dropdown */
.lang-toggle {
    position: relative;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 150px;
    background: var(--bg-main);
    /* Use defined background color */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 2px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 100;
    /* Ensure it stays above everything */
}

.lang-dropdown.show {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.lang-option:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

.lang-option.active {
    background: rgba(1, 180, 228, 0.1);
    color: var(--accent-primary);
    font-weight: 500;
}

.lang-current {
    font-size: 0.75rem;
    font-weight: 600;
}


.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

/* Language Toggle */
.lang-toggle {
    position: relative;
}

.lang-toggle .btn-icon {
    display: flex;
    align-items: center;
    gap: 4px;
    width: auto;
    padding: 0 10px;
}

.lang-current {
    font-size: 11px;
    font-weight: 600;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-width: 150px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

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

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.lang-option.active {
    background: var(--accent-primary);
    color: white;
}

.lang-option .flag {
    font-size: 16px;
}

/* Jump To Search - Premium Design */
.jump-to {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 102, 0, 0.1);
}

.jump-to-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.jump-to-btn:hover {
    border-color: rgba(255, 102, 0, 0.4);
    color: var(--text-secondary);
    background: rgba(255, 102, 0, 0.05);
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.1);
}

.jump-to-btn i {
    color: var(--accent-primary);
    opacity: 0.7;
}

.jump-to-btn kbd {
    margin-left: auto;
    padding: 4px 8px;
    background: rgba(255, 102, 0, 0.1);
    border: 1px solid rgba(255, 102, 0, 0.2);
    border-radius: 6px;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--accent-primary);
}

/* Nav Section - Premium */
.nav-section {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 102, 0, 0.1);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
}

.nav-link:hover {
    background: rgba(255, 102, 0, 0.08);
    border-color: rgba(255, 102, 0, 0.2);
    color: var(--text-primary);
    transform: translateX(4px);
}

.nav-link i {
    color: var(--accent-primary);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.nav-link:hover i {
    opacity: 1;
}

/* Product Selector - Premium Design */
.product-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 102, 0, 0.1);
    background: linear-gradient(180deg, rgba(255, 102, 0, 0.02) 0%, transparent 100%);
}

.product-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 10px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.product-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 102, 0, 0.1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 102, 0, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 102, 0, 0.12);
}

.product-btn:hover::before {
    opacity: 1;
}

.product-btn.active {
    background: linear-gradient(135deg, rgba(255, 102, 0, 0.15) 0%, rgba(255, 102, 0, 0.05) 100%);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow:
        0 4px 15px rgba(255, 102, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.product-icon {
    font-size: 1.4rem;
    transition: transform 0.3s ease;
}

.product-btn:hover .product-icon {
    transform: scale(1.1);
}

.product-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-btn:hover .product-icon-img {
    transform: scale(1.1);
}

/* Endpoint Tree Navigation - Premium */
.endpoint-tree {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}

.nav-group {
    margin-bottom: 12px;
}

.nav-group-title {
    padding: 10px 24px 8px;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    position: relative;
}

.nav-group-title::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 12px;
    background: linear-gradient(180deg, var(--accent-primary) 0%, rgba(255, 102, 0, 0.2) 100%);
    border-radius: 2px;
}

.endpoint-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
    margin: 2px 0;
}

.endpoint-link:hover {
    background: linear-gradient(90deg, rgba(255, 102, 0, 0.08) 0%, transparent 100%);
    color: var(--text-primary);
    border-left-color: rgba(255, 102, 0, 0.3);
}

.endpoint-link.active {
    background: linear-gradient(90deg, rgba(255, 102, 0, 0.12) 0%, transparent 100%);
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
    font-weight: 600;
}

/* Method Tags (Small) */
.method-tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.method-tag.get {
    background: var(--method-get);
    color: #000;
}

.method-tag.post {
    background: var(--method-post);
    color: #000;
}

.method-tag.put {
    background: var(--method-put);
    color: #000;
}

.method-tag.delete {
    background: var(--method-delete);
    color: #fff;
}

/* =============================================
   CENTER - Main Content Premium Design
============================================= */
.main-content {
    padding: 36px 44px;
    overflow-y: auto;
    max-height: 100vh;
    background: linear-gradient(180deg,
            rgba(255, 102, 0, 0.015) 0%,
            transparent 30%,
            transparent 70%,
            rgba(255, 102, 0, 0.01) 100%);
}

.endpoint-header {
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 102, 0, 0.1);
}

.endpoint-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.endpoint-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

/* Method Badge (Large) - Enhanced */
.method-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.method-badge.get {
    background: linear-gradient(135deg, var(--method-get) 0%, #0d9668 100%);
    color: #000;
}

.method-badge.post {
    background: linear-gradient(135deg, var(--method-post) 0%, #e55c00 100%);
    color: #000;
}

.method-badge.put {
    background: linear-gradient(135deg, var(--method-put) 0%, #d97706 100%);
    color: #000;
}

.method-badge.delete {
    background: linear-gradient(135deg, var(--method-delete) 0%, #dc2626 100%);
    color: #fff;
}

.endpoint-url {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-primary);
    background: linear-gradient(135deg, rgba(255, 102, 0, 0.12) 0%, rgba(255, 102, 0, 0.06) 100%);
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 102, 0, 0.2);
    word-break: break-all;
}

.endpoint-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 700px;
}

/* Recent Requests - Premium */
.recent-requests {
    background: linear-gradient(145deg,
            rgba(255, 255, 255, 0.02) 0%,
            rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.section-header h3 {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    position: relative;
    padding-left: 14px;
}

.section-header h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 14px;
    background: linear-gradient(180deg, var(--accent-primary) 0%, rgba(255, 102, 0, 0.3) 100%);
    border-radius: 2px;
}

.section-header a {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.section-header a:hover {
    color: var(--accent-primary);
    background: rgba(255, 102, 0, 0.1);
}

.requests-table {
    font-size: 0.82rem;
}

.table-header {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 102, 0, 0.1);
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.table-empty {
    padding: 28px;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
}

/* History rows */
.history-row {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: background 0.2s ease;
}

.history-row:hover {
    background: rgba(255, 102, 0, 0.05);
}

.history-row:last-child {
    border-bottom: none;
}

.text-success {
    color: var(--accent-success);
    font-weight: 600;
}

.text-error {
    color: var(--accent-error);
    font-weight: 600;
}

/* Parameters Section - Premium */
.params-section {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.param-group h3 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    position: relative;
    padding-left: 14px;
}

.param-group h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 14px;
    background: linear-gradient(180deg, var(--accent-primary) 0%, rgba(255, 102, 0, 0.3) 100%);
    border-radius: 2px;
}

.params-list {
    background: linear-gradient(145deg,
            rgba(255, 255, 255, 0.02) 0%,
            rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.param-row {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.3s ease;
}

.param-row:hover {
    background: rgba(255, 102, 0, 0.02);
}

.param-row:last-child {
    border-bottom: none;
}

.param-input {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.param-input label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.param-input input,
.param-input select,
.param-input textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font-mono);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] .param-input input,
[data-theme="light"] .param-input select,
[data-theme="light"] .param-input textarea {
    background: rgba(0, 0, 0, 0.03);
}

.param-input input:focus,
.param-input select:focus,
.param-input textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.15);
    background: rgba(255, 102, 0, 0.03);
}

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

/* Badges - Enhanced */
.required {
    font-size: 0.6rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--accent-error) 0%, #dc2626 100%);
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.optional {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.08);
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.conditional {
    font-size: 0.6rem;
    font-weight: 700;
    color: #000;
    background: linear-gradient(135deg, var(--accent-warning) 0%, #d97706 100%);
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

/* Badges */
.required {
    font-size: 0.65rem;
    font-weight: 600;
    color: #fff;
    background: var(--accent-error);
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
}

.optional {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
}

.conditional {
    font-size: 0.65rem;
    font-weight: 600;
    color: #000;
    background: var(--accent-warning);
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
}

/* Response Section */
.response-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.response-codes {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.response-code {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.response-code:hover,
.response-code.active {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.success {
    background: var(--accent-success);
}

.status-dot.error {
    background: var(--accent-error);
}

.response-schema {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.schema-header {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.schema-content {
    padding: 16px;
}

.schema-content code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-primary);
}

.schema-field {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0 8px 20px;
    font-size: 0.85rem;
}

.field-name {
    font-family: var(--font-mono);
    color: var(--accent-primary);
}

.field-type {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* =============================================
   RIGHT PANEL - Fixed Layout
============================================= */
.right-panel {
    background: linear-gradient(145deg,
            rgba(15, 15, 15, 0.95) 0%,
            rgba(10, 10, 10, 0.98) 50%,
            rgba(20, 15, 10, 0.95) 100%);
    border-left: 1px solid rgba(255, 102, 0, 0.15);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    /* Changed from auto - child elements will scroll */
    box-shadow:
        inset 1px 0 30px rgba(255, 102, 0, 0.03),
        -5px 0 20px rgba(0, 0, 0, 0.3);
}

/* Light mode right panel */
[data-theme="light"] .right-panel {
    background: linear-gradient(145deg,
            rgba(250, 250, 250, 0.98) 0%,
            rgba(245, 245, 245, 0.99) 50%,
            rgba(255, 250, 248, 0.98) 100%);
    border-left: 1px solid rgba(255, 102, 0, 0.2);
    box-shadow:
        inset 1px 0 30px rgba(255, 102, 0, 0.02),
        -5px 0 20px rgba(0, 0, 0, 0.05);
}

/* Language Tabs - Compact Premium Design */
.language-tabs {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 102, 0, 0.1);
    background: linear-gradient(180deg, rgba(255, 102, 0, 0.03) 0%, transparent 100%);
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    background: transparent !important;
}

.lang-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
}

.lang-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.lang-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 102, 0, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lang-btn i {
    font-size: 1.3rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.lang-btn:hover {
    border-color: rgba(255, 102, 0, 0.4);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow:
        0 8px 20px rgba(255, 102, 0, 0.15),
        0 0 0 1px rgba(255, 102, 0, 0.1);
}

.lang-btn:hover::before {
    opacity: 1;
}

.lang-btn:hover i {
    transform: scale(1.1);
    color: var(--accent-primary);
}

.lang-btn.active {
    background: linear-gradient(135deg, rgba(255, 102, 0, 0.15) 0%, rgba(255, 102, 0, 0.05) 100%);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow:
        0 4px 15px rgba(255, 102, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.lang-btn.active i {
    color: var(--accent-primary);
    filter: drop-shadow(0 0 6px rgba(255, 102, 0, 0.5));
}

/* Credentials Section - Fixed Top */
.credentials-section {
    flex-shrink: 0;
    /* Don't shrink - keep fixed size */
    background: linear-gradient(180deg,
            rgba(15, 15, 15, 0.98) 0%,
            rgba(15, 15, 15, 0.95) 100%);
    backdrop-filter: blur(20px);
    z-index: 10;
    padding: 14px 16px;
    margin: 0;
    border-bottom: 1px solid rgba(255, 102, 0, 0.1);
    overflow-y: auto;
    max-height: 45vh;
    /* Limit credentials to 45% of viewport height */
}

[data-theme="light"] .credentials-section {
    background: linear-gradient(180deg,
            rgba(250, 250, 250, 0.98) 0%,
            rgba(245, 245, 245, 0.95) 100%);
}

.cred-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.cred-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    padding-left: 12px;
}

.cred-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 12px;
    background: linear-gradient(180deg, var(--accent-primary) 0%, rgba(255, 102, 0, 0.3) 100%);
    border-radius: 2px;
}

.cred-lock {
    font-size: 0.7rem;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(255, 102, 0, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 102, 0, 0.2);
}

.cred-lock i {
    font-size: 0.65rem;
}

.cred-tabs {
    display: flex;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

[data-theme="light"] .cred-tabs {
    background: rgba(0, 0, 0, 0.05);
}

.cred-tab {
    flex: 1;
    text-align: center;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.cred-tab:first-child {
    border-radius: 8px;
}

.cred-tab:last-child {
    border-radius: 8px;
}

.cred-tab:hover {
    color: var(--text-primary);
}

.cred-tab.active {
    background: linear-gradient(135deg, rgba(255, 102, 0, 0.2) 0%, rgba(255, 102, 0, 0.1) 100%);
    color: var(--accent-primary);
    box-shadow:
        0 2px 10px rgba(255, 102, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

.cred-panel {
    animation: fadeIn 0.3s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cred-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cred-input {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cred-input label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.cred-input input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: var(--font-mono);
    transition: var(--transition);
}

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

/* Member Auth */
.member-auth {
    margin-top: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.auth-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-primary);
}

.auth-row {
    display: flex;
    gap: 8px;
}

.auth-row input {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.btn-sm {
    padding: 8px 12px;
    background: var(--accent-primary);
    border: none;
    border-radius: 6px;
    color: #000;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-sm:hover {
    opacity: 0.9;
}

.btn-primary {
    background: var(--accent-primary);
    color: #000;
}

.btn-link {
    background: none;
    border: none;
    color: var(--accent-primary);
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: underline;
}

.auth-success {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-success);
    font-size: 0.85rem;
}

.token-display {
    margin-top: 8px;
    padding: 8px;
    background: var(--bg-input);
    border-radius: 4px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    word-break: break-all;
}

/* Scrollable Code Area - Takes remaining height */
.code-scroll-area {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* cURL Section */
.curl-section {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 102, 0, 0.1);
    background: linear-gradient(180deg, transparent 0%, rgba(255, 102, 0, 0.02) 100%);
}

.curl-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.curl-header>span {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.curl-header .btn-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.curl-header .btn-icon:hover {
    background: rgba(255, 102, 0, 0.1);
    border-color: rgba(255, 102, 0, 0.3);
    color: var(--accent-primary);
}

.curl-code {
    flex: 1;
    background: linear-gradient(145deg,
            rgba(0, 0, 0, 0.4) 0%,
            rgba(0, 0, 0, 0.2) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 14px;
    margin: 0;
    overflow: auto;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--text-secondary);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .curl-code {
    background: linear-gradient(145deg,
            rgba(0, 0, 0, 0.03) 0%,
            rgba(0, 0, 0, 0.01) 100%);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.03);
}

.curl-code code {
    color: inherit;
}

.btn-try {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 14px 24px;
    background: linear-gradient(135deg,
            var(--accent-primary) 0%,
            #ff8533 100%);
    border: none;
    border-radius: 12px;
    color: #000;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-try::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.2) 0%,
            transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-try:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 30px rgba(255, 102, 0, 0.3),
        0 0 0 1px rgba(255, 102, 0, 0.3);
}

.btn-try:hover::before {
    opacity: 1;
}

.btn-try:active {
    transform: translateY(0);
}

/* Response Output */
.response-output {
    padding: 14px 16px;
    background: linear-gradient(180deg, rgba(255, 102, 0, 0.02) 0%, transparent 100%);
}

.response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.response-header>span {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    position: relative;
    padding-left: 12px;
}

.response-header>span::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 12px;
    background: linear-gradient(180deg, var(--accent-success) 0%, rgba(16, 185, 129, 0.3) 100%);
    border-radius: 2px;
}

.response-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all 0.3s ease;
}

.status-indicator.success {
    background: var(--accent-success);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.status-indicator.error {
    background: var(--accent-error);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.status-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.response-format {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.response-format:hover {
    border-color: rgba(255, 102, 0, 0.3);
    color: var(--text-primary);
}

#response {
    flex: 1;
    background: linear-gradient(145deg,
            rgba(0, 0, 0, 0.4) 0%,
            rgba(0, 0, 0, 0.2) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 18px;
    margin: 0;
    overflow: auto;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.8;
    color: var(--text-secondary);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] #response {
    background: linear-gradient(145deg,
            rgba(0, 0, 0, 0.03) 0%,
            rgba(0, 0, 0, 0.01) 100%);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.03);
}

#response code {
    color: inherit;
}

/* Syntax highlighting colors */
#response .key {
    color: var(--accent-primary);
}

#response .string {
    color: #10b981;
}

#response .number {
    color: #f59e0b;
}

#response .boolean {
    color: #8b5cf6;
}

#response .null {
    color: #ef4444;
}

/* Loading */
.loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    color: var(--text-muted);
}

.loading.show {
    display: flex;
}

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

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

/* =============================================
   MOBILE HEADER
============================================= */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border-color);
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
    z-index: 998;
}

.mobile-header .logo img {
    height: 24px;
}

.mobile-header-actions {
    display: flex;
    gap: 8px;
}

.hamburger-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* =============================================
   MOBILE DRAWER
============================================= */
.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: var(--bg-sidebar);
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-drawer.open {
    transform: translateX(0);
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-drawer-header .logo img {
    height: 28px;
}

.close-drawer-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.close-drawer-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.mobile-drawer-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
}

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.open {
    display: block;
    opacity: 1;
}

/* =============================================
   RESPONSIVE BREAKPOINTS
============================================= */

/* Large Desktop */
@media (max-width: 1400px) {
    :root {
        --right-panel-width: 380px;
    }
}

/* Desktop */
@media (max-width: 1200px) {
    :root {
        --sidebar-width: 240px;
        --right-panel-width: 360px;
    }
}

/* Tablet Landscape */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 220px;
        --right-panel-width: 320px;
    }

    .main-content {
        padding: 24px;
    }

    .cred-form {
        gap: 12px;
    }
}

/* Tablet Portrait - Switch to 2-column */
@media (max-width: 900px) {
    .api-tester-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }

    .sidebar-nav {
        display: none;
    }

    .mobile-header {
        display: flex;
    }

    .main-content {
        padding: 72px 20px 20px;
        max-height: none;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .right-panel {
        position: relative;
        height: auto;
        max-height: none;
        overflow: visible;
        width: 100%;
        box-sizing: border-box;
    }

    .credentials-section {
        position: relative;
        top: auto;
    }

    .response-output {
        position: relative;
    }
}

/* Mobile Large */
@media (max-width: 768px) {
    .mobile-drawer {
        width: 280px;
    }

    .main-content {
        padding: 72px 16px 16px;
    }

    .endpoint-header {
        padding-bottom: 16px;
        margin-bottom: 20px;
    }

    .endpoint-title {
        font-size: 1.5rem;
    }

    .endpoint-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .endpoint-url {
        font-size: 0.8rem;
        word-break: break-all;
    }

    .recent-requests {
        padding: 16px;
    }

    .section-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .params-section {
        padding: 16px;
    }

    .right-panel {
        padding: 16px;
    }

    .language-tabs {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .lang-buttons {
        flex-wrap: wrap;
    }

    .curl-code {
        font-size: 0.75rem;
        padding: 12px;
    }

    .btn-try {
        padding: 14px 20px;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .mobile-drawer {
        width: 100vw;
        max-width: 100vw;
    }

    .main-content {
        padding: 64px 12px 12px;
    }

    .endpoint-title {
        font-size: 1.25rem;
    }

    .endpoint-desc {
        font-size: 0.85rem;
    }

    .method-badge {
        font-size: 0.65rem;
        padding: 4px 8px;
    }

    .curl-container,
    .response-container {
        width: 100%;
        overflow-x: auto;
    }

    .curl-code,
    .response-code {
        white-space: pre-wrap;
        /* Wrap long lines in code blocks on mobile */
        word-break: break-all;
    }

    .param-group h3 {
        font-size: 0.75rem;
    }

    .param-input label {
        font-size: 0.8rem;
    }

    .param-input input {
        font-size: 0.85rem;
        padding: 10px 12px;
        width: 100%;
        box-sizing: border-box;
        /* Ensure padding doesn't overflow width */
    }

    .cred-input label {
        font-size: 0.7rem;
    }

    .cred-input input {
        font-size: 0.85rem;
        padding: 10px 12px;
        width: 100%;
        box-sizing: border-box;
    }

    .recent-requests,
    .params-section,
    .right-panel {
        padding: 12px;
        width: 100%;
        box-sizing: border-box;
    }

    .requests-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .requests-table .table-header span,
    .history-row span {
        font-size: 0.7rem;
    }

    .response-code {
        font-size: 0.7rem;
        max-height: 200px;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    .mobile-header {
        padding: 0 10px;
    }

    .endpoint-title {
        font-size: 1.1rem;
    }

    .main-content {
        padding: 60px 10px 10px;
    }
}

/* Theme Toggle Animation */
#themeIcon {
    transition: transform 0.3s ease;
}

[data-theme="light"] #themeIcon::before {
    content: "\f185";
    /* sun icon */
}

/* Syntax Highlighting (basic) */
.curl-code .string {
    color: #89ca78;
}

.curl-code .url {
    color: var(--accent-primary);
}

.curl-code .header {
    color: #d69d85;
}

/* Response JSON Highlighting */
.response-code .key {
    color: var(--accent-primary);
}

.response-code .string {
    color: #89ca78;
}

.response-code .number {
    color: #d19a66;
}

.response-code .boolean {
    color: #e06c75;
}

.response-code .null {
    color: var(--text-muted);
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .endpoint-link {
        padding: 14px 20px;
    }

    .btn-icon {
        width: 44px;
        height: 44px;
    }

    .param-input input,
    .cred-input input {
        min-height: 44px;
    }

    .btn-try {
        min-height: 48px;
    }

    .lang-option {
        padding: 14px 16px;
    }
}

/* =============================================
   COLLAPSIBLE CREDENTIALS SECTION
============================================= */
.cred-toggle-icon {
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.credentials-section.collapsed .cred-toggle-icon {
    transform: rotate(-90deg);
}

.cred-body {
    transition: all 0.3s ease;
    overflow: hidden;
}

.credentials-section.collapsed .cred-body {
    display: none;
}

.credentials-section .cred-header:hover {
    background: rgba(255, 102, 0, 0.05);
}

.credentials-section .cred-header:hover .cred-toggle-icon {
    color: var(--accent-primary);
}

/* Connected App Type Indicator */
.connected-app-type {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--accent-success);
}

.connected-app-type i {
    color: var(--accent-success);
}

.product-type-badge {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    background: rgba(16, 185, 129, 0.2);
    border-radius: 4px;
}

/* =============================================
   SEARCH MODAL - Spotlight Style "Jump To"
   ============================================= */

.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.search-overlay.open {
    display: flex;
    opacity: 1;
}

.search-modal {
    width: 600px;
    max-width: 90vw;
    background: #121212;
    /* Fallback */
    background: linear-gradient(145deg, rgba(20, 20, 20, 0.98), rgba(10, 10, 10, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.98);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-overlay.open .search-modal {
    transform: scale(1);
}

[data-theme="light"] .search-modal {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

/* Header & Input */
.search-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .search-header {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

.search-icon {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-right: 12px;
}

.search-header input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    outline: none;
    font-family: var(--font-sans);
}

.search-esc {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .search-esc {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Results List */
.search-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px 0;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: background 0.1s ease;
    text-decoration: none;
    color: var(--text-secondary);
}

.search-item:hover,
.search-item.active {
    background: rgba(255, 255, 255, 0.03);
    border-left-color: var(--accent-primary);
}

[data-theme="light"] .search-item:hover,
[data-theme="light"] .search-item.active {
    background: rgba(0, 0, 0, 0.03);
}

.search-item .method-badge {
    padding: 4px 8px;
    font-size: 0.7rem;
    min-width: 60px;
    text-align: center;
    box-shadow: none;
}

.search-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    overflow: hidden;
}

.search-item-title {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.search-item-path {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-item:hover .search-item-title,
.search-item.active .search-item-title {
    color: var(--accent-primary);
}

/* Empty State */
.search-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.search-empty .empty-icon {
    font-size: 2rem;
    opacity: 0.5;
    margin-bottom: 8px;
}

/* Footer */
.search-footer {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.75rem;
    color: var(--text-muted);
}

[data-theme="light"] .search-footer {
    background: rgba(0, 0, 0, 0.02);
    border-top-color: rgba(0, 0, 0, 0.05);
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-item kbd {
    background: rgba(255, 255, 255, 0.1);
    padding: 1px 5px;
    border-radius: 3px;
    font-family: inherit;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .footer-item kbd {
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 1px 0 #ccc;
    color: #555;
}

/* Search History Styling */
.search-section-title {
    padding: 8px 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.history-item {
    color: var(--text-secondary);
}

.history-item i {
    margin-right: 12px;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.history-item.active i,
.history-item:hover i {
    color: var(--accent-primary);
}