/*
CoPresenter AI - PowerPoint Converter
Design System matching copresenter.ai
*/

:root {
    /* Brand Colors */
    --bg-deep: #0e0b17;
    --bg-body: #141026;
    --bg-surface: #1a1626;
    --bg-card: rgba(255,255,255,0.06);
    --bg-input: rgba(255,255,255,0.05);
    --text: #eef;
    --text-inverse: #1a1a2e;
    --muted: #bfc6ff;
    --brand-1: #9b5cf6;
    --brand-2: #7c3aed;
    --ok: #34d399;
    --error: #f87171;
    --ring: rgba(153, 102, 255, 0.35);
    --shadow: 0 10px 35px rgba(0,0,0,0.35);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(255, 255, 255, 0.15);

    /* Sidebar Variables */
    --sidebar-width-collapsed: 64px;
    --sidebar-width-expanded: 220px;
    --sidebar-bg: rgba(14, 11, 23, 0.95);
    --sidebar-border: rgba(255, 255, 255, 0.08);

    /* Gradient overlays */
    --gradient-glow-1: rgba(124, 58, 237, 0.35);
    --gradient-glow-2: rgba(155, 92, 246, 0.3);
}

/* ============================================
   Light Mode Theme
   ============================================ */
[data-theme="light"] {
    --bg-deep: #f0f2f8;
    --bg-body: #f8f9fc;
    --bg-surface: #ffffff;
    --bg-card: rgba(0, 0, 0, 0.03);
    --bg-input: rgba(0, 0, 0, 0.04);
    --text: #1a1a2e;
    --text-inverse: #eef;
    --muted: #64648c;
    --brand-1: #8b5cf6;
    --brand-2: #7c3aed;
    --ok: #10b981;
    --error: #ef4444;
    --ring: rgba(124, 58, 237, 0.2);
    --shadow: 0 10px 35px rgba(0, 0, 0, 0.08);
    --border-color: rgba(0, 0, 0, 0.08);
    --border-color-hover: rgba(0, 0, 0, 0.15);
    --sidebar-bg: rgba(255, 255, 255, 0.98);
    --sidebar-border: rgba(0, 0, 0, 0.08);
    --gradient-glow-1: rgba(124, 58, 237, 0.15);
    --gradient-glow-2: rgba(155, 92, 246, 0.12);
    --white-alpha-05: rgba(0, 0, 0, 0.03);
    --white-alpha-08: rgba(0, 0, 0, 0.05);
    --white-alpha-10: rgba(0, 0, 0, 0.06);
    --white-alpha-15: rgba(0, 0, 0, 0.08);
}

/* Light mode component overrides */
[data-theme="light"] .control-btn,
[data-theme="light"] .nav-btn {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .control-btn:hover,
[data-theme="light"] .nav-btn:hover {
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    color: white;
}

[data-theme="light"] .viewer-header {
    background: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .toast {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .shortcuts-modal {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .shortcuts-modal kbd {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text);
}

[data-theme="light"] .processing-badge {
    background: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .field-select,
[data-theme="light"] .radio-group label,
[data-theme="light"] .checkbox-group label {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text);
}

[data-theme="light"] .field-select option {
    background: #fff;
    color: var(--text);
}

[data-theme="light"] .stat-card {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .thumbnail-strip {
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .home-icon-btn {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.1);
}

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

html, body {
    height: 100%;
}

body {
    font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--bg-body);
    min-height: 100dvh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50vh;
    background:
        radial-gradient(1200px 600px at 20% -10%, var(--gradient-glow-1), transparent 60%),
        radial-gradient(1000px 500px at 80% 0%, var(--gradient-glow-2), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   Sidebar Navigation
   ============================================ */

/* Layout wrapper for sidebar + main content */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width-collapsed);
    background: var(--sidebar-bg);
    backdrop-filter: blur(12px);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.sidebar:hover {
    width: var(--sidebar-width-expanded);
}

/* Sidebar Logo */
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 16px;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--sidebar-border);
    min-height: 72px;
}

.sidebar-logo svg {
    width: 32px;
    height: 32px;
    min-width: 32px;
    filter: drop-shadow(0 4px 12px rgba(124, 58, 237, 0.45));
}

.sidebar-logo-text {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sidebar:hover .sidebar-logo-text {
    opacity: 1;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 12px 8px;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--muted);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sidebar-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-link.active {
    color: var(--text);
    background: rgba(155, 92, 246, 0.2);
}

.sidebar-link svg {
    width: 22px;
    height: 22px;
    min-width: 22px;
    stroke-width: 1.75;
}

.sidebar-link-text {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sidebar:hover .sidebar-link-text {
    opacity: 1;
}

/* Sidebar Help Section */
.sidebar-help {
    padding: 8px 8px 0;
    margin-top: auto;
}

.sidebar-help .sidebar-link {
    color: var(--brand-1);
}

.sidebar-help .sidebar-link:hover {
    color: var(--brand-2);
    background: rgba(155, 92, 246, 0.1);
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

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

.theme-toggle:hover svg {
    transform: rotate(15deg);
}

/* Sidebar Footer (Logout) */
.sidebar-footer {
    padding: 12px 8px;
    border-top: 1px solid var(--sidebar-border);
}

.sidebar-link.logout {
    color: #fca5a5;
}

.sidebar-link.logout:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Main content area with sidebar */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width-collapsed);
    min-height: 100vh;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tooltip for collapsed state */
.sidebar-link[data-tooltip] {
    position: relative;
}

.sidebar-link[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-surface);
    color: var(--text);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    box-shadow: var(--shadow);
    border: 1px solid var(--sidebar-border);
    z-index: 101;
}

.sidebar:not(:hover) .sidebar-link:hover[data-tooltip]::after {
    opacity: 1;
}

/* Responsive: Mobile sidebar */
@media (max-width: 768px) {
    .sidebar {
        width: var(--sidebar-width-collapsed);
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        width: var(--sidebar-width-expanded);
    }

    .sidebar.open .sidebar-logo-text,
    .sidebar.open .sidebar-link-text {
        opacity: 1;
    }

    .main-content {
        margin-left: 0;
    }

    /* Mobile menu toggle button */
    .mobile-menu-toggle {
        display: flex;
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 99;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        background: var(--sidebar-bg);
        border: 1px solid var(--sidebar-border);
        border-radius: 10px;
        color: var(--text);
        cursor: pointer;
    }

    .mobile-menu-toggle svg {
        width: 24px;
        height: 24px;
    }

    /* Overlay */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99;
    }

    .sidebar-overlay.active {
        display: block;
    }
}

@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* Header */
header {
    width: 100%;
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    letter-spacing: 0.3px;
}

.brand svg {
    width: 36px;
    height: 36px;
    filter: drop-shadow(0 4px 12px rgba(124, 58, 237, 0.45));
}

/* Main Content */
main {
    display: grid;
    place-items: center;
    padding: 24px;
    position: relative;
    z-index: 1;
}

.container {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Glass Card Effect */
.card {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 32px 40px;
    box-shadow: var(--shadow);
}

/* Hero Section */
.hero-header {
    text-align: center;
    padding: 1rem 0;
}

.hero-header h2 {
    font-size: clamp(24px, 4vw, 36px);
    line-height: 1.2;
    margin: 0 0 12px;
    font-weight: 700;
}

.hero-header .lead {
    font-size: clamp(14px, 2vw, 16px);
    margin: 0;
    line-height: 1.5;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #e9e7ff;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    padding: 6px 12px;
    border-radius: 999px;
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.45);
    margin-bottom: 16px;
}

h1 {
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.05;
    margin: 0 0 16px;
    letter-spacing: 0.2px;
    font-weight: 800;
}

.lead {
    color: var(--muted);
    font-size: clamp(16px, 2.5vw, 20px);
    margin: 0 0 32px;
    line-height: 1.5;
}

/* ============================================
   Home Page - Hero Section
   ============================================ */

.hero-section {
    text-align: center;
    padding: 2rem 0 1rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-1);
    background: rgba(155, 92, 246, 0.15);
    padding: 8px 16px;
    border-radius: 999px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(155, 92, 246, 0.25);
}

.hero-badge svg {
    width: 16px;
    height: 16px;
}

.hero-title {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2), #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(16px, 2vw, 18px);
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ============================================
   Home Page - How It Works Section
   ============================================ */

.how-it-works {
    padding: 1.5rem 0;
}

.steps-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.step:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(155, 92, 246, 0.3);
    transform: translateY(-2px);
}

.step-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.step-content p {
    font-size: 12px;
    color: var(--muted);
    margin: 0;
}

.step-connector {
    display: flex;
    align-items: center;
    color: var(--muted);
    opacity: 0.4;
}

