/* ========================================
   THE ATHLETE — Visual Novel Stylesheet
   Dark / Neon / East Sterling Aesthetic
   Fully polished immersive experience
   ======================================== */

:root {
    --bg-dark: #0a0a0f;
    --bg-darker: #050508;
    --bg-card: #0c0c14;
    --neon-amber: #ff9500;
    --neon-amber-glow: rgba(255, 149, 0, 0.4);
    --neon-amber-dim: #cc7700;
    --neon-pink: #ff2d7b;
    --neon-pink-glow: rgba(255, 45, 123, 0.3);
    --neon-blue: #00c3ff;
    --neon-purple: #9d4edd;
    --neon-purple-glow: rgba(157, 78, 221, 0.3);
    --text-primary: #e8e8f0;
    --text-secondary: #a0a0b8;
    --text-narrator: #c8c8d8;
    --text-dim: #606070;
    --glass-bg: rgba(10, 10, 20, 0.7);
    --glass-bg-heavy: rgba(5, 5, 12, 0.92);
    --glass-border: rgba(255, 149, 0, 0.2);
    --glass-border-bright: rgba(255, 149, 0, 0.4);
    --gold: #ffd700;
    --transition-fast: 0.2s ease;
    --transition-med: 0.4s ease;
    --transition-slow: 0.7s ease;
    --transition-cinematic: 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --font-ui: 'Raleway', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --font-display: 'Cinzel', Georgia, 'Times New Roman', serif;
    --shadow-heavy: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-glow-amber: 0 0 30px rgba(255, 149, 0, 0.15);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg-darker);
    font-family: var(--font-ui);
    color: var(--text-primary);
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== SCREEN MANAGEMENT ===== */
.screen {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: none;
    z-index: 1;
}
.screen.active {
    display: block;
}
.hidden { display: none !important; }

/* ===== LOADING SCREEN ===== */
#loading-screen {
    background: var(--bg-darker);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
#loading-screen.active {
    display: flex;
}

.loading-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(ellipse at 50% 50%, rgba(255, 149, 0, 0.04) 0%, transparent 60%);
}

.loading-content {
    position: relative;
    text-align: center;
    z-index: 2;
}

.loading-logo {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--neon-amber);
    letter-spacing: 0.2em;
    margin-bottom: 40px;
    text-shadow: 0 0 30px var(--neon-amber-glow);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.loading-bar-outer {
    width: 300px;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto 20px;
}

.loading-bar-inner {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--neon-amber), var(--neon-pink));
    border-radius: 2px;
    transition: width 0.3s ease;
}

.loading-text {
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* ===== TITLE SCREEN ===== */
#title-screen {
    background: var(--bg-darker);
    display: flex;
    align-items: center;
    justify-content: center;
}

.title-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.25;
    z-index: 0;
    filter: blur(2px) saturate(0.7);
    transition: opacity 1s ease;
}

#title-particles {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
}

.title-vignette {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(0,0,0,0.7) 100%);
    z-index: 2;
    pointer-events: none;
}

.title-scanlines {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    z-index: 3;
    pointer-events: none;
}

.title-content {
    position: relative;
    z-index: 4;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    max-height: 100vh;
    padding: 24px 16px;
    overflow-y: auto;
    animation: title-fade-in 1.5s ease forwards;
}

@keyframes title-fade-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.title-pre {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 0.5em;
    text-transform: uppercase;
    margin-bottom: 8px;
    opacity: 0;
    animation: title-element-in 0.8s ease 0.3s forwards;
}

.title-main {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 9vw, 7rem);
    font-weight: 900;
    letter-spacing: 0.12em;
    color: var(--neon-amber);
    text-shadow:
        0 0 20px var(--neon-amber-glow),
        0 0 60px rgba(255, 149, 0, 0.15),
        0 2px 0 rgba(200, 120, 0, 0.8),
        0 4px 8px rgba(0, 0, 0, 0.8);
    animation: title-glow 4s ease-in-out infinite alternate;
    line-height: 1;
}

@keyframes title-glow {
    from { text-shadow: 0 0 20px var(--neon-amber-glow), 0 0 60px rgba(255,149,0,0.15), 0 2px 0 rgba(200,120,0,0.8), 0 4px 8px rgba(0,0,0,0.8); filter: brightness(1); }
    to { text-shadow: 0 0 40px var(--neon-amber-glow), 0 0 100px rgba(255,149,0,0.2), 0 2px 0 rgba(200,120,0,0.8), 0 4px 8px rgba(0,0,0,0.8); filter: brightness(1.1); }
}

@keyframes title-element-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.title-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
    opacity: 0;
    animation: title-element-in 0.8s ease 0.6s forwards;
}
.title-divider span:first-child,
.title-divider span:last-child {
    display: block;
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-amber-dim), transparent);
}
.divider-diamond {
    width: 8px;
    height: 8px;
    background: var(--neon-amber);
    transform: rotate(45deg);
    box-shadow: 0 0 10px var(--neon-amber-glow);
}

