/**
 * ============================================================================
 * glitch.css - 스릴러 연출 전용 스타일
 * ============================================================================
 * Day 1: 사용 안 됨 (완벽한 미연시)
 * Day 2+: GlitchSystem.js에 의해 점진적으로 활성화
 */

/* ===== Glitch Overlay ===== */
.glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    pointer-events: none;
}

/* Noise Effect */
.glitch-overlay.noise {
    background: repeating-linear-gradient(
        0deg,
        rgba(255, 0, 0, 0.03) 0px,
        transparent 1px,
        transparent 2px
    );
    animation: noise-flicker 0.15s infinite;
}

@keyframes noise-flicker {
    0% { opacity: 0.8; }
    50% { opacity: 0.4; }
    100% { opacity: 0.9; }
}

/* Heavy Glitch */
.glitch-overlay.heavy-glitch {
    background:
        linear-gradient(rgba(255, 0, 0, 0.1) 50%, transparent 50%);
    background-size: 100% 4px;
    animation: heavy-glitch-anim 0.1s infinite;
}

@keyframes heavy-glitch-anim {
    0% { transform: translate(0); }
    25% { transform: translate(-2px, 1px); }
    50% { transform: translate(2px, -1px); }
    75% { transform: translate(-1px, -2px); }
    100% { transform: translate(1px, 2px); }
}

/* Screen Shake */
.screen-shake {
    animation: shake 0.1s infinite;
}

@keyframes shake {
    0% { transform: translate(0); }
    25% { transform: translate(-3px, 2px); }
    50% { transform: translate(3px, -2px); }
    75% { transform: translate(-2px, -3px); }
    100% { transform: translate(2px, 3px); }
}

/* ===== Text Glitch ===== */
.glitch-text {
    animation: text-glitch 0.1s ease;
    color: #ff0040 !important;
    text-shadow: 2px 0 #00ff00, -2px 0 #0000ff;
}

@keyframes text-glitch {
    0% { transform: skewX(0deg); }
    25% { transform: skewX(-5deg); }
    75% { transform: skewX(3deg); }
    100% { transform: skewX(0deg); }
}

/* ===== Ghost Text ===== */
.ghost-text {
    position: absolute;
    z-index: 40;
    font-size: 0.85rem;
    color: rgba(200, 0, 0, 0.4);
    pointer-events: none;
    animation: ghost-fade 2s ease forwards;
    font-family: var(--font-main);
}

@keyframes ghost-fade {
    0% { opacity: 0; transform: translateY(0); }
    30% { opacity: 0.6; }
    100% { opacity: 0; transform: translateY(-30px); }
}

/* ===== Stat Revealed ===== */
.stat-revealed {
    animation: stat-reveal 0.5s ease;
    color: #ff2020 !important;
}

@keyframes stat-reveal {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); color: #ff0000; }
    100% { transform: scale(1); }
}

/* ===== Forced Choice ===== */
.forced-choice {
    opacity: 0.5;
    border-color: rgba(139, 0, 0, 0.5) !important;
    cursor: not-allowed !important;
    animation: force-pulse 1s ease infinite;
}

@keyframes force-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.6; }
}

/* ===== Cherry Blossom Particles (Title Screen) ===== */
.cherry-blossom-petal {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--color-primary);
    border-radius: 50% 0 50% 50%;
    opacity: 0.6;
    animation: petal-fall linear infinite;
    pointer-events: none;
}

@keyframes petal-fall {
    0% {
        transform: translateY(-10vh) rotate(0deg) translateX(0);
        opacity: 0.7;
    }
    100% {
        transform: translateY(110vh) rotate(720deg) translateX(100px);
        opacity: 0;
    }
}

/* ===== Dialogue Box - Thriller Mode ===== */
.dialogue-box.thriller-mode {
    border-top: 1px solid rgba(139, 0, 0, 0.5);
    box-shadow: 0 -5px 20px rgba(139, 0, 0, 0.2);
}

/* ===== Character - Silhouette ===== */
.character-sprite.silhouette {
    filter: brightness(0) opacity(0.7);
}

/* ===== Drug Blur (리인 음료 페널티) ===== */
.drug-blur {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    animation: drug-pulse 0.5s ease-out forwards;
}

