:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-code: #1f2937;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-code: #f3f4f6;
    --border-color: #e5e7eb;
    --border-hover: #d1d5db;
    --accent-color: #10b981;
    --accent-hover: #059669;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 6px rgba(0,0,0,0.1);
}

[data-theme="dark"] {
    --bg-primary: #1f2937;
    --bg-secondary: #111827;
    --bg-tertiary: #374151;
    --bg-code: #0f172a;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-code: #e5e7eb;
    --border-color: #374151;
    --border-hover: #4b5563;
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-lg: 0 4px 6px rgba(0,0,0,0.4);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: background-color 0.3s, color 0.3s;
}

/* Skip to main content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-color);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}

/* Improved focus indicators */
*:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.header {
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    color: white;
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 10;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.header p {
    font-size: 0.875rem;
    opacity: 0.9;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.theme-toggle:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
    background: rgba(255, 255, 255, 0.3);
}

.blog-link:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
    color: white !important;
    text-decoration: underline;
}

/* Focus style for header links with inline styles (Back to App, etc.) */
.header-actions a[href]:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
    background: rgba(255, 255, 255, 0.4) !important;
}

/* Focus style for button-style links (Buy Me a Coffee, etc.) */
a.btn:focus-visible {
    outline: 3px solid #111827 !important;
    outline-offset: 3px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15), 0 0 0 4px rgba(16, 185, 129, 0.4) !important;
}

/* Focus style for white buttons on gradient backgrounds (Send Feedback, etc.) */
a[href][tabindex][style*="background: white"]:focus-visible {
    outline: 3px solid #111827 !important;
    outline-offset: 3px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15), 0 0 0 4px rgba(255, 255, 255, 0.6) !important;
}

/* Focus style for table rows */
tr[tabindex]:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: -2px;
    background: rgba(16, 185, 129, 0.1);
}

/* Focus style for FAQ items */
.faq-item[tabindex]:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-left-color: var(--accent-color);
    background: rgba(16, 185, 129, 0.05);
}

/* Focus style for example cards */
.example-card[tabindex]:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-left-color: var(--accent-color);
    background: rgba(16, 185, 129, 0.05);
}

/* Focus style for shortcut rows */
.shortcut-row[tabindex]:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    background: rgba(16, 185, 129, 0.05);
    border-radius: 6px;
}

/* Focus style for workflow steps */
.workflow-step[tabindex]:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-left-color: var(--accent-color);
    background: rgba(16, 185, 129, 0.05);
}

/* Focus style for pro tip list items */
li[tabindex]:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    background: rgba(16, 185, 129, 0.05);
    border-radius: 4px;
}

/* Focus style for fact items */
.fact-item[tabindex]:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-left-color: var(--accent-color);
    background: rgba(16, 185, 129, 0.05);
}

/* Focus style for color swatches */
.color-swatch[tabindex]:focus-visible {
    outline: 3px solid white;
    outline-offset: 3px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
}

/* Focus style for h4 headings */
h4[tabindex]:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    background: rgba(16, 185, 129, 0.05);
    border-radius: 4px;
}

.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 300px auto 1fr;
    gap: 0;
    position: relative;
    z-index: 1;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: all 0.3s ease;
    margin-right: 1.5rem;
    position: relative;
    z-index: 2;
    min-width: 0;
}

.sidebar.collapsed {
    width: 4px;
    min-width: 4px;
    overflow: hidden;
    margin-right: 0;
    background: transparent;
    border-right: 4px solid var(--accent-color);
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    box-shadow: 0 0 20px var(--accent-color), 0 0 40px rgba(16, 185, 129, 0.3), 0 0 0 2px #3b82f6;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px var(--accent-color), 0 0 40px rgba(16, 185, 129, 0.3), 0 0 0 2px #3b82f6;
    }
    50% {
        box-shadow: 0 0 30px var(--accent-color), 0 0 60px rgba(16, 185, 129, 0.5), 0 0 0 2px #3b82f6;
    }
}

.sidebar.collapsed .card {
    display: none;
}

.container.sidebar-collapsed {
    grid-template-columns: auto auto 1fr auto;
    justify-content: center;
}

.container.sidebar-collapsed .main-content {
    max-width: 1000px;
    margin: 0 auto;
}

.sidebar-collapse-toggle {
    position: relative;
    width: 32px;
    height: 64px;
    background: var(--accent-color);
    border: none;
    border-radius: 0 8px 8px 0;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    align-self: start;
    margin-top: 2rem;
    z-index: 100;
}

.sidebar-collapse-toggle:hover {
    background: var(--accent-hover);
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.2);
}

.sidebar-collapse-toggle svg {
    transition: transform 0.3s ease;
}