.step-connector svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   Home Page - Upload Section
   ============================================ */

.upload-section {
    padding: 2rem;
}

.upload-header {
    text-align: center;
    margin-bottom: 2rem;
}

.upload-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.upload-header .text-muted {
    color: var(--muted);
    font-size: 14px;
}

.options-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

.option-section {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.option-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.option-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.option-icon {
    width: 20px;
    height: 20px;
    color: var(--brand-1);
}

.divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.divider-text {
    background: var(--bg-surface);
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    border-radius: 8px;
    z-index: 1;
}

.upload-icon-wrapper {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(155, 92, 246, 0.1);
    border-radius: 16px;
}

.upload-icon-wrapper .upload-icon {
    width: 32px;
    height: 32px;
    margin: 0;
}

/* ============================================
   Home Page - Features Section
   ============================================ */

.features-section {
    padding: 2rem 0 1rem;
}

.features-title {
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(155, 92, 246, 0.3);
    transform: translateY(-4px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(155, 92, 246, 0.2), rgba(124, 58, 237, 0.2));
    border-radius: 12px;
    margin-bottom: 1rem;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: var(--brand-1);
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
    margin: 0;
}

/* ============================================
   Home Page - Empty State Compact
   ============================================ */

.empty-state-compact {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.empty-state-compact .empty-state-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    flex-shrink: 0;
}

.empty-state-compact .empty-state-icon svg {
    width: 20px;
    height: 20px;
    color: var(--muted);
}

.empty-state-compact .empty-state-text p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

.empty-state-compact .empty-subtext {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

/* ============================================
   Home Page - Responsive
   ============================================ */

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

    .divider {
        flex-direction: row;
        padding: 0.5rem 0;
    }

    .divider::before {
        top: 50%;
        left: 0;
        right: 0;
        bottom: auto;
        width: 100%;
        height: 1px;
        background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.15), transparent);
    }
}

@media (max-width: 640px) {
    .steps-container {
        flex-direction: column;
        gap: 0.75rem;
    }

    .step-connector {
        transform: rotate(90deg);
    }

    .step {
        width: 100%;
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .hero-section {
        padding: 1rem 0;
    }
}

/* Upload Section */
.upload-box {
    background: rgba(255, 255, 255, 0.04);
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 48px 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-box:hover {
    border-color: var(--brand-1);
    background: rgba(155, 92, 246, 0.08);
    box-shadow: 0 0 0 6px var(--ring);
}

.upload-box.drag-over {
    border-color: var(--brand-1);
    background: rgba(155, 92, 246, 0.12);
    box-shadow: 0 0 0 8px var(--ring);
    transform: scale(1.01);
}

.upload-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
}

.upload-text {
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

.upload-subtext {
    color: var(--muted);
    font-size: 16px;
    margin: 20px 0;
}

.file-info {
    font-size: 14px;
    color: var(--muted);
    margin-top: 24px;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 12px;
    padding: 16px 40px;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.2px;
    color: white;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.5);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary .btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(124, 58, 237, 0.6);
}

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

.btn-secondary {
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 14px 28px;
    font-weight: 600;
    font-size: 16px;
    color: var(--text);
    background: var(--bg-card);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--brand-1);
}

/* Progress Section */
.progress-section {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow);
    animation: slideUp 0.4s ease-out;
}

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

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    min-height: 40px;
}

.progress-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
}

.progress-spinner .typing-indicator {
    padding: 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    border-radius: 999px;
    transition: width 0.4s ease-out;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    text-align: center;
    color: var(--muted);
    font-weight: 500;
    font-size: 16px;
    margin: 0;
}

/* Error Section */
.error-section {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow);
    animation: slideUp 0.4s ease-out;
}

.error-message {
    color: var(--error);
    font-weight: 500;
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(248, 113, 113, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(248, 113, 113, 0.2);
}

/* Footer */
footer {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 20px;
    opacity: 0.8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--muted);
    position: relative;
    z-index: 1;
}

.legal a {
    color: var(--muted);
    text-decoration: none;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
}

/* Viewer Page Styles */
.viewer-body {
    background:
        radial-gradient(1200px 600px at 20% -10%, var(--gradient-glow-1), transparent 60%),
        radial-gradient(1000px 500px at 80% 0%, var(--gradient-glow-2), transparent 60%),
        var(--bg-body);
}

.viewer-main {
    padding: 0;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.viewer-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.viewer-main .viewer-container {
    height: 100%;
    min-height: 0;
    flex: 1;
}

.viewer-header {
    background: var(--sidebar-bg);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.back-link {
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.back-link:hover {
    color: var(--text);
    background: var(--bg-card);
    border-color: var(--brand-1);
}

.home-icon-btn {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text);
    width: 44px;
    height: 44px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    text-decoration: none;
}

.home-icon-btn:hover {
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
}

.home-icon-btn svg {
    width: 22px;
    height: 22px;
}

.slide-counter {
    color: var(--text);
    font-size: 18px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.viewer-controls {
    display: flex;
    gap: 8px;
}

.control-btn {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.control-btn:hover {
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
}

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

/* Slide Container */
.slide-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    min-height: 0;
    overflow: hidden;
}

.slide-display {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.slide-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
    border: 1px solid var(--border-color);
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.spinner {
    width: 56px;
    height: 56px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--brand-1);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Navigation Buttons */
.nav-btn {
    position: absolute;
    background: var(--sidebar-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color-hover);
    color: var(--text);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
}

.nav-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    border-color: transparent;
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.5);
}

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

.nav-btn svg {
    width: 28px;
    height: 28px;
}

.nav-prev {
    left: 32px;
}

.nav-next {
    right: 32px;
}

/* Viewer Footer */
.viewer-footer {
    background: var(--sidebar-bg);
    backdrop-filter: blur(10px);
    padding: 12px;
    box-shadow: var(--shadow);
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.thumbnail-strip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--brand-1) rgba(255, 255, 255, 0.1);
}

.thumbnail-strip::-webkit-scrollbar {
    height: 8px;
}

.thumbnail-strip::-webkit-scrollbar-track {
    background: var(--bg-card);
    border-radius: 999px;
}

.thumbnail-strip::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    border-radius: 999px;
}

.thumbnail {
    flex-shrink: 0;
    width: 120px;
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.04);
}

.thumbnail:hover {
    border-color: var(--brand-1);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
}

.thumbnail.active {
    border-color: var(--brand-1);
    box-shadow: 0 0 0 3px var(--ring);
}

.thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.thumbnail-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    text-align: center;
    padding: 8px 4px;
    font-size: 12px;
    font-weight: 600;
}

/* Viewer Notes Panel */
.viewer-notes-panel {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 1rem;
    flex-shrink: 0;
    max-height: 200px;
    display: flex;
    flex-direction: column;
}

.viewer-notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.viewer-notes-header h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.viewer-notes-actions {
    display: flex;
    gap: 0.5rem;
}

.notes-action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.notes-action-btn svg {
    width: 14px;
    height: 14px;
}

.notes-action-btn:hover {
    background: rgba(155, 92, 246, 0.2);
}

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

.viewer-notes-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.viewer-notes-content .notes-display {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
}

.viewer-notes-content .notes-placeholder {
    color: var(--muted);
    font-style: italic;
}

.viewer-notes-content .notes-editor {
    width: 100%;
    height: 100%;
    min-height: 80px;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-input);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    resize: none;
    font-family: inherit;
}

.viewer-notes-content .notes-editor:focus {
    outline: none;
    border-color: var(--brand-1);
    box-shadow: 0 0 0 2px rgba(155, 92, 246, 0.2);
}

/* Notes toggle button active state */
.control-btn.active {
    background: rgba(155, 92, 246, 0.2);
    color: var(--brand-1);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        gap: 1.5rem;
    }

    .card {
        padding: 24px 20px;
    }

    .upload-box {
        padding: 40px 24px;
    }

    h1 {
        font-size: 32px;
    }

    .nav-btn {
        width: 48px;
        height: 48px;
    }

    .nav-prev {
        left: 16px;
    }

    .nav-next {
        right: 16px;
    }

    .thumbnail {
        width: 100px;
    }

    /* Viewer header: wrap controls on small screens */
    .viewer-header {
        flex-wrap: wrap;
        gap: 8px;
        padding: 8px 12px;
    }

    .viewer-controls {
        gap: 4px;
        flex-wrap: wrap;
    }

    .control-btn {
        width: 36px;
        height: 36px;
    }

    .control-btn svg {
        width: 18px;
        height: 18px;
    }

    .slide-counter {
        font-size: 15px;
    }

    /* Touch-friendly nav buttons */
    .nav-btn {
        width: 44px;
        height: 44px;
        opacity: 0.9;
    }

    .nav-prev { left: 4px; }
    .nav-next { right: 4px; }

    /* Notes panel full-width on mobile */
    .viewer-notes-panel {
        max-height: 40vh;
    }
}