@keyframes drug-pulse {
    0% { opacity: 0; backdrop-filter: blur(0px); }
    40% { opacity: 1; backdrop-filter: blur(10px); }
    100% { opacity: 0; backdrop-filter: blur(2px); }
}

/* ===== Red Vignette (Day 4+) ===== */
.bg-overlay.vignette-red {
    background: radial-gradient(
        ellipse at center,
        transparent 50%,
        rgba(80, 0, 0, 0.4) 100%
    );
}

/* ===== Drug Text Corruption (Zalgo effect) ===== */
.drug-text-corrupt {
    animation: zalgo-flicker 0.3s ease;
}

@keyframes zalgo-flicker {
    0% { opacity: 1; filter: none; }
    30% { opacity: 0.7; filter: blur(1px); transform: skewX(-2deg); }
    60% { opacity: 1; filter: none; transform: skewX(0); }
    100% { opacity: 1; }
}

/* ===== Choice Wave (drug debuff) ===== */
.choice-wave {
    animation: wave-text 2s ease-in-out infinite;
}

@keyframes wave-text {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-2px) rotate(0.5deg); }
    50% { transform: translateY(1px) rotate(-0.3deg); }
    75% { transform: translateY(-1px) rotate(0.2deg); }
}

/* ===== Choice Disguise (drug debuff + high danger) ===== */
.choice-disguise {
    animation: disguise-flash 1s ease forwards;
}

@keyframes disguise-flash {
    0% { opacity: 1; }
    40% { opacity: 0.3; filter: blur(2px); }
    50% { opacity: 1; filter: none; }
    100% { opacity: 1; }
}

/* ===== Fake Permission Modal ===== */
.fake-permission-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    color: #333;
    border-radius: 14px;
    padding: 24px;
    max-width: 320px;
    width: 90%;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: center;
    animation: modal-appear 0.3s ease;
}

.fake-permission-modal .modal-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 8px;
}

.fake-permission-modal .modal-desc {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 16px;
}

.fake-permission-modal .modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fake-permission-modal .modal-btn {
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

.fake-permission-modal .modal-btn.allow {
    background: #007AFF;
    color: white;
    font-weight: 600;
}

.fake-permission-modal .modal-btn.deny {
    background: #f0f0f0;
    color: #333;
}

.fake-permission-modal .modal-btn.auto-click {
    animation: auto-press 0.3s ease forwards;
}

@keyframes auto-press {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); background: #005ECB; }
    100% { transform: scale(1); background: #007AFF; }
}

@keyframes modal-appear {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ===== Dodge Button (Day 5 열린 감옥) ===== */
.dodge-btn {
    transition: transform 0.15s ease-out, opacity 0.3s ease;
    will-change: transform;
}

.dodge-btn:hover {
    /* PC: 호버 시 미세한 떨림 — 잡으려 하지만 빠져나가는 느낌 */
    animation: dodge-tremble 0.08s ease infinite;
}

@keyframes dodge-tremble {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-1px, 1px); }
    50% { transform: translate(1px, -1px); }
    75% { transform: translate(-1px, -1px); }
    100% { transform: translate(1px, 1px); }
}

.dodge-btn.fading {
    opacity: 0;
    pointer-events: none;
}

/* ===== Timed Choice Timer Bar ===== */
.choice-timer {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
}

.choice-timer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #ff4444, #ff8844);
    border-radius: 2px;
    animation: timer-shrink var(--timer-duration, 10s) linear forwards;
}

