/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Nanum+Myeongjo:wght@400;700&family=Share+Tech+Mono&display=swap');

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #050505;
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    color: #e0e0e0;
    user-select: none;
}

canvas {
    display: block;
    width: 100vw;
    height: 100vh;
}

/* 오버레이 화면 공통 스타일 */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(5, 5, 5, 0.9);
    z-index: 100;
    transition: opacity 2s ease-in-out;
}

.hidden {
    opacity: 0 !important;
    pointer-events: none;
}

/* 시작 화면 타포그래피 */
#start-screen h1 {
    font-size: 4rem;
    letter-spacing: 8px;
    margin-bottom: 5px;
    color: #a3ffb4;
    /* 기괴한 형광 초록빛 */
    text-shadow: 0 0 20px rgba(163, 255, 180, 0.4);
    font-family: 'Nanum Myeongjo', serif;
    /* 한국어 폰트 차별화 */
}

.subtitle {
    font-size: 1.2rem;
    letter-spacing: 3px;
    color: #888;
    margin-bottom: 40px;
}

.instructions p {
    font-size: 1.1rem;
    margin: 8px 0;
    color: #ccc;
    text-align: center;
}

.warning {
    color: #ff5555 !important;
    font-size: 0.9rem !important;
}

button {
    margin-top: 50px;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-family: inherit;
    background-color: rgba(20, 20, 20, 0.8);
    color: #fff;
    border: 1px solid #a3ffb4;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 2px;
}

button:hover {
    background-color: #a3ffb4;
    color: #000;
    box-shadow: 0 0 20px rgba(163, 255, 180, 0.6);
}

/* 인게임 UI 레이어 */
#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    transition: opacity 1s;
}

#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 24px;
    font-weight: 100;
}

#objective {
    position: absolute;
    top: 30px;
    left: 40px;
    font-size: 1.2rem;
    color: rgba(163, 255, 180, 0.9);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
    letter-spacing: 1px;
}

#hint-ui {
    position: absolute;
    bottom: 40px;
    right: 40px;
    font-size: 1.1rem;
    color: rgba(255, 255, 187, 0.9);
    text-shadow: 0 0 8px rgba(255, 255, 187, 0.5);
    letter-spacing: 1.5px;
    animation: pulseHint 2s infinite alternate;
}

@keyframes pulseHint {
    from {
        opacity: 0.6;
    }

    to {
        opacity: 1.0;
    }
}

/* 스토리 텍스트 (하단 중앙) */
#story-container {
    position: absolute;
    bottom: 100px;
    width: 100%;
    text-align: center;
    pointer-events: none;
    z-index: 20;
}

#blood-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 40%, rgba(200, 0, 0, 0.3) 80%, rgba(100, 0, 0, 0.8) 100%);
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#transition-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #050505;
    z-index: 100;
    transition: opacity 4s ease-in-out;
    opacity: 0;
    pointer-events: none;
}

#transition-overlay.active {
    opacity: 1;
}

/* 엔딩 화면 */
#story-text {
    display: inline-block;
    max-width: 60%;
    font-size: 1.4rem;
    line-height: 1.6;
    color: #fff;
    text-shadow: 0 0 10px #000, 0 0 15px rgba(255, 255, 255, 0.3);
    opacity: 0;
    transition: opacity 2s ease-in-out;
    background: transparent;
    font-family: 'Nanum Myeongjo', serif;
}

/* 엔딩 화면 */
#ending-screen {
    background-color: #000;
}

#ending-title {
    font-family: 'Nanum Myeongjo', serif;
    font-size: 3rem;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 0 0 15px #fff;
}

#ending-desc {
    font-size: 1.2rem;
    color: #aaa;
    line-height: 1.8;
    max-width: 600px;
    text-align: center;
    font-family: 'Nanum Myeongjo', serif;
}