@media (max-width: 480px) {
    .viewer-header {
        padding: 6px 8px;
    }

    .control-btn {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .control-btn svg {
        width: 16px;
        height: 16px;
    }

    .slide-counter {
        font-size: 14px;
    }

    .thumbnail {
        width: 72px;
    }

    .nav-btn {
        width: 36px;
        height: 36px;
    }
}

/* Accessibility */
button:focus-visible,
a:focus-visible,
.nav-btn:focus-visible,
.control-btn:focus-visible {
    outline: 2px solid var(--brand-1);
    outline-offset: 2px;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--brand-1);
    outline-offset: 1px;
    border-color: var(--brand-2);
}

/* Selection */
::selection {
    background: rgba(155, 92, 246, 0.3);
    color: var(--text);
}

/* ============================================ */
/* AI Analysis Page Styles */
/* ============================================ */

/* Analysis Type Selection */
.analysis-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.analysis-type-card {
    position: relative;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.analysis-type-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(155, 92, 246, 0.3);
    transform: translateY(-2px);
}

.analysis-type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.analysis-type-card input[type="radio"]:checked + .type-content {
    border-left-color: var(--brand-1);
}

.analysis-type-card input[type="radio"]:checked ~ .type-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    border-radius: 12px;
    opacity: 0.15;
    pointer-events: none;
}

.type-content {
    position: relative;
    border-left: 3px solid transparent;
    padding-left: 0.75rem;
    transition: border-color 0.3s ease;
}

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

.type-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0;
    color: var(--text);
}

.cache-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: help;
    transition: transform 0.2s ease;
}

.cache-indicator:hover {
    transform: scale(1.1);
}

.cache-indicator svg {
    filter: drop-shadow(0 2px 4px rgba(16, 185, 129, 0.3));
}

.type-content p {
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.4;
}

/* Button Spinner */
.btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 0.5rem;
}

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

/* Results Sections */
.results-section {
    animation: fadeInUp 0.5s ease;
}

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

.result-block {
    margin-top: 2rem;
}

.result-block:first-child {
    margin-top: 0;
}

.result-block h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

.result-block p {
    color: var(--muted);
    line-height: 1.6;
}

/* Tags Container */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    color: white;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Check List */
.check-list {
    list-style: none;
    padding: 0;
}

.check-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--muted);
    line-height: 1.6;
}

.check-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--ok);
    font-weight: bold;
    font-size: 1.125rem;
}

/* Rating Badge */
.rating-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
}

.rating-badge.excellent {
    background: rgba(52, 211, 153, 0.15);
    color: var(--ok);
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.rating-badge.good {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.rating-badge.fair {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.rating-badge.needs-work {
    background: rgba(248, 113, 113, 0.15);
    color: var(--error);
    border: 1px solid rgba(248, 113, 113, 0.3);
}

/* Improvement Cards */
.improvement-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

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

.slide-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.slide-badge.overall {
    background: linear-gradient(135deg, var(--muted), #6b7280);
}

.slide-badge.small {
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    border-radius: 10px;
}

.aspect-slides {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.4rem;
}

.issue-label {
    color: var(--muted);
    font-size: 0.875rem;
}

.improvement-issue {
    color: var(--text);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.improvement-recommendation {
    color: var(--muted);
    padding-left: 1rem;
    border-left: 3px solid rgba(155, 92, 246, 0.4);
}

/* Slide Notes */
.slide-note {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.slide-note p {
    margin-top: 0.5rem;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.info-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-label {
    font-size: 0.875rem;
    color: var(--muted);
}

.info-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
}

/* Recommendation Cards */
.recommendation-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.recommendation-header {
    margin-bottom: 0.75rem;
}

.priority-badge {
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-badge.high {
    background: rgba(248, 113, 113, 0.2);
    color: var(--error);
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.priority-badge.medium {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.priority-badge.low {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.recommendation-text {
    color: var(--text);
    margin: 0.75rem 0;
}

.recommendation-rationale {
    color: var(--muted);
    font-size: 0.875rem;
}

/* Structure Aspects */
.structure-aspect {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

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

.aspect-header h4 {
    margin: 0;
    font-size: 1rem;
}

/* Score Cards */
.scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.score-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
}

.score-label {
    display: block;
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

.score-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
}

.score-value.excellent { color: var(--ok); }
.score-value.good { color: #60a5fa; }
.score-value.fair { color: #fbbf24; }
.score-value.needs-work { color: var(--error); }

.score-badge {
    display: inline-flex;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 1.5rem;
    font-weight: 700;
}

.score-badge.excellent {
    background: rgba(52, 211, 153, 0.15);
    color: var(--ok);
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.score-badge.good {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.score-badge.fair {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.score-badge.needs-work {
    background: rgba(248, 113, 113, 0.15);
    color: var(--error);
    border: 1px solid rgba(248, 113, 113, 0.3);
}

/* Responsive Design for Analysis Page */
@media (max-width: 768px) {
    .analysis-types {
        grid-template-columns: 1fr;
    }

    .scores-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Onboarding Modal Styles
   ============================================ */

.onboarding-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

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

.onboarding-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.onboarding-content {
    position: relative;
    background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-deep) 100%);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 48px;
    max-width: 520px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.onboarding-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.onboarding-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Progress Dots */
.onboarding-progress {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bg-card);
    transition: all 0.3s ease;
}

.progress-dot.active {
    background: var(--brand-1);
}

.progress-dot.current {
    width: 24px;
    border-radius: 4px;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
}

/* Step Content */
.onboarding-step {
    text-align: center;
}

.onboarding-step.animate .onboarding-headline,
.onboarding-step.animate .onboarding-subheadline,
.onboarding-step.animate .onboarding-body,
.onboarding-step.animate .onboarding-journey,
.onboarding-step.animate .onboarding-icon {
    animation: onboardingFadeIn 0.4s ease-out forwards;
}

.onboarding-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(155, 92, 246, 0.2), rgba(124, 58, 237, 0.2));
    border-radius: 16px;
    color: var(--brand-1);
}

.onboarding-icon svg {
    width: 32px;
    height: 32px;
}

.onboarding-headline {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
    letter-spacing: -0.5px;
}

.onboarding-subheadline {
    font-size: 16px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

.onboarding-subheadline em {
    color: var(--brand-1);
    font-style: normal;
    font-weight: 600;
}

.onboarding-body {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 8px;
}

/* Journey Badge (Screen 2) */
.onboarding-journey {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--brand-1);
    background: rgba(155, 92, 246, 0.15);
    padding: 10px 20px;
    border-radius: 999px;
    margin-bottom: 28px;
    border: 1px solid rgba(155, 92, 246, 0.25);
}

/* Features List (Screen 2) */
.onboarding-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
    margin-top: 8px;
}

.onboarding-feature {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    opacity: 0;
    animation: onboardingSlideIn 0.4s ease-out forwards;
}

.onboarding-feature .feature-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(155, 92, 246, 0.15), rgba(124, 58, 237, 0.15));
    border-radius: 10px;
    flex-shrink: 0;
    color: var(--brand-1);
}

.onboarding-feature .feature-icon svg {
    width: 20px;
    height: 20px;
}

.onboarding-feature .feature-content h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text);
}

.onboarding-feature .feature-content p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
    margin: 0;
}

/* Sections List (Screen 3) */
.onboarding-sections {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    margin-top: 24px;
}

.onboarding-section {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    opacity: 0;
    animation: onboardingSlideIn 0.4s ease-out forwards;
}

.onboarding-section .section-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(155, 92, 246, 0.15), rgba(124, 58, 237, 0.15));
    border-radius: 8px;
    flex-shrink: 0;
    color: var(--brand-1);
}

.onboarding-section .section-icon svg {
    width: 18px;
    height: 18px;
}

.onboarding-section .section-content h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--text);
}

.onboarding-section .section-content p {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
    margin: 0;
}

/* Action Buttons */
.onboarding-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.onboarding-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
}

.onboarding-btn.primary {
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    color: white;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
}

.onboarding-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(124, 58, 237, 0.5);
}

.onboarding-btn.primary .btn-arrow {
    transition: transform 0.2s ease;
}

.onboarding-btn.primary:hover .btn-arrow {
    transform: translateX(4px);
}

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

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

