/* Global Styles */
@font-face {
    font-family: 'Spooky Mother';
    src: url('../assets/fonts/Spooky%20Mother.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --app-stage-width: 1920;
    --app-stage-height: 1080;
    --app-stage-scale: 1;
    --app-font-family: 'Spooky Mother', serif;
    --app-letter-spacing: 0.06em;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

img, video, canvas, svg {
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: auto;
}

html,
body {
    width: 100%;
    height: 100%;
}

body {
    font-family: var(--app-font-family);
    letter-spacing: var(--app-letter-spacing);
    overflow: hidden;
    background: #000;
    color: #fff;
}

body * {
    font-family: var(--app-font-family) !important;
}

#app-stage {
    position: fixed;
    top: 50%;
    left: 50%;
    width: calc(var(--app-stage-width) * 1px);
    height: calc(var(--app-stage-height) * 1px);
    overflow: hidden;
    background: #000;
    transform: translate(-50%, -50%) scale(var(--app-stage-scale));
    transform-origin: center center;
}

.hidden {
    display: none !important;
}

/* Game Container */
#game-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

#game-container img:not(.nav-btn-img) {
    /* width: 100%; */
    /* height: 100%; */
    object-fit: contain;
}

#game-container video,
#game-container canvas,
.TS_background img,
.light-button {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Scene View Stack */
#video-zones {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
}

.scene-stack {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.scene-full-video,
.scene-transition-video,
.scene-rewind-canvas,
.scene-empty-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.scene-full-video {
    object-fit: fill;
    background: #000;
    z-index: 1;
}

.scene-transition-video {
    object-fit: fill;
    background: transparent;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 220ms ease;
}

.scene-transition-video.is-active {
    opacity: 1;
    visibility: visible;
}

.scene-transition-video.is-altar-handoff {
    z-index: 45;
}

.scene-transition-video.is-handoff-releasing {
    opacity: 0;
}

.scene-rewind-canvas {
    z-index: 1;
    pointer-events: none;
    opacity: 0;
}

.scene-rewind-canvas.visible {
    opacity: 1;
}

.scene-empty-overlay {
    z-index: 2;
    pointer-events: none;
}

#demon-zones {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
}

#attack-caught-overlay {
    position: absolute;
    inset: 0;
    background-color: transparent;
    z-index: 33;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 140ms linear;
}

.attack-caught-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    background: transparent;
    transition: opacity 140ms linear;
}

#attack-caught-overlay.video-ready .attack-caught-video {
    opacity: 1;
}

#attack-caught-overlay.overlay-ready {
    background-color: #000;
}

#attack-caught-overlay.overlay-ready .attack-caught-video {
    background: #000;
}

/* Demon Clickable Zones */
.demon-clickable-zone {
    position: absolute;
    height: 100%;
    top: 0;
    width: 33.3334%;
    cursor: crosshair;
    pointer-events: none;
}

.demon-clickable-zone[data-zone="left"] {
    left: 0;
}

.demon-clickable-zone[data-zone="center"] {
    left: 33.3333%;
}

.demon-clickable-zone[data-zone="right"] {
    right: 0;
}

.demon-clickable-zone.active {
    pointer-events: auto;
}

/* Darkness Overlay */
#darkness-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

#lighting-canvas {
    width: 100%;
    height: 100%;
}

/* Collectibles Layer */
#collectibles-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 15;
}

/* Collectible spots - reveal full video underneath */
.collectible-spot {
    position: absolute;
    cursor: pointer;
    pointer-events: auto;
    transition: opacity 0.3s, transform 0.3s;
    background: transparent;
}

.scene-zone-hotspot {
    position: absolute;
    background: transparent;
}

.scene-zone-hotspot.presence {
    pointer-events: none;
    cursor: default;
}

.collectible-spot:hover {
    opacity: 0.9;
    transform: scale(1.05) !important;
}

