/* ── Unlock Cutscene Modal ──
   Full-screen video overlay played when a new tier or element unlocks.
   Shares visual language with the intro-story modal but layered higher
   so it can play over a just-closed discovery modal. */

.unlock-cutscene-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center,
        rgba(20, 10, 5, 0.88) 0%,
        rgba(0, 0, 0, 0.96) 70%,
        #000 100%);
    z-index: 10300;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease-out;
}

.unlock-cutscene-overlay.visible {
    opacity: 1;
}

.unlock-cutscene-frame {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.unlock-cutscene-video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: 100%;
    object-fit: contain;
    background: #000;
    box-shadow:
        0 0 120px rgba(255, 140, 40, 0.35),
        0 0 40px rgba(255, 215, 0, 0.25);
}

/* Eyebrow + title, top-center. Fades in shortly after the video starts. */
.unlock-cutscene-caption {
    position: absolute;
    top: 6vh;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: none;
    text-align: center;
    animation: unlockCaptionFade 1.2s ease-out 0.3s both;
}

.unlock-cutscene-eyebrow {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    letter-spacing: 0.45em;
    text-transform: uppercase;
    color: rgba(255, 215, 0, 0.85);
    text-shadow:
        0 0 12px rgba(255, 140, 40, 0.7),
        0 2px 4px rgba(0, 0, 0, 0.95);
}

.unlock-cutscene-title {
    font-family: 'IM Fell English SC', 'Cinzel', serif;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 600;
    color: #fff;
    text-shadow:
        0 0 24px rgba(255, 140, 40, 0.85),
        0 0 8px rgba(255, 215, 0, 0.6),
        0 4px 10px rgba(0, 0, 0, 0.95);
    letter-spacing: 0.06em;
}

@keyframes unlockCaptionFade {
    from { opacity: 0; transform: translate(-50%, -12px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

/* Control bar, bottom-center — same grammar as intro-story. */
.unlock-cutscene-controls {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 14px;
    padding: 12px 18px;
    background: linear-gradient(135deg,
        rgba(30, 18, 10, 0.92),
        rgba(15, 8, 4, 0.92));
    border: 2px solid rgba(255, 215, 0, 0.45);
    border-radius: 14px;
    box-shadow:
        0 10px 32px rgba(0, 0, 0, 0.7),
        0 0 24px rgba(255, 140, 40, 0.18),
        inset 0 1px 0 rgba(255, 215, 0, 0.12);
}

.unlock-cutscene-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-family: 'Cinzel', serif;
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg,
        rgba(70, 45, 22, 0.92),
        rgba(45, 28, 14, 0.92));
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 10px;
    cursor: url('../images/cursor.png') 16 16, pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.unlock-cutscene-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 215, 0, 0.9);
    background: linear-gradient(135deg,
        rgba(95, 65, 30, 0.96),
        rgba(70, 45, 22, 0.96));
    box-shadow:
        0 8px 20px rgba(255, 140, 40, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

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

/* Skip button reads as primary action (brighter ember). */
.unlock-cutscene-btn.unlock-cutscene-skip {
    background: linear-gradient(135deg,
        rgba(255, 140, 30, 0.92),
        rgba(210, 90, 20, 0.92));
    border-color: rgba(255, 215, 0, 0.7);
}

.unlock-cutscene-btn.unlock-cutscene-skip:hover {
    background: linear-gradient(135deg,
        rgba(255, 160, 50, 0.98),
        rgba(230, 105, 25, 0.98));
    box-shadow:
        0 8px 22px rgba(255, 140, 30, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.unlock-cutscene-icon {
    font-size: 1.1em;
    line-height: 1;
}

/* Collapse labels on small screens — keep icons only. */
@media (max-width: 600px) {
    .unlock-cutscene-controls {
        bottom: 20px;
        gap: 10px;
        padding: 10px 12px;
    }
    .unlock-cutscene-btn {
        padding: 8px 12px;
        font-size: 0.85em;
    }
    .unlock-cutscene-btn .unlock-cutscene-label {
        display: none;
    }
    .unlock-cutscene-icon {
        font-size: 1.3em;
    }
    .unlock-cutscene-caption {
        top: 4vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    .unlock-cutscene-overlay,
    .unlock-cutscene-caption {
        transition: none;
        animation: none;
    }
}