.title-tagline {
    font-family: var(--font-ui);
    font-size: clamp(0.85rem, 1.8vw, 1.1rem);
    font-weight: 300;
    font-style: italic;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    margin-top: 8px;
    opacity: 0;
    animation: title-element-in 0.8s ease 0.9s forwards;
}

.title-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 280px;
    opacity: 0;
    animation: title-element-in 0.8s ease 1.2s forwards;
}

.menu-btn {
    font-family: var(--font-ui);
    font-size: 1rem;
    font-weight: 400;
    padding: 14px 32px;
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}
.menu-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 149, 0, 0.08), transparent);
    transition: left 0.5s ease;
}
.menu-btn:hover::before {
    left: 100%;
}
.menu-btn:hover:not(:disabled) {
    background: rgba(255, 149, 0, 0.12);
    border-color: var(--glass-border-bright);
    color: var(--neon-amber);
    box-shadow: var(--shadow-glow-amber);
    transform: translateY(-1px);
}
.menu-btn:active:not(:disabled) {
    transform: scale(0.97) translateY(0);
}
.menu-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 0.85rem;
    opacity: 0.7;
}
.btn-text {
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.title-credit {
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    opacity: 0;
    animation: title-element-in 0.8s ease 1.5s forwards;
}

.neon-flicker {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 3;
    background: radial-gradient(ellipse at 50% 100%, rgba(255, 149, 0, 0.03) 0%, transparent 60%);
    animation: flicker 6s ease-in-out infinite;
}

/* Title bottom fade to black */
#title-screen::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 30%;
    background: linear-gradient(0deg, var(--bg-darker) 0%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    48% { opacity: 0.8; }
    50% { opacity: 1; }
    52% { opacity: 0.7; }
    53% { opacity: 1; }
    70% { opacity: 0.9; }
    72% { opacity: 1; }
}

/* ===== GAME SCREEN ===== */
#game-screen {
    background: var(--bg-dark);
}

/* Background Layer */
#scene-background, #scene-background-next {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--bg-dark);
    transition: opacity var(--transition-cinematic);
    z-index: 0;
}
#scene-background-next {
    opacity: 0;
    z-index: 1;
}

/* Video Background Layer */
#scene-video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0;
    transition: opacity var(--transition-cinematic);
    pointer-events: none;
    background: transparent;
}
#scene-video.active {
    opacity: 1;
}

/* Atmospheric Overlays */
#atmosphere-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 2;
    pointer-events: none;
}

.vignette-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(ellipse at 50% 50%, transparent 50%, rgba(0, 0, 0, 0.5) 100%);
}

.mood-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease, background 1.5s ease;
    mix-blend-mode: overlay;
}

/* Mood color grades */
.mood-overlay.mood-warm { background: rgba(255, 149, 0, 0.08); opacity: 1; }
.mood-overlay.mood-danger { background: rgba(255, 45, 45, 0.1); opacity: 1; }
.mood-overlay.mood-intimate { background: rgba(255, 100, 150, 0.1); opacity: 1; }
.mood-overlay.mood-cold { background: rgba(80, 120, 255, 0.08); opacity: 1; }
.mood-overlay.mood-neon { background: linear-gradient(135deg, rgba(255,149,0,0.06) 0%, rgba(157,78,221,0.06) 100%); opacity: 1; }
.mood-overlay.mood-ecstasy {
    background: linear-gradient(135deg, rgba(255,45,123,0.12) 0%, rgba(255,149,0,0.08) 100%);
    opacity: 1;
    animation: ecstasy-pulse 2s ease-in-out infinite;
}

/* Dialogue box border glow matches mood */
#game-screen.scene-ecstasy .dialogue-inner::before {
    background: linear-gradient(90deg, transparent 5%, var(--neon-pink) 30%, var(--neon-amber) 50%, var(--neon-pink) 70%, transparent 95%);
    opacity: 0.7;
    animation: ecstasy-pulse 2s ease-in-out infinite;
}
#game-screen.scene-danger .dialogue-inner::before {
    background: linear-gradient(90deg, transparent 5%, #ff4545 30%, #ff6666 50%, #ff4545 70%, transparent 95%);
    opacity: 0.6;
}
#game-screen.scene-intimate .dialogue-inner::before {
    background: linear-gradient(90deg, transparent 5%, var(--neon-pink) 30%, rgba(255,100,150,0.8) 50%, var(--neon-pink) 70%, transparent 95%);
    opacity: 0.5;
}

@keyframes ecstasy-pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

#game-particles {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

/* Screen Flash */
#screen-flash {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 45;
    pointer-events: none;
    opacity: 0;
}
#screen-flash.flash-white {
    background: white;
    animation: flash 0.5s ease-out forwards;
}
#screen-flash.flash-amber {
    background: var(--neon-amber);
    animation: flash 0.6s ease-out forwards;
}
#screen-flash.flash-pink {
    background: var(--neon-pink);
    animation: flash 0.8s ease-out forwards;
}

@keyframes flash {
    0% { opacity: 0.7; }
    100% { opacity: 0; }
}