/* OLD collectible system (emoji-based) - deprecated */
.collectible {
    position: absolute;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.1s;
    font-size: 40px;
}

.collectible:hover {
    transform: scale(1.2);
}

.collectible.cross::before {
    content: 'âœž';
}

.collectible.book::before {
    content: 'ðŸ“–';
}

/* Lights Container */
#lights-container {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}

.light-button {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 100, 0.3);
    border: 2px solid rgba(255, 255, 100, 0.5);
    cursor: pointer;
    pointer-events: auto;
    transition: background 0.2s;
}

.light-button:hover {
    background: rgba(255, 255, 100, 0.5);
}

.light-button[data-position="center-left"] {
    bottom: 50%;
    left: 19.5%;
}

.light-button[data-position="center-right"] {
    bottom: 50%;
    right: 19%;
}

/* Nun Overlay */
#nun-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.26s ease;
}

#nun-overlay.is-caught-scene {
    z-index: 60;
    background: rgba(0, 0, 0, 0.9);
}

#nun-overlay.is-caught-scene.is-stage-fading-out,
#nun-overlay.is-caught-scene.is-stage-fading-in {
    background: #000;
}

.nun-video-stack {
    position: relative;
    width: 100%;
    height: 100%;
}

.nun-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.26s ease;
}

.nun-video.is-visible {
    opacity: 1;
}

#nun-overlay.is-caught-scene.is-stage-fading-out .nun-video.is-visible {
    opacity: 0;
}

#nun-overlay.is-caught-scene.is-stage-fading-in .nun-video.is-visible {
    opacity: 1;
}

.nun-caught-continue {
    position: absolute;
    left: 100px;
    bottom: 32px;
    transform: translateX(-50%);
    z-index: 2;
    padding: 14px 28px;
    background: rgba(0, 0, 0, 0.82);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.65);
    border-radius: 10px;
    cursor: pointer;
    font-size: 20px;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.attack-caught-continue {
    position: absolute;
    left: 100px;
    bottom: 32px;
    transform: translateX(-50%);
    z-index: 2;
    padding: 14px 28px;
    background: rgba(0, 0, 0, 0.82);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.65);
    border-radius: 10px;
    cursor: pointer;
    font-size: 20px;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.nun-caught-continue:hover,
.nun-caught-continue:focus-visible,
.attack-caught-continue:hover,
.attack-caught-continue:focus-visible {
    transform: translateX(-50%) scale(1.03);
    border-color: rgb(var(--nd-root-strong-rgb) / 0.92);
    box-shadow: 0 0 20px rgb(var(--nd-root-strong-rgb) / 0.28);
    background: linear-gradient(145deg, rgb(var(--nd-root-strong-rgb) / 0.42), rgb(var(--nd-root-rgb) / 0.9));
    outline: none;
}

/* Power Struggle Screen */
#power-struggle-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.45) 55%, rgba(0, 0, 0, 0.72) 100%);
    z-index: 36;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
}

.lane-struggle-panel {
    width: min(760px, calc(100% - 96px));
    /* margin-bottom: 0px; */
    padding: 26px 30px 30px;
    /* border: 1px solid rgba(255, 104, 104, 0.38); */
    /* background: linear-gradient(180deg, rgba(26, 0, 0, 0.62), rgba(8, 0, 0, 0.82)); */
    /* box-shadow: 0 0 28px rgba(163, 0, 0, 0.45), inset 0 0 32px rgba(255, 69, 69, 0.12); */
    /* backdrop-filter: blur(16px); */
    pointer-events: auto;
    /* display: flex; */
    /* align-items: center; */
    position: relative;
}

.lane-struggle-timer {
    width: 100%;
    height: 8px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgb(var(--nd-root-strong-rgb) / 0.3);
    overflow: hidden;
    border-radius: 4px;
}

.lane-struggle-timer-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, rgb(var(--nd-root-rgb)), rgb(var(--nd-root-strong-rgb)));
    transition: width 0.1s linear;
    border-radius: 4px;
}

