/* --- Player Speech Bubble --- */
#speech-bubble {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 700px;
    background: rgba(10, 10, 10, 0.9);
    border: 2px solid #555;
    border-radius: 5px;
    padding: 20px;
    color: #fff;
    font-family: 'Courier New', monospace;
    z-index: 9999;
    box-shadow: 0 0 20px rgba(0,0,0,0.7);
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

#speech-bubble.hidden {
    opacity: 0;
    pointer-events: none;
}

#speech-title {
    font-weight: bold;
    color: #ffaa00;
    margin-bottom: 10px;
    font-size: 1.1em;
}

#speech-text {
    font-size: 1em;
    line-height: 1.6;
    white-space: pre-wrap; /* Allows text to wrap */
}

/* --- Wake Up / Eye Opening Effect --- */
#wake-up-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 9999;
    pointer-events: none;
    animation: fadeInEyes 8s forwards;
}

#eye-blur-layer {
    width: 100%;
    height: 100%;
    backdrop-filter: blur(10px);
    opacity: 1;
    animation: clearBlur 8s forwards;
}

@keyframes fadeInEyes {
    0% { background: #000; }
    50% { background: #000; }
    100% { background: transparent; }
}

@keyframes clearBlur {
    0% { backdrop-filter: blur(10px); opacity: 1; }
    70% { backdrop-filter: blur(10px); opacity: 1; }
    100% { backdrop-filter: blur(0px); opacity: 0; }
}


/* --- Narrative Black Screen --- */
#narrative-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 9998;
    opacity: 1;
    transition: opacity 1s ease-in-out;
}

#narrative-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

#narrative-text {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.5em;
    max-width: 80%;
    line-height: 1.8;
}