
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #090d16;
    color: #f1f5f9;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    user-select: none;
}

/* Header Bar */
header {
    height: 52px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 13.5pt;
    color: #ffffff;
}

.brand-badge {
    background: #2563eb;
    color: white;
    font-size: 7.5pt;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
}

.brand-title {
    font-size: 10pt;
    color: #cbd5e1;
    font-weight: 600;
}

.center-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-indicator-pill {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #60a5fa;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 8.5pt;
    font-weight: 700;
    white-space: nowrap;
}

.section-title-display {
    font-size: 9.5pt;
    font-weight: 600;
    color: #f8fafc;
    max-width: 380px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Mode Switch Group */
.mode-switch-group {
    display: flex;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 6px;
    overflow: hidden;
    padding: 2px;
}

.btn-mode {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 4px 10px;
    font-size: 8pt;
    font-weight: 700;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.btn-mode:hover {
    color: #f8fafc;
}

.btn-mode.active {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
}

.btn-header {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    font-size: 8.5pt;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-header:hover {
    background: #2563eb;
    border-color: #3b82f6;
    color: #ffffff;
}

.btn-back-main {
    background: rgba(56, 189, 248, 0.15) !important;
    border: 1px solid rgba(56, 189, 248, 0.45) !important;
    color: #38bdf8 !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.15) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 14px !important;
    border-radius: 6px !important;
    font-size: 8.5pt !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.btn-back-main:hover {
    background: #38bdf8 !important;
    border-color: #38bdf8 !important;
    color: #040711 !important;
    transform: translateY(-1px);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.5) !important;
}

.btn-fs-trigger {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    font-weight: 700;
}

.btn-fs-trigger:hover {
    background: #38bdf8;
    color: #040711;
}

.btn-pdf {
    background: #0284c7;
    border-color: #38bdf8;
    color: #ffffff;
}

/* Main Workspace */
main {
    flex: 1;
    display: flex;
    position: relative;
    overflow: hidden;
}

/* Central Stage */
.stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 50%, #0c1426 0%, #040711 100%);
    position: relative;
    padding: 14px;
    overflow: hidden;
}

.slide-wrapper {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: zoom-in;
}

.slide-img {
    max-width: 100%;
    max-height: calc(100vh - 150px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.8), 0 0 25px rgba(37, 99, 235, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.slide-wrapper:hover .slide-img {
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.9), 0 0 35px rgba(56, 189, 248, 0.35);
}

.fullscreen-hover-badge {
    position: absolute;
    bottom: 18px;
    right: 18px;
    background: rgba(15, 23, 42, 0.9);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.45);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 8pt;
    font-weight: 700;
    letter-spacing: 0.3px;
    backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(6px);
    transition: all 0.2s ease;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
}

.slide-wrapper:hover .fullscreen-hover-badge {
    opacity: 1;
    transform: translateY(0);
}

/* Nav Arrows on Stage */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    width: 44px;
    height: 68px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20pt;
    z-index: 20;
    transition: all 0.2s ease;
}

.nav-arrow:hover {
    background: #2563eb;
    border-color: #38bdf8;
    transform: translateY(-50%) scale(1.08);
}

.nav-prev { left: 16px; }
.nav-next { right: 16px; }

/* Sidebar */
aside {
    width: 320px;
    background: #0d1322;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 30;
}

.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: #090e1a;
}

