/* Global Styles - MAIN 2025 Live Transcription */
/* Aesthetic: Dark, minimal, white with opacity, subtle glows */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #0a0a12;
    --bg-secondary: #0f0f1a;
    --bg-card: rgba(255, 255, 255, 0.02);
    --bg-card-hover: rgba(255, 255, 255, 0.04);
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.65);
    --text-muted: rgba(255, 255, 255, 0.4);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(255, 255, 255, 0.15);
    --glow-soft: rgba(255, 255, 255, 0.1);
    --accent-blue: #5b9af5;
    --accent-green: #22c55e;
    --accent-amber: #f59e0b;
}

body.light-theme {
    --bg-primary: #f3f4f6;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-card-hover: rgba(255, 255, 255, 0.9);
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --border-color: rgba(0, 0, 0, 0.06);
    --border-color-hover: rgba(0, 0, 0, 0.12);
    --glow-soft: rgba(0, 0, 0, 0.05);
    --accent-blue: #2563eb;
    --accent-green: #16a34a;
    --accent-amber: #d97706;
}

/* Light Theme Specific Overrides */
body.light-theme header h1 {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(37, 99, 235, 0.15);
}

body.light-theme .transcript-box {
    background: rgba(255, 255, 255, 0.6);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

body.light-theme .nav-btn {
    background: rgba(255, 255, 255, 0.6);
}

body.light-theme .ephemeral-box {
    background: rgba(255, 255, 255, 0.5);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    height: 100vh;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative; /* Ensure stacking context */
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none; /* Let clicks pass through */
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
    overflow: hidden;
}

/* Header */
header {
    text-align: center;
    padding: 56px 20px 40px;
    position: relative;
    flex-shrink: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.01) 0%, transparent 100%);
}

header h1 {
    font-size: 5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #94bfff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    text-shadow: 0 10px 40px rgba(91, 154, 245, 0.25);
    line-height: 1;
}

header h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent-blue);
    letter-spacing: 0.4em;
    text-transform: uppercase;
    opacity: 0.9;
}

/* Connection Status */
.connection-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
    padding: 10px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    transition: all 0.4s ease;
}

.status-dot.connected {
    background: var(--accent-green);
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.6);
}

.status-dot.disconnected {
    background: #ef4444;
    animation: pulse-status 1.5s ease-in-out infinite;
}

.status-dot.idle {
    background: var(--accent-amber);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

@keyframes pulse-status {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Connection dot - same as status-dot for consistency across pages */
.connection-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    transition: all 0.4s ease;
}

.connection-dot.connected {
    background: var(--accent-green);
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.6);
}

.connection-dot.disconnected {
    background: #ef4444;
    animation: pulse-status 1.5s ease-in-out infinite;
}

.connection-dot.idle {
    background: var(--accent-amber);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

/* Navigation */
.view-selector {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, var(--glow-soft) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.nav-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color-hover);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4),
                0 0 20px var(--glow-soft);
}

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

.nav-btn .icon {
    font-size: 1.4rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    position: relative;
    z-index: 1;
}

.nav-btn:hover .icon {
    opacity: 1;
}

.admin-nav-btn {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.admin-nav-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-color-hover);
}

/* Main Content */
main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.transcript-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