/* Letterbox */
.letterbox {
    position: absolute;
    left: 0;
    width: 100%;
    height: 0;
    background: black;
    z-index: 40;
    transition: height 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
#letterbox-top { top: 0; }
#letterbox-bottom { bottom: 0; }
.letterbox.active { height: 8vh; }

/* Chapter Card */
#chapter-card {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
    z-index: 50;
    opacity: 0;
    transition: opacity 1s ease;
}
#chapter-card.visible {
    opacity: 1;
}

.chapter-card-inner {
    display: flex;
    align-items: center;
    gap: 30px;
}

.chapter-line-left, .chapter-line-right {
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-amber));
    transition: width 1s ease 0.3s;
}
.chapter-line-right {
    background: linear-gradient(90deg, var(--neon-amber), transparent);
}
#chapter-card.visible .chapter-line-left,
#chapter-card.visible .chapter-line-right {
    width: 120px;
}

.chapter-text-block {
    text-align: center;
}

.chapter-number {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 300;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--neon-amber);
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.6s ease 0.5s;
}
#chapter-card.visible .chapter-number {
    opacity: 1;
    transform: translateY(0);
}

.chapter-title {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 0 40px rgba(255, 149, 0, 0.2);
    letter-spacing: 0.05em;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.6s ease 0.7s;
}
#chapter-card.visible .chapter-title {
    opacity: 1;
    transform: translateY(0);
}

/* ===== CHARACTER SPRITES ===== */
#character-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 5;
    pointer-events: none;
}

.character-sprite {
    position: absolute;
    bottom: 185px;
    height: 75vh;
    max-width: 40vw;
    object-fit: contain;
    opacity: 0;
    transition: all var(--transition-med) ease, filter 0.3s ease;
    filter: drop-shadow(0 4px 25px rgba(0, 0, 0, 0.7));
}
.character-sprite.visible {
    opacity: 1;
}
.character-sprite.pos-left {
    left: 3%;
    transform: translateX(0);
}
.character-sprite.pos-left.enter {
    animation: sprite-enter-left 0.5s ease forwards;
}
.character-sprite.pos-center {
    left: 50%;
    transform: translateX(-50%);
}
.character-sprite.pos-center.enter {
    animation: sprite-enter-center 0.5s ease forwards;
}
.character-sprite.pos-right {
    right: 3%;
}
.character-sprite.pos-right.enter {
    animation: sprite-enter-right 0.5s ease forwards;
}
.character-sprite.dimmed {
    filter: brightness(0.45) saturate(0.6) drop-shadow(0 4px 25px rgba(0, 0, 0, 0.7));
}

@keyframes sprite-enter-left {
    from { opacity: 0; transform: translateX(-60px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes sprite-enter-center {
    from { opacity: 0; transform: translateX(-50%) scale(0.95); }
    to { opacity: 1; transform: translateX(-50%) scale(1); }
}
@keyframes sprite-enter-right {
    from { opacity: 0; transform: translateX(60px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== DIALOGUE BOX ===== */
#dialogue-box {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 20;
    padding: 0 2.5vw 1.5vh 2.5vw;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.dialogue-inner {
    background: linear-gradient(180deg, rgba(5, 5, 15, 0.85) 0%, rgba(5, 5, 15, 0.95) 100%);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border: 1px solid var(--glass-border);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    padding: 20px 32px 24px;
    min-height: 150px;
    position: relative;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4);
}

.dialogue-inner::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent 5%, var(--neon-amber-dim) 30%, var(--neon-amber) 50%, var(--neon-amber-dim) 70%, transparent 95%);
    opacity: 0.5;
}

#char-name-wrapper {
    margin-bottom: 10px;
    min-height: 2em;
}

#char-name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.25);
    letter-spacing: 0.05em;
    transition: color var(--transition-fast);
}

.name-underline {
    width: 0;
    height: 2px;
    margin-top: 4px;
    border-radius: 1px;
    background: var(--gold);
    transition: width 0.3s ease;
    opacity: 0.5;
}
.name-underline.visible {
    width: 60px;
}

/* Character name colors */
#char-name.char-mia { color: #f0c0d0; }
#char-name.char-mia ~ .name-underline { background: #f0c0d0; }
#char-name.char-bella { color: #c77dba; }
#char-name.char-bella ~ .name-underline { background: #c77dba; }
#char-name.char-darius { color: var(--neon-amber); }
#char-name.char-darius ~ .name-underline { background: var(--neon-amber); }
#char-name.char-jj { color: #ffd700; }
#char-name.char-jj ~ .name-underline { background: #ffd700; }
#char-name.char-shanice { color: #e06060; }
#char-name.char-shanice ~ .name-underline { background: #e06060; }
#char-name.char-sophie { color: #70d0f0; }
#char-name.char-sophie ~ .name-underline { background: #70d0f0; }
#char-name.char-lily { color: #ff6b6b; }
#char-name.char-lily ~ .name-underline { background: #ff6b6b; }
#char-name.char-narrator { color: var(--text-secondary); font-style: italic; font-family: var(--font-ui); font-weight: 300; }
#char-name.char-narrator ~ .name-underline { background: var(--text-secondary); }
#char-name.char-inner { color: var(--neon-pink); font-style: italic; font-family: var(--font-ui); font-weight: 300; }
#char-name.char-inner ~ .name-underline { background: var(--neon-pink); }

#dialogue-text {
    font-family: var(--font-ui);
    font-size: clamp(0.95rem, 1.6vw, 1.15rem);
    font-weight: 400;
    line-height: 1.85;
    color: var(--text-primary);
    min-height: 3.6em;
    letter-spacing: 0.01em;
}

