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

body {
    background: #000;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Courier New', monospace;
    image-rendering: pixelated;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 800px;
    height: 600px;
    border: 4px solid #fff;
    background: #030308;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto;
}

#level-display {
    position: absolute;
    top: 8px;
    left: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 2px 2px 0 #000;
    letter-spacing: 1px;
    text-transform: uppercase;
    pointer-events: none;
}

.screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #000;
    border: 4px solid #fff;
    padding: 32px 48px;
    text-align: center;
    pointer-events: auto;
}

.full-screen-menu {
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    height: 100%;
    padding: 24px 28px;
    text-align: left;
    border: none !important;
}

.menu-row {
    display: flex;
    flex-direction: row;
    gap: 22px;
    height: 100%;
    align-items: stretch;
    justify-content: space-between;
}

.menu-col {
    flex: 1;
    min-width: 0;
}

.menu-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.menu-back {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 50;
    margin-top: 0;
}

.screen.hidden {
    display: none;
}

.hidden {
    display: none !important;
}

.screen h1 {
    color: #fcbcb0;
    font-size: 28px;
    margin-bottom: 24px;
    text-shadow: 2px 2px 0 #881400;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.screen p {
    color: #fff;
    font-size: 14px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.controls-info {
    background: #000;
    padding: 16px;
    margin: 16px 0;
    border: 2px solid #fcbcb0;
}

.controls-info p {
    margin-bottom: 8px;
    font-size: 12px;
}

.screen button {
    background: #e44028;
    border: none;
    border-top: 4px solid #fc9838;
    border-left: 4px solid #fc9838;
    border-bottom: 4px solid #881400;
    border-right: 4px solid #881400;
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: bold;
    padding: 12px 32px;
    cursor: pointer;
    text-shadow: 2px 2px 0 #000;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 16px;
}

.screen button:hover {
    background: #fc5038;
}

.screen button:active {
    border-top: 4px solid #881400;
    border-left: 4px solid #881400;
    border-bottom: 4px solid #fc9838;
    border-right: 4px solid #fc9838;
}

/* Infinite mode button styling */
#infinite-btn {
    background: #0a0a2a;
    border-top: 4px solid #00ffff;
    border-left: 4px solid #00ffff;
    border-bottom: 4px solid #ff00ff;
    border-right: 4px solid #ff00ff;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
    margin-left: 10px;
}

#infinite-btn:hover {
    background: #1a1a4a;
    box-shadow: 0 0 20px #00ffff;
}

#infinite-retry-btn {
    background: #0a0a2a;
    border-top: 4px solid #00ffff;
    border-left: 4px solid #00ffff;
    border-bottom: 4px solid #ff00ff;
    border-right: 4px solid #ff00ff;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
}

#infinite-retry-btn:hover {
    background: #1a1a4a;
}

#infinite-menu-btn {
    margin-left: 10px;
}

#infinite-over-screen h1 {
    color: #ff00ff;
    text-shadow: 0 0 20px #ff00ff;
}

#infinite-score, #infinite-record {
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
    font-size: 18px !important;
}

/* Neon Title Screen */
.neon-screen {
    background: linear-gradient(180deg, #0a0a1a 0%, #1a0a2a 50%, #0a1a2a 100%) !important;
    border: 4px solid #ff00ff !important;
    box-shadow: 0 0 30px #ff00ff, inset 0 0 30px rgba(0, 255, 255, 0.1);
}

.neon-title {
    margin-bottom: 20px;
}

.title-neon {
    display: block;
    font-size: 42px;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff, 0 0 40px #00ffff;
    letter-spacing: 8px;
    animation: neonFlicker 2s infinite;
}

.title-rider {
    display: block;
    font-size: 48px;
    color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff, 0 0 40px #ff00ff;
    letter-spacing: 12px;
    margin-top: -5px;
}

@keyframes neonFlicker {
    0%, 100% { opacity: 1; }
    92% { opacity: 1; }
    93% { opacity: 0.8; }
    94% { opacity: 1; }
    96% { opacity: 0.9; }
    97% { opacity: 1; }
}

.tagline {
    color: #888 !important;
    font-size: 12px !important;
    letter-spacing: 3px;
    margin-bottom: 20px !important;
}

.neon-controls {
    background: rgba(0, 255, 255, 0.05) !important;
    border: 2px solid #00ffff !important;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.neon-controls p {
    color: #00ffff !important;
}

.button-row {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.full-screen-menu .button-row {
    justify-content: flex-start;
    margin-top: 12px;
}

#garage-screen .controls-info button {
    margin-top: 8px;
    margin-bottom: 12px;
    font-size: 12px;
    padding: 10px 16px;
}

#garage-btn {
    background: #0a0a2a;
    border-top: 4px solid #ffff00;
    border-left: 4px solid #ffff00;
    border-bottom: 4px solid #00ffff;
    border-right: 4px solid #00ffff;
    color: #ffff00;
    text-shadow: 0 0 10px #ffff00;
}

#garage-btn:hover {
    background: #1a1a4a;
    box-shadow: 0 0 20px #ffff00;
}

.skin-select {
    background: #111;
    border-top: 3px solid #00ffff;
    border-left: 3px solid #00ffff;
    border-bottom: 3px solid #ff00ff;
    border-right: 3px solid #ff00ff;
    color: #00ffff;
}

.skin-select:hover {
    background: #1a1a1a;
}

#start-btn {
    background: linear-gradient(180deg, #ff00ff 0%, #aa00aa 100%);
    border: none;
    border-top: 3px solid #ff66ff;
    border-left: 3px solid #ff66ff;
    border-bottom: 3px solid #660066;
    border-right: 3px solid #660066;
    color: #fff;
    text-shadow: 0 0 10px #fff;
    padding: 12px 24px;
}

#start-btn:hover {
    background: linear-gradient(180deg, #ff33ff 0%, #cc00cc 100%);
    box-shadow: 0 0 20px #ff00ff;
}

#high-score-display {
    margin-top: 15px;
    color: #ffff00 !important;
    text-shadow: 0 0 10px #ffff00;
    font-size: 14px !important;
}
