* {
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh; /* Mobile viewport fix */
    overflow: hidden;
    background-color: #050a10;
    font-family: monospace;
    touch-action: none; /* Prevents browser pull-to-refresh and scrolling */
}

#game-container {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1;
}

#ui-layer {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10;
    pointer-events: none; /* Allows interactions to pass down to input zones */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#info-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid #00ffff;
    color: #00ffff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
    pointer-events: auto;
    transition: all 0.2s;
}

#info-btn:hover {
    background: rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
}

#info-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    max-width: 450px;
    background: rgba(5, 10, 16, 0.95);
    border: 1px solid #00ffff;
    color: white;
    padding: 30px;
    border-radius: 5px;
    z-index: 30;
    box-shadow: 0 0 30px rgba(0,255,255,0.2) inset, 0 0 20px rgba(0,0,0,0.8);
    display: none;
    pointer-events: auto;
    text-align: center;
}

#info-modal h2 {
    color: #00ffff;
    margin-top: 0;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 5px #00ffff;
}

#info-modal p {
    line-height: 1.6;
    margin-bottom: 15px;
    color: #ccc;
    font-size: 14px;
}

#info-modal a {
    color: #00ffff;
    text-decoration: none;
    font-weight: bold;
}

#info-modal a:hover {
    text-decoration: underline;
    text-shadow: 0 0 5px #00ffff;
}

#close-info-btn {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid #00ffff;
    color: #00ffff;
    padding: 10px 20px;
    cursor: pointer;
    width: 100%;
    margin-top: 15px;
    font-family: monospace;
    font-size: 16px;
    text-transform: uppercase;
    transition: all 0.2s;
}

#close-info-btn:hover {
    background: rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

#score-display {
    color: #00ffff;
    font-size: 18px;
    padding: 20px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

#hint-box {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid #00ffff;
    color: #00ffff;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    text-shadow: 0 0 5px #00ffff;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 80%;
    max-width: 400px;
}

#vision-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vmin;
    height: 80vmin;
    background-image: url('dada_steal.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 3s ease-in-out;
    z-index: 5;
    mix-blend-mode: screen;
}

#message-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    background: rgba(0, 150, 255, 0.15);
    border: 1px solid #00ffff;
    padding: 20px 40px;
    border-radius: 5px;
    display: none;
    pointer-events: none;
    text-shadow: 0 0 10px #00ffff;
    box-shadow: 0 0 20px rgba(0,255,255,0.2) inset;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 2px;
}

/* Interaction controls split screen on mobile */
#joystick-zone {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    z-index: 5;
    display: none;
}

#touch-look-zone {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    z-index: 5;
    display: none;
}

/* Activate touch overlays ONLY if device supports coarse pointers */
@media (pointer: coarse) {
    #joystick-zone, #touch-look-zone {
        display: block;
    }
}