.driver-profile-page { min-height:100vh; padding:9rem 6vw 5rem; background:radial-gradient(circle at 80% 5%,rgba(220,38,38,.12),transparent 34%); }
.profile-state { min-height:55vh; display:flex; justify-content:center; align-items:center; gap:.75rem; color:var(--muted); }
.profile-state[hidden] { display:none; }
.profile-login { max-width:860px; margin:5vh auto; padding:clamp(2rem,7vw,5rem); text-align:center; border:1px solid var(--border); border-top:3px solid var(--red); background:rgba(255,255,255,.025); }
.profile-login-mark { color:var(--red); font:700 .8rem 'Barlow Condensed',sans-serif; letter-spacing:.22em; text-transform:uppercase; }
.profile-login h1 { margin:1rem 0; font:400 clamp(3rem,8vw,6rem)/.9 'Bebas Neue',sans-serif; letter-spacing:.02em; }
.profile-login h1 span { color:var(--red); }.profile-login p { max-width:38rem; margin:0 auto 2rem; color:var(--muted); line-height:1.7; }
.discord-login-button { display:inline-block; text-decoration:none; }.profile-login-error { margin:1.5rem auto 0; max-width:40rem; padding:1rem; border:1px solid rgba(255,80,80,.35); color:#ff8585; }
.profile-dashboard { max-width:1200px; margin:auto; padding:0; }
.profile-hero { display:flex; align-items:center; gap:1.5rem; padding:2rem; border:1px solid var(--border); border-top:3px solid var(--red); background:rgba(255,255,255,.03); }
.profile-avatar { width:90px;height:90px;flex:0 0 auto;border:2px solid var(--red);background:var(--bg2);background-size:cover;background-position:center;display:grid;place-items:center;font:400 2.5rem 'Bebas Neue'; }
.profile-hero h1 { font:400 clamp(2.2rem,6vw,4rem)/1 'Bebas Neue'; }.profile-hero p { color:var(--muted);margin-top:.35rem; }
.profile-logout { margin-left:auto;color:var(--muted);text-decoration:none;text-transform:uppercase;font:700 .8rem 'Barlow Condensed';letter-spacing:.1em; }
.profile-logout:hover { color:var(--red); }
.profile-stats { display:grid;grid-template-columns:repeat(5,1fr);gap:1rem;margin:1rem 0 3rem; }
.profile-stat { padding:1.25rem;text-align:center;border:1px solid var(--border);background:rgba(255,255,255,.025); }
.profile-stat strong { display:block;color:var(--red);font:400 2rem 'Bebas Neue'; }.profile-stat span { color:var(--muted);font:700 .72rem 'Barlow Condensed';letter-spacing:.08em;text-transform:uppercase; }
.profile-history-heading { display:flex;justify-content:space-between;align-items:end;margin-bottom:1rem; }.profile-history-heading h2 { font:400 2.5rem 'Bebas Neue'; }.profile-history-heading>span { color:var(--muted); }
.profile-race-card { width:100%;display:grid;grid-template-columns:minmax(12rem,1.4fr) minmax(9rem,1fr) repeat(4,minmax(4rem,.55fr)) auto;gap:1rem;align-items:center;padding:1.1rem 1.25rem;margin-bottom:.65rem;color:var(--text);text-align:left;background:rgba(255,255,255,.025);border:1px solid var(--border);cursor:pointer;transition:.2s; }
.profile-race-card:hover { border-color:var(--red);transform:translateX(3px); }.profile-race-card strong,.profile-race-card span { display:block; }.profile-race-card small { color:var(--muted); }.profile-race-value { font-family:'Barlow Condensed'; }.profile-race-value small { text-transform:uppercase;font-size:.66rem;letter-spacing:.08em; }
.profile-empty { padding:3rem;text-align:center;color:var(--muted);border:1px solid var(--border); }
.profile-modal { position:fixed;inset:0;z-index:10000;background:rgba(0,0,0,.88);display:flex;align-items:center;justify-content:center;padding:2rem; }
.profile-modal[hidden]{display:none}.profile-modal-dialog{position:relative;width:min(1100px,100%);max-height:90vh;overflow:auto;background:var(--bg2);border:1px solid var(--border);border-top:3px solid var(--red);padding:2rem}.profile-modal-close{position:absolute;right:1rem;top:.7rem;border:0;background:none;color:var(--text);font-size:2rem;cursor:pointer}.profile-result-title{font:400 2.5rem 'Bebas Neue';margin-bottom:.25rem}.profile-result-meta{color:var(--muted);margin-bottom:1.5rem}.profile-result-table{overflow-x:auto}.profile-result-table table{width:100%;border-collapse:collapse}.profile-result-table th,.profile-result-table td{padding:.8rem;border-bottom:1px solid var(--border);text-align:left}.profile-result-table th{color:var(--muted);font:700 .72rem 'Barlow Condensed';text-transform:uppercase;letter-spacing:.07em}
@media(max-width:900px){.profile-stats{grid-template-columns:repeat(2,1fr)}.profile-race-card{grid-template-columns:1fr 1fr}.profile-race-card .profile-race-open{display:none}}
@media(max-width:600px){.driver-profile-page{padding:7rem 1rem 3rem}.profile-hero{align-items:flex-start;flex-wrap:wrap}.profile-avatar{width:68px;height:68px}.profile-logout{margin-left:0;width:100%}.profile-stats{grid-template-columns:1fr 1fr}.profile-race-card{grid-template-columns:1fr}.profile-modal{padding:.5rem}.profile-modal-dialog{padding:1.25rem}}