@keyframes timer-shrink {
    0% { width: 100%; }
    60% { background: linear-gradient(90deg, #ff4444, #ff8844); }
    80% { background: linear-gradient(90deg, #ff2222, #ff4444); }
    100% { width: 0%; background: #ff0000; }
}

.choice-timer-text {
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 100, 100, 0.8);
    margin-bottom: 4px;
    font-variant-numeric: tabular-nums;
}

/* 타이머 위급 (3초 이하) */
.choice-timer.urgent::after {
    animation-timing-function: steps(2, jump-none);
    background: #ff0000 !important;
}

/* ===== Long Press Indicator (모바일 탈출) ===== */
.long-press-btn {
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.long-press-btn .press-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff4444, #ff8888);
    width: 0%;
    border-radius: 0 0 4px 4px;
    transition: none;
}

.long-press-btn .press-progress.success {
    background: linear-gradient(90deg, #44ff44, #88ff88);
    width: 100%;
}

.long-press-btn:active {
    transform: scale(0.97);
}

/* 누르는 동안 테두리 펄스 */
.long-press-btn.pressing {
    animation: press-border-pulse 1s ease infinite;
    border-color: #ff4444;
}

@keyframes press-border-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(255, 68, 68, 0); }
}

/* ===== Cursor Slowdown (PC Day 5) ===== */
.cursor-slowdown-overlay {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(139, 0, 0, 0.3);
    border: 1px solid rgba(139, 0, 0, 0.5);
    pointer-events: none;
    z-index: 9999;
    transition: left 0.3s ease-out, top 0.3s ease-out;
    transform: translate(-50%, -50%);
}

/* 커서 감속 중 전체 화면 커서 변경 */
body.cursor-slowed {
    cursor: wait !important;
}

body.cursor-slowed * {
    cursor: inherit !important;
}

/* ===== Screen Crack Effect ===== */
.screen-crack-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 150;
    pointer-events: none;
    animation: crack-appear 0.1s ease-out forwards;
}

@keyframes crack-appear {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0.9; }
}

.screen-crack-overlay.fading {
    transition: opacity 0.5s ease;
    opacity: 0;
}

/* ===== Fake Emergency Alert (모바일 가짜 긴급 알림) ===== */
.fake-emergency-alert {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    width: 92%;
    max-width: 400px;
    background: rgba(30, 30, 30, 0.97);
    color: #fff;
    border-radius: 0 0 14px 14px;
    padding: 16px 20px;
    z-index: 200;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.fake-emergency-alert.visible {
    transform: translateX(-50%) translateY(0);
}

.fake-emergency-alert .alert-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.fake-emergency-alert .alert-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
}

.fake-emergency-alert .alert-icon.ios {
    background: #ff3b30;
}

.fake-emergency-alert .alert-icon.android {
    background: #f44336;
}

.fake-emergency-alert .alert-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.fake-emergency-alert .alert-time {
    margin-left: auto;
    font-size: 0.75rem;
    color: #888;
}

.fake-emergency-alert .alert-body {
    font-size: 0.85rem;
    line-height: 1.4;
    color: #ddd;
}

/* ===== Mobile Shake + Vibration Dual Effect ===== */
@media (hover: none) and (pointer: coarse) {
    /* 모바일: CSS shake + vibration API 동시 적용 */
    .screen-shake-mobile {
        animation: mobile-shake 0.15s infinite;
    }

    @keyframes mobile-shake {
        0% { transform: translate(0); }
        20% { transform: translate(-4px, 3px); }
        40% { transform: translate(4px, -2px); }
        60% { transform: translate(-3px, -4px); }
        80% { transform: translate(3px, 4px); }
        100% { transform: translate(0); }
    }
}

/* ===== Heartbeat Pulse (공포 절정) ===== */
.heartbeat-pulse {
    animation: heartbeat 0.8s ease infinite;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.04); }
    28% { transform: scale(1); }
    42% { transform: scale(1.06); }
    56% { transform: scale(1); }
    100% { transform: scale(1); }
}

/* =============================================================================
   가로 모드(Landscape) 전용 기믹 스타일
   ============================================================================= */

/* ===== Orientation Hijack Overlay ===== */
.orientation-hijack {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 300;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 20px;
    transition: background 0.3s ease;
}

/* Day 1~3: 정상 안내 */
.orientation-hijack.normal {
    background: #111;
    color: #aaa;
}

.orientation-hijack.normal .orient-icon {
    width: 60px;
    height: 60px;
    border: 2px solid #aaa;
    border-radius: 8px;
    animation: rotate-phone 1.5s ease-in-out infinite;
    position: relative;
}

.orientation-hijack.normal .orient-icon::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 3px;
    background: #aaa;
    border-radius: 2px;
}

/* rotate-phone keyframes는 style.css에 정의됨 */

.orientation-hijack.normal .orient-text {
    font-size: 0.9rem;
    color: #888;
    max-width: 260px;
    line-height: 1.5;
}