#dialogue-text.narrator-text {
    font-family: var(--font-display);
    font-weight: 400;
    font-style: italic;
    color: var(--text-narrator);
    font-size: clamp(0.95rem, 1.6vw, 1.1rem);
}

#dialogue-text.inner-text {
    font-style: italic;
    font-weight: 300;
    color: var(--neon-pink);
    opacity: 0.9;
    text-shadow: 0 0 20px var(--neon-pink-glow);
}

/* Typewriter cursor */
.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1.15em;
    background: var(--neon-amber);
    margin-left: 1px;
    vertical-align: text-bottom;
    animation: cursor-blink 0.7s step-end infinite;
    box-shadow: 0 0 6px var(--neon-amber-glow);
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

#advance-indicator {
    position: absolute;
    bottom: 10px;
    right: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
#advance-indicator.visible {
    opacity: 1;
}
#advance-indicator.auto-mode .advance-arrow {
    color: var(--neon-pink);
    animation: auto-pulse 1.5s ease-in-out infinite;
}
@keyframes auto-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; transform: translateY(3px); }
}
.advance-arrow {
    font-size: 0.8rem;
    color: var(--neon-amber);
    opacity: 0.7;
    animation: bounce-arrow 1.2s ease-in-out infinite;
}

@keyframes bounce-arrow {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(5px); opacity: 1; }
}

/* ===== CHOICE CONTAINER ===== */
#choice-container {
    position: absolute;
    bottom: 190px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 25;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 420px;
    max-width: 620px;
    width: 50vw;
}

.choice-btn {
    font-family: var(--font-ui);
    font-size: 1rem;
    font-weight: 400;
    padding: 18px 28px;
    background: linear-gradient(135deg, rgba(5, 5, 15, 0.92) 0%, rgba(15, 10, 25, 0.92) 100%);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    text-align: left;
    opacity: 0;
    transform: translateX(-20px);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.02em;
}
.choice-btn::before {
    content: '';
    position: absolute;
    left: 0; top: 0;
    width: 3px; height: 100%;
    background: var(--neon-amber);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.choice-btn:hover::before {
    opacity: 1;
}
.choice-btn.appear {
    animation: choice-slide-in 0.4s ease forwards;
}
.choice-btn:nth-child(1).appear { animation-delay: 0.05s; }
.choice-btn:nth-child(2).appear { animation-delay: 0.15s; }
.choice-btn:nth-child(3).appear { animation-delay: 0.25s; }

@keyframes choice-slide-in {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.choice-btn:hover {
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.15) 0%, rgba(255, 149, 0, 0.08) 100%);
    border-color: var(--glass-border-bright);
    color: var(--neon-amber);
    box-shadow: 0 0 30px rgba(255, 149, 0, 0.1), inset 0 0 30px rgba(255, 149, 0, 0.03);
    transform: translateX(4px);
}
.choice-btn:active {
    transform: scale(0.98);
    transition-duration: 0.05s;
}

.choice-label {
    display: block;
    line-height: 1.5;
}
.choice-hint {
    display: block;
    font-size: 0.78rem;
    font-weight: 300;
    font-style: italic;
    color: var(--text-secondary);
    margin-top: 5px;
    opacity: 0.6;
}

/* ===== STATS PANEL ===== */
#stats-panel {
    position: absolute;
    top: 60px;
    left: 16px;
    z-index: 15;
    background: var(--glass-bg-heavy);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 16px 20px 14px;
    min-width: 200px;
    transition: all var(--transition-med);
    box-shadow: var(--shadow-heavy);
    animation: panel-slide-in 0.3s ease;
}

@keyframes panel-slide-in {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.stats-header {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--neon-amber);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 149, 0, 0.15);
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.stat-row:last-child { margin-bottom: 0; }

.stat-icon {
    font-size: 0.7rem;
    width: 16px;
    text-align: center;
    opacity: 0.7;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    width: 70px;
    flex-shrink: 0;
}