.sidebar.collapsed ~ .sidebar-collapse-toggle svg {
    transform: rotate(180deg);
}

.main-content {
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    min-width: 0;
}

.card {
    background: var(--bg-primary);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.sidebar .card {
    position: sticky;
    top: 2rem;
}

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

.sidebar h2 {
    font-size: 1.125rem;
    font-weight: 600;
}

.btn-icon {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    color: var(--text-secondary);
    transition: background 0.2s;
}

.btn-icon:hover {
    background: var(--bg-tertiary);
}

.btn-icon:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    background: var(--bg-tertiary);
}

.collection {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.collection-header {
    background: var(--bg-secondary);
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    user-select: none;
    transition: background 0.2s;
}

.collection-header:hover {
    background: var(--bg-tertiary);
}

.collection-header:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: -2px;
    background: var(--bg-tertiary);
}

.collection-body {
    padding: 0.5rem;
}

.collection-body.hidden {
    display: none;
}

.endpoint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    margin-bottom: 0.25rem;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.endpoint:hover {
    background: var(--bg-secondary);
}

.endpoint:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: -2px;
    background: var(--bg-secondary);
}

.endpoint.active {
    border-color: var(--border-hover);
    box-shadow: 0 0 0 2px rgba(156, 163, 175, 0.2);
}

.method-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    min-width: 60px;
    text-align: center;
}