/* Animations */
@keyframes onboardingFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes onboardingSlideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive */
@media (max-width: 640px) {
    .onboarding-content {
        padding: 32px 24px;
        margin: 16px;
        max-height: 90vh;
    }

    .onboarding-headline {
        font-size: 24px;
    }

    .onboarding-actions {
        flex-direction: column-reverse;
    }

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

/* ============================================
   Presentations List Styles
   ============================================ */

.presentations-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.search-input {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 0;
    max-width: 100%;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.sort-select {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.sort-select:hover {
    background: var(--bg-card);
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.sort-select option {
    background: var(--bg-surface);
    color: var(--text);
    padding: 0.5rem;
}

.presentations-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.5rem;
}

/* Scrollbar styling for presentations list */
.presentations-list::-webkit-scrollbar {
    width: 8px;
}

.presentations-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.presentations-list::-webkit-scrollbar-thumb {
    background: rgba(155, 92, 246, 0.3);
    border-radius: 4px;
}

.presentations-list::-webkit-scrollbar-thumb:hover {
    background: rgba(155, 92, 246, 0.5);
}

.presentation-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.presentation-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(155, 92, 246, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.15);
}

.presentation-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(155, 92, 246, 0.2) 0%, rgba(124, 58, 237, 0.2) 100%);
    border-radius: 0.75rem;
}

.presentation-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
}

.presentation-details {
    flex: 1 1 0%;
    min-width: 0;
    overflow: hidden;
}

.presentation-title {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: color 0.2s ease;
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.presentation-title:hover {
    color: var(--brand-2);
}

.presentation-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.presentation-meta span {
    display: inline-block;
}

.presentation-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
}

.presentation-item:hover .presentation-actions {
    opacity: 1;
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: rgba(155, 92, 246, 0.2);
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.btn-icon svg {
    width: 18px;
    height: 18px;
    color: var(--text-primary);
}

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

.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    color: var(--text-tertiary);
}

.empty-state p {
    margin: 0.5rem 0;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.empty-subtext {
    font-size: 0.875rem !important;
    color: var(--text-secondary) !important;
}

/* Responsive adjustments for presentations list */
@media (max-width: 1024px) {
    .presentations-controls {
        flex-direction: column;
        width: 100%;
    }

    .search-input,
    .sort-select {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .presentations-list {
        max-height: 400px;
    }

    .presentation-item {
        flex-wrap: wrap;
    }

    .presentation-actions {
        opacity: 1;
        width: 100%;
        justify-content: flex-end;
    }

    .presentation-details {
        width: 100%;
        min-width: 0;
    }

    .presentation-title {
        width: 100%;
    }
}

/* ============================================
   Configuration Page Styles
   ============================================ */

/* Header Navigation */
.header-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

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

.nav-link.active {
    color: var(--text-primary);
    background: rgba(155, 92, 246, 0.15);
}

.nav-link.logout-link {
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.nav-link.logout-link:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.5);
}

/* Config Section */
.config-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.config-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(155, 92, 246, 0.2);
}

.config-title-group {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    flex: 1;
}

.config-icon {
    width: 32px;
    height: 32px;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.config-title-group h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #9b5cf6 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.config-description {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.config-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge.status-custom {
    background: rgba(124, 58, 237, 0.15);
    color: #9b5cf6;
    border: 1px solid rgba(155, 92, 246, 0.3);
}

.status-badge.status-default {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Prompt Tabs */
.prompt-tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem;
    border-radius: 0.75rem;
}

.prompt-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-icon {
    width: 20px;
    height: 20px;
}

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

.prompt-tab.active {
    background: rgba(124, 58, 237, 0.2);
    color: var(--primary);
    border: 1px solid rgba(155, 92, 246, 0.3);
}

/* Prompt Panels */
.prompt-panel {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
}

.prompt-panel.active {
    display: flex;
}

/* Prompt Editor */
.prompt-editor {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.editor-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

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

.prompt-textarea {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    color: var(--text-primary);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9375rem;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
}

.prompt-textarea:focus {
    outline: none;
    border-color: rgba(155, 92, 246, 0.5);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.prompt-textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.prompt-textarea[readonly] {
    cursor: default;
    opacity: 0.7;
}

.prompt-textarea[readonly]:focus {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

/* Config Actions */
.config-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.btn-icon-svg {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
}

/* Info Alert */
.info-alert {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 0.75rem;
}

.info-icon {
    width: 24px;
    height: 24px;
    color: #60a5fa;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.info-content {
    flex: 1;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.info-content strong {
    color: var(--text-primary);
}

.info-content code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    color: #60a5fa;
}

/* Message Alerts */
#messageContainer {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
}

.message-alert {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    background: rgba(15, 15, 20, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.3s ease;
    transition: opacity 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.message-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.message-close {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

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

.message-close svg {
    width: 20px;
    height: 20px;
}

.message-success {
    border-color: rgba(34, 197, 94, 0.3);
}

.message-success .message-icon {
    color: #22c55e;
}

.message-error {
    border-color: rgba(239, 68, 68, 0.3);
}

.message-error .message-icon {
    color: #ef4444;
}

.message-warning {
    border-color: rgba(234, 179, 8, 0.3);
}

.message-warning .message-icon {
    color: #eab308;
}

.message-info {
    border-color: rgba(59, 130, 246, 0.3);
}

.message-info .message-icon {
    color: #3b82f6;
}

/* Button spinner */
.btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 0.5rem;
}

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

/* Restart Server Section */
.restart-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(234, 179, 8, 0.05);
    border: 1px solid rgba(234, 179, 8, 0.2);
    border-radius: 0.75rem;
    margin-top: 1rem;
}

.restart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.restart-title-group {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    flex: 1;
}

.restart-icon {
    width: 28px;
    height: 28px;
    color: #eab308;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.restart-title-group h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.restart-description {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.btn-restart {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
    color: #000;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-restart:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #eab308 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(234, 179, 8, 0.3);
}

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

.btn-restart:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.restart-warning {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.75rem 1rem;
    background: rgba(234, 179, 8, 0.1);
    border-left: 3px solid #eab308;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.warning-icon {
    width: 20px;
    height: 20px;
    color: #eab308;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

/* Responsive adjustments for config page */
@media (max-width: 768px) {
    .config-header {
        flex-direction: column;
    }

    .config-title-group {
        flex-direction: column;
    }

    .config-icon {
        margin-top: 0;
    }

    .config-actions {
        flex-direction: column;
    }

    .config-actions button {
        width: 100%;
    }

    #messageContainer {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }

    .prompt-tabs {
        flex-direction: column;
    }

    .header-nav {
        gap: 0.5rem;
    }

    .nav-link {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }

    .restart-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .restart-title-group {
        width: 100%;
    }

    .btn-restart {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   Chat Interface Styles
   ============================================ */

.chat-body {
    background:
        radial-gradient(1200px 600px at 20% -10%, var(--gradient-glow-1), transparent 60%),
        radial-gradient(1000px 500px at 80% 0%, var(--gradient-glow-2), transparent 60%),
        var(--bg-body);
    overflow: hidden;
    min-height: 100vh;
}

/* Chat Main Content Area (when sidebar is present) */
.chat-main {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(1200px 600px at 20% -10%, var(--gradient-glow-1), transparent 60%),
        radial-gradient(1000px 500px at 80% 0%, var(--gradient-glow-2), transparent 60%),
        var(--bg-body);
}

.chat-main .chat-layout {
    height: 100%;
}

/* Chat Layout with Sidebar */
.chat-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Slides Sidebar */
.chat-slides-sidebar {
    width: 180px;
    background: var(--sidebar-bg);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.chat-slides-sidebar.collapsed {
    width: 0;
    border-right: none;
    overflow: hidden;
}

.slides-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.slides-sidebar-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.slides-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

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

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

.slides-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.slides-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--muted);
}

.slides-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(155, 92, 246, 0.2);
    border-top-color: var(--brand-2);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

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

.slides-error {
    padding: 1rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.875rem;
}

.slide-item {
    margin-bottom: 0.5rem;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
}

.slide-item:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--brand-2);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.slide-item.selected {
    background: rgba(155, 92, 246, 0.15);
    border-color: var(--brand-1);
    box-shadow: 0 0 0 2px rgba(155, 92, 246, 0.3);
}

.slide-item.selected .slide-badge {
    background: var(--brand-1);
    box-shadow: 0 0 8px rgba(155, 92, 246, 0.5);
}

/* Slide Preview Popup */
.slide-preview-popup {
    position: fixed;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.15s ease, transform 0.15s ease;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    max-width: 500px;
    width: 500px;
}

.slide-preview-popup.visible {
    opacity: 1;
    transform: scale(1);
}

.slide-preview-popup img {
    width: 100%;
    height: auto;
    display: block;
}

.slide-preview-popup .slide-preview-label {
    padding: 8px 12px;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    color: white;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

/* Chat sidebar slide thumbnail */
.chat-slides-sidebar .slide-item .slide-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.chat-slides-sidebar .slide-item .slide-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.chat-slides-sidebar .slide-item:hover .slide-thumbnail img {
    transform: scale(1.05);
}

.chat-slides-sidebar .slide-item .slide-thumbnail .slide-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.65rem;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Chat Notes Panel */
.chat-notes-panel {
    flex-shrink: 0;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    max-height: 200px;
    min-height: 120px;
}

.chat-notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.1);
}

.chat-notes-header h4 {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
}

.chat-notes-actions {
    display: flex;
    gap: 4px;
}

.chat-notes-panel .notes-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-notes-panel .notes-action-btn svg {
    width: 14px;
    height: 14px;
}

.chat-notes-panel .notes-action-btn:hover {
    background: rgba(155, 92, 246, 0.2);
    color: var(--brand-1);
}

.chat-notes-content {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0.75rem;
    min-height: 0;
}

.chat-notes-content .notes-display {
    font-size: 12px;
    line-height: 1.5;
    color: var(--text);
}

.chat-notes-content .notes-placeholder {
    color: var(--muted);
    font-style: italic;
    font-size: 11px;
}

.chat-notes-content .notes-editor {
    width: 100%;
    height: 100%;
    min-height: 60px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-input);
    color: var(--text);
    font-size: 12px;
    line-height: 1.5;
    resize: none;
    font-family: inherit;
}

.chat-notes-content .notes-editor:focus {
    outline: none;
    border-color: var(--brand-1);
}

/* Legacy slide-number for other uses */
.slide-number {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted);
    background: rgba(0, 0, 0, 0.2);
}

/* Mobile slides toggle button (hidden on desktop) */
.mobile-slides-toggle {
    display: none;
}

.chat-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100vh;
    min-width: 0;
}