section h3 {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* Transcript Header */
.transcript-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.transcript-header h3 {
    margin-bottom: 0;
}

.ephemeral-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    color: var(--accent-amber);
    background: rgba(245, 158, 11, 0.05);
    padding: 5px 14px;
    border-radius: 16px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Ephemeral Box - Current chunk */
.ephemeral-box {
    padding: 18px 24px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 20px;
    min-height: 62px;
    max-height: 200px; /* Limit max size */
    overflow-y: auto; /* Scroll if content exceeds max */
    display: flex;
    align-items: flex-start; /* Align to top when text wraps */
    flex-shrink: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.ephemeral-text {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin: 0;
}

.ephemeral-text.status-message {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Typing cursor effect */
.ephemeral-text::after {
    content: '|';
    color: var(--text-muted);
    animation: blink-cursor 1s ease-in-out infinite;
    margin-left: 3px;
}

@keyframes blink-cursor {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 0.1; }
}

/* Transcript Box - History */
.transcript-box {
    flex: 1;
    max-height: 600px; /* Fixed max height - no infinite scrolling */
    overflow-y: auto;
    padding: 28px 32px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.9;
    color: var(--text-secondary);
    min-height: 0;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.transcript-box .placeholder {
    color: var(--text-muted);
    font-style: italic;
}

.transcript-line {
    margin-bottom: 14px;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.4s ease;
    border-left: 2px solid transparent;
}

.transcript-line.new {
    background: rgba(91, 154, 245, 0.08);
    color: var(--text-primary);
    border-left-color: var(--accent-blue);
    box-shadow: 0 0 16px rgba(91, 154, 245, 0.15);
    animation: highlight-fade 3s ease-out forwards;
}

.transcript-line.refined {
    background: rgba(34, 197, 94, 0.08);
    color: var(--text-primary);
    border-left-color: var(--accent-green);
    box-shadow: 0 0 16px rgba(34, 197, 94, 0.15);
    animation: refined-fade 2.5s ease-out forwards;
}

@keyframes highlight-fade {
    0% {
        background: rgba(91, 154, 245, 0.12);
        border-left-color: var(--accent-blue);
        box-shadow: 0 0 20px rgba(91, 154, 245, 0.2);
    }
    100% {
        background: transparent;
        border-left-color: transparent;
        box-shadow: none;
    }
}

@keyframes refined-fade {
    0% {
        background: rgba(34, 197, 94, 0.12);
        border-left-color: var(--accent-green);
        box-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
    }
    100% {
        background: transparent;
        border-left-color: transparent;
        box-shadow: none;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 28px 20px;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    flex-shrink: 0;
}

/* Logo Signature */
.logo-signature {
    position: fixed;
    bottom: 20px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.theme-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2000;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    transform: rotate(15deg);
}

.info-toggle {
    position: fixed;
    top: 80px; /* Below theme toggle (24 + 44 + 12 gap) */
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2000;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.info-toggle:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    transform: scale(1.05);
}

/* Info Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 18, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 3000;
    padding: 40px;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}

body.light-theme .modal {
    background: rgba(243, 244, 246, 0.95);
}

.modal.active {
    display: flex;
}

.modal-content.info-content {
    max-width: 900px;
    width: 100%;
    max-height: 95vh;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

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

.info-header h2 {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-transform: uppercase;
}

.info-image {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.info-caption {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
    text-align: center;
    max-width: 800px;
}

.logo-signature:hover {
    opacity: 0.7;
}

.logo-signature img {
    height: 32px;
    width: auto;
}

.logo-signature span {
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    font-weight: 500;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Tablet adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
    .container {
        max-width: 750px;
        padding: 20px;
    }

    header {
        padding: 40px 20px 28px;
    }
}

/* Laptop screen adjustments - ensure transcript fits */
@media (min-width: 769px) and (max-height: 900px) {
    header {
        padding: 20px 20px 16px;
    }

    header h1 {
        font-size: 2.8rem;
        margin-bottom: 4px;
    }

    header h2 {
        font-size: 0.75rem;
        letter-spacing: 0.3em;
    }

    .connection-status {
        margin-top: 12px;
        padding: 6px 16px;
        font-size: 0.65rem;
    }

    .status-dot {
        width: 6px;
        height: 6px;
    }

    .view-selector {
        margin: 20px 0;
        gap: 12px;
    }

    .nav-btn {
        padding: 10px 20px;
        font-size: 0.8rem;
        gap: 10px;
    }

    .nav-btn .icon {
        font-size: 1.2rem;
    }

    section {
        padding: 18px 24px;
    }

    section h3 {
        font-size: 0.7rem;
        margin-bottom: 14px;
    }

    .transcript-header {
        margin-bottom: 14px;
    }

    .ephemeral-label {
        font-size: 0.6rem;
        padding: 4px 12px;
    }

    .ephemeral-box {
        padding: 12px 18px;
        min-height: 45px;
        margin-bottom: 14px;
    }

    .ephemeral-text {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .transcript-box {
        max-height: 350px;
        padding: 20px 24px;
        font-size: 0.85rem;
        line-height: 1.7;
    }

    .transcript-line {
        margin-bottom: 10px;
        padding: 8px 12px;
    }

    footer {
        padding: 14px 20px;
        font-size: 0.7rem;
    }
}

/* Even smaller laptop screens */
@media (min-width: 769px) and (max-height: 800px) {
    header {
        padding: 16px 20px 12px;
    }

    header h1 {
        font-size: 2.4rem;
        margin-bottom: 2px;
    }

    header h2 {
        font-size: 0.7rem;
        letter-spacing: 0.25em;
    }

    .connection-status {
        margin-top: 10px;
        padding: 5px 14px;
        font-size: 0.62rem;
    }

    .status-dot {
        width: 5px;
        height: 5px;
    }

    .view-selector {
        margin: 16px 0;
        gap: 10px;
    }

    .nav-btn {
        padding: 8px 18px;
        font-size: 0.75rem;
        gap: 8px;
    }

    .nav-btn .icon {
        font-size: 1.1rem;
    }

    section {
        padding: 16px 20px;
    }

    section h3 {
        font-size: 0.68rem;
        margin-bottom: 12px;
    }

    .transcript-header {
        margin-bottom: 12px;
    }

    .ephemeral-label {
        font-size: 0.58rem;
        padding: 3px 10px;
    }

    .ephemeral-box {
        padding: 10px 16px;
        min-height: 40px;
        margin-bottom: 12px;
    }

    .ephemeral-text {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .transcript-box {
        max-height: 280px;
        padding: 18px 20px;
        font-size: 0.8rem;
        line-height: 1.6;
    }

    .transcript-line {
        margin-bottom: 8px;
        padding: 6px 10px;
    }

    footer {
        padding: 12px 20px;
        font-size: 0.68rem;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    /* FIX THE HTML ELEMENT TOO! */
    html {
        height: auto !important;
        min-height: 100vh !important;
        overflow: auto !important;
    }

    /* NUCLEAR OPTION: Remove all flex/height constraints */
    body {
        height: auto !important;
        min-height: 100vh !important;
        max-height: none !important;
        overflow: auto !important;  /* THE FIX - auto creates scrollbars! */
        display: block !important;
        flex: none !important;
    }

    .container {
        max-width: 100%;
        padding: 16px;
        overflow: visible !important;  /* Let content flow naturally */
        min-height: 0 !important;
        max-height: none !important;
        height: auto !important;
        flex: none !important;
        display: block !important;
    }

    header {
        padding: 40px 16px 32px;
    }

    header h1 {
        font-size: 3rem;
        letter-spacing: -0.02em;
        line-height: 1.1;
    }

    header h2 {
        font-size: 0.8rem;
        letter-spacing: 0.3em;
    }

    .connection-status {
        margin-top: 20px;
        padding: 8px 20px;
        font-size: 0.7rem;
    }

    .status-dot {
        width: 7px;
        height: 7px;
    }

    .view-selector {
        margin: 32px 0;
        gap: 16px;
    }

    .nav-btn {
        flex-direction: column;
        gap: 10px;
        padding: 16px 24px;
        font-size: 0.8rem;
    }

    .nav-btn .icon {
        font-size: 1.3rem;
    }

    main {
        overflow: visible !important;  /* MUST override overflow:hidden */
        min-height: 0 !important;
        max-height: none !important;
        height: auto !important;
        flex: none !important;
        display: block !important;
    }

    section {
        padding: 24px 20px;
        overflow: visible !important;  /* MUST override overflow:hidden */
        min-height: 0 !important;
        max-height: none !important;
        height: auto !important;
        flex: none !important;
        display: block !important;  /* Kill flex layout */
    }

    .transcript-section {
        overflow: visible !important;  /* THIS IS KEY - was overflow:hidden! */
        min-height: 0 !important;
        max-height: none !important;
        height: auto !important;
        flex: none !important;
        display: block !important;  /* Kill flex layout */
    }

    .transcript-header {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        margin-bottom: 16px;
    }

    /* Ephemeral box - allow natural growth on mobile */
    .ephemeral-box {
        padding: 16px 20px;
        min-height: 0 !important;
        max-height: none !important;
        height: auto !important;
        display: block !important;  /* Kill flex layout */
        align-items: unset !important;
        flex-shrink: unset !important;
        margin-bottom: 24px;
        border: 2px solid rgba(245, 158, 11, 0.3);
        box-shadow: 0 4px 16px rgba(245, 158, 11, 0.1);
    }

    .ephemeral-text {
        font-size: 0.9rem;
        line-height: 1.6;
        word-wrap: break-word;
    }

    /* Transcript box - fixed height with internal scrolling */
    .transcript-box {
        font-size: 0.9rem;
        padding: 24px 20px;
        height: 400px !important;
        min-height: 400px !important;
        max-height: 400px !important;
        flex: none !important;
        overflow-y: scroll !important;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        border: 2px solid rgba(91, 154, 245, 0.2);
        box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.4);
        margin-bottom: 24px;
    }

    .transcript-line {
        margin-bottom: 12px;
        padding: 8px 12px;
    }

    footer {
        padding: 20px;
        font-size: 0.7rem;
        flex-shrink: 0;
        position: relative;
        margin-top: 20px;
        margin-bottom: 80px; /* Space for fixed logo */
    }

    .logo-signature {
        bottom: 12px;
        right: 12px;
        position: fixed;
        z-index: 100;
    }
}

/* ======================================
   ONBOARDING MODAL - SYSTEM INITIALIZATION
   ====================================== */

/* Onboarding Modal Container */
.onboarding-modal {
    z-index: 5000;
    background: rgba(10, 10, 18, 0.75) !important; /* More transparent */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: modalFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.onboarding-modal.active {
    display: flex;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
}

body.light-theme .onboarding-modal {
    background: rgba(243, 244, 246, 0.75) !important;
}

/* Onboarding Content Card - More transparent */
.modal-content.onboarding-content {
    max-width: 650px;
    width: 90%;
    min-height: 500px;
    max-height: 85vh;
    background: rgba(255, 255, 255, 0.03); /* Lower opacity */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 50px;
    position: relative;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(91, 154, 245, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: contentSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.1s;
    opacity: 0;
    transform: translateY(20px) scale(0.97);
    overflow: hidden;
}

body.light-theme .modal-content.onboarding-content {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 0 40px rgba(91, 154, 245, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

@keyframes contentSlideUp {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Page Indicator */
.page-indicator {
    position: absolute;
    top: 20px;
    right: 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.6;
    z-index: 10;
}

.page-num {
    color: var(--accent-blue);
    font-weight: 600;
}

.page-separator {
    margin: 0 4px;
}

/* Onboarding Pages Container */
.onboarding-page {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 100px;
    display: none;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 40px 60px 40px 60px;
}

.onboarding-page.active {
    display: block;
}

/* Intro Content Wrapper */
.intro-content {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

/* Intro Content Styling */
.intro-content h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #5b9af5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-theme .intro-content h2 {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.intro-content .subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 36px;
    line-height: 1.7;
}

.intro-content .subtitle strong {
    color: var(--accent-blue);
    font-weight: 600;
}

/* Intro Body */
.intro-body {
    margin-bottom: 0;
}

.intro-body p {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 24px;
    text-align: center;
}

/* Feature List */
.feature-list {
    list-style: none;
    margin: 32px 0 0;
    padding: 0;
    text-align: left;
}

.feature-list li {
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 18px;
    padding-left: 28px;
    position: relative;
}

.feature-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-blue);
    font-size: 1rem;
}

.feature-list li strong {
    color: var(--text-primary);
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
}

/* Utility Note Section */
.utility-note {
    margin-top: 0;
    padding: 28px;
    background: rgba(91, 154, 245, 0.06);
    border: 1px solid rgba(91, 154, 245, 0.15);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(91, 154, 245, 0.08);
    text-align: left;
}

body.light-theme .utility-note {
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.12);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.06);
}

.utility-note h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-blue);
    margin-bottom: 16px;
    text-align: center;
}

.utility-note p {
    font-size: 0.92rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.utility-note p:last-child {
    margin-bottom: 0;
}

/* Navigation Arrows */
.onboarding-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    z-index: 10;
    transition: opacity 0.4s ease, pointer-events 0.4s ease;
}

.nav-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body.light-theme .nav-arrow {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-arrow:hover:not(:disabled) {
    background: rgba(91, 154, 245, 0.15);
    border-color: rgba(91, 154, 245, 0.3);
    color: var(--accent-blue);
    transform: scale(1.05);
}

.nav-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-arrow svg {
    transition: transform 0.3s ease;
}

.nav-arrow:hover:not(:disabled) svg {
    transform: translateX(0);
}

.prev-btn:hover:not(:disabled) svg {
    transform: translateX(-2px);
}

.next-btn:hover:not(:disabled) svg {
    transform: translateX(2px);
}

/* Enter Experiment Button */
.enter-btn {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 32px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    z-index: 11;
}

body.light-theme .enter-btn {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.enter-btn:hover {
    background: rgba(91, 154, 245, 0.15);
    border-color: rgba(91, 154, 245, 0.3);
    color: var(--accent-blue);
    transform: translateX(-50%) translateY(-2px);
}

/* Mobile Adjustments for Onboarding Modal */
@media (max-width: 768px) {
    .modal-content.onboarding-content {
        padding: 30px 20px;
        max-width: 95%;
        min-height: 500px;
        border-radius: 16px;
    }

    .onboarding-page {
        top: 50px;
        left: 0;
        right: 0;
        bottom: 90px;
        padding: 30px 30px;
    }

    .intro-content {
        max-width: 100%;
    }

    .intro-content h2 {
        font-size: 1.6rem;
        margin-bottom: 16px;
    }

    .intro-content .subtitle {
        font-size: 0.88rem;
        margin-bottom: 28px;
    }

    .intro-body p {
        font-size: 0.88rem;
        line-height: 1.7;
        margin-bottom: 20px;
    }

    .feature-list {
        margin-top: 24px;
    }

    .feature-list li {
        font-size: 0.86rem;
        line-height: 1.7;
        margin-bottom: 16px;
        padding-left: 24px;
    }

    .utility-note {
        padding: 24px;
    }

    .utility-note h3 {
        font-size: 0.8rem;
        margin-bottom: 14px;
    }

    .utility-note p {
        font-size: 0.86rem;
        line-height: 1.7;
        margin-bottom: 14px;
    }

    .enter-btn {
        bottom: 25px;
        padding: 12px 28px;
        font-size: 0.85rem;
    }

    .onboarding-nav {
        bottom: 25px;
    }

    .nav-arrow {
        width: 42px;
        height: 42px;
    }

    .page-indicator {
        top: 18px;
        right: 22px;
        font-size: 0.75rem;
    }
}