/* Day 4: 은수 하이재킹 */
.orientation-hijack.hijack-eunsu {
    background: #0a0000;
}

.orientation-hijack.hijack-eunsu .hijack-face {
    width: 80%;
    max-width: 300px;
    filter: brightness(0.7) contrast(1.3) saturate(0.5);
    animation: hijack-face-pulse 2s ease infinite;
}

.orientation-hijack.hijack-eunsu .hijack-text {
    font-size: 1.2rem;
    color: #cc0000;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(200, 0, 0, 0.5);
    animation: hijack-text-flicker 0.1s ease infinite;
}

/* Day 5: 세아 하이재킹 */
.orientation-hijack.hijack-sea {
    background: #000008;
}

.orientation-hijack.hijack-sea .hijack-face {
    width: 80%;
    max-width: 300px;
    filter: brightness(0.5) contrast(1.5) hue-rotate(340deg);
    animation: hijack-face-close 3s ease-in forwards;
}

.orientation-hijack.hijack-sea .hijack-text {
    font-size: 1.1rem;
    color: #8888ff;
    text-shadow: 0 0 15px rgba(100, 100, 255, 0.6);
}

@keyframes hijack-face-pulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
}

@keyframes hijack-face-close {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.3); opacity: 1; }
}

@keyframes hijack-text-flicker {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* ===== Multi-Touch Door Push ===== */
.multi-touch-door {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 80;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    gap: 20px;
}

.multi-touch-door .door-instruction {
    font-size: 0.85rem;
    color: rgba(255, 100, 100, 0.8);
    text-align: center;
    max-width: 280px;
    line-height: 1.5;
    animation: door-text-pulse 1.5s ease infinite;
}

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

.multi-touch-door .door-progress-bar {
    width: 80%;
    max-width: 320px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.multi-touch-door .door-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff4444, #ff8844, #ffcc44);
    border-radius: 4px;
    transition: none;
}

.multi-touch-door .door-progress-fill.success {
    background: linear-gradient(90deg, #44ff44, #88ff88);
    width: 100%;
}

/* 양쪽 터치 영역 시각 힌트 */
.multi-touch-door .touch-zone {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 120px;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.multi-touch-door .touch-zone.left {
    left: 5%;
}

.multi-touch-door .touch-zone.right {
    right: 5%;
}

.multi-touch-door .touch-zone.active {
    border-color: rgba(255, 100, 100, 0.5);
    background: rgba(255, 100, 100, 0.05);
}

.multi-touch-door .touch-zone .thumb-icon {
    font-size: 1.5rem;
    opacity: 0.3;
}

/* ===== Peripheral Ghost (주변부 시야 공포) ===== */
.peripheral-ghost {
    position: fixed;
    z-index: 45;
    pointer-events: none;
    opacity: 0;
    transition: opacity ease;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.peripheral-ghost.left {
    left: 2%;
    top: 30%;
}

.peripheral-ghost.right {
    right: 2%;
    top: 30%;
}

/* ===== Thumb-Hostile Choice Placement ===== */
@media (orientation: landscape) and (hover: none) and (pointer: coarse) {
    /* 가로 모드 + 터치 전용 */
    .choice-btn.thumb-easy {
        position: absolute !important;
        right: 5%;
        bottom: 15%;
        font-size: 1.1rem;
        padding: 14px 28px;
        min-width: 160px;
    }

    .choice-btn.thumb-hard {
        position: absolute !important;
        left: 8%;
        top: 15%;
        font-size: 0.8rem;
        padding: 6px 14px;
        min-width: auto;
        opacity: 0.7;
    }

    .choice-btn.thumb-extreme {
        position: absolute !important;
        left: 50%;
        top: 8%;
        transform: translateX(-50%);
        font-size: 0.7rem;
        padding: 4px 10px;
        min-width: auto;
        opacity: 0.5;
    }
}

/* ===== AI Free Input UI ===== */
.ai-input-container {
    display: flex;
    gap: 8px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin-top: 8px;
}

.ai-input-container input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.5);
    color: #ddd;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease;
}

.ai-input-container input:focus {
    border-color: var(--color-accent, #ff69b4);
}

.ai-input-container input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.ai-input-container button {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    background: var(--color-accent, #ff69b4);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.ai-input-container button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* AI 응답 대기 중 입력 비활성화 */
.ai-input-container.waiting input {
    opacity: 0.5;
    pointer-events: none;
}

.ai-input-container.waiting button {
    opacity: 0.3;
    pointer-events: none;
}

/* =========================================================================
   Save Slot Glitch UI — Day 4 세이브파일 강제 오픈 연출
   ========================================================================= */

#save-slot-overlay {
    z-index: 55;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: slot-overlay-appear 0.8s ease forwards;
}

#save-slot-overlay.hidden {
    display: none;
}

@keyframes slot-overlay-appear {
    0% { opacity: 0; }
    30% { opacity: 1; }
    35% { opacity: 0.3; }
    40% { opacity: 1; }
    100% { opacity: 1; }
}

.save-slot-container {
    width: min(90vw, 700px);
    max-height: 85vh;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    color: #00ff41;
    scrollbar-width: thin;
    scrollbar-color: #00ff41 #0a0a0a;
}

.save-slot-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #00ff4140;
    padding-bottom: 12px;
}

.save-slot-title {
    display: block;
    font-size: 1.4em;
    letter-spacing: 6px;
    animation: slot-title-glitch 3s infinite;
}

.save-slot-subtitle {
    display: block;
    font-size: 0.75em;
    color: #00ff4160;
    margin-top: 4px;
    letter-spacing: 2px;
}

@keyframes slot-title-glitch {
    0%, 92%, 100% { text-shadow: none; transform: none; }
    93% { text-shadow: -2px 0 #ff0040, 2px 0 #00f0ff; transform: skewX(-2deg); }
    95% { text-shadow: 2px 0 #ff0040, -2px 0 #00f0ff; transform: skewX(1deg); }
    96% { text-shadow: none; transform: none; }
}

/* Individual slot */
.save-slot-item {
    display: grid;
    grid-template-columns: 50px 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 10px 14px;
    margin: 4px 0;
    background: rgba(0, 255, 65, 0.03);
    border: 1px solid transparent;
    border-radius: 2px;
    font-size: 0.85em;
    opacity: 0;
    animation: slot-item-reveal 0.3s ease forwards;
    transition: border-color 0.2s, background 0.2s;
}

.save-slot-item:hover {
    border-color: #00ff4130;
    background: rgba(0, 255, 65, 0.06);
}

@keyframes slot-item-reveal {
    0% { opacity: 0; transform: translateX(-10px); }
    100% { opacity: 1; transform: translateX(0); }
}

.slot-number {
    font-weight: bold;
    color: #00ff4180;
    text-align: center;
}

.slot-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.slot-name {
    color: #00ff41;
    font-weight: bold;
}

.slot-day {
    font-size: 0.8em;
    color: #00ff4160;
}

.slot-status {
    text-align: right;
    font-size: 0.8em;
    padding: 3px 8px;
    border-radius: 2px;
}

/* Status classes */
.save-slot-item.completed .slot-status {
    color: #808080;
}

.save-slot-item.failed .slot-status {
    color: #ff6644;
}

.save-slot-item.corrupted {
    animation: slot-item-reveal 0.3s ease forwards, slot-corrupt-flicker 2s infinite;
}

.save-slot-item.corrupted .slot-status {
    color: #ff0040;
    text-shadow: 0 0 5px #ff004080;
}

.save-slot-item.corrupted .slot-name {
    color: #ff8844;
}

@keyframes slot-corrupt-flicker {
    0%, 90%, 100% { opacity: 1; }
    92% { opacity: 0.4; }
    94% { opacity: 1; }
    95% { opacity: 0.6; transform: skewX(-1deg); }
    96% { opacity: 1; transform: none; }
}

.save-slot-item.active {
    border-color: #00ff41;
    background: rgba(0, 255, 65, 0.08);
    animation: slot-item-reveal 0.3s ease forwards, slot-active-pulse 1.5s ease infinite;
}

.save-slot-item.active .slot-name {
    color: #ffffff;
    text-shadow: 0 0 8px #00ff4180;
}

.save-slot-item.active .slot-status {
    color: #00ff41;
    font-weight: bold;
}

@keyframes slot-active-pulse {
    0%, 100% { border-color: #00ff41; box-shadow: none; }
    50% { border-color: #00ff41aa; box-shadow: 0 0 10px #00ff4120; }
}

/* Graduated (TRUE END 이후) */
.save-slot-item.graduated .slot-status {
    color: #ffcc00;
}

.save-slot-item.graduated {
    border-color: #ffcc0040;
}

/* NG+ flash: 1회차 결과 잠깐 보였다 사라지는 효과 */
.save-slot-item.ng-flash {
    animation: slot-ng-flash 0.6s ease forwards;
}

@keyframes slot-ng-flash {
    0% { opacity: 1; }
    30% { background: rgba(255, 0, 64, 0.15); }
    100% { background: rgba(0, 255, 65, 0.08); }
}

/* Load attempt (클릭 시 거절) */
.save-slot-item.load-denied {
    animation: slot-load-denied 0.4s ease;
}

@keyframes slot-load-denied {
    0%, 100% { transform: none; }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-2px); }
}

.slot-denied-msg {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #ff0040;
    font-size: 0.75em;
    animation: ghost-fade 1.5s ease forwards;
    pointer-events: none;
}

/* =========================================================================
   NG+ Title Screen Corruption
   ========================================================================= */

/* 타이틀 로고 균열 텍스처 */
.title-text.ng-plus-cracked {
    position: relative;
}

.title-text.ng-plus-cracked::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        transparent 30%,
        rgba(139, 0, 0, 0.15) 30.5%,
        transparent 31%,
        transparent 55%,
        rgba(139, 0, 0, 0.1) 55.5%,
        transparent 56%,
        transparent 78%,
        rgba(139, 0, 0, 0.12) 78.5%,
        transparent 79%
    );
    pointer-events: none;
    animation: crack-breathe 4s ease-in-out infinite;
}

@keyframes crack-breathe {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* [Load] 버튼 아래 서브텍스트 */
.ng-plus-load-subtext {
    display: block;
    font-size: 0.45rem;
    color: rgba(139, 0, 0, 0.25);
    margin-top: 2px;
    font-style: italic;
    letter-spacing: 0.5px;
    pointer-events: none;
    user-select: none;
}

/* =========================================================================
   NG+ Choice Staining — 이전 회차 선택지 흔적
   ========================================================================= */

/* 붉은 체크마크 */
.choice-btn .ng-plus-check {
    position: absolute;
    top: -4px;
    right: -4px;
    color: rgba(139, 0, 0, 0.5);
    font-size: 0.75rem;
    pointer-events: none;
    animation: ng-check-flash 0.3s ease forwards;
}

@keyframes ng-check-flash {
    0% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 0.8; transform: scale(1.2); }
    100% { opacity: 0; transform: scale(1); }
}

/* 고스트 텍스트 (선택지 하단) */
.choice-ghost-text {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: rgba(139, 0, 0, 0.35);
    white-space: nowrap;
    pointer-events: none;
    animation: choice-ghost-fade 0.5s ease forwards;
}

@keyframes choice-ghost-fade {
    0% { opacity: 0; }
    30% { opacity: 0.6; }
    100% { opacity: 0; }
}

/* =========================================================================
   NG+ Dialogue Micro-Distortion — 대사 앞 깜빡임 단어
   ========================================================================= */

.ng-plus-flash-word {
    position: absolute;
    left: 0;
    top: 0;
    color: rgba(139, 0, 0, 0.4);
    font-size: inherit;
    pointer-events: none;
    animation: flash-word-fade 0.3s ease forwards;
    z-index: 5;
}

@keyframes flash-word-fade {
    0% { opacity: 0; }
    30% { opacity: 0.5; }
    100% { opacity: 0; }
}

/* =========================================================================
   Day 5 Noise Filter — 모든 대화창에 미세한 노이즈
   ========================================================================= */

.dialogue-box.day5-noise {
    position: relative;
}

.dialogue-box.day5-noise::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(255, 0, 0, 0.015) 0px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
    z-index: 1;
    animation: day5-noise-flicker 0.3s infinite;
    border-radius: inherit;
}

@keyframes day5-noise-flicker {
    0% { opacity: 0.5; background-position: 0 0; }
    50% { opacity: 0.8; background-position: 0 1px; }
    100% { opacity: 0.6; background-position: 0 0; }
}

/* =========================================================================
   Interactive Mirror Swipe — 거울 안개 닦기
   ========================================================================= */

.mirror-swipe-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 70;
    cursor: grab;
    touch-action: none;
}