.stat-bar-outer {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

.stat-bar-inner {
    height: 100%;
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}
.stat-bar-inner::after {
    content: '';
    position: absolute;
    right: 0; top: 0;
    width: 6px; height: 100%;
    background: white;
    opacity: 0.5;
    border-radius: 0 2px 2px 0;
    filter: blur(2px);
}

.bar-confidence { background: linear-gradient(90deg, #0077cc, var(--neon-blue)); width: 50%; }
.bar-submission { background: linear-gradient(90deg, #6b21a8, var(--neon-purple)); width: 0%; }
.bar-arousal { background: linear-gradient(90deg, #cc1155, var(--neon-pink)); width: 0%; }

.stat-value {
    font-size: 0.65rem;
    color: var(--text-dim);
    width: 24px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    transition: color 0.3s ease;
}
.stat-value.changed {
    color: var(--neon-amber);
}

/* Stat change flash */
.stat-flash {
    animation: stat-pulse 0.5s ease;
}
@keyframes stat-pulse {
    0% { filter: brightness(1); }
    50% { filter: brightness(2); }
    100% { filter: brightness(1); }
}

/* ===== SCENE PROGRESS ===== */
#scene-progress {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 2px;
    z-index: 15;
    background: rgba(255, 255, 255, 0.03);
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--neon-amber), var(--neon-pink));
    transition: width 0.8s ease;
    box-shadow: 0 0 8px var(--neon-amber-glow);
}

/* ===== QUICK MENU ===== */
#quick-menu {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 15;
    display: flex;
    gap: 6px;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}
#quick-menu:hover {
    opacity: 1;
}

.qm-btn {
    width: 34px;
    height: 34px;
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.qm-btn svg {
    width: 15px;
    height: 15px;
}
.qm-btn:hover {
    background: rgba(255, 149, 0, 0.12);
    border-color: var(--glass-border-bright);
    color: var(--neon-amber);
    box-shadow: 0 0 15px rgba(255, 149, 0, 0.1);
}
.qm-btn.active {
    background: rgba(255, 149, 0, 0.18);
    border-color: var(--neon-amber);
    color: var(--neon-amber);
}

/* ===== OVERLAYS ===== */
.overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: overlay-in 0.3s ease;
}

@keyframes overlay-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.overlay-panel {
    background: linear-gradient(180deg, rgba(12, 12, 20, 0.97) 0%, rgba(8, 8, 16, 0.97) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 40px 48px;
    min-width: 340px;
    text-align: center;
    box-shadow: var(--shadow-heavy), 0 0 60px rgba(0, 0, 0, 0.5);
    animation: panel-pop 0.3s ease;
}
.overlay-wide {
    min-width: 500px;
    max-width: 700px;
    width: 50vw;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

@keyframes panel-pop {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.overlay-panel h2 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--neon-amber);
    margin-bottom: 28px;
    text-shadow: 0 0 20px rgba(255, 149, 0, 0.2);
    letter-spacing: 0.08em;
}

.overlay-panel .menu-btn {
    display: flex;
    width: 100%;
    margin-bottom: 8px;
    font-size: 0.95rem;
}
.overlay-panel .menu-btn:last-child { margin-bottom: 0; }

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 16px;
}
.setting-row label {
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--text-secondary);
    min-width: 100px;
    text-align: left;
}
.setting-row input[type="range"] {
    flex: 1;
    accent-color: var(--neon-amber);
    height: 4px;
}
.setting-val {
    font-size: 0.8rem;
    color: var(--neon-amber);
    min-width: 30px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.shortcuts-info {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left;
}
.shortcuts-title {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 10px;
}
.shortcut-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.shortcut-key {
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 2px 8px;
    color: var(--neon-amber);
}

.button-row {
    margin-top: 24px;
}

/* History log */
.history-log {
    flex: 1;
    overflow-y: auto;
    text-align: left;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin-bottom: 16px;
    max-height: 50vh;
}
.history-log::-webkit-scrollbar {
    width: 4px;
}
.history-log::-webkit-scrollbar-track {
    background: transparent;
}
.history-log::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 2px;
}
.history-entry {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.history-entry:last-child {
    margin-bottom: 0;
    border-bottom: none;
}
.history-name {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 3px;
}
.history-text {
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== NOTIFICATION ===== */
#notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    z-index: 200;
    background: var(--glass-bg-heavy);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border-bright);
    border-radius: 10px;
    padding: 10px 28px;
    color: var(--neon-amber);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: var(--shadow-glow-amber);
}
#notification.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    display: block !important;
}

/* ===== SCENE TRANSITION ===== */
#scene-transition {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: black;
    z-index: 35;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}
#scene-transition.active {
    opacity: 1;
    transition: opacity 0.4s ease;
}

/* CRT Scanlines on game screen */
#game-scanlines {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.015) 2px,
        rgba(0, 0, 0, 0.015) 4px
    );
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}
#game-scanlines.active { opacity: 1; }

/* Dialogue fade effect */
#dialogue-text.text-fade-in {
    animation: textFadeIn 0.2s ease;
}
@keyframes textFadeIn {
    from { opacity: 0.3; }
    to { opacity: 1; }
}

/* Quick menu auto-hide */
#quick-menu.dim {
    opacity: 0.1;
}

/* ===== CLICK HINT ===== */
#click-hint {
    position: fixed;
    bottom: 200px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 8px 24px;
    font-size: 0.75rem;
    font-weight: 300;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease;
}
#click-hint.visible {
    display: block !important;
    animation: hintPulse 4s ease-in-out forwards;
}
@keyframes hintPulse {
    0% { opacity: 0; }
    15% { opacity: 0.7; }
    70% { opacity: 0.7; }
    100% { opacity: 0; display: none; }
}

