:root {
    --bg-color: #050510;
    --text-color: #ffffff;
    --color-red: #ff0055;
    --color-blue: #00ccff;
    --color-green: #00ff99;
    --color-yellow: #ffcc00;
    --font-main: 'Outfit', sans-serif;
}

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

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

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 800px;
    /* Optional constraint for ultra-wide monitors */
    background: #000;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* UI Overlays */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 16, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.hidden {
    display: none !important;
}

/* Typography & Layout */
.title {
    font-weight: 900;
    font-size: 5rem;
    line-height: 0.9;
    letter-spacing: -2px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.title .highlight {
    background: linear-gradient(45deg, var(--color-blue), var(--color-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(0, 204, 255, 0.5));
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 3rem;
    letter-spacing: 1px;
}

/* Controls Preview */
.controls-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.control-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
}

.key-icon {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 5px;
    color: #fff;
    min-width: 30px;
}

.color-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
}

.color-dot.red {
    background-color: var(--color-red);
    color: var(--color-red);
}

.color-dot.blue {
    background-color: var(--color-blue);
    color: var(--color-blue);
}

.color-dot.green {
    background-color: var(--color-green);
    color: var(--color-green);
}

.color-dot.yellow {
    background-color: var(--color-yellow);
    color: var(--color-yellow);
}

/* Buttons */
.btn {
    border: none;
    outline: none;
    padding: 1rem 3rem;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-main);
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 50px;
    letter-spacing: 2px;
}

.btn.primary {
    background: #fff;
    color: #000;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.btn.primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.6);
}

.btn.secondary {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
}

.btn.secondary:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* HUD */
#hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.score-container {
    text-align: left;
}

.score-container .label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
}

#score-display {
    font-size: 4rem;
    font-weight: 900;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.controls-hint {
    opacity: 0.3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.controls-hint .row {
    display: flex;
    gap: 5px;
}

.controls-hint .key {
    width: 30px;
    height: 30px;
    border: 1px solid #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.final-score {
    margin-bottom: 3rem;
}

.final-score #final-score-display {
    display: block;
    font-size: 6rem;
    font-weight: 900;
    color: var(--color-yellow);
    text-shadow: 0 0 30px rgba(255, 204, 0, 0.5);
}