.mirror-swipe-container:active {
    cursor: grabbing;
}

.mirror-swipe-canvas {
    width: 100%;
    height: 100%;
}

.mirror-swipe-hint {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    animation: mirror-hint-pulse 2s ease infinite;
    pointer-events: none;
}

@keyframes mirror-hint-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* =========================================================================
   Mirror 13 Faces Overlay
   ========================================================================= */

.mirror-face-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 75;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

.mirror-face-img {
    position: absolute;
    width: 200px;
    height: 260px;
    object-fit: cover;
    border-radius: 4px;
    opacity: 0;
    animation: face-flash-in 0.4s ease forwards;
}

@keyframes face-flash-in {
    0% { opacity: 0; filter: brightness(2) contrast(0.5); }
    40% { opacity: 1; filter: brightness(1.2) contrast(1); }
    100% { opacity: 0; filter: brightness(0.5) contrast(1.5); }
}

.mirror-face-name {
    position: absolute;
    bottom: 30%;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    animation: face-name-flicker 0.4s ease;
}

@keyframes face-name-flicker {
    0% { opacity: 0; }
    30% { opacity: 0.7; }
    100% { opacity: 0; }
}

/* 최종 텍스트: "나는 13번째 껍데기다" */
.mirror-final-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    text-align: center;
    animation: mirror-final-fade 3s ease forwards;
    text-shadow: 0 0 10px rgba(139, 0, 0, 0.5);
}

