body {
    margin: 0;
    overflow: hidden;
    background-color: #111;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    user-select: none;
}

#game-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    /* Let clicks pass through to canvas */
}

#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}

.portal-indicator {
    position: absolute;
    bottom: 20px;
    width: 40px;
    height: 60px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
}

#portal-indicator-blue {
    left: 20px;
    border-color: #00a2ff;
    box-shadow: 0 0 10px rgba(0, 162, 255, 0.2);
}

#portal-indicator-blue.active {
    background-color: rgba(0, 162, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 162, 255, 0.6);
}

#portal-indicator-orange {
    left: 70px;
    border-color: #ff6600;
    box-shadow: 0 0 10px rgba(255, 102, 0, 0.2);
}

#portal-indicator-orange.active {
    background-color: rgba(255, 102, 0, 0.5);
    box-shadow: 0 0 20px rgba(255, 102, 0, 0.6);
}

#level-name {
    position: absolute;
    top: 20px;
    width: 100%;
    text-align: center;
    color: white;
    font-size: 24px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 4px;
    opacity: 0;
    transition: opacity 1s;
}

#instructions-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    /* Darker background */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #00FF00;
    /* Green text */
    font-family: 'Courier New', Courier, monospace;
    /* Terminal font */
    pointer-events: auto;
    /* Enable clicking on instructions */
}

#instructions-overlay.hidden {
    display: none;
}

h1 {
    font-size: 48px;
    margin-bottom: 20px;
    letter-spacing: 5px;
    text-transform: uppercase;
    text-shadow: 0 0 10px #00FF00;
    /* Glow */
}

p {
    font-size: 18px;
    margin: 5px 0;
    color: #00FF00;
    /* Green text */
}

#end-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    font-family: 'Courier New', Courier, monospace;
    color: #00FF00;
}

#end-screen h1 {
    font-size: 4rem;
    margin-bottom: 2rem;
    text-shadow: 0 0 10px #00FF00;
}

#final-time {
    font-size: 3rem;
    margin-bottom: 2rem;
}

.restart-hint {
    font-size: 1.5rem;
    opacity: 0.7;
    animation: blink 2s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 0.3;
    }
}