#struggle-instruction {
    font-size: 18px;
    margin-bottom: 18px;
    color: #fff4f4;
}

.lane-struggle-sequence {
    margin-bottom: 20px;
    font-size: 28px;
    color: #ffe680;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.lane-struggle-zones {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.lane-struggle-playfield {
    position: relative;
    width: 100%;
    height: 340px;
    margin-bottom: 20px;
    border: 1px solid rgb(var(--nd-root-strong-rgb) / 0.28);
    background: radial-gradient(circle at center, rgb(var(--nd-root-rgb) / 0.16), rgb(var(--nd-root-rgb) / 0.42) 72%);
    overflow: hidden;
}

.lane-struggle-target {
    position: absolute;
    border: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), rgb(var(--nd-root-strong-rgb)) 35%, rgb(var(--nd-root-rgb)) 100%);
    box-shadow: 0 0 22px rgb(var(--nd-root-strong-rgb) / 0.5), inset 0 0 12px rgba(255, 255, 255, 0.26);
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.lane-struggle-target:hover,
.lane-struggle-target:focus-visible {
    transform: scale(1.08);
    box-shadow: 0 0 26px rgb(var(--nd-root-strong-rgb) / 0.65), inset 0 0 14px rgba(255, 255, 255, 0.34);
    outline: none;
}

.lane-struggle-action-row {
    display: flex;
    align-items: center;
    gap: 18px;
}

.lane-struggle-hit-circle {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    border: 3px solid rgb(var(--nd-root-strong-rgb) / 0.92);
    border-radius: 50%;
    background:
        radial-gradient(circle at center, rgba(28, 10, 10, 0) 0 40%, rgb(var(--nd-root-strong-rgb) / 0.95) 41% 49%, rgb(var(--nd-root-rgb) / 0.96) 50% 100%),
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.98), rgb(var(--nd-root-strong-rgb) / 0.94) 34%, rgb(var(--nd-root-rgb) / 0.98) 100%);
    box-shadow: 0 0 24px rgb(var(--nd-root-strong-rgb) / 0.42), inset 0 0 16px rgb(var(--nd-root-strong-rgb) / 0.2);
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.lane-struggle-hit-circle:hover,
.lane-struggle-hit-circle:focus-visible {
    transform: scale(1.06);
    box-shadow: 0 0 28px rgb(var(--nd-root-strong-rgb) / 0.56), inset 0 0 18px rgb(var(--nd-root-strong-rgb) / 0.28);
    outline: none;
}

.lane-struggle-hit-circle:active {
    transform: scale(0.96);
}

.lane-struggle-zone {
    flex: 1;
    min-height: 96px;
    border: 1px solid rgb(var(--nd-root-strong-rgb) / 0.42);
    background: linear-gradient(180deg, rgb(var(--nd-root-rgb) / 0.72), rgb(var(--nd-root-rgb) / 0.88));
    color: #fff;
    font-size: 22px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.lane-struggle-zone:hover,
.lane-struggle-zone.is-target {
    transform: translateY(-2px);
    border-color: rgb(var(--nd-root-strong-rgb) / 0.82);
    box-shadow: 0 0 24px rgb(var(--nd-root-strong-rgb) / 0.32), inset 0 0 12px rgb(var(--nd-root-strong-rgb) / 0.18);
}

.lane-struggle-meter {
    width: 100%;
    flex: 1 1 auto;
    height: 24px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
    box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.4);
}

#struggle-progress {
    height: 100%;
    background: linear-gradient(90deg, rgb(var(--nd-root-rgb)), rgb(var(--nd-root-strong-rgb)));
    width: 0%;
    transition: width 0.12s linear;
}

/* Main UI */
#main-ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 35;
}

/* Phase start intro — fullscreen overlay above everything */
.phase-intro-overlay {
    position: absolute;
    inset: 0;
    z-index: 200;
    background: #000;
    opacity: 1;
    transition: opacity 700ms linear;
}

