*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body,#app{width:100%;height:100%;overflow:hidden;background:#141c27;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color:#f4f6fa;user-select:none;-webkit-user-select:none;touch-action:manipulation}#game-canvas{display:block;width:100%;height:100%}#hud{position:fixed;inset:0;pointer-events:none;padding:18px 22px}.speed-fx{position:fixed;inset:0;pointer-events:none;opacity:0;background:radial-gradient(ellipse at center,transparent 52%,rgba(28,195,255,.24) 84%,rgba(10,26,48,.56) 100%),repeating-conic-gradient(from 0deg at 50% 50%,rgba(220,248,255,.14) 0deg 1.1deg,transparent 1.1deg 9deg);mask-image:radial-gradient(ellipse at center,transparent 48%,black 88%);-webkit-mask-image:radial-gradient(ellipse at center,transparent 48%,black 88%);transition:opacity 90ms linear}.panel{background:#0c1018c7;backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,.14);border-radius:12px;box-shadow:0 10px 28px #00000059}.mono{font-variant-numeric:tabular-nums;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}.hud-top-left{position:absolute;top:18px;left:22px;padding:12px 16px;min-width:248px}.brand-row{display:flex;align-items:center;gap:8px;margin-bottom:10px;padding-bottom:8px;border-bottom:1px solid rgba(255,255,255,.1)}.brand-accent{width:4px;height:16px;border-radius:2px;background:#e83b1e}.brand-title{font-weight:800;font-size:12px;letter-spacing:.12em;color:#fff}.brand-car{margin-left:auto;font-size:10px;font-weight:700;letter-spacing:.08em;color:#f6b352}.race-stats-row{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:10px;padding-bottom:8px;border-bottom:1px solid rgba(255,255,255,.09)}.stat-box{display:flex;flex-direction:column;gap:2px}.stat-box.right{align-items:flex-end}.stat-big{font-size:24px;font-weight:900;line-height:1.05;color:#fff}.label{font-size:11px;font-weight:700;letter-spacing:.1em;color:#ebf0f8a8}.times-grid{display:flex;flex-direction:column;gap:4px}.time-row{display:flex;justify-content:space-between;align-items:center;font-size:13.5px;font-weight:600}.time-row.best .mono{color:#4be38a}.hud-top-center{position:absolute;top:18px;left:50%;transform:translate(-50%);display:flex;flex-direction:column;align-items:center;gap:8px}.status-banner{padding:9px 18px;border-radius:999px;font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;box-shadow:0 8px 24px #0006}.status-banner.offroad{background:#d92d1cf0;border:1px solid #ff9a8b;color:#fff}.status-banner.demo{background:#1078d2e6;border:1px solid #8fd0ff;color:#fff}.countdown-overlay{position:absolute;top:30%;left:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:14px;padding:18px 34px;border-radius:18px;background:#0a0e16b8;backdrop-filter:blur(8px);border:1px solid rgba(255,255,255,.16);box-shadow:0 18px 44px #00000080}.start-lights{display:flex;gap:12px}.light-lamp{width:24px;height:24px;border-radius:50%;background:#1d222c;border:2px solid rgba(255,255,255,.18);transition:background 80ms ease,box-shadow 80ms ease}.light-lamp.red{background:#ff2525;border-color:#ff9c9c;box-shadow:0 0 16px #ff2525}.light-lamp.green{background:#2ae86a;border-color:#a8ffbf;box-shadow:0 0 18px #2ae86a}.countdown-text{font-size:72px;font-weight:900;line-height:1;letter-spacing:.04em;color:#fff;text-shadow:0 6px 24px rgba(0,0,0,.6)}.countdown-text.go{color:#4be38a}.results-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#080c1485;pointer-events:auto;z-index:20}.results-card{width:min(560px,92vw);padding:24px 28px;background:#0c111beb}.results-header{display:flex;flex-direction:column;gap:4px;margin-bottom:18px}.results-tag{font-size:11px;font-weight:800;letter-spacing:.14em;color:#f6b352}.results-title{font-size:28px;font-weight:900;letter-spacing:.02em;color:#fff}.results-table{width:100%;border-collapse:collapse;margin-bottom:20px}.results-table th{font-size:11px;font-weight:700;letter-spacing:.1em;color:#ebf0f899;text-align:left;padding:0 10px 10px;border-bottom:1px solid rgba(255,255,255,.12)}.results-table td{padding:12px 10px;font-size:14px;font-weight:600;border-bottom:1px solid rgba(255,255,255,.08)}.results-table th.num,.results-table td.num{text-align:right}.results-table tr.player-row{background:#e83b1e2e}.results-table .pos-col{font-size:16px;font-weight:900;width:48px}.driver-col{display:flex;align-items:center;gap:10px}.swatch{width:12px;height:12px;border-radius:3px;display:inline-block;flex-shrink:0;border:1px solid rgba(255,255,255,.4)}.on-track-pill{display:inline-block;padding:2px 9px;border-radius:999px;font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;background:#ffffff1f;color:#cbd5e1}.results-footer{display:flex;justify-content:flex-end}.primary-btn{border:1px solid #ff8c73;background:#e83b1e;color:#fff;font-size:14px;font-weight:800;letter-spacing:.04em;padding:10px 22px;border-radius:9px;cursor:pointer;box-shadow:0 6px 18px #e83b1e59;transition:background .12s ease,transform .12s ease}.primary-btn:hover{background:#f54a2e;transform:translateY(-1px)}.hidden{display:none!important}.hud-top-right{position:absolute;top:18px;right:22px;padding:10px 12px;display:flex;flex-direction:column;align-items:center;gap:8px;pointer-events:auto}.minimap{width:168px;height:128px;display:block}.map-outline{fill:none;stroke:#fff3;stroke-width:8;stroke-linejoin:round}.map-road{fill:none;stroke:#d7dee8;stroke-width:4;stroke-linejoin:round}.map-start{stroke:#4be38a;stroke-width:3}.map-dot.player{stroke:#fff;stroke-width:1.9}.map-dot.rival{stroke:#0c1018d9;stroke-width:1.2}.map-dot.ghost{fill:#6ce8ff8c;stroke:#7ef0ff;stroke-width:1.5}.hud-actions{display:flex;gap:6px;width:100%}.hud-btn{flex:1;border:1px solid rgba(255,255,255,.2);background:#ffffff17;color:#fff;font-size:11px;font-weight:700;padding:6px 8px;border-radius:7px;cursor:pointer;transition:background .12s ease,border-color .12s ease}.hud-btn:hover{background:#ffffff2e}.hud-btn.active{background:#1484e6;border-color:#7cc6ff}.controls-pill{position:absolute;bottom:18px;left:22px;padding:9px 14px;font-size:12px;font-weight:600;color:#f2f6fce0;display:flex;align-items:center;gap:5px}.controls-pill kbd{display:inline-block;padding:2px 6px;border-radius:5px;background:#ffffff29;border:1px solid rgba(255,255,255,.25);font-family:inherit;font-size:11px;font-weight:800;color:#fff}.controls-pill .sep{opacity:.45;margin:0 3px}.speed-cluster{position:absolute;bottom:18px;right:22px;padding:12px 18px;min-width:228px}.speed-top{display:flex;align-items:baseline;justify-content:space-between;gap:14px;margin-bottom:8px}.gear-badge{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:8px;background:#e83b1e38;border:1px solid rgba(232,59,30,.7);color:#ff7759;font-size:20px;font-weight:900}.speed-readout{display:flex;align-items:baseline;gap:6px}.speed-num{font-size:46px;font-weight:900;line-height:.95;letter-spacing:-.02em;color:#fff}.speed-unit{font-size:12px;font-weight:800;letter-spacing:.1em;color:#ebf0f8a6}.speed-bar-track{position:relative;width:100%;height:7px;border-radius:999px;background:#ffffff24;overflow:hidden;margin-bottom:9px}.speed-bar-fill{height:100%;width:0%;border-radius:999px;background:linear-gradient(90deg,#32d583,#f6b352 65%,#e83b1e);transition:width 40ms linear}.speed-bar-fill.boosting{background:linear-gradient(90deg,#27c8ff,#6cf0ff 70%,#fff);box-shadow:0 0 12px #38d9ff}.speed-bar-fill.offroad{background:#ef4444}.speed-cap-tick{position:absolute;top:0;bottom:0;width:2px;background:#ffffff8c}.boost-row{display:flex;align-items:center;gap:8px}.boost-label{font-size:10px;font-weight:800;letter-spacing:.1em;color:#6ce8ff}.boost-bar-track{flex:1;height:8px;border-radius:999px;background:#ffffff24;overflow:hidden}.boost-bar-fill{height:100%;width:100%;border-radius:999px;background:linear-gradient(90deg,#0ea5e9,#38e8ff);transition:width 40ms linear}.boost-bar-fill.burning{background:linear-gradient(90deg,#f59e0b,#38e8ff 60%,#fff);box-shadow:0 0 12px #38e8ff}.boost-bar-fill.empty{background:#475569}.boost-pct{font-size:11px;font-weight:800;width:34px;text-align:right;color:#d8f6ff}.touch-controls{display:none;position:fixed;left:10px;right:10px;bottom:10px;justify-content:space-between;align-items:flex-end;pointer-events:none;z-index:12}.touch-group{display:flex;gap:8px;pointer-events:auto}.touch-btn{border:1px solid rgba(255,255,255,.28);background:#0e1420c7;backdrop-filter:blur(8px);color:#fff;font-weight:900;border-radius:14px;touch-action:none;user-select:none;-webkit-user-select:none;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 6px 18px #0006}.touch-btn.pressed{transform:scale(.95);border-color:#fff}.steer-btn{width:64px;height:60px;font-size:24px}.touch-pedals .touch-btn{height:60px;padding:0 11px;font-size:12px;letter-spacing:.05em}.boost-btn{border-color:#38e8ffa6;background:#0e74a8c7;color:#d8f8ff}.brake-btn{border-color:#f87171a6;background:#991b1bc7}.gas-btn{border-color:#4ade80a6;background:#16803dd1;min-width:58px}@media(pointer:coarse){.controls-pill{display:none}.touch-controls{display:flex}}@media(max-width:640px){#hud{padding:10px}.hud-top-left{top:10px;left:10px;min-width:0;width:178px;padding:8px 10px;border-radius:10px}.brand-row{gap:5px;margin-bottom:6px;padding-bottom:5px}.brand-title{font-size:10px;letter-spacing:.06em}.brand-car{display:none}.race-stats-row{gap:8px;margin-bottom:6px;padding-bottom:6px}.stat-big{font-size:17px}.label{font-size:9.5px}.time-row{font-size:11.5px}.hud-top-right{top:10px;right:10px;width:166px;padding:7px 8px;gap:6px;border-radius:10px}.minimap{width:146px;height:92px}.hud-actions{gap:5px}.hud-btn{font-size:9px;padding:5px 3px;white-space:nowrap}.hud-top-center{top:178px;width:calc(100vw - 20px)}.status-banner{font-size:10px;padding:6px 12px;letter-spacing:.05em;text-align:center;max-width:100%}.controls-pill{display:none}.touch-controls{display:flex}.steer-btn{width:56px;height:48px;font-size:20px}.touch-pedals{gap:5px}.touch-pedals .touch-btn{height:48px;padding:0 9px;font-size:10.5px}.gas-btn{min-width:48px}.speed-cluster{bottom:66px;right:10px;min-width:0;width:170px;padding:7px 10px;border-radius:10px}.speed-top{gap:8px;margin-bottom:6px}.gear-badge{width:28px;height:28px;font-size:15px}.speed-num{font-size:30px}.speed-unit{font-size:9.5px}.speed-bar-track{margin-bottom:6px}.boost-label,.boost-pct{font-size:9.5px}.countdown-overlay{top:42%;padding:14px 24px}.countdown-text{font-size:54px}.light-lamp{width:18px;height:18px}}