/* ===== SCREEN EFFECTS ===== */
.screen-shake {
    animation: shake 0.4s ease-in-out;
}
@keyframes shake {
    0%, 100% { transform: translate(0); }
    15% { transform: translate(-5px, 3px); }
    30% { transform: translate(5px, -2px); }
    45% { transform: translate(-3px, 5px); }
    60% { transform: translate(3px, -3px); }
    75% { transform: translate(-2px, 2px); }
}

.screen-pulse {
    animation: screen-pulse 0.6s ease;
}
@keyframes screen-pulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

/* ===== ENDING SCREEN ===== */
.ending-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--neon-amber);
    text-shadow: 0 0 40px var(--neon-amber-glow);
    margin-bottom: 16px;
    opacity: 0;
    animation: title-element-in 1s ease 0.3s forwards;
}
.ending-tagline {
    font-family: var(--font-ui);
    font-size: 1rem;
    font-weight: 300;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 32px;
    opacity: 0;
    animation: title-element-in 0.8s ease 0.8s forwards;
}
.ending-stats {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin-bottom: 32px;
    opacity: 0;
    animation: title-element-in 0.8s ease 1.2s forwards;
}
.ending-stat {
    text-align: center;
}
.ending-stat-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}
.ending-stat-value.stat-confidence { color: var(--neon-blue); }
.ending-stat-value.stat-submission { color: var(--neon-purple); }
.ending-stat-value.stat-arousal { color: var(--neon-pink); }
.ending-stat-label {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-dim);
}
.ending-credit {
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    margin-bottom: 32px;
    opacity: 0;
    animation: title-element-in 0.8s ease 1.6s forwards;
}
.ending-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    opacity: 0;
    animation: title-element-in 0.8s ease 2s forwards;
}
.ending-buttons .menu-btn {
    min-width: 160px;
}

/* ===== FADE TRANSITIONS ===== */
.fade-in { animation: fadeIn 0.6s ease forwards; }
.fade-out { animation: fadeOut 0.6s ease forwards; }
.fade-in-slow { animation: fadeIn 1.2s ease forwards; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ===== DIALOGUE BOX BREATHING ===== */
#dialogue-box .dialogue-inner::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(180deg, transparent 70%, rgba(255, 149, 0, 0.02) 100%);
    pointer-events: none;
    border-radius: inherit;
}

/* ===== AMBIENT GLOW ===== */
.character-sprite.visible {
    animation: sprite-breathe 4s ease-in-out infinite;
}
@keyframes sprite-breathe {
    0%, 100% { filter: drop-shadow(0 4px 25px rgba(0, 0, 0, 0.7)); }
    50% { filter: drop-shadow(0 4px 30px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 5px rgba(255, 149, 0, 0.05)); }
}
.character-sprite.dimmed {
    animation: none;
    filter: brightness(0.45) saturate(0.6) drop-shadow(0 4px 25px rgba(0, 0, 0, 0.7));
}

/* ===== CHOICE COUNTDOWN HINT ===== */
.choice-btn::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    height: 2px;
    width: 0;
    background: var(--neon-amber);
    opacity: 0;
    transition: width 0.3s ease, opacity 0.3s ease;
}
.choice-btn:hover::after {
    width: 100%;
    opacity: 0.5;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .dialogue-inner {
        padding: 14px 18px 18px;
        min-height: 120px;
    }
    #char-name { font-size: 1rem; }
    #dialogue-text { font-size: 0.9rem; }
    #choice-container {
        min-width: unset;
        width: 92vw;
        bottom: 160px;
    }
    .choice-btn { font-size: 0.9rem; padding: 14px 20px; }
    .character-sprite { height: 60vh; max-width: 50vw; bottom: 150px; }
    #stats-panel { top: 50px; left: 8px; padding: 10px 14px; min-width: 160px; }
    .overlay-panel { padding: 28px 24px; min-width: 280px; }
    .overlay-wide { min-width: unset; width: 92vw; }
    .title-main { letter-spacing: 0.06em; }
}

/* ========================================
   POLISH PASS — Custom Event Effects
   Heartbeat, particles, text fragments,
   sprite effects, stat slams, overlays
   ======================================== */

/* --- Heartbeat Vignette Overlay --- */
#heartbeat-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 4;
    pointer-events: none;
    opacity: 0;
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease;
}
#heartbeat-overlay.active {
    opacity: 1;
    animation: heartbeat-vignette 1s ease-in-out infinite;
}
@keyframes heartbeat-vignette {
    0%, 60%, 100% {
        box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.3);
    }
    15% {
        box-shadow: inset 0 0 150px rgba(0, 0, 0, 0.7);
    }
    30% {
        box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.3);
    }
    45% {
        box-shadow: inset 0 0 150px rgba(0, 0, 0, 0.7);
    }
}

/* --- Overwhelm Overlay (ecstasy scenes) --- */
#overwhelm-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 4;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease;
    background:
        radial-gradient(ellipse at 50% 50%, transparent 30%, rgba(255, 45, 123, 0.1) 60%, rgba(255, 45, 123, 0.2) 100%),
        radial-gradient(ellipse at 30% 70%, rgba(255, 149, 0, 0.05) 0%, transparent 50%);
}
#overwhelm-overlay.active {
    opacity: 1;
    animation: overwhelm-breathe 2s ease-in-out infinite;
}
@keyframes overwhelm-breathe {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* --- Climax White-out --- */
#climax-whiteout {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: white;
    z-index: 44;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}