.phase-intro-overlay.hidden {
    display: none;
}

.phase-intro-overlay.is-exiting {
    opacity: 0;
    pointer-events: none;
}

.phase-intro-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    pointer-events: none;
}

.phase-intro-continue {
    position: absolute;
    left: 50px;
    bottom: 32px;
    z-index: 2;
    padding: 14px 28px;
    background: rgba(0, 0, 0, 0.82);
    color: #ffffff;
    border: 2px solid rgb(var(--nd-root-strong-rgb) / 0.65);
    border-radius: 10px;
    cursor: pointer;
    font-size: 20px;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.phase-intro-continue:hover,
.phase-intro-continue:focus-visible {
    transform: scale(1.05);
    border-color: rgb(var(--nd-root-strong-rgb) / 0.92);
    box-shadow: 0 0 20px rgb(var(--nd-root-strong-rgb) / 0.28);
    background: linear-gradient(145deg, rgb(var(--nd-root-strong-rgb) / 0.42), rgb(var(--nd-root-rgb) / 0.9));
    outline: none;
}

#counters {
    position: absolute;
    top: 20px;
    left: 734.5px;
    display: flex;
    gap: 20px;
    pointer-events: none;
    z-index: 50;
    transition: opacity 0.2s ease;
}

#counters.counters-hidden {
    opacity: 0;
    pointer-events: none;
}

.counter {
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.counter-icon {
    font-size: 24px;
    display: flex;
    align-items: center;
}

.counter-icon--cross {
    font-size: 30px;
    margin-top: -7px;
}

#game-container .counter-icon--book img {
    height: 31px;
    width: auto;
    object-fit: unset;
}

.counter-label {
    font-size: 16px;
    letter-spacing: 0.1em;
}

.counter-value {
    font-size: 20px;
    color: #ffff00;
    top: 10px;
    margin-top: -3px;
}

#navigation {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    pointer-events: auto;
    flex-direction: column-reverse;
}

.nav-button {
    padding: 15px 40px;
    font-size: 18px;
    background: rgb(var(--nd-root-rgb) / 0.8);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-button--icon {
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    line-height: 0;
    display: flex;
    justify-content: center;
}

.nav-btn-img {
    display: block;
    width: auto;
    height: 80px;
    object-fit: contain;
    pointer-events: auto;
    opacity: 0.2;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.7));
    transition: opacity 0.2s ease, filter 0.2s ease;
}

.nav-button--icon:not(:disabled):not([disabled]) .nav-btn-img:hover {
    opacity: 1;
    filter: brightness(1.08) saturate(1.12) drop-shadow(0 0 10px rgb(var(--nd-root-strong-rgb) / 0.82)) drop-shadow(0 2px 8px rgba(0,0,0,0.7));
}

.nav-button--icon:not(:disabled):not([disabled]) .nav-btn-img:active {
    opacity: 1;
    filter: brightness(1.02) saturate(1.08) drop-shadow(0 0 7px rgb(var(--nd-root-rgb) / 0.72)) drop-shadow(0 2px 8px rgba(0,0,0,0.7));
}

.nav-button--icon:disabled .nav-btn-img,
.nav-button--icon[disabled] .nav-btn-img {
    opacity: 0.2;
    cursor: default;
}

.nav-button--icon:disabled,
.nav-button--icon[disabled] {
    background: transparent;
    opacity: 1;
    transform: none;
}

.nav-button:hover {
    background: linear-gradient(145deg, rgb(var(--nd-root-strong-rgb) / 0.42), rgb(var(--nd-root-rgb) / 0.9));
    border-color: #fff;
    transform: scale(1.05);
}

.nav-button--icon:hover {
    background: transparent;
    transform: none;
}

.nav-button:active {
    transform: scale(0.95);
}

.nav-button--icon:active {
    transform: none;
}