.sidebar-tab {
    flex: 1;
    text-align: center;
    padding: 12px;
    font-size: 8.5pt;
    font-weight: 700;
    color: #94a3b8;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.sidebar-tab.active {
    color: #38bdf8;
    border-bottom-color: #38bdf8;
    background: rgba(56, 189, 248, 0.05);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.thumb-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.thumb-item {
    display: flex;
    gap: 10px;
    padding: 8px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.thumb-item:hover {
    background: rgba(37, 99, 235, 0.2);
    border-color: #3b82f6;
}

.thumb-item.active {
    background: rgba(37, 99, 235, 0.35);
    border-color: #38bdf8;
}

.thumb-img {
    width: 72px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.thumb-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.thumb-num {
    font-size: 7.5pt;
    color: #38bdf8;
    font-weight: 700;
}

.thumb-title {
    font-size: 8pt;
    font-weight: 600;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* Transcript Container */
.transcript-box {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 8px;
    padding: 14px;
}

.transcript-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 8pt;
    font-weight: 800;
    color: #38bdf8;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.transcript-body {
    font-size: 9pt;
    line-height: 1.6;
    color: #cbd5e1;
}

/* Bottom Audio Deck */
footer {
    height: 72px;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    padding: 8px 20px;
    z-index: 100;
}

.scrubber-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.time-label {
    font-size: 8pt;
    font-weight: 700;
    color: #cbd5e1;
    min-width: 42px;
}

.progress-track {
    flex: 1;
    height: 6px;
    background: #334155;
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    background: #38bdf8;
    border-radius: 3px;
    width: 0%;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    right: -5px;
    top: -3px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 6px #38bdf8;
}

.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.controls-left, .controls-center, .controls-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.volume-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-slider {
    width: 80px;
    -webkit-appearance: none;
    height: 4px;
    border-radius: 2px;
    background: #475569;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #38bdf8;
    cursor: pointer;
}

.speed-select {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 8pt;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.btn-ctrl {
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-size: 13pt;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.btn-ctrl:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.btn-play-main {
    background: #2563eb;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.5);
}

.btn-play-main:hover {
    background: #1d4ed8;
    transform: scale(1.08);
}

/* ========================================================
   FULLSCREEN THEATER MODAL (VOICE CONTINUES IN BACKGROUND)
   ======================================================== */
.fs-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(4, 7, 15, 0.96);
    backdrop-filter: blur(14px);
    display: none;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    user-select: none;
    animation: fadeInModal 0.2s ease-out;
}

.fs-modal.active {
    display: flex;
}

@keyframes fadeInModal {
    from { opacity: 0; transform: scale(0.99); }
    to { opacity: 1; transform: scale(1); }
}

/* Fullscreen Top HUD */
.fs-top-bar {
    width: 100%;
    height: 52px;
    background: rgba(15, 23, 42, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 10000;
    backdrop-filter: blur(8px);
}

.fs-info-group {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.fs-badge {
    background: #2563eb;
    color: #fff;
    font-size: 8pt;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.fs-title {
    font-size: 10pt;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 42vw;
}

.fs-voice-status {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
    font-size: 7.5pt;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    flex-shrink: 0;
}

.fs-voice-pulse {
    width: 7px;
    height: 7px;
    background: #34d399;
    border-radius: 50%;
    box-shadow: 0 0 8px #34d399;
    animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.85); }
}

.fs-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.fs-btn {
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f1f5f9;
    padding: 5px 11px;
    border-radius: 5px;
    font-size: 8.5pt;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s;
}

.fs-btn:hover {
    background: #2563eb;
    border-color: #38bdf8;
    color: #fff;
}

.fs-btn-close {
    background: rgba(239, 68, 68, 0.22);
    border-color: rgba(239, 68, 68, 0.45);
    color: #fca5a5;
}

.fs-btn-close:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

/* Fullscreen Viewport */
.fs-viewport {
    flex: 1;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 10px 60px;
}

.fs-canvas {
    background: #040711;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), 0 0 45px rgba(37, 99, 235, 0.3);
    border-radius: 8px;
    max-width: 96vw;
    max-height: calc(100vh - 150px);
    transition: transform 0.2s ease;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fs-canvas img {
    display: block;
    max-width: 96vw;
    max-height: calc(100vh - 150px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

/* Fullscreen Navigation Arrows */
.fs-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 48px;
    height: 74px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24pt;
    z-index: 10001;
    transition: all 0.2s;
}

.fs-nav-arrow:hover {
    background: #2563eb;
    border-color: #38bdf8;
    transform: translateY(-50%) scale(1.08);
}

.fs-nav-arrow.prev { left: 16px; }
.fs-nav-arrow.next { right: 16px; }

/* Fullscreen Floating Bottom Audio Deck */
.fs-audio-bar {
    width: calc(100% - 40px);
    max-width: 960px;
    height: 64px;
    margin-bottom: 12px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75), 0 0 25px rgba(56, 189, 248, 0.2);
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    padding: 6px 18px 8px 18px;
    z-index: 10000;
}

.fs-scrubber-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}
