:root {
    --primary: #EF4444;      /* Crimson Red */
    --secondary: #F87171;    /* Light Red */
    --accent: #FBBF24;       /* Amber/Yellow */
    --bg-color: #1A0A0A;     /* Dark Crimson Black */
    --grid-color: rgba(239, 68, 68, 0.05);
    --text-main: #FFFFFF;
    --font-main: 'Orbitron', sans-serif;
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-touch-callout: none;
}

body {
    background-color: var(--bg-color);
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center center;
    color: var(--text-main);
    font-family: var(--font-main);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 800px; /* Optional cap for desktop */
    margin: 0 auto;
    box-shadow: 0 0 50px rgba(239, 68, 68, 0.1);
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    background: transparent;
}

/* UI Overlay */
#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* HUD elements */
#hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 5;
}

.hud-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(26, 10, 10, 0.7);
    padding: 8px 15px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
}

.hud-label {
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--secondary);
    margin-bottom: 4px;
}

.hud-value {
    font-size: 20px;
    font-weight: 700;
}

/* Screens */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(26, 10, 10, 0.85);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: auto;
    z-index: 20;
}

.screen.active {
    opacity: 1;
    visibility: visible;
}

.game-title {
    font-size: 50px;
    font-weight: 900;
    line-height: 1.1;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 16px;
    color: var(--secondary);
    margin: 20px 0 40px;
    letter-spacing: 1px;
    text-align: center;
}

.controls-info {
    font-family: monospace;
    font-size: 14px;
    color: #A0A0A0;
    margin-bottom: 40px;
    text-align: center;
    line-height: 1.8;
}

.stats-box {
    margin-bottom: 40px;
    text-align: center;
    font-size: 20px;
    line-height: 2;
    background: rgba(239, 68, 68, 0.1);
    padding: 20px 40px;
    border-radius: var(--radius);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Neon Glows */
.neon-text {
    color: var(--primary);
    text-shadow: 
        0 0 5px rgba(239,68,68,0.5),
        0 0 10px rgba(239,68,68,0.5),
        0 0 20px rgba(239,68,68,0.5);
}

.neon-text-secondary {
    color: var(--secondary);
    text-shadow: 
        0 0 5px rgba(248,113,113,0.5),
        0 0 10px rgba(248,113,113,0.5),
        0 0 20px rgba(248,113,113,0.5);
}

.neon-text-accent {
    color: var(--accent);
    text-shadow: 
        0 0 5px rgba(251,191,36,0.5),
        0 0 10px rgba(251,191,36,0.5),
        0 0 20px rgba(251,191,36,0.5);
}

/* Buttons */
.neon-btn {
    background: transparent;
    color: var(--primary);
    font-family: var(--font-main);
    font-size: 20px;
    font-weight: 700;
    padding: 15px 40px;
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(239,68,68,0.2), inset 0 0 10px rgba(239,68,68,0.2);
    text-shadow: 0 0 5px rgba(239,68,68,0.5);
}

.neon-btn:hover {
    background: var(--primary);
    color: #1A0A0A;
    box-shadow: 0 0 20px rgba(239,68,68,0.6), inset 0 0 10px rgba(239,68,68,0.4);
    text-shadow: none;
    transform: scale(1.05);
}

.neon-btn:active {
    transform: scale(0.95);
}