.nav-button:not(.nav-button--icon):disabled {
    background: rgba(50, 50, 50, 0.5);
    opacity: 0.5;
    cursor: default;
}

/* Altar Screen */
#altar-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
}

.altar-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.altar-hover-effects {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
}

.altar-hover-effect {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 41.1%;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.altar-hover-effect--left {
    left: 0;
}

.altar-hover-effect--right {
    right: 0;
}

.altar-hover-effect--shade {
    background: rgba(0, 0, 0, 0.75);
}

.altar-hover-effect--glow {
    background: linear-gradient(90deg, rgba(255, 214, 153, 0.22), rgba(255, 240, 214, 0.12));
    mix-blend-mode: screen;
}

#altar-screen.altar-screen--shade-left .altar-hover-effect--shade.altar-hover-effect--left {
    opacity: 1;
}

#altar-screen.altar-screen--shade-left .altar-hover-effect--glow.altar-hover-effect--right {
    opacity: 1;
}

#altar-screen.altar-screen--shade-right .altar-hover-effect--shade.altar-hover-effect--right {
    opacity: 1;
}

#altar-screen.altar-screen--shade-right .altar-hover-effect--glow.altar-hover-effect--left {
    opacity: 1;
}

.altar-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    z-index: 2;
}

.altar-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    z-index: 1;
}

#altar-choices {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    /* padding: 40px; */
    /* width: 489px; */
    z-index: 4;
}

#altar-choices h2 {
    font-size: 36px;
    /* margin-bottom: 124px; */
    color: #ffffff;
    position: relative;
    bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}


.altar-resource-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(8, 8, 12, 0.68);
    color: rgba(255, 255, 255, 0.88);
    font-size: 15px;
    letter-spacing: 0.02em;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.altar-resource-pill strong {
    font-size: 18px;
    color: #ffffff;
}

.altar-resource-pill--crosses strong {
    color: #ffd166;
}

.altar-resource-pill--books strong {
    color: #a3e8ff;
}

.choice-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.choice-btn {
    padding: 20px;
    background: rgb(var(--nd-root-rgb) / 0.8);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
    position: relative;
    overflow: visible;
}

.choice-btn--help-nun {
    position: relative;
    right: 260px;
    bottom: 123px;
    width: 235px;
    /* display: flex; */
    text-align: center;
}

.choice-btn--help-demon {
    /* position: relative; */
    position: relative;
    left: 429px;
    bottom: 257px;
    width: 235px;
    text-align: center;
}

.choice-btn--surrender {
    position: relative;
    top: 152px;
    width: 200px;
    left: 97px;
}

.choice-btn--demon-exorcism {
    position: relative;
    /* width: 235px; */
    position: relative;
    right: 685px;
    bottom: 505px;
    width: 380px;
}

.choice-btn--nun-corruption {
    /* position: relative; */
    /* position: relative; */
    /* right: 518px; */
    /* bottom: -165px; */
    position: relative;
    /* width: 235px; */
    position: relative;
    left: 701px;
    bottom: 639px;
    width: 396px;
}

.choice-btn:hover:not(.locked) {
    background: linear-gradient(145deg, rgb(var(--nd-root-strong-rgb) / 0.42), rgb(var(--nd-root-rgb) / 0.9));
    border-color: #fff;
    transform: scale(1.05);
}

.choice-btn.locked:hover,
.choice-btn.locked:focus-visible {
    transform: scale(1.05);
}

.choice-btn:active:not(.locked) {
    transform: scale(0.95);
}

.choice-btn:disabled,
.choice-btn--disabled {
    pointer-events: none;
    opacity: 0.78;
}

.choice-btn.locked {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.9), rgba(64, 64, 64, 0.75));
    cursor: pointer;
    opacity: 1;
}