#climax-whiteout.active {
    animation: slow-whiteout 3s ease-in forwards;
}
@keyframes slow-whiteout {
    0% { opacity: 0; }
    100% { opacity: 0.7; }
}

/* --- Background Zoom / Ken Burns --- */
#game-screen.bg-zoom #scene-background {
    transform: scale(1.05);
    transition: transform 10s linear;
}
#game-screen.bg-zoom #scene-background-next {
    transform: scale(1.05);
    transition: transform 10s linear;
}

/* --- Flash Variants --- */
#screen-flash.flash-red {
    background: #ff2020;
    animation: flash 0.4s ease-out forwards;
}
#screen-flash.flash-gold {
    background: var(--gold);
    animation: flash 0.6s ease-out forwards;
}
#screen-flash.flash-triple {
    animation: triple-flash 0.9s ease-out forwards;
}
@keyframes triple-flash {
    0% { background: var(--neon-pink); opacity: 0.7; }
    30% { background: var(--neon-amber); opacity: 0.5; }
    60% { background: white; opacity: 0.6; }
    100% { background: white; opacity: 0; }
}

/* --- Screen Shake Variants --- */
.screen-shake-extended {
    animation: shake-extended 0.8s ease-in-out !important;
}
@keyframes shake-extended {
    0%, 100% { transform: translate(0); }
    10% { transform: translate(-6px, 3px); }
    20% { transform: translate(5px, -4px); }
    30% { transform: translate(-4px, 5px); }
    40% { transform: translate(4px, -3px); }
    50% { transform: translate(-3px, 4px); }
    60% { transform: translate(3px, -2px); }
    70% { transform: translate(-2px, 2px); }
    80% { transform: translate(1px, -1px); }
}

.screen-shake-heavy {
    animation: shake-heavy 0.8s ease-in-out !important;
}
@keyframes shake-heavy {
    0%, 100% { transform: translate(0); }
    10% { transform: translate(-8px, 5px); }
    20% { transform: translate(8px, -4px); }
    30% { transform: translate(-6px, 8px); }
    40% { transform: translate(6px, -6px); }
    50% { transform: translate(-4px, 4px); }
    60% { transform: translate(4px, -3px); }
    70% { transform: translate(-3px, 2px); }
    80% { transform: translate(2px, -1px); }
}

.screen-thump {
    animation: thump 0.25s ease !important;
}
@keyframes thump {
    0%, 100% { transform: translate(0); }
    30% { transform: translate(0, 4px); }
    60% { transform: translate(0, -2px); }
}

/* --- Screen Tilt & Contract --- */
.screen-tilt {
    transform: rotate(0.5deg) !important;
    transition: transform 0.5s ease !important;
}

.screen-contract {
    animation: screen-contract-anim 0.6s ease !important;
}
@keyframes screen-contract-anim {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.98); }
}

/* --- Camera Lower (kneel) --- */
.camera-lower-active {
    animation: camera-lower 1s ease forwards !important;
}
@keyframes camera-lower {
    0% { transform: translateY(0); }
    100% { transform: translateY(15px); }
}

/* --- Power Entrance (darken/brighten) --- */
.power-entrance-active {
    animation: power-entrance-anim 0.6s ease forwards !important;
}
@keyframes power-entrance-anim {
    0% { filter: brightness(1); }
    30% { filter: brightness(0.3); }
    60% { filter: brightness(1.2); }
    100% { filter: brightness(1); }
}

/* --- Point of No Return (UI dims) --- */
#game-screen.point-of-no-return-active #stats-panel,
#game-screen.point-of-no-return-active #quick-menu {
    opacity: 0.1 !important;
    transition: opacity 1s ease;
}

/* --- Desaturation Pulse (secret shame) --- */
.desaturation-pulse {
    animation: desaturation-pulse-anim 1.5s ease forwards !important;
}
@keyframes desaturation-pulse-anim {
    0% { filter: saturate(1); }
    30% { filter: saturate(0.2); }
    50% { filter: saturate(0.3) brightness(0.95); }
    70% { filter: saturate(0.8); }
    100% { filter: saturate(1); }
}

/* --- Aftermath Peace (sepia) --- */
#game-screen.aftermath-peace-active {
    filter: sepia(0.3) saturate(0.8);
    transition: filter 3s ease;
}

/* --- Golden Return Filter --- */
#game-screen.golden-return-active {
    filter: sepia(0.15) saturate(1.2) brightness(1.05);
    transition: filter 1s ease;
}

/* --- Screen Split (switch) --- */
.screen-split-active {
    animation: screen-split-anim 0.4s ease !important;
}
@keyframes screen-split-anim {
    0% { clip-path: inset(0); }
    25% { clip-path: inset(0 50% 0 0); }
    50% { clip-path: inset(0 0 0 50%); }
    75% { clip-path: inset(0); filter: brightness(2); }
    100% { clip-path: inset(0); filter: brightness(1); }
}

