@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
    margin: 0;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    user-select: none;
}

/* ===================== START SCREEN ===================== */
/* Tela de abertura estilo Street Fighter / Arcade 16-bit */
#startScreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #001133 0%, #0033aa 40%, #000022 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    font-family: 'Press Start 2P', cursive;
    overflow: hidden;
    text-align: center;
}

/* Efeito de scanlines de TV CRT de fundo */
#startScreen::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
                linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: -1;
    background-size: 100% 4px, 6px 100%;
    pointer-events: none;
}

#startScreen h1 {
    font-size: 60px;
    margin-bottom: 40px;
    background: -webkit-linear-gradient(#fcee21, #f03a47);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(4px 4px 0px #000) drop-shadow(8px 8px 0px #550000);
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: pulseTitle 2s infinite alternate;
}

@keyframes pulseTitle {
    0%   { transform: scale(1); }
    100% { transform: scale(1.05); }
}

#startScreen p {
    font-size: 12px;
    line-height: 2;
    max-width: 800px;
    margin: 10px auto;
    text-shadow: 2px 2px 0px #000;
    color: #aaddff;
}

#startScreen p.objective {
    font-size: 14px;
    margin-bottom: 30px;
    color: #ffffaa;
    text-transform: uppercase;
}

/* ===================== BUTTONS ===================== */
#startBtn {
    margin-top: 50px;
    padding: 15px 30px;
    font-size: 20px;
    font-family: 'Press Start 2P', cursive;
    cursor: pointer;
    background: transparent;
    color: #fff;
    border: 4px solid #fff;
    box-shadow: 4px 4px 0px #000;
    text-shadow: 2px 2px 0px #000;
    transition: all 0.1s;
    animation: blinkText 1s infinite step-end;
}

@keyframes blinkText {
    0%, 100% { color: #fff; border-color: #fff; }
    50%       { color: #f03a47; border-color: #f03a47; }
}

#startBtn:hover  { background: rgba(255, 255, 255, 0.1); }
#startBtn:active { transform: translate(4px, 4px); box-shadow: 0px 0px 0px #000; }

/* ===================== HUD ===================== */
#hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: none;
    z-index: 10;
}

#minimapContainer {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #fff;
    background: rgba(0, 0, 0, 0.5);
}

#minimap {
    width: 100%;
    height: 100%;
}

#stats {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #fff;
    font-size: 20px;
    text-shadow: 1px 1px 2px #000;
}

#health {
    color: red;
    font-size: 30px;
}

#speedometer {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: #0f0;
    padding: 15px;
    border-radius: 10px;
    font-family: monospace;
    font-size: 24px;
    display: none;
}

#messages {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 300px;
    text-align: right;
    color: #ff0;
    font-size: 18px;
    text-shadow: 1px 1px 2px #000;
}

/* ===================== CROSSHAIR ===================== */
#crosshair {
    position: absolute;
    top: 40%;
    left: 50%;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%);
    display: none;
}

#crosshair::before,
#crosshair::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
}

#crosshair::before {
    top: 9px;
    left: 0;
    width: 20px;
    height: 2px;
}

#crosshair::after {
    top: 0;
    left: 9px;
    width: 2px;
    height: 20px;
}

/* ===================== GAME OVER ===================== */
#gameOverScreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 50;
}

/* ===================== CONTROLS GRID ===================== */
.controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 40px;
    text-align: left;
    background: rgba(0, 0, 0, 0.6);
    padding: 20px 30px;
    border: 2px solid #555;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.controls-grid div {
    font-size: 12px;
    color: #ccc;
    line-height: 1.5;
}

.controls-grid span {
    color: #fff;
    background: #f03a47;
    padding: 2px 5px;
    border-radius: 3px;
    margin-right: 8px;
    border-bottom: 2px solid #800;
}

/* ===================== CONFIG SCREEN ===================== */
#configScreen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #222;
    padding: 30px;
    border-radius: 10px;
    border: 4px solid #fff;
    color: #fff;
    z-index: 300;
    display: none;
    flex-direction: column;
    gap: 15px;
    font-family: sans-serif;
    text-shadow: none;
    min-width: 300px;
}

#configScreen h2     { margin-top: 0; }

#configScreen input[type="password"] {
    padding: 8px;
    width: 100%;
    box-sizing: border-box;
}

#configScreen button {
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
}
