.hidden { display: none !important; }
* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; }
body, html { width: 100%; height: 100%; overflow: hidden; background-color: #030409; font-family: 'Rajdhani', sans-serif; color: #ffffff; }
#game-container { position: relative; width: 100%; height: 100%; }
#webgl-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: block; z-index: 1; }
.screen-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(4,6,15,0.75); backdrop-filter: blur(12px); display: flex; justify-content: center; align-items: center; z-index: 10; transition: opacity 0.4s ease, visibility 0.4s ease; }
.screen-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.glass-card { background: rgba(14,18,36,0.45); border: 1px solid rgba(0,180,255,0.2); border-radius: 16px; padding: 40px; width: 90%; max-width: 520px; box-shadow: 0 8px 32px 0 rgba(0,0,0,0.4), inset 0 0 16px 0 rgba(0,180,255,0.05); text-align: center; }
.text-center { text-align: center; }
.game-title { font-family: 'Orbitron', sans-serif; font-size: 2.8rem; font-weight: 900; letter-spacing: 4px; background: linear-gradient(135deg, #00f0ff 0%, #ff007f 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-shadow: 0 0 20px rgba(0,240,255,0.15); margin-bottom: 5px; }
.game-subtitle { font-size: 1.1rem; color: #8fa0dd; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 30px; }
.controls-guide { margin: 25px 0 35px 0; background: rgba(0,0,0,0.25); border-radius: 8px; padding: 20px; border: 1px solid rgba(255,255,255,0.05); }
.controls-guide h3 { font-family: 'Orbitron', sans-serif; font-size: 1.1rem; letter-spacing: 2px; margin-bottom: 15px; color: #00f0ff; }
.control-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 0.95rem; }
.control-row:last-child { margin-bottom: 0; }
.key { background: rgba(255,255,255,0.1); border: 1.5px solid rgba(255,255,255,0.25); border-radius: 5px; padding: 3px 8px; font-family: 'Orbitron', sans-serif; font-size: 0.8rem; font-weight: 700; box-shadow: 0 2px 0 0 rgba(255,255,255,0.2); margin-right: 4px; color: #ff007f; }
.desc { color: #aebce8; text-align: right; width: 60%; }
.btn { font-family: 'Orbitron', sans-serif; font-size: 1.1rem; font-weight: 700; letter-spacing: 2px; padding: 14px 45px; border: none; border-radius: 30px; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 0 15px rgba(0,240,255,0.2); }
.btn-primary { background: linear-gradient(135deg, #00f0ff 0%, #0072ff 100%); color: #ffffff; border: 1px solid rgba(255,255,255,0.2); }
.btn-primary:hover { transform: scale(1.05); box-shadow: 0 0 25px rgba(0,240,255,0.5); background: linear-gradient(135deg, #00f0ff 20%, #0084ff 100%); }
.btn-primary:active { transform: scale(0.98); }
#hud-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; padding: 30px; display: flex; flex-direction: column; justify-content: space-between; }
#hud-overlay.hidden { display: none; }
.hud-panel { position: absolute; top: 30px; background: rgba(10,12,28,0.55); backdrop-filter: blur(8px); border: 1.5px solid rgba(0,180,255,0.15); border-radius: 12px; padding: 15px 22px; display: flex; flex-direction: column; pointer-events: auto; }
.left-panel { left: 30px; min-width: 160px; }
.right-panel { right: 30px; min-width: 180px; align-items: flex-end; }
.hud-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; gap: 15px; }
.hud-row:last-child { margin-bottom: 0; }
.hud-label { font-size: 0.8rem; letter-spacing: 1.5px; color: #8fa0dd; font-weight: 700; }
.hud-value { font-family: 'Orbitron', sans-serif; font-size: 1.35rem; font-weight: 700; color: #00f0ff; text-shadow: 0 0 10px rgba(0,240,255,0.3); }
.hud-splits { margin-top: 10px; font-family: 'Orbitron', sans-serif; font-size: 0.8rem; color: rgba(255,255,255,0.45); border-top: 1px solid rgba(255,255,255,0.08); padding-top: 6px; }
#hud-center-alert { position: absolute; top: 30%; left: 50%; transform: translate(-50%,-50%); text-align: center; }
#countdown-display { font-family: 'Orbitron', sans-serif; font-size: 8rem; font-weight: 900; background: linear-gradient(to bottom, #ffffff, #ff007f); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-shadow: 0 0 35px rgba(255,0,127,0.4); animation: countdownScale 1s infinite ease-out; }
#checkpoint-flash { font-family: 'Orbitron', sans-serif; font-size: 1.8rem; font-weight: 900; letter-spacing: 4px; color: #00f0ff; background: rgba(0,240,255,0.08); border: 1px solid rgba(0,240,255,0.4); border-radius: 8px; padding: 10px 30px; text-shadow: 0 0 15px rgba(0,240,255,0.6); box-shadow: 0 0 30px rgba(0,240,255,0.2); animation: alertPulse 1.2s ease-out; }
#drift-active-container { display: flex; flex-direction: column; align-items: flex-end; margin-top: 5px; }
.drift-fire-label { font-family: 'Orbitron', sans-serif; font-size: 0.8rem; font-weight: 900; color: #ff007f; letter-spacing: 2px; text-shadow: 0 0 8px rgba(255,0,127,0.5); animation: firePulse 0.4s infinite alternate; }
.drift-current-val { font-family: 'Orbitron', sans-serif; font-size: 1.4rem; font-weight: 700; color: #ffffff; text-shadow: 0 0 10px rgba(255,255,255,0.4); }
.minimap-container { margin-top: 15px; border: 1px solid rgba(0,180,255,0.15); border-radius: 8px; background: rgba(0,0,0,0.4); padding: 5px; }
#minimap-canvas { display: block; }
.hud-bottom-panel { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); width: 320px; background: rgba(10,12,28,0.6); border: 1.5px solid rgba(0,180,255,0.2); border-radius: 16px; padding: 15px 22px; backdrop-filter: blur(8px); display: flex; flex-direction: column; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.speedometer-container { text-align: center; margin-bottom: 8px; }
.speed-readout { display: flex; flex-direction: column; align-items: center; }
.speed-num { font-family: 'Orbitron', sans-serif; font-size: 2.8rem; font-weight: 900; color: #ffffff; line-height: 1.0; text-shadow: 0 0 15px rgba(255,255,255,0.25); }
.speed-unit { font-size: 0.75rem; font-weight: 700; letter-spacing: 2px; color: #ff007f; }
.boost-container { width: 100%; margin-top: 4px; }
.boost-track { width: 100%; height: 8px; background: rgba(255,255,255,0.08); border-radius: 4px; overflow: hidden; margin-top: 5px; border: 1px solid rgba(0,240,255,0.15); }
.boost-fill { height: 100%; background: linear-gradient(to right, #0072ff, #00f0ff); box-shadow: 0 0 10px rgba(0,240,255,0.8); border-radius: 4px; transition: width 0.1s linear; }
.controls-quick-help { position: absolute; bottom: 30px; left: 30px; font-size: 0.8rem; color: rgba(255,255,255,0.35); letter-spacing: 1px; }
.success-title { font-family: 'Orbitron', sans-serif; font-size: 2.5rem; font-weight: 900; color: #00f0ff; letter-spacing: 3px; text-shadow: 0 0 20px rgba(0,240,255,0.4); margin-bottom: 25px; }
.final-stats { background: rgba(0,0,0,0.3); border-radius: 12px; padding: 22px; margin-bottom: 25px; border: 1px solid rgba(255,255,255,0.05); }
.stat-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 1.1rem; }
.stat-lbl { color: #8fa0dd; font-weight: 500; }
.stat-val { font-family: 'Orbitron', sans-serif; color: #ffffff; font-weight: 700; }
.total-row { border-top: 1.5px dashed rgba(0,180,255,0.3); padding-top: 12px; margin-bottom: 0; font-size: 1.3rem; }
.total-row .stat-lbl { color: #00f0ff; font-weight: 700; }
.total-row .stat-val { color: #ff007f; text-shadow: 0 0 15px rgba(255,0,127,0.4); }
.lap-splits-summary { font-family: 'Orbitron', sans-serif; font-size: 0.9rem; color: rgba(255,255,255,0.5); margin-bottom: 30px; text-align: left; max-height: 120px; overflow-y: auto; padding: 0 10px; }
.lap-splits-summary div { display: flex; justify-content: space-between; margin-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,0.03); padding-bottom: 3px; }
@keyframes countdownScale { 0% { transform: scale(0.6); opacity: 0; } 5% { opacity: 1; } 50% { transform: scale(1.1); } 100% { transform: scale(1.0); opacity: 0; } }
@keyframes alertPulse { 0% { transform: scale(0.8); opacity: 0; } 15% { transform: scale(1.05); opacity: 1; } 30% { transform: scale(1.0); } 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes firePulse { from { color: #ff007f; text-shadow: 0 0 8px rgba(255,0,127,0.5); } to { color: #ff7200; text-shadow: 0 0 15px rgba(255,114,0,0.8); } }
.screen-shake { animation: shake 0.3s cubic-bezier(.36,.07,.19,.97) both; transform: translate3d(0,0,0); }
@keyframes shake { 10%,90% { transform: translate3d(-2px,-1px,0); } 20%,80% { transform: translate3d(3px,2px,0); } 30%,50%,70% { transform: translate3d(-5px,-3px,0); } 40%,60% { transform: translate3d(5px,3px,0); } }
