/* ============================================================
   HEC Presentation Player — Professional dark navy / gold theme
   ============================================================ */

:root {
    --navy-900: #060d1f;
    --navy-800: #0b1730;
    --navy-700: #122343;
    --navy-600: #1b3157;
    --gold: #c9a24b;
    --gold-light: #e3c57e;
    --white: #f5f7fb;
    --muted: #93a3bd;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
    --radius: 10px;
    --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

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

html, body {
    height: 100%;
    background: var(--navy-900);
    font-family: var(--font);
    color: var(--white);
    overflow: hidden;
}

/* ---------- Container ---------- */

.presentation-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 60%, #0a1228 100%);
    overflow: hidden;
    cursor: default;
}

.presentation-container.hide-cursor { cursor: none; }

.hidden { display: none !important; }

/* ---------- Slide header ---------- */

.slide-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 42px 16px;
    z-index: 5;
}

.header-accent {
    width: 6px;
    height: 34px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--gold-light), var(--gold));
    flex: 0 0 auto;
}

.slide-title {
    font-size: clamp(1.15rem, 2.2vw, 1.9rem);
    font-weight: 600;
    letter-spacing: 0.4px;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Image stage ---------- */

.stage {
    flex: 1 1 auto;
    position: relative;
    align-self: center;
    aspect-ratio: 16 / 9;
    max-width: calc(100% - 84px);
    margin: 0 auto 6px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--navy-700);
    box-shadow: var(--shadow);
    border: 1px solid rgba(201, 162, 75, 0.18);
    min-height: 0;
}

.stage-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--navy-700);
    opacity: 0;
    transition: opacity 0.7s ease;
    cursor: pointer;
}

.stage-image.visible { opacity: 1; }

.image-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 42%, var(--navy-600), var(--navy-800) 75%);
    z-index: 2;
}

.placeholder-emblem {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: 10px;
    color: rgba(201, 162, 75, 0.35);
    border: 2px solid rgba(201, 162, 75, 0.25);
    border-radius: 50%;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Pointer heading band ---------- */

.pointer-band {
    flex: 0 0 auto;
    margin: 12px 42px 8px;
    height: 48px;
    border-radius: var(--radius);
    background: rgba(18, 35, 67, 0.85);
    border: 1px solid rgba(201, 162, 75, 0.25);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
}

.pointer-band::before,
.pointer-band::after {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    width: 70px;
    z-index: 2;
    pointer-events: none;
}
.pointer-band::before { left: 0;  background: linear-gradient(90deg, var(--navy-800), transparent); }
.pointer-band::after  { right: 0; background: linear-gradient(-90deg, var(--navy-800), transparent); }

.pointer-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.pointer-heading {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(100vw, -50%);
    white-space: nowrap;
    font-size: clamp(0.85rem, 1.3vw, 1.1rem);
    font-weight: 600;
    letter-spacing: 0.6px;
    color: var(--gold-light);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    will-change: transform;
}

/* Short-audio pointers: centered heading with a gentle fade-in */
.pointer-heading.static {
    animation: headingFadeIn 0.6s ease;
}

@keyframes headingFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ---------- Controls ---------- */
/* Navigation is keyboard-driven — the on-screen bar stays hidden */

.controls-bar {
    display: none;
    flex: 0 0 auto;
    padding: 6px 42px 12px;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 22px;
    z-index: 10;
    opacity: 1;
    transition: opacity 0.45s ease;
}

.controls-bar.controls-hidden {
    opacity: 0;
    pointer-events: none;
}

.controls-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ctrl-btn {
    background: rgba(27, 49, 87, 0.9);
    color: var(--white);
    border: 1px solid rgba(201, 162, 75, 0.3);
    border-radius: 8px;
    min-width: 42px;
    height: 36px;
    padding: 0 12px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.12s ease, border-color 0.2s ease;
}

.ctrl-btn:hover {
    background: var(--navy-600);
    border-color: var(--gold);
    transform: translateY(-1px);
}

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

.ctrl-btn-primary {
    background: linear-gradient(180deg, var(--gold-light), var(--gold));
    color: var(--navy-900);
    font-weight: 700;
    min-width: 50px;
    border: none;
}

.ctrl-btn-primary:hover {
    background: linear-gradient(180deg, #f0d697, var(--gold-light));
}

.ctrl-divider {
    width: 1px;
    height: 28px;
    background: rgba(147, 163, 189, 0.35);
    margin: 0 4px;
}

.controls-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.78rem;
    letter-spacing: 1px;
    color: var(--muted);
    text-transform: uppercase;
}

.info-sep { color: var(--gold); }

/* ---------- Transcript ---------- */

.transcript-panel {
    position: absolute;
    right: 42px;
    top: 90px;
    bottom: 170px;
    width: min(380px, 40vw);
    background: rgba(11, 23, 48, 0.96);
    border: 1px solid rgba(201, 162, 75, 0.3);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 20;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.transcript-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(201, 162, 75, 0.25);
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--gold-light);
}

.transcript-close {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1rem;
    cursor: pointer;
}
.transcript-close:hover { color: var(--white); }

#transcriptText {
    padding: 18px;
    overflow-y: auto;
    line-height: 1.65;
    font-size: 0.95rem;
    color: var(--white);
}

/* ---------- Start / End overlays ---------- */

.start-overlay,
.end-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 40%, var(--navy-700), var(--navy-900) 80%);
}

.start-card,
.end-card {
    text-align: center;
    padding: 56px 72px;
    border: 1px solid rgba(201, 162, 75, 0.35);
    border-radius: 14px;
    background: rgba(11, 23, 48, 0.75);
    box-shadow: var(--shadow);
    max-width: min(720px, 86vw);
}

.start-emblem {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    color: var(--gold-light);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 28px;
}

.start-title {
    font-size: clamp(1.5rem, 3vw, 2.3rem);
    font-weight: 600;
    margin-bottom: 10px;
}

.start-subtitle {
    color: var(--muted);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-bottom: 36px;
}

.end-card h1 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    margin-bottom: 14px;
}

.end-card p {
    color: var(--gold-light);
    font-size: 1.3rem;
    letter-spacing: 2px;
    margin-bottom: 36px;
}

.start-btn {
    background: linear-gradient(180deg, var(--gold-light), var(--gold));
    color: var(--navy-900);
    border: none;
    border-radius: 8px;
    padding: 15px 42px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201, 162, 75, 0.35);
}

/* ---------- Audio error ---------- */

.audio-error {
    position: absolute;
    left: 50%;
    bottom: 190px;
    transform: translateX(-50%);
    z-index: 30;
    background: rgba(11, 23, 48, 0.97);
    border: 1px solid rgba(201, 162, 75, 0.45);
    border-radius: var(--radius);
    padding: 18px 28px;
    text-align: center;
    box-shadow: var(--shadow);
}

.audio-error p { margin-bottom: 14px; color: var(--white); }

.audio-error-actions { display: flex; gap: 10px; justify-content: center; }

.audio-error button {
    background: var(--navy-600);
    color: var(--white);
    border: 1px solid rgba(201, 162, 75, 0.4);
    border-radius: 6px;
    padding: 8px 20px;
    cursor: pointer;
}

.audio-error button:hover { border-color: var(--gold); }

/* ---------- Hidden audio ---------- */

.presentation-audio { display: none; }

/* ---------- Fullscreen tweaks ---------- */

.presentation-container:fullscreen {
    width: 100vw;
    height: 100vh;
}