/* Chat Header */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--sidebar-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

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

.chat-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--muted);
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.chat-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    transform: translateX(-2px);
}

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

.chat-header-info {
    min-width: 0;
    flex: 1;
}

.chat-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-subtitle {
    margin: 0;
    font-size: 0.875rem;
    color: var(--muted);
}

.chat-header-actions {
    display: flex;
    gap: 0.5rem;
}

.chat-header-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-header-btn:hover {
    background: var(--bg-card);
    color: var(--text);
}

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

/* Chat Messages Area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Individual Chat Message */
.chat-message {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    max-width: 100%;
    animation: fadeIn 0.3s ease;
}

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

/* Message Avatar */
.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9b5cf6 0%, #7c3aed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.message-avatar svg {
    width: 20px;
    height: 20px;
    color: white;
}

.user-avatar {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.error-avatar {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Message Content */
.message-content {
    flex: 1;
    min-width: 0;
}

.message-text {
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    color: var(--text);
    line-height: 1.6;
    word-wrap: break-word;
}

.message-text p {
    margin: 0 0 0.75rem 0;
}

.message-text p:last-child {
    margin-bottom: 0;
}

.message-text ul, .message-text ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.message-text li {
    margin: 0.5rem 0;
}

.message-text strong {
    color: var(--text);
    font-weight: 600;
}

.message-text code {
    background: rgba(0, 0, 0, 0.4);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875em;
    color: var(--brand-1);
}

/* User Message Styling */
.user-message {
    flex-direction: row-reverse;
}

.user-message .message-text {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Error Message Styling */
.error-message .message-text {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.error-text {
    color: #fca5a5 !important;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--brand-1);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Chat Input Container */
.chat-input-container {
    flex-shrink: 0;
    padding: 1.5rem;
    background: var(--sidebar-bg);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
}

.chat-input-wrapper {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    max-width: 900px;
    margin: 0 auto;
}

.chat-input-area {
    flex: 1;
    position: relative;
}

.chat-input {
    width: 100%;
    min-height: 52px;
    max-height: 200px;
    padding: 0.875rem 3rem 0.875rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    color: var(--text);
    font-family: inherit;
    font-size: 0.9375rem;
    line-height: 1.5;
    resize: none;
    transition: all 0.3s ease;
}

.chat-input:focus {
    outline: none;
    background: var(--bg-card);
    border-color: var(--brand-2);
    box-shadow: 0 0 0 3px var(--ring);
}

.chat-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.chat-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-clear-input-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    opacity: 0.7;
    z-index: 1;
}

.chat-clear-input-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text);
    opacity: 1;
}

.chat-clear-input-btn.hidden {
    display: none;
}

.chat-clear-input-btn svg {
    width: 14px;
    height: 14px;
}

.chat-voice-btn {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-right: 0.5rem;
    position: relative;
}

.chat-voice-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.chat-voice-btn:active:not(:disabled) {
    transform: translateY(0);
}

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

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

.chat-voice-btn .hidden {
    display: none;
}

/* Recording state */
.chat-voice-btn.recording {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    animation: pulse-recording 2s ease-in-out infinite;
}

.chat-voice-btn.recording:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
}

@keyframes pulse-recording {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
}

.chat-send-btn {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-1) 0%, var(--brand-2) 100%);
    border: none;
    border-radius: 0.75rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.chat-send-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #a78bfa 0%, var(--brand-1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
}

.chat-send-btn:active:not(:disabled) {
    transform: translateY(0);
}

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

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

.chat-input-hint {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: var(--muted);
    min-height: 1.5rem;
}

.chat-input-hint kbd {
    padding: 0.125rem 0.375rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    font-family: inherit;
    font-size: 0.75rem;
    color: var(--text);
}

/* Recording pulse indicator */
.recording-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    margin-right: 0.5rem;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* Loading State */
.chat-loading {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.chat-cancel-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 0.5rem;
    color: #ef4444;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-cancel-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #f87171;
    transform: translateY(-1px);
}

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

.chat-cancel-btn svg {
    width: 18px;
    height: 18px;
}

/* Scrollbar Styling for Chat Messages */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Responsive Design for Chat */
@media (max-width: 768px) {
    /* Hide slides sidebar on mobile by default */
    .chat-slides-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 1000;
        transform: translateX(-100%);
        width: 280px;
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.3);
    }

    .chat-slides-sidebar:not(.collapsed) {
        transform: translateX(0);
    }

    .chat-slides-sidebar.collapsed {
        transform: translateX(-100%);
        width: 280px;
    }

    /* Show mobile toggle button */
    .mobile-slides-toggle {
        display: flex;
    }

    /* Hide desktop toggle button */
    .slides-toggle-btn {
        display: none;
    }

    .chat-layout {
        flex-direction: column;
    }

    .chat-container {
        width: 100%;
    }

    .chat-header {
        padding: 1rem;
    }

    .chat-title {
        font-size: 1rem;
    }

    .chat-subtitle {
        font-size: 0.8125rem;
        display: none;
    }

    .chat-messages {
        padding: 1rem;
        gap: 1rem;
    }

    .chat-message {
        gap: 0.75rem;
    }

    .message-avatar {
        width: 32px;
        height: 32px;
    }

    .message-avatar svg {
        width: 18px;
        height: 18px;
    }

    .message-text {
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
    }

    .chat-input-container {
        padding: 1rem;
    }

    .chat-input, .chat-send-btn, .chat-voice-btn {
        height: 48px;
        min-height: 48px;
    }

    .chat-send-btn, .chat-voice-btn {
        width: 48px;
    }

    .chat-voice-btn {
        margin-right: 0.375rem;
    }

    .chat-input-hint {
        font-size: 0.6875rem;
    }

    .slide-item {
        margin-bottom: 0.5rem;
    }

    .slide-number {
        padding: 0.375rem 0.5rem;
    }
}

/* Overlay when slides sidebar is open on mobile */
@media (max-width: 768px) {
    .chat-layout::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(2px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: 999;
    }

    .chat-slides-sidebar:not(.collapsed) ~ * .chat-layout::before,
    .chat-layout:has(.chat-slides-sidebar:not(.collapsed))::before {
        opacity: 1;
        pointer-events: auto;
    }
}

/* ============================================
   Utility Classes
   ============================================ */

/* Display utilities */
.hidden {
    display: none;
}

.inline-flex {
    display: inline-flex;
}

.flex {
    display: flex;
}

.block {
    display: block;
}

/* Spacing utilities */
.mb-1 {
    margin-bottom: 1rem;
}