.choice-btn--gold {
    border-color: rgba(255, 209, 102, 0.9);
    box-shadow: 0 0 0 1px rgba(255, 209, 102, 0.15), 0 16px 36px rgba(84, 54, 2, 0.25);
}

.choice-btn--gold:not(.locked) {
    background: linear-gradient(135deg, rgba(84, 54, 2, 0.82), rgba(122, 84, 10, 0.76));
}

.choice-btn--gold.locked {
    border-color: rgba(255, 209, 102, 0.9);
    box-shadow: 0 0 0 1px rgba(255, 209, 102, 0.15), 0 16px 36px rgba(84, 54, 2, 0.25);
}

.choice-btn--gold:hover:not(.locked),
.choice-btn--gold.locked:hover,
.choice-btn--gold.locked:focus-visible {
    background: linear-gradient(135deg, rgba(84, 54, 2, 0.92), rgba(167, 113, 14, 0.82));
    border-color: #ffd166;
    box-shadow: 0 0 0 1px rgba(255, 209, 102, 0.32), 0 20px 44px rgba(84, 54, 2, 0.45);
}

.choice-btn--diamond {
    border-color: rgba(163, 232, 255, 0.95);
    box-shadow: 0 0 0 1px rgba(163, 232, 255, 0.16), 0 16px 36px rgba(17, 76, 102, 0.24);
}

.choice-btn--diamond:not(.locked) {
    background: linear-gradient(135deg, rgba(12, 52, 68, 0.84), rgba(30, 103, 130, 0.76));
}

.choice-btn--diamond.locked {
    border-color: rgba(163, 232, 255, 0.95);
    box-shadow: 0 0 0 1px rgba(163, 232, 255, 0.16), 0 16px 36px rgba(17, 76, 102, 0.24);
}

.choice-btn--diamond:hover:not(.locked),
.choice-btn--diamond.locked:hover,
.choice-btn--diamond.locked:focus-visible {
    background: linear-gradient(135deg, rgba(12, 52, 68, 0.94), rgba(52, 140, 173, 0.84));
    border-color: #a3e8ff;
    box-shadow: 0 0 0 1px rgba(163, 232, 255, 0.36), 0 20px 44px rgba(17, 76, 102, 0.42);
}

.choice-btn--gold.locked .choice-requirement {
    color: #ffd166;
}

.choice-btn--gold .choice-requirement {
    color: #ffd166;
}

.choice-btn--diamond.locked .choice-requirement {
    color: #a3e8ff;
}

.choice-btn--diamond .choice-requirement {
    color: #a3e8ff;
}

.choice-hover-preview {
    position: absolute;
    top: 50%;
    left: calc(100% + 28px);
    width: 280px;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-50%) translateX(-18px) scale(0.96);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
    z-index: 5;
}

.choice-btn--gold .choice-hover-preview {
    border-color: rgba(255, 209, 102, 0.9);
}

.choice-btn--diamond .choice-hover-preview {
    left: auto;
    right: calc(100% + 28px);
    border-color: rgba(163, 232, 255, 0.95);
    transform: translateY(-50%) translateX(18px) scale(0.96);
}

.choice-hover-preview video,
.choice-hover-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.04);
}

.choice-btn.locked:hover .choice-hover-preview,
.choice-btn.locked:focus-visible .choice-hover-preview {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0) scale(1);
}

.choice-btn.insufficient {
    background: rgb(0 0 0);
    opacity: 0.7;
}

.choice-title {
    font-size: 22px;
}

.choice-requirement {
    font-size: 16px;
    color: #ffff00;
}

.choice-progress {
    font-size: 14px;
    color: #aaaaaa;
}

@media (max-width: 1200px) {

    .choice-hover-preview {
        top: calc(100% + 14px);
        left: 0;
        right: auto;
        width: min(280px, 70vw);
        transform: translateY(-12px) scale(0.96);
    }

    .choice-btn--diamond .choice-hover-preview {
        left: 0;
        right: auto;
        transform: translateY(-12px) scale(0.96);
    }

    .choice-btn.locked:hover .choice-hover-preview,
    .choice-btn.locked:focus-visible .choice-hover-preview {
        transform: translateY(0) scale(1);
    }
}

