:root {
    --bg-color: #0f172a;
    /* Slate 900 */
    --accent-color: #38bdf8;
    /* Sky 400 */
    --text-color: #f8fafc;
    /* Slate 50 */
    --surface-color: rgba(30, 41, 59, 0.7);
    /* Slate 800 with opacity */
    --danger-color: #f87171;
    /* Red 400 */
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-body);
    color: var(--text-color);
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 400px;
    /* Base height, optional aspect ratio maintenance can be added */
    background: #1e293b;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

#game-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

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

#score-board {
    position: absolute;
    top: 20px;
    right: 30px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-color);
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

#high-score {
    margin-left: 20px;
    opacity: 0.7;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    transition: opacity 0.3s ease;
    pointer-events: auto;
}

.screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.screen h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff, var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 20px rgba(56, 189, 248, 0.3);
}

.screen p {
    font-size: 1.2rem;
    opacity: 0.9;
    animation: pulse 2s infinite;
}

button {
    margin-top: 30px;
    padding: 12px 32px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--bg-color);
    background: var(--accent-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    font-weight: 700;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.6);
}

button:active {
    transform: translateY(0);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}