:root {
    --bg-color: #050505;
    --primary: #00ffcc;
    --primary-glow: rgba(0, 255, 204, 0.4);
    --secondary: #ff0055;
    --text-color: #f0f0f0;
    --overlay-bg: rgba(5, 5, 5, 0.85);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #000;
    font-family: 'Outfit', sans-serif;
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    background: radial-gradient(circle at center, #111 0%, #000 100%);
}

#game-container {
    position: relative;
    width: 800px;
    height: 600px;
    box-shadow: 0 0 30px rgba(0, 255, 204, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--bg-color);
}

/* UI Overlays */
#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Let clicks pass through if needed, but screens enable it */
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--overlay-bg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(4px);
}

.screen.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Specific Screens */
#hud {
    background: transparent;
    backdrop-filter: none;
    justify-content: flex-start;
    padding: 20px;
    pointer-events: none !important; /* HUD should never block */
}

.hud-top {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

.controls-hint {
    margin-top: auto;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    transition: opacity 2s ease;
}

h1 {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: 2px;
}

h1 span {
    color: var(--primary);
    text-shadow: 0 0 20px var(--primary-glow);
}

h2 {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 10px;
    text-shadow: 0 0 15px var(--primary-glow);
}

#game-over h2 {
    color: var(--secondary);
    text-shadow: 0 0 15px rgba(255, 0, 85, 0.5);
}

p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
}

button {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 15px 40px;
    font-family: inherit;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 0 15px var(--primary-glow);
}

button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--primary);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    transition: width 0.3s ease, height 0.3s ease;
    z-index: -1;
}

button:hover {
    color: #000;
    box-shadow: 0 0 25px var(--primary-glow);
}

button:hover::before {
    width: 300px;
    height: 300px;
}

button:active {
    transform: scale(0.95);
}

/* Canvas styling */
#gameCanvas {
    /* Set display block to prevent margin below canvas */
    display: block; 
}