@keyframes mirror-final-fade {
    0% { opacity: 0; }
    20% { opacity: 0.9; }
    80% { opacity: 0.9; }
    100% { opacity: 0; }
}

/* =========================================================================
   Screenshot Detection Phantom Text
   ========================================================================= */

.screenshot-phantom {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 0, 64, 0.6);
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    z-index: 200;
    pointer-events: none;
    animation: phantom-flash 0.5s ease forwards;
    text-shadow: 0 0 5px rgba(255, 0, 64, 0.3);
}

@keyframes phantom-flash {
    0% { opacity: 0; }
    20% { opacity: 0.8; }
    100% { opacity: 0; }
}

/* =========================================================================
   NG+ Skip Deja Vu Text
   ========================================================================= */

.skip-dejavu-text {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(200, 162, 200, 0.5);
    font-size: 0.85rem;
    font-style: italic;
    pointer-events: none;
    z-index: 45;
    animation: skip-dejavu-fade 2s ease forwards;
    max-width: 80%;
    text-align: center;
    line-height: 1.6;
}

@keyframes skip-dejavu-fade {
    0% { opacity: 0; transform: translateX(-50%) translateY(0); }
    15% { opacity: 0.7; }
    85% { opacity: 0.7; }
    100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

/* =========================================================================
   NG+ Day 1 Early Escape — White Fade
   ========================================================================= */

.early-escape-white {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 100;
    opacity: 0;
    transition: opacity 2s ease;
    pointer-events: none;
}

.early-escape-white.active {
    opacity: 1;
}

/* =========================================================================
   COMPLICIT Signature Touch Interaction
   ========================================================================= */

.complicit-sign-area {
    position: relative;
    display: inline-block;
    border-bottom: 2px solid rgba(139, 0, 0, 0.5);
    padding: 4px 20px;
    cursor: pointer;
    min-width: 120px;
    text-align: center;
    color: rgba(139, 0, 0, 0.7);
    font-style: italic;
    transition: border-color 0.3s ease;
}

.complicit-sign-area:hover {
    border-color: rgba(139, 0, 0, 0.8);
}

.complicit-sign-area .sign-ghost {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: rgba(139, 0, 0, 0.4);
    animation: choice-ghost-fade 0.5s ease forwards;
    pointer-events: none;
    white-space: nowrap;
}
