/* =====================================================
   SpaceApps Lecture Presentation Engine
   Shared styles for 2026-03-11 decks
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg-primary: #050a18;
    --glass-bg: rgba(13, 18, 36, 0.78);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent: #f59e0b;
    --accent-2: #fbbf24;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
    --info: #3b82f6;
}

body {
    background: var(--bg-primary);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    overflow: hidden;
    height: 100vh;
    line-height: 1.7;
}

/* BACKGROUND */
#bg-canvas { position: fixed; inset: 0; z-index: 0; }
.bg-overlay {
    position: fixed; inset: 0; z-index: 1;
    background: radial-gradient(ellipse at 30% 40%, rgba(245, 158, 11, 0.08), transparent 60%),
                radial-gradient(ellipse at 70% 60%, rgba(59, 130, 246, 0.06), transparent 50%);
    pointer-events: none;
}

/* PROGRESS BAR */
.progress-bar {
    position: fixed; top: 0; left: 0; height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    z-index: 100; transition: width 0.4s ease;
    box-shadow: 0 0 12px var(--accent);
}

/* TOP NAV */
.top-nav {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 50; display: flex;
    align-items: center; justify-content: space-between;
    padding: 0.8rem 2rem;
}
.nav-brand {
    font-weight: 800; font-size: 0.85rem;
    color: var(--accent); letter-spacing: 1px;
    text-transform: uppercase;
}
.nav-brand span { color: var(--text-muted); font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 1rem; }
.nav-links a {
    color: var(--text-muted); text-decoration: none;
    font-size: 0.85rem; font-weight: 500; transition: color 0.2s;
}
.nav-links a:hover { color: #fff; }

/* SLIDE VIEWPORT — two-column: content + video */
.slide-viewport {
    position: fixed; inset: 0; z-index: 10;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.5rem;
    padding: 4rem 2.5% 5rem;
    align-items: center;
}

/* LEFT: content panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem 3rem;
    max-height: 82vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    justify-self: stretch;
}
.glass-panel.active { opacity: 1; transform: translateY(0); }
.glass-panel::-webkit-scrollbar { width: 4px; }
.glass-panel::-webkit-scrollbar-track { background: transparent; }
.glass-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

/* RIGHT: reserved video panel (~20%) */
.video-panel {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 0.8rem;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.video-panel .video-label {
    font-size: 0.7rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 800;
    text-align: center;
}
.video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}
.video-wrap iframe,
.video-wrap .video-placeholder {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    border: none;
}
.video-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(59,130,246,0.06));
    color: var(--text-muted);
    font-size: 0.78rem;
}
.video-placeholder .icon { font-size: 1.8rem; opacity: 0.6; }
.video-caption {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.4;
    padding: 0 0.3rem;
}

/* SLIDE TYPOGRAPHY */
.slide h1 {
    font-size: 2.6rem; font-weight: 800;
    line-height: 1.15; margin-bottom: 1rem;
    background: linear-gradient(90deg, #fff, var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.slide h2 {
    font-size: 1.7rem; font-weight: 800;
    color: #fff; margin-bottom: 1rem;
}
.slide .eyebrow, .slide h3.eyebrow {
    font-size: 0.8rem; font-weight: 800;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.6rem;
    display: inline-block;
}
.slide h3 {
    font-size: 1.1rem; font-weight: 700;
    color: var(--accent-2);
    margin: 1rem 0 0.5rem;
}
.slide p {
    color: var(--text-main); opacity: 0.92;
    margin-bottom: 0.9rem; font-size: 1rem;
}
.slide .subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 1.2rem;
}
.slide em { color: var(--accent); font-style: normal; font-weight: 700; }
.slide strong { color: #fff; }
.slide ul, .slide ol { margin: 0.8rem 0; padding-left: 1.3rem; }
.slide li { margin-bottom: 0.5rem; color: var(--text-main); opacity: 0.92; }
.slide blockquote {
    border-left: 3px solid var(--accent);
    padding: 0.8rem 1.3rem;
    margin: 1rem 0;
    background: rgba(245, 158, 11, 0.06);
    border-radius: 0 12px 12px 0;
}
.slide code {
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-2);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
}
.slide a { color: var(--accent-2); text-decoration: underline; }