.mb-1-5 {
    margin-bottom: 1.5rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mt-4px {
    margin-top: 4px;
}

/* Width utilities */
.w-full {
    width: 100%;
}

.max-w-1200 {
    max-width: 1200px;
}

/* Text utilities */
.text-muted {
    color: var(--muted);
}

.text-small {
    font-size: 12px;
}

.text-sm {
    font-size: 14px;
}

.no-underline {
    text-decoration: none;
}

/* Flexbox utilities */
.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-0-5 {
    gap: 0.5rem;
}

.gap-1 {
    gap: 1rem;
}

.mb-0-5 {
    margin-bottom: 0.5rem;
}

/* Icon sizing */
.icon-16 {
    width: 16px;
    height: 16px;
}

.icon-20 {
    width: 20px;
    height: 20px;
}

/* Misc utilities */
.border-radius-4 {
    border-radius: 4px;
}

.vertical-align-minus-3 {
    vertical-align: -3px;
}

/* Breadcrumb nav */
.breadcrumb-nav {
    margin-bottom: 1.5rem;
}

.breadcrumb-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.breadcrumb-link:hover {
    color: var(--text);
}

/* Small helper text */
.helper-text {
    color: var(--muted);
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

/* Strong text with proper color */
.text-strong {
    color: var(--text);
    font-weight: 600;
}

/* ===================================
   Dashboard Styles
   =================================== */

/* Stats Grid - Summary Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(155, 92, 246, 0.4);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.2);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.stat-label {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Improvement Table */
.improvement-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.improvement-table th,
.improvement-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.improvement-table th {
    font-weight: 600;
    color: var(--muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.improvement-table td {
    color: var(--text);
}

.improvement-table tr:hover {
    background: rgba(255,255,255,0.03);
}

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

/* Success/Danger indicators */
.text-success {
    color: var(--ok);
    font-weight: 600;
}

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

/* Activity Feed */
.activity-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: background 0.2s ease;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background: rgba(255,255,255,0.03);
}

.activity-icon {
    width: 20px;
    height: 20px;
    margin-right: 1rem;
    flex-shrink: 0;
    color: var(--brand-1);
}

.activity-icon svg {
    width: 100%;
    height: 100%;
}

.activity-content {
    flex: 1;
}

.activity-content strong {
    color: var(--text);
    font-weight: 600;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(155, 92, 246, 0.2);
    border-top-color: var(--brand-1);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Chart containers */
canvas {
    max-height: 400px;
}

/* Empty state styling */
#emptyState {
    animation: fadeIn 0.5s ease;
}

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

/* ============================================
   PRACTICE MODE STYLES
   ============================================ */

.practice-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.practice-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Practice Header */
.practice-header {
    background: var(--sidebar-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

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

.practice-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.practice-back-btn:hover {
    background: var(--bg-card);
    border-color: var(--border-color-hover);
    transform: translateX(-2px);
}

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

.practice-info {
    flex: 1;
    min-width: 0;
}

.practice-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slide-counter {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 500;
}

.practice-header-center {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.practice-timer {
    text-align: center;
}

.timer-display {
    font-size: 2rem;
    font-weight: 700;
    color: var(--brand-1);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
}

.slide-timer .timer-display {
    color: var(--muted);
    font-size: 1.5rem;
}

.timer-label {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

.practice-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.practice-control-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--brand-2) 0%, var(--brand-1) 100%);
    border: none;
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.practice-control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.4);
}

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

.practice-control-btn.practicing {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    animation: pulse-practicing 2s ease-in-out infinite;
}

@keyframes pulse-practicing {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(239, 68, 68, 0.6);
    }
}

.practice-control-btn.secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(155, 92, 246, 0.3);
    box-shadow: none;
}

.practice-control-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(155, 92, 246, 0.5);
}

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

.practice-control-btn .hidden {
    display: none;
}

/* Main Practice Area */
.practice-main {
    flex: 1;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* Slide Section */
.practice-slide-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: hidden;
}

.practice-slide-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
}

.practice-slide-display {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.practice-slide-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.3s;
    border-radius: 8px;
}

.practice-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--sidebar-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text);
    z-index: 10;
}

.practice-nav-btn:hover:not(:disabled) {
    background: rgba(155, 92, 246, 0.2);
    border-color: rgba(155, 92, 246, 0.5);
    transform: translateY(-50%) scale(1.1);
}

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

.practice-nav-btn svg {
    width: 24px;
    height: 24px;
}

.practice-nav-btn.nav-prev {
    left: 1rem;
}

.practice-nav-btn.nav-next {
    right: 1rem;
}

/* Slide Progress Bar */
.slide-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.slide-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-2) 0%, var(--brand-1) 100%);
    transition: width 0.3s;
    border-radius: 3px;
}

/* Notes Section */
.practice-notes-section {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

/* CoPresenter Branding */
.notes-branding {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(155, 92, 246, 0.15);
}

.copresenter-logo {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 8px rgba(124, 58, 237, 0.4));
    flex-shrink: 0;
}

.copresenter-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.3px;
}

/* Notes Footer (Speaker Notes label and buttons at bottom) */
.notes-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(155, 92, 246, 0.2);
}

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

/* Legacy - keep for backwards compatibility */
.notes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(155, 92, 246, 0.2);
}

.notes-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.notes-edit-btn,
.notes-save-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(155, 92, 246, 0.3);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.notes-edit-btn:hover,
.notes-save-btn:hover {
    background: rgba(155, 92, 246, 0.1);
    border-color: rgba(155, 92, 246, 0.5);
}