/* --- Text Effects --- */
.text-glow-amber {
    text-shadow: 0 0 10px rgba(255, 149, 0, 0.5), 0 0 20px rgba(255, 149, 0, 0.2) !important;
}
.text-glow-pink {
    text-shadow: 0 0 10px rgba(255, 45, 123, 0.4), 0 0 20px rgba(255, 45, 123, 0.15) !important;
}

/* Good Girl — larger/bolder golden text */
#dialogue-text.text-good-girl {
    font-size: clamp(1.1rem, 2vw, 1.4rem) !important;
    font-weight: 700 !important;
    color: var(--gold) !important;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.4), 0 0 30px rgba(255, 215, 0, 0.2) !important;
}

/* Text Fragment — words appear with varying opacity */
#dialogue-text.text-fragment .frag-word {
    display: inline;
    opacity: 0;
    animation: frag-word-in 0.2s ease forwards;
}
#dialogue-text.text-fragment .frag-word.frag-emphasis {
    font-size: 1.1em;
}
@keyframes frag-word-in {
    from { opacity: 0; transform: translateY(2px); }
    to { opacity: var(--frag-opacity, 1); transform: translateY(0); }
}

/* --- Sprite Effects --- */
.character-sprite.sprite-glow {
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5)) drop-shadow(0 0 40px rgba(255, 215, 0, 0.2)) !important;
    animation: sprite-glow-pulse 3s ease-in-out infinite !important;
}
@keyframes sprite-glow-pulse {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5)) drop-shadow(0 0 40px rgba(255, 215, 0, 0.2)); }
    50% { filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.6)) drop-shadow(0 0 50px rgba(255, 215, 0, 0.3)); }
}

.character-sprite.dominance-aura {
    filter: drop-shadow(0 0 25px rgba(255, 149, 0, 0.5)) drop-shadow(0 0 50px rgba(255, 149, 0, 0.2)) !important;
}

.character-sprite.sprite-jolt {
    animation: sprite-jolt-anim 0.3s ease !important;
}
@keyframes sprite-jolt-anim {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    50% { transform: translateX(8px); }
    75% { transform: translateX(-4px); }
}
.character-sprite.pos-center.sprite-jolt {
    animation: sprite-jolt-center 0.3s ease !important;
}
@keyframes sprite-jolt-center {
    0%, 100% { transform: translateX(-50%); }
    25% { transform: translateX(calc(-50% - 8px)); }
    50% { transform: translateX(calc(-50% + 8px)); }
    75% { transform: translateX(calc(-50% - 4px)); }
}

.character-sprite.sprite-jerk {
    animation: sprite-jerk-anim 0.4s ease !important;
}
@keyframes sprite-jerk-anim {
    0% { transform: translateX(0); }
    20% { transform: translateX(15px) rotate(2deg); }
    40% { transform: translateX(-10px) rotate(-1deg); }
    60% { transform: translateX(5px); }
    100% { transform: translateX(0); }
}
.character-sprite.pos-center.sprite-jerk {
    animation: sprite-jerk-center 0.4s ease !important;
}
@keyframes sprite-jerk-center {
    0% { transform: translateX(-50%); }
    20% { transform: translateX(calc(-50% + 15px)) rotate(2deg); }
    40% { transform: translateX(calc(-50% - 10px)) rotate(-1deg); }
    60% { transform: translateX(calc(-50% + 5px)); }
    100% { transform: translateX(-50%); }
}

/* Sprite Breathing — intimate/ecstasy scenes */
.character-sprite.sprite-breathing {
    animation: sprite-breathe-intimate 3s ease-in-out infinite !important;
}
.character-sprite.sprite-breathing-fast {
    animation: sprite-breathe-fast 1.5s ease-in-out infinite !important;
}
@keyframes sprite-breathe-intimate {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.008); }
}
@keyframes sprite-breathe-fast {
    0%, 100% { transform: scale(0.995); }
    50% { transform: scale(1.01); }
}
.character-sprite.pos-center.sprite-breathing {
    animation: sprite-breathe-intimate-c 3s ease-in-out infinite !important;
}
.character-sprite.pos-center.sprite-breathing-fast {
    animation: sprite-breathe-fast-c 1.5s ease-in-out infinite !important;
}
@keyframes sprite-breathe-intimate-c {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.008); }
}
@keyframes sprite-breathe-fast-c {
    0%, 100% { transform: translateX(-50%) scale(0.995); }
    50% { transform: translateX(-50%) scale(1.01); }
}

/* --- Stat Bar Slam (overshoot on big changes) --- */
.stat-bar-inner.stat-slam {
    animation: stat-slam-overshoot 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}
@keyframes stat-slam-overshoot {
    0% { filter: brightness(1); transform: scaleX(1); }
    40% { filter: brightness(2.5); transform: scaleX(1.08); }
    60% { filter: brightness(2); transform: scaleX(0.97); }
    80% { filter: brightness(1.5); transform: scaleX(1.02); }
    100% { filter: brightness(1); transform: scaleX(1); }
}

/* All stats pulse together */
.stats-all-pulse .stat-bar-inner {
    animation: stat-pulse 0.5s ease !important;
}