/* Utility blocks */
.pill {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}
.pill.trend { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #000; }
.pill.core { background: rgba(59, 130, 246, 0.18); color: #93c5fd; border: 1px solid rgba(59,130,246,0.4); }
.pill.warn { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border: 1px solid rgba(239,68,68,0.4); }
.pill.good { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.4); }

.stat-row { display: flex; gap: 0.8rem; flex-wrap: wrap; margin: 1rem 0; }
.stat-box {
    flex: 1; min-width: 110px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: 10px; padding: 0.9rem; text-align: center;
}
.stat-box .val {
    font-size: 1.6rem; font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
}
.stat-box .lbl { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

.compare-table { width: 100%; border-collapse: collapse; margin: 0.8rem 0; }
.compare-table th, .compare-table td {
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid var(--glass-border);
    text-align: left; font-size: 0.88rem;
}
.compare-table th {
    color: var(--accent); font-weight: 700;
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px;
}
.compare-table td:first-child { font-weight: 600; color: #fff; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.callout {
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-left: 3px solid var(--info);
    padding: 0.9rem 1.1rem;
    border-radius: 10px;
    margin: 0.8rem 0;
    font-size: 0.92rem;
}
.callout.trend {
    background: rgba(245, 158, 11, 0.07);
    border-color: rgba(245, 158, 11, 0.3);
    border-left-color: var(--accent);
}
.callout.warn {
    background: rgba(239, 68, 68, 0.07);
    border-color: rgba(239, 68, 68, 0.3);
    border-left-color: var(--danger);
}

.step-list { counter-reset: step; list-style: none; padding: 0; }
.step-list li {
    counter-increment: step;
    display: flex; align-items: flex-start;
    gap: 0.7rem; margin-bottom: 0.6rem;
}
.step-list li::before {
    content: counter(step);
    display: flex; align-items: center; justify-content: center;
    min-width: 26px; height: 26px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 50%;
    font-weight: 800; font-size: 0.75rem;
    color: var(--accent); flex-shrink: 0; margin-top: 2px;
}

/* QUIZ */
.quiz-block { margin: 1rem 0; }
.quiz-q { font-weight: 700; color: #fff; margin-bottom: 0.6rem; font-size: 1rem; }
.quiz-opt {
    display: block;
    padding: 0.7rem 1rem;
    margin-bottom: 0.5rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.92rem;
    color: var(--text-main);
}
.quiz-opt:hover { border-color: var(--accent); background: rgba(245,158,11,0.08); }
.quiz-opt.correct { border-color: var(--success); background: rgba(16,185,129,0.12); color: #6ee7b7; }
.quiz-opt.wrong { border-color: var(--danger); background: rgba(239,68,68,0.12); color: #fca5a5; }
.quiz-feedback {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    min-height: 1.2rem;
}

/* READINGS */
.reading-card {
    display: block;
    padding: 0.9rem 1.1rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin-bottom: 0.7rem;
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}
.reading-card:hover {
    border-color: var(--accent);
    transform: translateX(4px);
    background: rgba(245,158,11,0.05);
}
.reading-card .title {
    font-weight: 700;
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
    text-decoration: none;
}
.reading-card .meta {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-decoration: none;
}

/* CONTROLS */
.controls {
    position: fixed; bottom: 1.3rem; left: 50%;
    transform: translateX(-50%); z-index: 50;
    display: flex; align-items: center; gap: 0;
    background: rgba(10, 14, 23, 0.88);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 0.35rem 0.6rem;
}
.ctrl-btn {
    width: 38px; height: 38px;
    background: none; border: none;
    color: var(--text-muted); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; transition: all 0.2s;
}
.ctrl-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }
.slide-counter {
    font-size: 0.85rem; color: var(--text-muted);
    font-weight: 600; padding: 0 0.7rem;
    min-width: 50px; text-align: center; user-select: none;
}
.ctrl-divider { width: 1px; height: 20px; background: var(--glass-border); margin: 0 0.3rem; }

/* RESPONSIVE */
@media (max-width: 1000px) {
    .slide-viewport {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
        padding: 3.5rem 1rem 5.5rem;
        gap: 1rem;
        align-items: start;
    }
    .glass-panel { max-height: 65vh; padding: 1.8rem 1.3rem; }
    .video-panel { max-height: 25vh; flex-direction: row; padding: 0.5rem; }
    .video-wrap { aspect-ratio: 16 / 9; flex: 1; }
    .video-panel .video-label, .video-caption { display: none; }
    .slide h1 { font-size: 1.9rem; }
    .slide h2 { font-size: 1.3rem; }
    .two-col { grid-template-columns: 1fr; }
}