.notes-save-btn {
    background: linear-gradient(135deg, var(--ok) 0%, #10b981 100%);
    border-color: var(--ok);
}

.notes-save-btn:hover {
    background: linear-gradient(135deg, #10b981 0%, var(--ok) 100%);
}

.notes-edit-btn svg,
.notes-save-btn svg {
    width: 16px;
    height: 16px;
}

.notes-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notes-display {
    flex: 1;
    padding: 1.25rem;
    overflow-y: auto;
    line-height: 1.6;
    color: var(--text);
}

.notes-display p {
    margin: 0 0 1rem 0;
}

.notes-placeholder {
    color: var(--muted);
    font-style: italic;
    opacity: 0.7;
}

.notes-editor {
    flex: 1;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: none;
    outline: none;
}

.notes-editor::placeholder {
    color: var(--muted);
    opacity: 0.5;
}

/* Loading Spinner */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(155, 92, 246, 0.2);
    border-top-color: var(--brand-1);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ── Coaching Panel ─────────────────────────────────────── */

.coaching-btn.active {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    border-color: #ef4444 !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.coaching-panel {
    display: flex;
    flex-direction: column;
    background: var(--card-bg, rgba(255,255,255,0.04));
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-left: 3px solid #6366f1;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    max-height: 300px;
    overflow: hidden;
    gap: 0.5rem;
}

.coaching-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.coaching-status {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted, #94a3b8);
    min-width: 0;
}

.coaching-status-text {
    line-height: 1.3;
}

.coaching-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #64748b;
    flex-shrink: 0;
}

.coaching-dot.listening {
    background: #ef4444;
    animation: coaching-pulse 1.4s ease-in-out infinite;
}

.coaching-dot.loading {
    background: #f59e0b;
    animation: coaching-pulse 1s ease-in-out infinite;
}

.coaching-dot.error {
    background: #ef4444;
}

@keyframes coaching-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50%      { box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
}

.coaching-close-btn {
    background: none;
    border: none;
    color: var(--muted, #94a3b8);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
}

.coaching-close-btn:hover {
    color: var(--text, #e2e8f0);
}

/* Progress */
.coaching-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.coaching-progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    overflow: hidden;
}

.coaching-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366f1, #22c55e);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.coaching-progress-text {
    font-size: 0.75rem;
    color: var(--muted, #94a3b8);
    white-space: nowrap;
}

/* Topic list */
.coaching-topic-items {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.coaching-placeholder {
    font-size: 0.85rem;
    color: var(--muted, #94a3b8);
    text-align: center;
    padding: 1rem 0;
    margin: 0;
}

.coaching-topic-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.4rem;
    border-radius: 6px;
    transition: opacity 0.3s, background 0.2s;
}

.coaching-topic-item:hover {
    background: rgba(255,255,255,0.03);
}

.coaching-topic-item.covered {
    opacity: 0.5;
}

.coaching-topic-item.covered .coaching-topic-label {
    text-decoration: line-through;
    color: #22c55e;
}

.coaching-topic-item svg.coaching-check,
.coaching-topic-item svg.coaching-circle {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.coaching-topic-item svg.coaching-check {
    color: #22c55e;
}

.coaching-topic-item svg.coaching-circle {
    color: var(--muted, #94a3b8);
}

.coaching-topic-label {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text, #e2e8f0);
}

.coaching-importance-badge {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    letter-spacing: 0.04em;
}

.importance-high {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.importance-medium {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.importance-low {
    background: rgba(100, 116, 139, 0.15);
    color: #94a3b8;
}

/* Transcript preview */
.coaching-transcript-preview {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--muted, #94a3b8);
    overflow: hidden;
}

.coaching-transcript-label {
    flex-shrink: 0;
    font-weight: 600;
    opacity: 0.7;
}

.coaching-transcript-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================
   Coaching Review Modal
   ============================================ */

.coaching-review-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.coaching-review-modal.show {
    display: flex;
}

.coaching-review-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
}

.coaching-review-content {
    position: relative;
    max-width: 540px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    background: var(--card-bg, var(--bg-surface, #1e293b));
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.coaching-review-content::-webkit-scrollbar {
    display: none;
}

.coaching-review-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.coaching-review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.25rem;
}

.coaching-review-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

/* Score section */
.coaching-review-score {
    text-align: center;
    margin-bottom: 1.5rem;
}

.coaching-review-pct {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.75rem;
}

.score-green .coaching-review-pct {
    color: #34d399;
}

.score-amber .coaching-review-pct {
    color: #fbbf24;
}

.score-red .coaching-review-pct {
    color: #f87171;
}

.coaching-review-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.coaching-review-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--brand-1, #9b5cf6), var(--brand-2, #7c3aed));
    transition: width 0.5s ease;
}

.score-green .coaching-review-bar-fill {
    background: linear-gradient(90deg, #34d399, #10b981);
}

.score-amber .coaching-review-bar-fill {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.score-red .coaching-review-bar-fill {
    background: linear-gradient(90deg, #f87171, #ef4444);
}

.coaching-review-count {
    font-size: 0.85rem;
    color: var(--muted, #94a3b8);
}

/* Congratulations state */
.coaching-review-congrats {
    text-align: center;
    padding: 2rem 1rem;
}

.coaching-review-congrats-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
    border-radius: 50%;
    font-size: 1.75rem;
    font-weight: 700;
}

.coaching-review-congrats p {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* Missed topics section */
.coaching-review-missed h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.75rem 0;
}

.coaching-review-slide {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

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

.coaching-review-slide-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--brand-1, #9b5cf6), var(--brand-2, #7c3aed));
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    flex-shrink: 0;
}

.coaching-review-slide-title {
    font-size: 0.8rem;
    color: var(--muted, #94a3b8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.coaching-review-missed-topic {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
}

.coaching-review-missed-topic svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--muted, #94a3b8);
    opacity: 0.5;
}

.coaching-review-topic-label {
    flex: 1;
    font-size: 0.8rem;
    color: var(--text);
}

/* Suggestions */
.coaching-review-suggestions {
    margin-top: 1.25rem;
    padding: 0.75rem 1rem;
    background: rgba(155, 92, 246, 0.08);
    border-left: 3px solid var(--brand-1, #9b5cf6);
    border-radius: 0 8px 8px 0;
}

.coaching-review-suggestions p {
    font-size: 0.8rem;
    color: var(--text);
    line-height: 1.5;
    margin: 0 0 0.35rem 0;
}

.coaching-review-suggestions p:last-child {
    margin-bottom: 0;
}

/* Coaching Session History */
.coaching-history {
    border-top: 1px solid var(--border, rgba(0,0,0,0.1));
    padding: 0.75rem 0.75rem 0.5rem;
    margin-top: 0.5rem;
}

.coaching-history-header {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim, #888);
    margin-bottom: 0.5rem;
}

.coaching-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.coaching-history-entry {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.coaching-history-date {
    flex: 0 0 auto;
    color: var(--text-dim, #888);
    min-width: 3.5rem;
}

.coaching-history-bar {
    flex: 1 1 auto;
    height: 6px;
    background: var(--border, rgba(0,0,0,0.1));
    border-radius: 3px;
    overflow: hidden;
}

.coaching-history-bar-fill {
    display: block;
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.coaching-history-bar-fill.score-green { background: #22c55e; }
.coaching-history-bar-fill.score-amber { background: #f59e0b; }
.coaching-history-bar-fill.score-red   { background: #ef4444; }

.coaching-history-pct {
    flex: 0 0 auto;
    font-weight: 600;
    font-size: 0.7rem;
    min-width: 5rem;
    text-align: right;
}

.coaching-history-pct.score-green { color: #22c55e; }
.coaching-history-pct.score-amber { color: #f59e0b; }
.coaching-history-pct.score-red   { color: #ef4444; }

/* History section in notes panel */
.practice-notes-section .coaching-history {
    margin: 0.75rem 0;
    padding: 0.75rem;
    background: rgba(124, 58, 237, 0.04);
    border: 1px solid rgba(124, 58, 237, 0.1);
    border-radius: 10px;
}

.practice-notes-section .coaching-history-header {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--brand-2);
    margin-bottom: 0.5rem;
}

.coaching-history-entry:hover {
    background: rgba(124, 58, 237, 0.06);
    border-radius: 6px;
    margin: -2px -4px;
    padding: 2px 4px;
}

.coaching-compare-btn {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 8px;
    color: var(--brand-2);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.coaching-compare-btn:hover {
    background: rgba(124, 58, 237, 0.18);
    border-color: var(--brand-2);
}

/* Session review extras */
.coaching-review-date {
    text-align: center;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 1rem;
}

.coaching-review-duration {
    text-align: center;
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.5rem;
}

/* Comparison view */
.coaching-compare-header {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.25rem;
}

.coaching-compare-scores {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.coaching-compare-col {
    text-align: center;
    flex: 1;
}

.coaching-compare-label {
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.coaching-compare-arrow {
    flex-shrink: 0;
    font-size: 1.5rem;
    color: var(--muted);
}

.coaching-compare-diff {
    font-size: 1.1rem;
    font-weight: 700;
}

.coaching-compare-section {
    margin-bottom: 1rem;
}

.coaching-compare-section h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.coaching-compare-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.coaching-compare-item {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0;
    color: var(--text);
}

.coaching-compare-item.improved { color: #22c55e; }
.coaching-compare-item.regressed { color: #ef4444; }
.coaching-compare-item.still-missed { color: var(--muted); }

/* Hidden utility */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .practice-header {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .practice-header-center {
        order: 3;
        width: 100%;
        justify-content: center;
        padding-top: 0.5rem;
        border-top: 1px solid var(--border-color);
    }
}

@media (max-width: 968px) {
    .practice-main {
        grid-template-columns: 1fr;
        grid-template-rows: 2fr 1fr;
    }

    .practice-header-center {
        gap: 1rem;
    }

    .timer-display {
        font-size: 1.5rem;
    }

    .slide-timer .timer-display {
        font-size: 1.2rem;
    }
}

@media (max-width: 640px) {
    .practice-header {
        padding: 0.75rem 1rem;
    }

    .practice-title {
        font-size: 0.95rem;
    }

    .practice-back-btn span {
        display: none;
    }

    .practice-control-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .practice-control-btn span {
        display: none;
    }

    .practice-main {
        padding: 1rem;
        gap: 1rem;
    }

    .timer-display {
        font-size: 1.3rem;
    }

    .slide-timer .timer-display {
        font-size: 1rem;
    }

    .practice-nav-btn {
        width: 40px;
        height: 40px;
    }

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

/* ============================================
   Presentation Details Page Styles
   ============================================ */

/* Presentation Header */
.presentation-header {
    text-align: center;
}

.presentation-header .presentation-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
    word-break: break-word;
}

.presentation-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.stat-icon {
    width: 20px;
    height: 20px;
    color: var(--brand-1);
}

/* Quick Actions Grid */
.quick-actions h2 {
    margin-bottom: 1rem;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.action-card {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
    cursor: pointer;
}

.action-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--brand-1);
    transform: translateY(-1px);
}

.action-icon {
    width: 22px;
    height: 22px;
    color: var(--brand-1);
    margin-bottom: 0.4rem;
}

.action-card h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.action-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Overview Section */
.overview-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.overview-section .section-header-collapsible:has(+ .overview-content.hidden) {
    margin-bottom: 0;
}

.overview-section h2 {
    margin: 0;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge.success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.overview-content {
    position: relative;
}

.overview-content .loading-state,
.overview-content #overviewResults {
    min-height: 150px;
}

.overview-text {
    color: var(--text);
    line-height: 1.6;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
    color: var(--text-secondary);
}

.loading-state p {
    margin-top: 1rem;
}

.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
    color: var(--error);
}

.error-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}

.error-state p {
    color: var(--text-secondary);
}

/* Overview Empty State */
.overview-empty-state {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 0;
}

.overview-empty-state .empty-state-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.overview-empty-state .empty-icon {
    width: 36px;
    height: 36px;
    color: var(--brand-1);
    flex-shrink: 0;
    opacity: 0.8;
}

.overview-empty-state .empty-text h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.25rem 0;
}

.overview-empty-state .empty-text p {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
}

.overview-empty-state .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.overview-empty-state .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.overview-empty-state .btn-primary .btn-icon {
    width: 18px;
    height: 18px;
}

@media (max-width: 600px) {
    .overview-empty-state {
        flex-direction: column;
        text-align: center;
    }

    .overview-empty-state .empty-state-content {
        flex-direction: column;
    }
}

/* Slides List */
.slides-list h2 {
    margin-bottom: 1.5rem;
}

.slides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

/* Slide Card with Thumbnail */
.slide-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
    overflow: hidden;
}

.slide-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--brand-1);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.15);
}

.slide-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.slide-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.slide-card:hover .slide-thumbnail img {
    transform: scale(1.05);
}

.slide-thumbnail.thumbnail-error {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 58, 237, 0.1);
}

.slide-thumbnail.thumbnail-error::after {
    content: 'Preview unavailable';
    color: var(--muted);
    font-size: 0.85rem;
}

.slide-thumbnail.thumbnail-error img {
    display: none;
}

.slide-card .slide-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.slide-card .slide-info {
    padding: 1rem;
    flex: 1;
    min-width: 0;
}

.slide-card .slide-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.slide-card .slide-preview {
    font-size: 0.8rem;
    color: var(--muted);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

/* Legacy slide-item styles (keep for backwards compatibility) */
.slide-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

.slide-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--brand-1);
    transform: translateX(4px);
}

.slide-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
}

.slide-info {
    flex: 1;
    min-width: 0;
}

.slide-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slide-preview {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .presentation-header .presentation-title {
        font-size: 1.5rem;
    }

    .action-grid {
        grid-template-columns: 1fr;
    }

    .slides-grid {
        grid-template-columns: 1fr;
    }

    .presentation-stats {
        gap: 1rem;
    }
}

/* ============================================
   Presentation Thumbnails
   ============================================ */

.presentation-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 0.5rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.presentation-thumbnail {
    position: relative;
}

.presentation-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.processing-badge {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 600;
    color: var(--brand-2);
    letter-spacing: 0.5px;
}

.spinner-small {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(155, 92, 246, 0.3);
    border-top-color: var(--brand-2);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.processing-text {
    color: var(--brand-2);
    font-weight: 500;
}

.presentation-thumbnail img.loading {
    opacity: 0;
}

.presentation-thumbnail .thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(155, 92, 246, 0.2) 0%, rgba(124, 58, 237, 0.2) 100%);
}

.presentation-thumbnail .thumbnail-placeholder svg {
    width: 24px;
    height: 24px;
    color: var(--brand-1);
}

.presentation-item:hover .presentation-thumbnail img {
    transform: scale(1.05);
}

/* Grid layout for presentations with thumbnails */
.presentations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.presentations-grid .presentation-item {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
}

.presentations-grid .presentation-thumbnail {
    width: 100%;
    height: 140px;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
}

.presentations-grid .presentation-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.presentations-grid .presentation-details {
    width: 100%;
}

.presentations-grid .presentation-actions {
    opacity: 1;
    position: relative;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

/* View toggle buttons */
.view-toggle {
    display: flex;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    padding: 0.25rem;
}

.view-toggle button {
    padding: 0.4rem 0.6rem;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.view-toggle button:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.view-toggle button.active {
    color: var(--text);
    background: rgba(155, 92, 246, 0.2);
}

.view-toggle button svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 640px) {
    .presentations-grid {
        grid-template-columns: 1fr;
    }

    .presentation-thumbnail {
        width: 60px;
        height: 45px;
    }
}

/* ============================================
   Presenter View Styles
   ============================================ */

body.presenter-body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--bg-deep);
}

.presenter-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

/* Presenter Header */
.presenter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
    flex-shrink: 0;
}

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

.presenter-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    transition: all 0.2s ease;
}

.presenter-back-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}

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

.presenter-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.presenter-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.presenter-header .slide-counter {
    font-size: 12px;
    color: var(--muted);
}

.presenter-header-center {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.presenter-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.presenter-timer .timer-display {
    font-size: 28px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    letter-spacing: 0.5px;
}

.presenter-timer .timer-label {
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.presenter-timer.slide-timer .timer-display {
    font-size: 20px;
    color: var(--brand-1);
}

.presenter-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.presenter-control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 500;
}

.presenter-control-btn svg {
    width: 18px;
    height: 18px;
}

.presenter-control-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.presenter-control-btn.running {
    background: rgba(52, 211, 153, 0.2);
    color: #34d399;
}

.presenter-control-btn.secondary {
    background: transparent;
    color: var(--muted);
}

.presenter-control-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.presenter-control-btn.primary {
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    color: white;
}

.presenter-control-btn.primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.presenter-control-btn .btn-text {
    display: inline;
}

/* Presenter Main Area */
.presenter-main {
    display: flex;
    flex: 1;
    gap: 1rem;
    padding: 1rem;
    min-height: 0;
    overflow: hidden;
}

/* Current Slide Section */
.presenter-current-slide-section {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.presenter-current-slide-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    min-height: 0;
}

.presenter-slide-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.2s ease;
}

/* Navigation under current slide */
.presenter-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    background: var(--bg-surface);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.presenter-nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 500;
}

.presenter-nav-btn svg {
    width: 18px;
    height: 18px;
}

.presenter-nav-btn:hover:not(:disabled) {
    background: rgba(155, 92, 246, 0.2);
}

.presenter-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.presenter-slide-indicator {
    font-size: 14px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* Side Panel: Next Slide + Notes */
.presenter-side-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 280px;
    max-width: 400px;
    min-height: 0;
}

.presenter-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    margin: 0 0 0.5rem;
}

/* Next Slide Preview */
.presenter-next-slide-section {
    flex-shrink: 0;
}

.presenter-next-slide-container {
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.presenter-next-slide-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.presenter-next-slide-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--ok);
    font-size: 13px;
}

.presenter-next-slide-placeholder svg {
    width: 32px;
    height: 32px;
}

/* Speaker Notes */
.presenter-notes-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.presenter-notes-container {
    flex: 1;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    min-height: 0;
}

.presenter-notes-content {
    height: 100%;
    padding: 1rem;
    overflow-y: auto;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
}

.presenter-notes-content.empty {
    display: flex;
    align-items: center;
    justify-content: center;
}

.presenter-notes-content .notes-placeholder {
    color: var(--muted);
    font-style: italic;
    text-align: center;
}

/* Thumbnail Strip Footer */
.presenter-footer {
    flex-shrink: 0;
    padding: 0.75rem 1rem;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
}

.presenter-thumbnail-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.presenter-thumbnail-strip::-webkit-scrollbar {
    height: 6px;
}

.presenter-thumbnail-strip::-webkit-scrollbar-track {
    background: transparent;
}

.presenter-thumbnail-strip::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.presenter-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 45px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

.presenter-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.presenter-thumbnail:hover {
    border-color: var(--border-color-hover);
    transform: scale(1.05);
}

.presenter-thumbnail.active {
    border-color: var(--brand-1);
    box-shadow: 0 0 0 2px rgba(155, 92, 246, 0.3);
}

.presenter-thumbnail-label {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 10px;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Audience Connection Status */
.audience-status {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 12px;
    color: var(--muted);
    z-index: 100;
}

.audience-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--muted);
}

.audience-status.connected .status-dot {
    background: var(--ok);
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 4px rgba(52, 211, 153, 0.3); }
    50% { box-shadow: 0 0 12px rgba(52, 211, 153, 0.7); }
}

.audience-status.connected .status-text {
    color: var(--ok);
}

/* Responsive Presenter View */
@media (max-width: 1024px) {
    .presenter-main {
        flex-direction: column;
    }

    .presenter-side-panel {
        flex-direction: row;
        max-width: none;
        min-width: 0;
    }

    .presenter-next-slide-section,
    .presenter-notes-section {
        flex: 1;
        min-width: 0;
    }

    .presenter-next-slide-container {
        aspect-ratio: 16/9;
        height: auto;
    }
}

@media (max-width: 768px) {
    .presenter-header {
        flex-wrap: wrap;
        padding: 0.5rem;
    }

    .presenter-header-center {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }

    .presenter-control-btn .btn-text {
        display: none;
    }

    .presenter-side-panel {
        flex-direction: column;
    }

    .presenter-thumbnail {
        width: 60px;
        height: 34px;
    }
}

/* Light mode adjustments */
[data-theme="light"] .presenter-current-slide-container,
[data-theme="light"] .presenter-next-slide-container {
    border: 1px solid var(--border-color);
}

[data-theme="light"] .audience-status {
    background: white;
}
