@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
    background-color: #2c3e50;
    color: white;
    font-family: 'Press Start 2P', cursive;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    user-select: none;
}

#game-container {
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border: 4px solid #fff;
}

canvas {
    background-color: #7f8c8d; /* Podłoga korytarza */
    display: block;
    image-rendering: pixelated; 
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

.hud {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    font-size: 12px;
    text-shadow: 2px 2px 0 #000;
}

#dialogue-box {
    position: absolute;
    bottom: 20px;
    left: 5%;
    width: 90%;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid white;
    padding: 10px;
    display: none;
    pointer-events: auto;
    box-sizing: border-box;
    z-index: 10;
}

.dialogue-title {
    color: #f1c40f;
    margin-bottom: 10px;
    font-size: 10px;
    text-transform: uppercase;
}

.option {
    background: #34495e;
    margin: 5px 0;
    padding: 8px;
    cursor: pointer;
    font-size: 10px;
    border: 1px solid #7f8c8d;
    transition: 0.1s;
}

.option:hover {
    background: #e74c3c;
    color: white;
    border-color: #fff;
}

#game-over-screen, #start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

#start-screen {
    display: flex;
}

#title-label {
    color: #f1c40f; 
    text-shadow: 3px 3px 0 #000; 
    text-align: center; 
    line-height: 1.5;
}

#title-subtext {
    margin-top: 10px; 
    color: #bdc3c7; 
    font-size: 10px;
}

#game-over-screen {
    display: none;
}

button {
    background: #e74c3c;
    color: white;
    border: 2px solid white;
    padding: 15px;
    font-family: 'Press Start 2P', cursive;
    cursor: pointer;
    margin-top: 20px;
    font-size: 14px;
}

button:hover {
    background: #c0392b;
}

.pixel-alert {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    color: #2ecc71;
    text-shadow: 2px 2px 0 #000;
    pointer-events: none;
    animation: floatUp 1s ease-out forwards;
    display: none;
}

.keys-hint {
    margin-top: 10px;
    font-size: 10px;
    color: #bdc3c7;
}

@keyframes floatUp {
    0% { opacity: 1; transform: translate(-50%, -50%); }
    100% { opacity: 0; transform: translate(-50%, -150%); }
}