.altar-continue-button {
    position: absolute;
    left: 50px;
    bottom: 32px;
    z-index: 3;
    padding: 14px 28px;
    background: rgba(0, 0, 0, 0.82);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.65);
    border-radius: 10px;
    cursor: pointer;
    font-size: 20px;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.altar-action-row {
    position: absolute;
    left: 32px;
    bottom: 32px;
    z-index: 3;
    display: flex;
    gap: 16px;
}

.altar-cum-button {
    position: absolute;
    right: 32px;
    top: 38%;
    z-index: 3;
    height: 150px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-width: 182px;
    padding: 24px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff2f4;
    border: 2px solid rgba(255, 221, 226, 0.12);
    border-radius: 24px;
    cursor: pointer;
    font-family: Georgia, serif;
    font-size: 22px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.altar-cum-button_icon {
    width: 75px;
    height: 75px;
    object-fit: contain;
    flex: 0 0 auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.28));
}

.altar-cum-button_label {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.altar-cum-button:hover,
.altar-cum-button:focus-visible {
    border-color: rgba(255, 221, 226, 0.26);
    outline: none;
}

.altar-cum-button.is-selected {
    background: rgba(28, 56, 92, 0.9);
    border-color: rgba(164, 222, 255, 0.5);
    color: #f3feff;
    box-shadow: 0 0 0 1px rgba(164, 222, 255, 0.14), 0 18px 36px rgba(0, 0, 0, 0.28);
}

.altar-cum-button.hidden {
    pointer-events: none !important;
}

.altar-action-row .altar-continue-button {
    position: static;
}

.altar-secondary-button {
    background: rgba(20, 20, 20, 0.88);
    border-color: rgba(255, 255, 255, 0.4);
}

.altar-continue-button:hover,
.altar-continue-button:focus-visible {
    background: linear-gradient(145deg, rgb(var(--nd-root-strong-rgb) / 0.42), rgb(var(--nd-root-rgb) / 0.9));
    border-color: #ffffff;
    transform: scale(1.05);
    outline: none;
}

.altar-secondary-button:hover,
.altar-secondary-button:focus-visible {
    background: rgba(70, 70, 70, 0.92);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .counter {
        padding: 8px 15px;
    }

    .counter-icon {
        font-size: 20px;
    }

    .altar-cum-button {
        top: auto;
        right: 24px;
        bottom: 96px;
        transform: none;
    }

    .altar-cum-button:hover,
    .altar-cum-button:focus-visible {
        border-color: rgba(255, 221, 226, 0.26);
        outline: none;
    }

    .counter-value {
        font-size: 18px;
    }

    .nav-button {
        padding: 12px 30px;
        font-size: 16px;
    }
}

/* Modal Overlays */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    color: white;
}

.modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.game-over-title {
    font-size: 48px;
    margin-bottom: 20px;
    color: #ff4444;
}

.game-over-text {
    font-size: 24px;
    margin-bottom: 40px;
}

.victory-title {
    font-size: 64px;
    margin-bottom: 20px;
    color: #ffdd00;
}

.victory-text {
    font-size: 32px;
    margin-bottom: 40px;
}

.victory-subtext {
    font-size: 20px;
    margin-bottom: 20px;
}

.modal-button-row {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.modal-button {
    padding: 15px 40px;
    font-size: 20px;
    background: rgba(150, 0, 0, 0.9);
    color: white;
    border: 2px solid white;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
}

.modal-button:hover {
    background: rgba(200, 0, 0, 1);
    transform: scale(1.05);
}

.modal-button.victory {
    background: rgba(0, 150, 0, 0.9);
}

.modal-button.victory:hover {
    background: rgba(0, 200, 0, 1);
}

.edition-upgrade-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(3, 5, 7, 0.36);
    backdrop-filter: blur(3px);
    z-index: 1100;
}

