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

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(180deg, #0a0a1f 0%, #1a0a2e 50%, #16213e 100%);
    color: #00ffff;
    overflow: hidden;
    min-height: 100vh;
}

#game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Screen Management */
.screen {
    position: absolute;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
}

.screen.active {
    display: flex;
}

.screen.overlay {
    background: rgba(10, 10, 31, 0.9);
    z-index: 100;
}

/* Menu Screen */
#menu-screen {
    flex-direction: column;
    background: linear-gradient(135deg, #0a0a1f 0%, #1a0a2e 50%, #16213e 100%);
}

.neon-title {
    text-align: center;
    margin-bottom: 60px;
    animation: glow-pulse 2s ease-in-out infinite;
}

.neon-title h1 {
    font-size: 80px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 8px;
    color: #00ffff;
    text-shadow:
        0 0 10px #00ffff,
        0 0 20px #00ffff,
        0 0 40px #00ffff,
        0 0 80px #ff00ff,
        0 0 120px #ff00ff;
    margin-bottom: 20px;
}

.subtitle {
    font-size: 24px;
    color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
    letter-spacing: 4px;
}

.menu-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 60px;
}

.neon-button {
    background: transparent;
    border: 2px solid #00ffff;
    color: #00ffff;
    font-family: 'Courier New', monospace;
    font-size: 20px;
    font-weight: bold;
    padding: 15px 50px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    transition: all 0.3s ease;
    box-shadow:
        0 0 10px #00ffff,
        inset 0 0 10px rgba(0, 255, 255, 0.2);
}

.neon-button:hover {
    background: rgba(0, 255, 255, 0.1);
    box-shadow:
        0 0 20px #00ffff,
        0 0 40px #00ffff,
        inset 0 0 20px rgba(0, 255, 255, 0.4);
    transform: scale(1.05);
}

.neon-button:active {
    transform: scale(0.98);
}

.game-info {
    text-align: center;
    max-width: 600px;
}

.game-info h3 {
    font-size: 24px;
    color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
    margin-bottom: 20px;
}

.control-info {
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.3);
    padding: 20px;
    border-radius: 10px;
}

.control-info p {
    margin: 10px 0;
    font-size: 16px;
    color: #00ffff;
}

.key {
    display: inline-block;
    background: rgba(255, 0, 255, 0.2);
    border: 1px solid #ff00ff;
    padding: 5px 12px;
    border-radius: 5px;
    color: #ff00ff;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
}

/* Game Screen */
#game-screen {
    flex-direction: column;
    background: #000;
}

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

/* HUD */
#hud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 20px;
    z-index: 10;
    pointer-events: none;
}

.hud-left, .hud-center, .hud-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hud-center {
    align-items: center;
}

.hud-right {
    align-items: flex-end;
}

.stat-box {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #00ffff;
    padding: 10px 20px;
    display: flex;
    align-items: baseline;
    gap: 8px;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.stat-box.small {
    padding: 8px 15px;
}

.stat-box .label {
    font-size: 12px;
    color: #00ffff;
    text-shadow: 0 0 5px #00ffff;
}

.stat-box .value {
    font-size: 24px;
    font-weight: bold;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
    min-width: 60px;
}

.stat-box.small .value {
    font-size: 18px;
    min-width: 40px;
}

.stat-box .unit {
    font-size: 12px;
    color: #00ffff;
}

#time-display {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #ff00ff;
    padding: 15px 30px;
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

#time-display .value {
    font-size: 28px;
    color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
}

#course-name {
    font-size: 20px;
    font-weight: bold;
    color: #ffff00;
    text-shadow: 0 0 10px #ffff00;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #ffff00;
    box-shadow: 0 0 10px rgba(255, 255, 0, 0.5);
}

.gauge-box {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #00ffff;
    padding: 10px 20px;
    width: 250px;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.gauge-box .label {
    font-size: 12px;
    color: #00ffff;
    text-shadow: 0 0 5px #00ffff;
    display: block;
    margin-bottom: 5px;
}

.gauge {
    width: 100%;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #00ffff;
    position: relative;
    overflow: hidden;
}

.gauge-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ffff, #00ff88);
    box-shadow: 0 0 10px #00ffff;
    transition: width 0.3s ease;
}

.boost-gauge .gauge-fill {
    background: linear-gradient(90deg, #ff00ff, #ff0088);
    box-shadow: 0 0 10px #ff00ff;
}

/* Minimap */
#minimap {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 80px;
    height: 200px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    z-index: 10;
}

.minimap-player {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 12px;
    background: #00ffff;
    box-shadow: 0 0 5px #00ffff;
}

/* Pause Screen */
.pause-menu {
    text-align: center;
}

.pause-menu h2 {
    font-size: 60px;
    color: #00ffff;
    text-shadow: 0 0 20px #00ffff;
    margin-bottom: 40px;
    letter-spacing: 10px;
}

/* Result Screen */
.result-panel {
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    border: 3px solid #00ffff;
    padding: 40px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    min-width: 600px;
}

.result-panel h2 {
    font-size: 50px;
    color: #ffff00;
    text-shadow: 0 0 20px #ffff00;
    margin-bottom: 30px;
    letter-spacing: 8px;
}

.result-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.result-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0, 255, 255, 0.05);
    border: 2px solid rgba(0, 255, 255, 0.3);
    padding: 20px;
}

.result-item .label {
    font-size: 14px;
    color: #00ffff;
    text-shadow: 0 0 5px #00ffff;
}

.result-item .value {
    font-size: 32px;
    font-weight: bold;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
}

.result-item .value.rank {
    font-size: 48px;
    color: #ffff00;
    text-shadow: 0 0 15px #ffff00;
}

.result-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Animations */
@keyframes glow-pulse {
    0%, 100% {
        text-shadow:
            0 0 10px #00ffff,
            0 0 20px #00ffff,
            0 0 40px #00ffff,
            0 0 80px #ff00ff,
            0 0 120px #ff00ff;
    }
    50% {
        text-shadow:
            0 0 20px #00ffff,
            0 0 40px #00ffff,
            0 0 60px #00ffff,
            0 0 100px #ff00ff,
            0 0 140px #ff00ff;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .neon-title h1 {
        font-size: 48px;
    }

    .result-panel {
        min-width: 90%;
        padding: 20px;
    }

    .result-stats {
        grid-template-columns: 1fr;
    }
}
