.stats-page { background:radial-gradient(circle at 22% 12%,rgba(84,224,208,.11),transparent 34%),#07101a; }
.stats-hero { padding:155px 0 82px; border-bottom:1px solid var(--line); background:linear-gradient(120deg,rgba(4,10,18,.58),rgba(4,10,18,.96)),url('/assets/minecraft-bg.png') center 58%/cover; }
.stats-hero-grid { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:72px; align-items:end; }
.stats-hero h1 { margin:14px 0 20px; font-size:clamp(52px,7vw,90px); line-height:.92; letter-spacing:-.055em; }
.stats-hero h1 em { color:var(--gold); font-style:normal; }
.stats-hero p:not(.eyebrow) { max-width:700px; margin:0; color:var(--mist); font-size:18px; }
.stats-live-card,.find-player-card,.join-mini-card,.leaderboard-card,.profile-card { border:1px solid var(--line); border-radius:var(--radius); background:rgba(8,20,31,.88); box-shadow:var(--shadow); }
.stats-live-card { padding:25px; }
.stats-live-card small,.join-mini-card small { display:block; color:var(--muted); font-size:11px; font-weight:800; letter-spacing:.15em; text-transform:uppercase; }
.stats-live-card strong { display:block; margin:8px 0 13px; color:var(--paper); font-size:29px; }
.stats-live-card span { display:flex; gap:9px; align-items:center; color:#8eecc0; font-size:13px; font-weight:750; }
.stats-live-card i { width:8px; height:8px; border-radius:50%; background:#72efb3; box-shadow:0 0 14px #72efb3; }
.realm-tabs { display:flex; gap:5px; width:max-content; max-width:100%; margin:26px 0 0; padding:5px; overflow:auto; border:1px solid var(--line); border-radius:13px; background:rgba(8,20,31,.9); }
.realm-tabs a { min-height:44px; flex:0 0 auto; padding:9px 15px; display:flex; align-items:center; border-radius:9px; color:var(--muted); font-size:13px; font-weight:750; text-decoration:none; }
.realm-tabs a:hover,.realm-tabs a.active { color:var(--paper); background:rgba(84,224,208,.12); }
.leaderboard-section { padding:32px 0 105px; }
.leaderboard-layout { display:grid; grid-template-columns:205px minmax(0,1fr) 245px; gap:18px; align-items:start; }
.metric-navigation { position:sticky; top:105px; overflow:hidden; border:1px solid var(--line); border-radius:15px; background:rgba(8,20,31,.76); }
.metric-navigation section { padding:13px 9px; border-bottom:1px solid rgba(155,215,207,.08); }
.metric-navigation section:last-child { border-bottom:0; }
.metric-navigation h3 { margin:0 10px 7px; color:#607a83; font-size:10px; letter-spacing:.16em; text-transform:uppercase; }
.metric-navigation button { display:block; width:100%; min-height:44px; padding:8px 10px; border:0; border-radius:8px; color:#91a3a9; background:transparent; text-align:left; cursor:pointer; }
.metric-navigation button:hover,.metric-navigation button.active { color:var(--paper); background:rgba(84,224,208,.11); }
.leaderboard-card { overflow:hidden; }
.leaderboard-heading { display:flex; justify-content:space-between; gap:20px; padding:27px 27px 18px; }
.leaderboard-heading h2 { margin:7px 0 5px; font-size:34px; letter-spacing:-.03em; }
.leaderboard-heading p:not(.eyebrow) { max-width:560px; margin:0; color:var(--muted); font-size:13px; }
.time-filters { display:flex; align-self:start; gap:4px; padding:4px; border:1px solid var(--line); border-radius:11px; }
.time-filters button { min-height:44px; padding:7px 10px; border:0; border-radius:7px; color:var(--muted); background:transparent; }
.time-filters button.active { color:#04110b; background:#72efb3; font-weight:800; }
.time-filters button:disabled { opacity:.42; }
.board-meta { display:flex; justify-content:space-between; gap:20px; padding:0 27px 13px; color:#698087; font-size:11px; }
.leaderboard-table-wrap,.profile-table-wrap { overflow-x:auto; }
.leaderboard-table,.profile-rankings table { width:100%; border-collapse:collapse; }
.leaderboard-table th,.leaderboard-table td,.profile-rankings th,.profile-rankings td { padding:13px 19px; border-top:1px solid rgba(155,215,207,.08); text-align:left; }
.leaderboard-table thead th,.profile-rankings thead th { color:#617980; font-size:10px; letter-spacing:.14em; text-transform:uppercase; background:rgba(255,255,255,.018); }
.leaderboard-table tbody tr:hover,.profile-rankings tbody tr:hover { background:rgba(84,224,208,.035); }
.leaderboard-table td:last-child { color:#aaf2cc; font-weight:750; text-align:right; }
.rank-number { width:60px; color:var(--gold); font-weight:850; }
.player-link { min-height:44px; display:flex; align-items:center; gap:11px; color:var(--paper); text-decoration:none; }
.player-link img,.player-results img { border:1px solid var(--line); border-radius:8px; image-rendering:pixelated; background:#091520; }
.history-note { margin:0; padding:16px 25px 20px; color:#627981; font-size:11px; }
.stats-aside { position:sticky; top:105px; display:grid; gap:14px; }
.find-player-card,.join-mini-card { padding:19px; }
.find-player-card label { display:block; margin:13px 0 10px; }
.find-player-card input { width:100%; min-height:44px; padding:11px 12px; border:1px solid var(--line); border-radius:9px; outline:0; color:var(--paper); background:rgba(255,255,255,.035); }
.find-player-card input:focus { border-color:var(--line-strong); }
.player-results { display:grid; gap:6px; }
.player-results p { margin:7px 0 0; color:#687e85; font-size:12px; }
.player-results a { min-height:44px; display:flex; align-items:center; gap:8px; padding:7px; border-radius:9px; color:var(--paper); text-decoration:none; }
.player-results a:hover { background:rgba(84,224,208,.08); }
.player-results span { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.player-results b { margin-left:auto; color:var(--aqua); font-size:10px; }
.join-mini-card strong { display:block; margin:8px 0 3px; color:var(--paper); font-size:13px; word-break:break-word; }
.join-mini-card span { display:block; color:var(--muted); font-size:11px; }
.join-mini-card a { min-height:44px; margin-top:13px; display:inline-flex; align-items:center; color:var(--aqua); font-size:12px; font-weight:750; text-decoration:none; }
.stats-loading,.stats-error,.stats-empty { padding:45px !important; color:var(--muted); text-align:center !important; }
.stats-error { color:#ffad96; }
.profile-main { min-height:75vh; padding:130px 0 105px; }
.profile-breadcrumb a { min-height:44px; display:inline-flex; align-items:center; color:var(--muted); font-size:12px; text-decoration:none; }
.player-hero { display:grid; grid-template-columns:235px 1fr; gap:44px; align-items:center; margin:28px 0 0; padding:28px 42px; border:1px solid var(--line); border-radius:20px; background:radial-gradient(circle at 12% 50%,rgba(84,224,208,.15),transparent 34%),rgba(8,20,31,.84); }
.player-render { position:relative; display:grid; height:250px; place-items:center; overflow:hidden; isolation:isolate; }
.player-render::after { content:""; position:absolute; z-index:0; left:50%; bottom:8px; width:92px; height:16px; border-radius:50%; background:rgba(0,0,0,.42); filter:blur(5px); transform:translateX(-50%); }
.player-model-canvas,.player-model-fallback { position:absolute; z-index:1; transition:opacity .22s ease; }
.player-model-canvas { inset:0; width:100%; height:100%; opacity:0; outline:0; touch-action:none; cursor:grab; pointer-events:none; }
.player-model-canvas:active { cursor:grabbing; }
.player-model-canvas:focus-visible { border-radius:13px; box-shadow:inset 0 0 0 2px var(--aqua); }
.player-model-fallback { width:auto; height:235px; object-fit:contain; image-rendering:pixelated; filter:drop-shadow(0 18px 18px rgba(0,0,0,.42)); }
.player-render.is-3d-ready .player-model-canvas { opacity:1; pointer-events:auto; }
.player-render.is-3d-ready .player-model-fallback { opacity:0; pointer-events:none; }
.player-model-hint { position:absolute; z-index:2; right:7px; bottom:7px; padding:5px 7px; border:1px solid rgba(155,215,207,.16); border-radius:7px; color:#8ca5aa; background:rgba(5,14,22,.72); font-size:9px; font-weight:750; letter-spacing:.06em; opacity:0; pointer-events:none; text-transform:uppercase; transition:opacity .22s ease; }
.player-render.is-3d-ready:hover .player-model-hint,.player-render.is-3d-ready:focus-within .player-model-hint { opacity:1; }
.player-intro h1 { margin:10px 0 7px; font-size:clamp(46px,7vw,82px); line-height:.95; letter-spacing:-.05em; }
.player-intro > p:not(.eyebrow) { margin:0; color:var(--muted); }
.player-intro strong { color:var(--aqua); }
.profile-actions { display:flex; gap:14px; align-items:center; margin-top:22px; }
.profile-actions button { min-height:44px; padding:10px 14px; border:1px solid var(--line-strong); border-radius:10px; color:#07121a; background:var(--aqua); font-weight:800; cursor:pointer; }
.profile-actions span { color:#687e85; font-size:11px; }
.profile-overview { display:grid; grid-template-columns:repeat(6,1fr); gap:10px; margin:23px 0; }
.profile-overview article { min-width:0; padding:17px; border:1px solid var(--line); border-radius:13px; background:rgba(8,20,31,.78); }
.profile-overview small { display:block; color:#637b82; font-size:9px; letter-spacing:.11em; text-transform:uppercase; }
.profile-overview strong { display:block; margin-top:6px; overflow:hidden; color:var(--paper); font-size:17px; text-overflow:ellipsis; }
.profile-grid { display:grid; grid-template-columns:280px minmax(0,1fr); gap:18px; align-items:start; }
.profile-sidebar { display:grid; gap:15px; }
.profile-card { padding:21px; }
.profile-card h2 { margin:0 0 15px; font-size:20px; }
.progress-row { margin:12px 0; }
.progress-row span { display:flex; justify-content:space-between; gap:12px; margin-bottom:6px; }
.progress-row b { color:#a8bbc0; font-size:12px; }
.progress-row small { color:#688087; font-size:10px; }
.progress-row progress { display:block; width:100%; height:5px; overflow:hidden; border:0; border-radius:99px; appearance:none; -webkit-appearance:none; background:rgba(255,255,255,.06); }
.progress-row progress::-webkit-progress-bar { border-radius:99px; background:rgba(255,255,255,.06); }
.progress-row progress::-webkit-progress-value { border-radius:99px; background:linear-gradient(90deg,var(--aqua),#72efb3); }
.progress-row progress::-moz-progress-bar { border-radius:99px; background:linear-gradient(90deg,var(--aqua),#72efb3); }
.profile-rankings { padding:0; overflow:hidden; }
.profile-card-heading { display:flex; justify-content:space-between; gap:20px; align-items:end; padding:24px; }
.profile-card-heading h2 { margin:6px 0 0; font-size:31px; }
.profile-card-heading > span { color:#688087; font-size:11px; }
.profile-rankings th,.profile-rankings td { padding:13px 20px; }
.profile-rankings tbody th { color:#aebfc3; font-weight:650; }
.profile-rankings td:nth-child(2) { color:var(--gold); font-weight:800; }
.profile-rankings td:nth-child(2) small { color:#617980; font-weight:500; }
.profile-rankings td:last-child { color:#aaf2cc; text-align:right; }
.profile-loading,.profile-missing { padding:80px 0; }
.profile-loading h1,.profile-missing h1 { margin:12px 0; font-size:clamp(44px,7vw,78px); }
.profile-missing p:not(.eyebrow) { color:var(--muted); }
@media (max-width:1120px) {
  .leaderboard-layout { grid-template-columns:190px minmax(0,1fr); }
  .stats-aside { position:static; grid-column:1/-1; grid-template-columns:1fr 1fr; }
  .profile-overview { grid-template-columns:repeat(3,1fr); }
}
@media (max-width:820px) {
  .stats-hero-grid,.player-hero,.profile-grid { grid-template-columns:1fr; }
  .stats-hero-grid { gap:30px; }
  .stats-live-card { max-width:340px; }
  .leaderboard-layout { grid-template-columns:1fr; }
  .metric-navigation { position:static; display:flex; overflow-x:auto; overscroll-behavior-inline:contain; scroll-snap-type:x proximity; scrollbar-width:thin; }
  .metric-navigation section { flex:0 0 180px; border-right:1px solid rgba(155,215,207,.08); border-bottom:0; scroll-snap-align:start; }
  .stats-aside { grid-column:auto; }
  .player-hero { gap:10px; padding:25px; }
  .player-render { height:210px; }
  .player-model-fallback { height:205px; }
  .player-model-canvas { touch-action:pan-y; }
}
@media (max-width:620px) {
  .stats-hero { padding:125px 0 58px; }
  .stats-hero h1 { font-size:clamp(45px,14vw,66px); }
  .leaderboard-section { padding-bottom:75px; }
  .leaderboard-heading { flex-direction:column; padding:22px 17px 15px; }
  .board-meta { flex-direction:column; gap:3px; padding:0 17px 12px; }
  .leaderboard-table th,.leaderboard-table td { padding:11px 10px; }
  .player-link img { width:31px; height:31px; }
  .stats-aside { grid-template-columns:1fr; }
  .profile-main { padding-top:105px; }
  .player-intro h1 { font-size:clamp(38px,13vw,62px); overflow-wrap:anywhere; }
  .profile-overview { grid-template-columns:repeat(2,1fr); }
  .profile-actions { align-items:flex-start; flex-direction:column; }
  .profile-rankings th,.profile-rankings td { padding:11px 12px; }
}
@media (prefers-reduced-motion:reduce) {
  .player-model-canvas,.player-model-fallback,.player-model-hint { transition:none; }
}
