:root {
    --bg-color: #0f172a;
    --game-bg: #0f172a;
    --ground-color: #94a3b8;
    --buggy-color: #f59e0b;
    --text-color: #f1f5f9;
    --accent-color: #f59e0b;
    /* Orange */
    --accent-color-glow-strong: rgba(245, 158, 11, 0.4);
    --accent-color-glow-medium: rgba(245, 158, 11, 0.2);
    --accent-color-glow-weak: rgba(245, 158, 11, 0.1);
    --overlay-bg: rgba(15, 23, 42, 0.85);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    margin: 0 auto;
    max-width: 1200px;
    /* padding-top removed */
}

/* .top-bar styles moved to global style.css */

.stats-display {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
}

.stats-display #username-display {
    color: var(--buggy-color);
    font-weight: 700;
}

.stat-item {
    color: #94a3b8;
}

.stat-item span {
    color: #fff;
    font-weight: 700;
}

/* Game-specific styles below - button styles are now global */

.settings-placeholder {
    width: 40px;
    height: 40px;
    opacity: 0;
    pointer-events: none;
}

.score-display,
.lives-display {
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 0 10px var(--accent-color);
}

.game-container {
    /* Styles now inherited from global .game-container */
    margin-top: 20px;
}

canvas {
    background-color: var(--game-bg);
    display: block;
    /* Retro CRT effect optional */
}

.ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
}

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

h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--buggy-color);
    text-shadow: 0 0 20px var(--buggy-color);
    letter-spacing: 4px;
}

p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #cbd5e1;
}

button {
    padding: 12px 32px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--bg-color);
    background-color: var(--buggy-color);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px var(--buggy-color);
}

.controls-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem;
    background-color: rgba(15, 23, 42, 0.9);
    border-top: 1px solid #334155;
    width: 100%;
}

.control-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.key {
    background-color: #334155;
    color: #f1f5f9;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.8rem;
    border-bottom: 2px solid #1e293b;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}