.method-get { background: #3b82f6; }
.method-post { background: #10b981; }
.method-put { background: #f59e0b; }
.method-patch { background: #8b5cf6; }
.method-delete { background: #ef4444; }

.endpoint-path {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-group textarea {
    font-family: 'Courier New', monospace;
    resize: vertical;
}

.url-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.url-row .method-badge {
    flex-shrink: 0;
}

.url-row input {
    flex: 1;
}

.btn-primary {
    width: 100%;
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
}

.btn-primary:focus-visible,
a.btn.btn-primary:focus-visible {
    outline: 3px solid white !important;
    outline-offset: 3px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2), 0 0 0 5px rgba(255, 255, 255, 0.4) !important;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1rem;
    overflow-x: auto;
}

.tab {
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    white-space: nowrap;
}

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

.tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.tab:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    color: var(--text-primary);
}

.tab-content {
    display: none;
}

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

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

.response-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.response-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.response-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.response-actions .btn-icon {
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.response-actions .btn-icon:hover {
    background: var(--bg-tertiary);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-success { background: #d1fae5; color: #065f46; }
.status-error { background: #fee2e2; color: #991b1b; }
.status-info { background: #dbeafe; color: #1e40af; }

[data-theme="dark"] .status-success { background: #064e3b; color: #d1fae5; }
[data-theme="dark"] .status-error { background: #7f1d1d; color: #fee2e2; }
[data-theme="dark"] .status-info { background: #1e3a8a; color: #dbeafe; }

.duration {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.response-body {
    background: var(--bg-code);
    color: var(--text-code);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.param-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.btn-small {
    padding: 0.5rem 0.75rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.btn-small:hover {
    background: #dc2626;
}

.btn-small:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.btn-add {
    background: var(--accent-color);
    width: 100%;
}

.btn-add:hover {
    background: var(--accent-hover);
}

.history-item {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.history-item:hover {
    border-color: var(--border-hover);
    background: var(--bg-secondary);
}

.history-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.history-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.history-url {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chart-container {
    height: 200px;
    position: relative;
    margin-bottom: 1rem;
}

.chart-canvas {
    width: 100%;
    height: 100%;
}

.cookie-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

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

.cookie-name {
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.cookie-details {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.no-data {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Sidebar Backdrop */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1090;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-backdrop.active {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {
    .header {
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    body.mobile-sidebar-open .header {
        z-index: 900;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .container {
        grid-template-columns: 1fr;
        padding: 0 1rem;
        margin: 1rem auto;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 300px;
        max-width: 85vw;
        background: var(--bg-secondary);
        z-index: 1100;
        transform: translateX(-100%);
        transition: transform 0.3s ease-out;
        overflow-y: auto;
        padding: 1rem;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    /* Hide collapse toggle on mobile - use hamburger menu instead */
    .sidebar-collapse-toggle {
        display: none;
    }

    /* Reset sidebar collapsed state on mobile */
    .sidebar.collapsed {
        width: 300px;
        min-width: 300px;
        border-right: none;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        animation: none;
        overflow-y: auto;
    }

    .sidebar.collapsed .card {
        display: flex;
    }

    .sidebar .card {
        position: relative;
        top: 0;
    }

    .sidebar .card:first-child {
        margin-top: 3rem;
    }

    .header-content {
        padding: 0;
    }

    .header {
        padding: 1rem;
    }

    /* Close button for mobile sidebar */
    .sidebar-close {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: var(--bg-primary);
        border: 1px solid var(--border-color);
        border-radius: 6px;
        padding: 0.5rem;
        cursor: pointer;
        color: var(--text-primary);
        z-index: 1000;
    }

    /* Mobile sidebar hint */
    .mobile-sidebar-hint {
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(20, 184, 166, 0.1));
        border: 1px solid rgba(16, 185, 129, 0.3);
        border-radius: 8px;
        padding: 1rem;
        margin: 0 1rem 1.5rem 1rem;
        color: var(--text-primary);
    }

    .mobile-sidebar-hint svg {
        color: var(--accent-color);
        margin-top: 2px;
    }

    .mobile-sidebar-hint p {
        margin: 0;
        font-size: 0.875rem;
        line-height: 1.5;
    }

    .mobile-sidebar-hint strong {
        color: var(--accent-color);
        font-weight: 600;
    }

    /* Make buttons more touch-friendly */
    .btn-icon,
    .btn-small,
    .tab {
        min-height: 44px;
        min-width: 44px;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.25rem;
    }

    .header p {
        display: none;
    }

    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

.sidebar-close {
    display: none;
}

/* Mobile Sidebar Hint */
.mobile-sidebar-hint {
    display: none;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

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

.btn-primary.loading {
    opacity: 0.8;
    cursor: wait;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    background: white;
    color: #111827;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    max-width: 400px;
    animation: slideIn 0.3s ease-out;
    pointer-events: auto;
    border-left: 4px solid #10b981;
}

.toast.success {
    border-left-color: #10b981;
}

.toast.error {
    border-left-color: #ef4444;
}

.toast.info {
    border-left-color: #3b82f6;
}

[data-theme="dark"] .toast {
    background: #1f2937;
    color: #f9fafb;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.4;
}

.toast.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Footer */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-section a:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    color: var(--accent-color);
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer {
        padding: 2rem 1rem 1rem;
        margin-top: 2rem;
    }
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-top: 2px solid var(--accent-color);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1;
    min-width: 250px;
}

.cookie-banner-text h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.cookie-banner-text p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.cookie-banner-text a {
    color: var(--accent-color);
    text-decoration: underline;
}

.cookie-banner-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cookie-banner-buttons button {
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.cookie-accept {
    background: var(--accent-color);
    color: white;
}

.cookie-accept:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.cookie-decline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.cookie-decline:hover {
    background: var(--bg-secondary);
    border-color: var(--border-hover);
}

@media (max-width: 768px) {
    .cookie-banner {
        padding: 1rem;
    }

    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .cookie-banner-text {
        min-width: 100%;
    }

    .cookie-banner-buttons {
        width: 100%;
        flex-direction: column;
    }

    .cookie-banner-buttons button {
        width: 100%;
    }
}

/* Terms of Service Acceptance Modal */
.tos-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
}

.tos-modal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.tos-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.tos-modal-content {
    position: relative;
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

.tos-modal-content h2 {
    margin: 0 0 1rem 0;
    color: var(--accent-color);
    font-size: 1.75rem;
}

.tos-modal-body {
    margin-bottom: 1.5rem;
}

.tos-modal-body p {
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.tos-modal-body a {
    color: var(--accent-color);
    text-decoration: underline;
}

.tos-summary {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid var(--accent-color);
}

.tos-summary h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.125rem;
}

.tos-summary ul {
    margin: 0;
    padding-left: 1.5rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.tos-summary li {
    margin-bottom: 0.5rem;
}

.tos-summary strong {
    color: var(--text-primary);
}

.tos-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.tos-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tos-btn-primary {
    background: var(--accent-color);
    color: white;
}

.tos-btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.tos-btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.tos-btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--border-hover);
}

@media (max-width: 768px) {
    .tos-modal-content {
        padding: 1.5rem;
        width: 95%;
        max-height: 90vh;
    }

    .tos-modal-content h2 {
        font-size: 1.5rem;
    }

    .tos-modal-actions {
        flex-direction: column-reverse;
    }

    .tos-btn {
        width: 100%;
    }
}

/* ==================== Onboarding Tutorial Styles ==================== */

.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.onboarding-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.onboarding-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.onboarding-tooltip {
    position: fixed;
    background: var(--bg-primary);
    border: 2px solid var(--accent-color);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 400px;
    z-index: 10001;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.onboarding-tooltip.show {
    opacity: 1;
    transform: scale(1);
}

.onboarding-tooltip.fade-out {
    opacity: 0;
    transform: scale(0.9);
}

.onboarding-progress {
    width: 100%;
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.onboarding-progress-bar {
    height: 100%;
    background: var(--accent-color);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.onboarding-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.75rem 0;
}

.onboarding-content {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
}

.onboarding-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.onboarding-skip {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.onboarding-skip:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.onboarding-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.onboarding-step-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.onboarding-next {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.onboarding-next:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.onboarding-next:active {
    transform: translateY(0);
}

.onboarding-highlight {
    position: relative;
    z-index: 10000;
    box-shadow: 0 0 0 4px var(--accent-color), 0 0 0 8px rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    animation: pulse-highlight 2s infinite;
}

@keyframes pulse-highlight {
    0%, 100% {
        box-shadow: 0 0 0 4px var(--accent-color), 0 0 0 8px rgba(99, 102, 241, 0.3);
    }
    50% {
        box-shadow: 0 0 0 4px var(--accent-color), 0 0 0 12px rgba(99, 102, 241, 0.5);
    }
}

@media (max-width: 768px) {
    .onboarding-tooltip {
        max-width: 90%;
        padding: 1.25rem;
        left: 5% !important;
        right: 5% !important;
        width: auto !important;
    }

    .onboarding-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .onboarding-skip {
        width: 100%;
        text-align: center;
    }

    .onboarding-nav {
        width: 100%;
        justify-content: space-between;
    }

    .onboarding-next {
        flex: 1;
    }
}

/* ==================== Testimonials Page Styles ==================== */

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.testimonial-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

.testimonial-quote {
    flex: 1;
}

.quote-icon {
    color: var(--accent-color);
    opacity: 0.3;
    margin-bottom: 1rem;
}

.testimonial-quote p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin: 0;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.author-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.author-role {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.testimonial-cta {
    background: linear-gradient(135deg, var(--accent-color) 0%, #7c3aed 100%);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    margin: 4rem 0 3rem 0;
    color: white;
}

.testimonial-cta h2 {
    font-size: 2rem;
    margin: 0 0 1rem 0;
    color: white;
}

.testimonial-cta p {
    font-size: 1.1rem;
    margin: 0 0 2rem 0;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    padding: 0.875rem 2rem;
    font-size: 1rem;
}

.cta-buttons .btn-secondary {
    background: white;
    color: var(--accent-color);
}

.cta-buttons .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .testimonial-card {
        padding: 1.5rem;
    }

    .testimonial-cta {
        padding: 2rem 1.5rem;
    }

    .testimonial-cta h2 {
        font-size: 1.5rem;
    }

    .testimonial-cta p {
        font-size: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-buttons .btn {
        width: 100%;
    }
}

/* Scroll Navigation Buttons */
.scroll-btn {
    position: fixed;
    right: 2rem;
    background: var(--accent-color);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 24px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0;
}

.scroll-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
    width: auto;
    padding: 0 1rem;
}

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

.scroll-btn:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4), 0 0 0 4px rgba(255, 255, 255, 0.3);
    width: auto;
    padding: 0 1rem;
    transform: translateY(-2px);
}

.scroll-btn:focus-visible .scroll-btn-text {
    max-width: 150px;
    opacity: 1;
    margin-left: 0.25rem;
}

.scroll-to-top {
    bottom: 2rem;
}

.scroll-to-bottom {
    top: 80px; /* Below header */
}

.scroll-btn svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.scroll-btn-text {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.scroll-btn:hover .scroll-btn-text {
    max-width: 150px;
    opacity: 1;
    margin-left: 0.25rem;
}

@media (max-width: 768px) {
    .scroll-btn {
        width: 40px;
        height: 40px;
        right: 1rem;
    }

    .scroll-to-top {
        bottom: 1rem;
    }

    .scroll-to-bottom {
        top: 70px;
    }

    .scroll-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* Environment Selector */
.environment-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1rem;
}

.environment-selector label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
}

.environment-selector select {
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 150px;
}

.environment-selector select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.environment-selector select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.environment-selector .btn-icon {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.environment-selector .btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .environment-selector label {
        display: none;
    }

    .environment-selector select {
        min-width: 120px;
        font-size: 0.8125rem;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: var(--bg-primary);
    border-radius: 12px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.2s ease-out;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Environment Item */
.env-item {
    transition: all 0.2s;
}

.env-item:hover {
    background: var(--bg-tertiary) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-secondary);
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-header h2 {
        font-size: 1.125rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .env-item {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.75rem;
    }

    .env-item > div:last-child {
        width: 100%;
    }

    .env-item button {
        flex: 1;
    }
}

/* Enhanced Features Styling */
.env-badge {
    display: inline-block;
    background: #10b981;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.env-variable-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: center;
}

.btn-small {
    padding: 0.375rem 0.625rem;
    font-size: 0.875rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-small:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-color);
}

#variable-search {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
}