.edition-upgrade-popup {
    width: min(500px, 90vw);
    padding: 26px;
    border-radius: 18px;
    border: 2px solid transparent;
    background: linear-gradient(145deg, rgba(17, 36, 47, 0.98), rgba(8, 12, 20, 0.98));
    text-align: center;
    color: #ffffff;
    font-family: Georgia, serif;
    letter-spacing: 0.05em;
}

.edition-upgrade-popup--gold {
    border-color: rgba(255, 214, 92, 0.9);
}

.edition-upgrade-popup--diamond {
    border-color: rgba(191, 240, 255, 0.92);
}

.edition-upgrade-title {
    margin: 0 0 12px;
    font-size: 25px;
    color: #ffffff;
    letter-spacing: 0.06em;
}

.edition-upgrade-text {
    margin: 8px 0;
    font-size: 14px;
    color: #ffffff;
}

.edition-upgrade-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
}

.edition-upgrade-button {
    margin-top: 14px;
    padding: 10px 24px 10px;
    background: linear-gradient(145deg, rgba(164, 34, 34, 0.95), rgba(82, 10, 10, 0.97));
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 0.05em;
    transition: all 0.25s ease;
}

.edition-upgrade-popup--gold .edition-upgrade-button {
    background: linear-gradient(145deg, rgba(255, 221, 116, 0.88), rgba(110, 74, 14, 0.98));
    border-color: rgba(255, 214, 92, 0.42);
    color: #fff7d0;
}

.edition-upgrade-popup--diamond .edition-upgrade-button {
    background: linear-gradient(145deg, rgba(214, 247, 255, 0.86), rgba(34, 74, 102, 0.98));
    border-color: rgba(191, 240, 255, 0.45);
    color: #f3feff;
}

.edition-upgrade-button:hover,
.edition-upgrade-button:focus-visible {
    outline: none;
    transform: translateY(-1px);
}

.edition-upgrade-button--secondary {
    background: linear-gradient(145deg, rgba(42, 46, 55, 0.95), rgba(16, 18, 24, 0.98)) !important;
    color: #ffffff !important;
    border-color: rgba(136, 160, 171, 0.28) !important;
}

.edition-upgrade-popup--f95 {
    width: min(580px, 92vw);
    padding: 36px 36px 32px;
    border-color: rgba(255, 102, 51, 0.85);
}

.edition-upgrade-f95-icon {
    display: block;
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin: 0 auto 16px;
}

.edition-upgrade-popup--f95 .edition-upgrade-title {
    font-size: 28px;
}

.edition-upgrade-popup--f95 .edition-upgrade-text {
    font-size: 16px;
    line-height: 1.6;
}

.edition-upgrade-button--patreon {
    background: linear-gradient(145deg, rgba(255, 102, 51, 0.95), rgba(180, 55, 20, 0.97)) !important;
    border-color: rgba(255, 130, 80, 0.5) !important;
    color: #fff !important;
}

/* Game Notifications */
.game-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 20px 40px;
    border-radius: 10px;
    font-size: 18px;
    z-index: 10000;
    border: 2px solid rgba(255, 255, 255, 0.5);
    animation: slideIn 0.3s ease-out;
    max-width: 80%;
    text-align: center;
}

.game-notification.error {
    border-color: rgb(var(--nd-root-strong-rgb));
    background: rgba(var(--nd-root-rgb) / 0.9);
}

.game-notification.success {
    border-color: #44ff44;
    background: rgba(0, 100, 0, 0.9);
}

.game-notification.info {
    border-color: #4444ff;
    background: rgba(0, 0, 100, 0.9);
}

.game-notification.fade-out {
    animation: fadeOut 0.5s ease-out;
    opacity: 0;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Ending Scene Overlay */
.ending-scene-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}
