:root {
  --bg: #faf9f7;
  --bg2: #f2f0ed;
  --bg3: #e9e6e2;
  --card: #fff;
  --input: #f5f3f0;
  --accent: #e63b2e;
  --accent2: #f97316;
  --grad: linear-gradient(135deg, #e63b2e, #f97316);
  --asoft: rgba(230, 59, 46, .06);
  --asoft2: rgba(249, 115, 22, .05);
  --glow: rgba(230, 59, 46, .10);
  --glowS: rgba(230, 59, 46, .20);
  --t: #18181b;
  --t2: #64646e;
  --t3: #9c9ca8;
  --t4: #c4c4ce;
  --b: #e5e3df;
  --b2: #d5d2cd;
  --green: #16a34a;
  --gsoft: rgba(22, 163, 74, .07);
  --red: #dc2626;
  --rsoft: rgba(220, 38, 38, .06);
  --blue: #2563eb;
  --purple: #7c3aed;
  --yellow: #eab308;
  --r: 12px;
  --r2: 16px;
  --ss: 0 1px 2px rgba(0, 0, 0, .04);
  --sm: 0 4px 12px rgba(0, 0, 0, .06);
  --sl: 0 10px 30px rgba(0, 0, 0, .08);
  --sxl: 0 20px 60px rgba(0, 0, 0, .10);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--t);
  overflow-x: hidden;
  min-height: 100vh;
}

.page {
  display: none;
  min-height: 100vh;
}

.page.active {
  display: block;
}

::selection {
  background: rgba(230, 59, 46, .15);
  color: var(--t);
}

input,
select,
button {
  font-family: 'Outfit', sans-serif;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 var(--glowS)
  }

  50% {
    box-shadow: 0 0 0 10px transparent
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) rotate(2deg)
  }

  50% {
    transform: translateY(-10px) rotate(2deg)
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

@keyframes shimmer {
  to {
    background-position: 200% 0
  }
}

@keyframes scrollX {
  to {
    transform: translateX(-50%)
  }
}

@keyframes ripple {
  0% {
    transform: scale(.8);
    opacity: 1
  }

  100% {
    transform: scale(2.5);
    opacity: 0
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(.96)
  }

  to {
    opacity: 1;
    transform: none
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-12px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

/* ═══════════════════════════════
   NAV
═══════════════════════════════ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 32px;
  height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(250, 249, 247, .82);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, .04);
}

.nlogo {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -.5px;
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--t);
  cursor: pointer;
  user-select: none;
}

.nicon {
  width: 28px;
  height: 28px;
  background: var(--grad);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-4deg);
  box-shadow: 0 3px 10px var(--glowS);
}

.nicon svg {
  width: 14px;
  height: 14px;
}

.nlinks {
  display: flex;
  gap: 6px;
  align-items: center;
}

.nlinks a {
  color: var(--t2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 7px 12px;
  border-radius: 8px;
  transition: all .2s;
}

.nlinks a:hover {
  background: var(--bg2);
  color: var(--t);
}

.ncta {
  background: var(--grad) !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  letter-spacing: .3px;
  text-transform: uppercase;
  box-shadow: 0 2px 10px var(--glowS);
}

.ncta:hover {
  box-shadow: 0 4px 20px var(--glowS) !important;
  transform: translateY(-1px);
}

/* ═══════════════════════════════
   LANDING PAGE
═══════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 100px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% 60%, rgba(230, 59, 46, .18), transparent 60%),
    radial-gradient(ellipse 70% 50% at 90% 20%, rgba(249, 115, 22, .16), transparent 55%),
    radial-gradient(ellipse 60% 60% at 50% 90%, rgba(124, 58, 237, .12), transparent 50%),
    radial-gradient(ellipse 80% 50% at 70% 10%, rgba(37, 99, 235, .10), transparent 55%),
    radial-gradient(ellipse 50% 40% at 30% 30%, rgba(16, 185, 129, .08), transparent 50%);
  background-size: 300% 300%;
  animation: heroMesh 8s ease-in-out infinite;
}

@keyframes heroMesh {
  0% {
    background-position: 0% 0%
  }

  25% {
    background-position: 100% 50%
  }

  50% {
    background-position: 50% 100%
  }

  75% {
    background-position: 0% 50%
  }

  100% {
    background-position: 0% 0%
  }
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(0, 0, 0, .02) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, .02) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black, transparent);
}

.particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
}

@keyframes particleFade {

  0%,
  100% {
    opacity: 0;
    transform: translateY(0) scale(.5)
  }

  50% {
    opacity: .3;
    transform: translateY(-40px) scale(1)
  }
}

.hbadge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: var(--asoft);
  border: 1px solid rgba(230, 59, 46, .1);
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
  opacity: 0;
  animation: fadeUp .7s .2s forwards;
}

.bdot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero h1 {
  font-family: 'Sora', sans-serif;
  font-size: clamp(44px, 7.5vw, 84px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -3px;
  position: relative;
  z-index: 1;
  opacity: 0;
  animation: fadeUp .7s .35s forwards;
}

.gr {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hsub {
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--t2);
  line-height: 1.65;
  max-width: 480px;
  margin: 24px auto 0;
  position: relative;
  z-index: 1;
  opacity: 0;
  animation: fadeUp .7s .5s forwards;
}

.hacts {
  display: flex;
  gap: 12px;
  margin-top: 36px;
  position: relative;
  z-index: 1;
  opacity: 0;
  animation: fadeUp .7s .65s forwards;
}

.bp {
  padding: 14px 34px;
  background: var(--grad);
  color: #fff;
  border: none;
  border-radius: var(--r);
  font-family: 'Sora';
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all .25s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bp:hover {
  box-shadow: 0 8px 32px var(--glowS);
  transform: translateY(-2px);
}

.bg {
  padding: 14px 28px;
  background: transparent;
  color: var(--t);
  border: 1.5px solid var(--b2);
  border-radius: var(--r);
  font-family: 'Outfit';
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s;
  text-decoration: none;
}

.bg:hover {
  border-color: var(--t3);
  background: var(--card);
}

/* Matchup */
.hvisual {
  margin-top: 64px;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 800px;
  opacity: 0;
  animation: fadeUp .8s .85s forwards;
}

.mucard {
  background: var(--card);
  border: 1px solid var(--b);
  border-radius: var(--r2);
  padding: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--sl);
}

.mucard::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad);
}

.muhdr {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 20px;
}

.muplayers {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 36px;
}

.plcard {
  text-align: center;
  transition: transform .3s;
  cursor: pointer;
}

.plcard:hover {
  transform: translateY(-3px);
}

.plavatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2.5px solid var(--b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 8px;
  transition: all .3s;
  background: var(--bg2);
}

.plcard:hover .plavatar {
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--glow);
}

.plname {
  font-family: 'Sora';
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 2px;
}

.plelo {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

.plsport {
  font-size: 10px;
  color: var(--t3);
  margin-top: 1px;
}

.vsbadge {
  font-family: 'Sora';
  font-weight: 800;
  font-size: 18px;
  color: var(--t4);
  padding: 10px;
  border: 2px solid var(--b);
  border-radius: 50%;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg2);
}

.mures {
  text-align: center;
  margin-top: 20px;
}

.mubtn {
  padding: 11px 36px;
  background: var(--grad);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'Sora';
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .3s;
}

.mubtn:hover {
  box-shadow: 0 6px 24px var(--glowS);
  transform: scale(1.02);
}

.eloch {
  display: none;
  margin-top: 10px;
  font-size: 13px;
  color: var(--t2);
  animation: fadeUp .4s;
}

.eloch.visible {
  display: block;
}

.eloch .win {
  color: var(--green);
  font-weight: 700;
}

.eloch .lose {
  color: var(--red);
  font-weight: 700;
}

/* Features Grid */
.fsec {
  padding: 80px 32px;
  max-width: 1100px;
  margin: 0 auto;
}

.slbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 12px;
}

.stitle {
  font-family: 'Sora';
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 48px;
  max-width: 500px;
}

.fgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.fcard {
  background: var(--card);
  border: 1px solid var(--b);
  border-radius: var(--r);
  padding: 26px;
  transition: all .35s;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(24px);
  box-shadow: var(--ss);
}

.fcard.visible {
  opacity: 1;
  transform: none;
  transition-delay: var(--d, 0s);
}

.fcard:hover {
  border-color: rgba(230, 59, 46, .12);
  transform: translateY(-3px) !important;
  box-shadow: var(--sm);
}

.fcard::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transition: transform .35s;
}

.fcard:hover::before {
  transform: scaleX(1);
}

.ficon {
  width: 42px;
  height: 42px;
  background: var(--asoft);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}

.fcard h3 {
  font-family: 'Sora';
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.fcard p {
  color: var(--t2);
  font-size: 12px;
  line-height: 1.7;
}

/* ELO Demo */
.elosec {
  padding: 60px 32px;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.elodemo {
  background: var(--card);
  border: 1px solid var(--b);
  border-radius: var(--r2);
  padding: 32px;
  margin-top: 32px;
  box-shadow: var(--sm);
}

.elodisp {
  font-family: 'Sora';
  font-size: 56px;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 4px;
}

.elorl {
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 20px;
}

.elosli {
  width: 100%;
  -webkit-appearance: none;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg, #e63b2e, #f97316, #eab308, #16a34a, #2563eb, #7c3aed);
  outline: none;
  margin: 16px 0;
}

.elosli::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--t);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

.elotiers {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--t3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Carousel */
.carsec {
  padding: 56px 0;
  overflow: hidden;
}

.cartrack {
  display: flex;
  gap: 12px;
  animation: scrollX 30s linear infinite;
  width: max-content;
}

.cartrack:hover {
  animation-play-state: paused;
}

.schip {
  padding: 10px 20px;
  background: var(--card);
  border: 1px solid var(--b);
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all .25s;
  cursor: default;
  box-shadow: var(--ss);
}

.schip:hover {
  border-color: var(--accent);
  background: var(--asoft);
}

/* CTA */
.ctasec {
  padding: 80px 32px;
  text-align: center;
  position: relative;
}

.ctasec::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 40% at 50% 50%, rgba(230, 59, 46, .035), transparent);
}

.ctasub {
  color: var(--t2);
  font-size: 16px;
  max-width: 420px;
  margin: 0 auto 32px;
  line-height: 1.6;
  position: relative;
}

footer {
  padding: 32px;
  border-top: 1px solid var(--b);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--t3);
}

footer a {
  color: var(--t2);
  text-decoration: none;
}

/* ═══════════════════════════════
   AUTH PAGE
═══════════════════════════════ */
.auth-wrap {
  min-height: 100vh;
  display: flex;
}

.auth-left {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  overflow: hidden;
  background: var(--bg2);
}

.auth-left .grid-ov {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(0, 0, 0, .015) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, .015) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.auth-hl {
  font-family: 'Sora';
  font-weight: 800;
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.auth-sub {
  font-size: 15px;
  color: var(--t2);
  line-height: 1.6;
  max-width: 360px;
  position: relative;
  z-index: 1;
}

.elo-float {
  position: absolute;
  right: 48px;
  top: 50%;
  transform: translateY(-50%) rotate(2deg);
  background: var(--card);
  border: 1px solid var(--b);
  border-radius: 14px;
  padding: 20px;
  width: 170px;
  z-index: 1;
  box-shadow: var(--sl);
  animation: float 6s ease-in-out infinite;
}

.ef-label {
  font-size: 9px;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 3px;
}

.ef-val {
  font-family: 'Sora';
  font-size: 34px;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.ef-rank {
  font-size: 11px;
  color: var(--t2);
  margin-top: 4px;
}

.ef-rank .arrow {
  color: var(--green);
}

.auth-stats {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 28px;
}

.auth-stats .sn {
  font-family: 'Sora';
  font-weight: 700;
  font-size: 22px;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-stats .sl {
  font-size: 10px;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 2px;
}

.auth-right {
  width: 440px;
  min-height: 100vh;
  background: var(--card);
  border-left: 1px solid var(--b);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px 40px;
  position: relative;
}

.auth-right::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--grad);
}

.tabsw {
  display: flex;
  background: var(--bg2);
  border-radius: 9px;
  padding: 3px;
  margin-bottom: 24px;
}

.tabbtn {
  flex: 1;
  padding: 9px;
  border: none;
  background: transparent;
  color: var(--t3);
  font-family: 'Outfit';
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 7px;
  transition: all .25s;
}

.tabbtn.active {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 3px 12px var(--glowS);
}

.ftitle {
  font-family: 'Sora';
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 3px;
}

.fsub {
  color: var(--t2);
  font-size: 12px;
  margin-bottom: 20px;
}

.aform {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.frow {
  display: flex;
  gap: 10px;
}

.frow .ig {
  flex: 1;
}

.ig {
  position: relative;
}

.ig label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--t2);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

.ig input,
.ig select {
  width: 100%;
  padding: 10px 12px;
  background: var(--input);
  border: 1.5px solid var(--b);
  border-radius: var(--r);
  color: var(--t);
  font-size: 13px;
  transition: all .2s;
  outline: none;
}

.ig input::placeholder {
  color: var(--t4);
}

.ig input:focus,
.ig select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--glow);
}

.ig select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%239c9ca8'%3E%3Cpath d='M5 7L0 2h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.ig.err input,
.ig.err select {
  border-color: var(--red);
}

.ig .err-msg {
  font-size: 10px;
  color: var(--red);
  margin-top: 2px;
}

.auth-alert {
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  display: none;
}

.auth-alert.aerr {
  display: block;
  background: var(--rsoft);
  color: var(--red);
}

.auth-alert.aok {
  display: block;
  background: var(--gsoft);
  color: var(--green);
}

.auth-alert.asuc {
  display: block;
  background: var(--gsoft);
  color: var(--green);
}

.auth-alert.ainfo {
  display: block;
  background: var(--asoft);
  color: var(--accent);
}

.pwtog {
  position: absolute;
  right: 10px;
  top: 30px;
  background: none;
  border: none;
  color: var(--t3);
  cursor: pointer;
  padding: 3px;
  font-size: 14px;
}

.pwtog:hover {
  color: var(--t2);
}

.fex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.rem {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--t2);
  cursor: pointer;
  font-size: 12px;
}

.rem input[type="checkbox"] {
  appearance: none;
  width: 15px;
  height: 15px;
  background: var(--input);
  border: 1.5px solid var(--b);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: all .2s;
}

.rem input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.rem input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 9px;
  color: #fff;
  font-weight: 700;
}

.forgot {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  font-size: 12px;
}

.subbtn {
  width: 100%;
  padding: 12px;
  background: var(--grad);
  color: #fff;
  border: none;
  border-radius: var(--r);
  font-family: 'Sora';
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .25s;
  margin-top: 2px;
}

.subbtn:hover {
  box-shadow: 0 6px 24px var(--glowS);
  transform: translateY(-1px);
}

.subbtn:disabled {
  opacity: .6;
  pointer-events: none;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
  color: var(--t3);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--b);
}

.socbtns {
  display: flex;
  gap: 8px;
}

.socb {
  flex: 1;
  padding: 10px;
  background: var(--input);
  border: 1.5px solid var(--b);
  border-radius: var(--r);
  color: var(--t);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all .2s;
}

.socb svg {
  flex-shrink: 0;
}

.socb:hover {
  border-color: var(--b2);
  background: var(--bg2);
}

.terms {
  text-align: center;
  font-size: 10px;
  color: var(--t3);
  margin-top: 6px;
  line-height: 1.5;
}

.terms a {
  color: var(--t2);
  text-decoration: underline;
}

.fc {
  display: none;
}

.fc.active {
  display: block;
  animation: fadeUp .3s;
}

.demobtn {
  width: 100%;
  padding: 10px;
  background: var(--bg2);
  border: 1.5px solid var(--b);
  border-radius: var(--r);
  font-family: 'Outfit';
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  transition: all .2s;
  margin-top: 6px;
}

.demobtn:hover {
  background: var(--asoft);
  border-color: var(--accent);
}

/* ═══════════════════════════════
   DASHBOARD
═══════════════════════════════ */
.dash {
  display: flex;
  min-height: 100vh;
  padding-top: 56px;
}

.sidebar {
  width: 220px;
  position: fixed;
  top: 56px;
  bottom: 0;
  left: 0;
  background: var(--card);
  border-right: 1px solid var(--b);
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  z-index: 50;
  overflow-y: auto;
}

.sbs {
  padding: 0 12px;
  margin-bottom: 4px;
}

.sblbl {
  font-size: 9px;
  font-weight: 700;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 8px 10px 4px;
}

.sbi {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--t2);
  cursor: pointer;
  transition: all .15s;
  margin-bottom: 1px;
  user-select: none;
}

.sbi:hover {
  background: var(--bg2);
  color: var(--t);
}

.sbi.active {
  background: var(--asoft);
  color: var(--accent);
  font-weight: 600;
}

.sbi .sicon {
  width: 16px;
  text-align: center;
  font-size: 14px;
}

.sbnot {
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
  margin-left: auto;
}

.sbspc {
  flex: 1;
}

.sbuser {
  padding: 12px;
  border-top: 1px solid var(--b);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sbav {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  font-family: 'Sora';
}

.sbuname {
  font-size: 12px;
  font-weight: 600;
}

.sburole {
  font-size: 10px;
  color: var(--t3);
}

.dmain {
  flex: 1;
  margin-left: 220px;
  padding: 24px 28px;
  max-width: calc(100vw - 220px);
}

/* Dashboard View Transition */
.dview {
  display: none;
  animation: fadeUp .3s;
}

.dview.active {
  display: block;
}

/* Back Button */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: var(--bg2);
  border: 1px solid var(--b);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  color: var(--t2);
  cursor: pointer;
  transition: all .2s;
  margin-bottom: 14px;
}

.back-btn:hover {
  background: var(--bg3);
  color: var(--t);
}

/* Header */
.dheader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.dgreet h1 {
  font-family: 'Sora';
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.5px;
}

.dgreet p {
  color: var(--t2);
  font-size: 12px;
  margin-top: 2px;
}

.dacts {
  display: flex;
  gap: 6px;
}

.dbtn {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  border: 1.5px solid var(--b);
  background: var(--card);
  color: var(--t);
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Outfit';
}

.dbtn:hover {
  border-color: var(--b2);
  box-shadow: var(--ss);
}

.dbtn-a {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
}

.dbtn-a:hover {
  box-shadow: 0 4px 16px var(--glowS);
  transform: translateY(-1px);
}

/* Stats Row */
.srow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.scard {
  background: var(--card);
  border: 1px solid var(--b);
  border-radius: var(--r);
  padding: 18px;
  position: relative;
  overflow: hidden;
  transition: all .25s;
  box-shadow: var(--ss);
}

.scard:hover {
  box-shadow: var(--sm);
  transform: translateY(-1px);
}

.scard::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad);
  opacity: 0;
  transition: opacity .25s;
}

.scard:hover::before {
  opacity: 1;
}

.sclbl {
  font-size: 10px;
  color: var(--t3);
  font-weight: 500;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.scval {
  font-family: 'Sora';
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.5px;
}

.sc-chg {
  font-size: 10px;
  font-weight: 600;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.sc-up {
  color: var(--green);
}

.sc-dn {
  color: var(--red);
}

/* Grid */
.dgrid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 14px;
}

/* Card */
.dc {
  background: var(--card);
  border: 1px solid var(--b);
  border-radius: var(--r);
  padding: 18px;
  box-shadow: var(--ss);
  margin-bottom: 14px;
}

.dch {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.dct {
  font-family: 'Sora';
  font-size: 14px;
  font-weight: 700;
}

.dca {
  font-size: 10px;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s;
}

.dca:hover {
  opacity: .7;
}

/* Chart */
.chart-c {
  width: 100%;
  height: 180px;
  position: relative;
}

.chart-svg {
  width: 100%;
  height: 100%;
}

.chart-line {
  fill: none;
  stroke: url(#cGrad);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-area {
  fill: url(#cAreaGrad);
  opacity: .2;
}

.chart-dot {
  fill: var(--accent);
  stroke: #fff;
  stroke-width: 2;
  cursor: pointer;
  transition: r .15s;
}

.chart-dot:hover {
  r: 6;
}

.chart-tip {
  position: absolute;
  background: var(--t);
  color: #fff;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  white-space: nowrap;
  z-index: 10;
}

.chart-gridl {
  stroke: var(--b);
  stroke-dasharray: 3, 3;
  stroke-width: .8;
}

.chart-lab {
  fill: var(--t3);
  font-size: 10px;
  font-family: 'Outfit';
}

/* Match Item */
.mi {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--b);
  transition: background .15s;
}

.mi:last-child {
  border-bottom: none;
}

.mi-res {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11px;
  font-family: 'Sora';
}

.mi-w {
  background: var(--gsoft);
  color: var(--green);
}

.mi-l {
  background: var(--rsoft);
  color: var(--red);
}

.mi-d {
  background: var(--bg2);
  color: var(--t3);
}

.mi-inf {
  flex: 1;
}

.mi-opp {
  font-weight: 600;
  font-size: 12px;
}

.mi-det {
  font-size: 10px;
  color: var(--t3);
  margin-top: 1px;
}

.mi-elo {
  text-align: right;
}

.mi-ec {
  font-weight: 700;
  font-size: 12px;
}

.mi-en {
  font-size: 9px;
  color: var(--t3);
  margin-top: 1px;
}

/* Leaderboard Item */
.lbi {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid var(--b);
}

.lbi:last-child {
  border-bottom: none;
}

.lb-rk {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 10px;
  font-family: 'Sora';
  background: var(--bg2);
  color: var(--t3);
}

.lb-rk.t1 {
  background: var(--grad);
  color: #fff;
}

.lb-rk.t2 {
  background: linear-gradient(135deg, #f97316, #eab308);
  color: #fff;
}

.lb-rk.t3 {
  background: linear-gradient(135deg, #f97316, #fb923c);
  color: #fff;
}

.lb-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.lb-inf {
  flex: 1;
}

.lb-nm {
  font-weight: 600;
  font-size: 11px;
}

.lb-sp {
  font-size: 10px;
  color: var(--t3);
}

.lb-elo {
  font-family: 'Sora';
  font-weight: 700;
  font-size: 12px;
  color: var(--accent);
}

/* Activity Feed */
.afi {
  display: flex;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--b);
  font-size: 11px;
}

.afi:last-child {
  border-bottom: none;
}

.af-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.af-dot.g {
  background: var(--green);
}

.af-dot.o {
  background: var(--accent2);
}

.af-dot.r {
  background: var(--red);
}

.af-txt {
  color: var(--t2);
  line-height: 1.5;
}

.af-txt strong {
  color: var(--t);
  font-weight: 600;
}

.af-time {
  font-size: 9px;
  color: var(--t3);
  margin-top: 1px;
}

/* Quick Match */
.qm {
  text-align: center;
  padding: 8px 0;
}

.qm-cir {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2.5px dashed var(--b);
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  transition: all .35s;
  cursor: pointer;
  position: relative;
}

.qm-cir:hover {
  border-color: var(--accent);
  border-style: solid;
  box-shadow: 0 0 24px var(--glow);
}

.qm-cir.searching {
  border-color: var(--accent);
  border-style: solid;
  animation: pulse 1.5s infinite;
}

.qm-cir.found {
  border-color: var(--green);
  background: var(--gsoft);
}

.qm-txt {
  font-size: 12px;
  color: var(--t2);
  margin-bottom: 10px;
}

.qm-btn {
  padding: 9px 24px;
  background: var(--grad);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'Sora';
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .25s;
}

.qm-btn:hover {
  box-shadow: 0 4px 16px var(--glowS);
}

.qm-btn:disabled {
  opacity: .5;
}

.qm-res {
  display: none;
  margin-top: 10px;
  animation: fadeUp .35s;
}

.qm-res.vis {
  display: block;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 28px 16px;
  color: var(--t3);
  font-size: 12px;
}

.es-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

/* Modal */
.modal-ov {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .3);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-ov.open {
  display: flex;
}

.modal {
  background: var(--card);
  border-radius: var(--r2);
  padding: 24px;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--sxl);
  animation: scaleIn .25s;
  border: 1px solid var(--b);
}

.modal h3 {
  font-family: 'Sora';
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
}

.modal-close {
  float: right;
  background: var(--bg2);
  border: 1px solid var(--b);
  border-radius: 7px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: var(--t2);
}

/* Highlights Grid */
.hl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.hl-card {
  background: var(--card);
  border: 1px solid var(--b);
  border-radius: var(--r);
  overflow: hidden;
  cursor: pointer;
  transition: all .25s;
  position: relative;
}

.hl-card:hover {
  box-shadow: var(--sl);
  transform: translateY(-2px);
}

.hl-thumb {
  width: 100%;
  height: 160px;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  position: relative;
}

.hl-thumb::after {
  content: '▶';
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  background: var(--grad);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
}

.hl-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 8px;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 600;
}

.hl-views {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 7px;
  background: rgba(0, 0, 0, .5);
  color: #fff;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 600;
}

.hl-info {
  padding: 12px;
}

.hl-info h4 {
  font-family: 'Sora';
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 2px;
}

.hl-info p {
  font-size: 10px;
  color: var(--t3);
}

/* AI Coach */
.ai-hero {
  background: var(--bg2);
  border-radius: var(--r2);
  padding: 28px;
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.ai-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 50%, rgba(230, 59, 46, .05), transparent);
  pointer-events: none;
}

.ai-hero-icon {
  width: 64px;
  height: 64px;
  background: var(--grad);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  flex-shrink: 0;
}

.ai-hero-text h2 {
  font-family: 'Sora';
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
}

.ai-hero-text p {
  font-size: 12px;
  color: var(--t2);
  line-height: 1.6;
  max-width: 380px;
}

.ai-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 5px 12px;
  background: var(--asoft);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.ai-feats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.ai-feat {
  background: var(--card);
  border: 1px solid var(--b);
  border-radius: var(--r);
  padding: 18px;
  transition: all .25s;
  cursor: pointer;
}

.ai-feat:hover {
  box-shadow: var(--sm);
  transform: translateY(-2px);
  border-color: rgba(230, 59, 46, .12);
}

.ai-feat .af-ic {
  font-size: 24px;
  margin-bottom: 8px;
}

.ai-feat h4 {
  font-family: 'Sora';
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 3px;
}

.ai-feat p {
  font-size: 10px;
  color: var(--t2);
  line-height: 1.5;
}

.ai-feat .af-tag {
  margin-top: 8px;
  padding: 2px 8px;
  background: var(--bg2);
  border-radius: 10px;
  font-size: 9px;
  font-weight: 600;
  color: var(--t3);
  display: inline-block;
}

.ai-chat {
  background: var(--card);
  border: 1px solid var(--b);
  border-radius: var(--r);
  overflow: hidden;
}

.ai-ch {
  padding: 14px 18px;
  border-bottom: 1px solid var(--b);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Sora';
  font-weight: 700;
  font-size: 13px;
}

.ai-ch .adot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.ai-msgs {
  padding: 16px;
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.6;
}

.ai-msg.bot {
  background: var(--bg2);
  color: var(--t);
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}

.ai-msg.user {
  background: var(--grad);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 3px;
}

.ai-inp {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--b);
}

.ai-inp input {
  flex: 1;
  padding: 9px 12px;
  background: var(--input);
  border: 1.5px solid var(--b);
  border-radius: 8px;
  font-size: 12px;
  color: var(--t);
  outline: none;
  transition: border .2s;
}

.ai-inp input:focus {
  border-color: var(--accent);
}

.ai-inp button {
  padding: 9px 16px;
  background: var(--grad);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'Sora';
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

/* Location / Map */
.loc-map {
  width: 100%;
  height: 340px;
  background: var(--bg2);
  border-radius: var(--r);
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--b);
}

.loc-map #leafletMap,
.loc-map #liveMapEl,
.loc-map #runMapActive,
.loc-map #trailMapOverview {
  width: 100%;
  height: 100%;
  border-radius: var(--r);
  z-index: 1;
}

.loc-map-overlay {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  color: var(--t2);
  box-shadow: var(--sm);
  z-index: 10;
  pointer-events: none;
}

.loc-map-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(0, 0, 0, .03) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, .03) 1px, transparent 1px);
  background-size: 40px 40px;
}

.loc-pin {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .15);
  cursor: pointer;
  transition: transform .2s;
  z-index: 2;
}

.loc-pin:hover {
  transform: scale(1.4);
}

.loc-pin::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: var(--glow);
  animation: ripple 2.5s infinite;
  z-index: -1;
}

.loc-pin.you {
  background: var(--accent);
  width: 16px;
  height: 16px;
  z-index: 3;
}

.loc-pin.other {
  background: var(--accent2);
}

.loc-pin-label {
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--t);
  color: #fff;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .15s;
  pointer-events: none;
}

.loc-pin:hover .loc-pin-label {
  opacity: 1;
}

.loc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.loc-stat {
  background: var(--card);
  border: 1px solid var(--b);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}

.loc-stat .ls-val {
  font-family: 'Sora';
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
}

.loc-stat .ls-lbl {
  font-size: 10px;
  color: var(--t3);
  margin-top: 2px;
}

.nb-item {
  background: var(--card);
  border: 1px solid var(--b);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all .2s;
  margin-bottom: 8px;
}

.nb-item:hover {
  box-shadow: var(--sm);
}

.nb-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.nb-info {
  flex: 1;
}

.nb-name {
  font-weight: 600;
  font-size: 12px;
}

.nb-meta {
  font-size: 10px;
  color: var(--t3);
  margin-top: 1px;
}

.nb-dist {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  text-align: right;
}

.nb-dist small {
  color: var(--t3);
  font-weight: 400;
  display: block;
}

/* Find Match */
.fm-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.fm-group {
  background: var(--bg2);
  border-radius: var(--r);
  padding: 16px;
}

.fm-group-title {
  font-family: 'Sora';
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.fm-range {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.fm-range label {
  font-size: 10px;
  color: var(--t2);
  min-width: 52px;
}

.fm-range input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  height: 3px;
  border-radius: 2px;
  background: var(--b);
  outline: none;
}

.fm-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

.fm-range .fm-val {
  font-family: 'Sora';
  font-weight: 700;
  font-size: 12px;
  color: var(--accent);
  min-width: 36px;
  text-align: right;
}

.fm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.fm-chip {
  padding: 5px 12px;
  border-radius: 18px;
  font-size: 10px;
  font-weight: 600;
  border: 1.5px solid var(--b);
  background: var(--card);
  color: var(--t2);
  cursor: pointer;
  transition: all .15s;
}

.fm-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.fm-chip.sel {
  background: var(--asoft);
  border-color: var(--accent);
  color: var(--accent);
}

.fm-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
}

.fm-tog {
  width: 36px;
  height: 20px;
  background: var(--b);
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  transition: background .25s;
}

.fm-tog.on {
  background: var(--accent);
}

.fm-tog::after {
  content: '';
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: left .25s;
  box-shadow: var(--ss);
}

.fm-tog.on::after {
  left: 18px;
}

.fm-tog-lbl {
  font-size: 11px;
  color: var(--t2);
}

.fm-search-box {
  background: var(--card);
  border: 2px dashed var(--b);
  border-radius: var(--r2);
  padding: 32px;
  text-align: center;
  transition: all .35s;
  cursor: pointer;
  position: relative;
}

.fm-search-box:hover {
  border-color: var(--accent);
  border-style: solid;
}

.fm-search-box.active {
  border-color: var(--accent);
  border-style: solid;
  background: var(--asoft);
}

.fm-bi {
  font-size: 44px;
  margin-bottom: 10px;
}

.fm-bt {
  font-family: 'Sora';
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 3px;
}

.fm-bs {
  font-size: 11px;
  color: var(--t2);
}

.fm-spinner {
  display: none;
  width: 36px;
  height: 36px;
  border: 3px solid var(--b);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 10px;
  animation: spin .7s linear infinite;
}

.fm-search-box.active .fm-spinner {
  display: block;
}

.fm-search-box.active .fm-bi {
  display: none;
}

.fm-results {
  margin-top: 16px;
}

.fm-rc {
  background: var(--card);
  border: 1px solid var(--b);
  border-radius: var(--r);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  transition: all .25s;
  animation: fadeUp .35s;
}

.fm-rc:hover {
  box-shadow: var(--sm);
  transform: translateY(-1px);
}

.fm-rc-av {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.fm-rc-info {
  flex: 1;
}

.fm-rc-pct {
  font-family: 'Sora';
  font-weight: 800;
  font-size: 13px;
  color: var(--accent);
}

.fm-rc-name {
  font-family: 'Sora';
  font-weight: 700;
  font-size: 14px;
  margin-top: 1px;
}

.fm-rc-meta {
  font-size: 10px;
  color: var(--t3);
  margin-top: 2px;
}

.fm-rc-meta span {
  margin-right: 8px;
}

.fm-rc-acts {
  display: flex;
  gap: 6px;
}

.fm-rb {
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  border: none;
  font-family: 'Outfit';
}

.fm-rb.primary {
  background: var(--grad);
  color: #fff;
}

.fm-rb.primary:hover {
  box-shadow: 0 3px 12px var(--glowS);
}

.fm-rb.secondary {
  background: var(--bg2);
  color: var(--t);
  border: 1px solid var(--b);
}

.fm-rb.secondary:hover {
  border-color: var(--b2);
}

/* Stats */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.stat-big {
  background: var(--card);
  border: 1px solid var(--b);
  border-radius: var(--r);
  padding: 20px;
  text-align: center;
  transition: all .25s;
}

.stat-big:hover {
  box-shadow: var(--sm);
}

.stat-big .sb-val {
  font-family: 'Sora';
  font-size: 32px;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-big .sb-lbl {
  font-size: 10px;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 3px;
}

.stat-bar {
  margin-bottom: 10px;
}

.stat-bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 3px;
}

.stat-bar-header span:first-child {
  font-weight: 600;
}

.stat-bar-header span:last-child {
  color: var(--t3);
}

.stat-bar-track {
  height: 5px;
  background: var(--bg2);
  border-radius: 3px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  background: var(--grad);
  border-radius: 3px;
  transition: width .8s;
}

.wl-row {
  display: flex;
  gap: 2px;
  margin-bottom: 5px;
}

.wl-row div {
  height: 22px;
  border-radius: 2px;
  transition: all .25s;
  cursor: pointer;
}

.wl-row div:hover {
  opacity: .8;
  transform: scaleY(1.15);
}

.achv {
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
  margin: 2px;
}

/* Log Match */
.lm-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Profile */
.prof-header {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}

.prof-av {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 24px;
  font-family: 'Sora';
}

.prof-name {
  font-family: 'Sora';
  font-size: 20px;
  font-weight: 800;
}

.prof-sub {
  font-size: 12px;
  color: var(--t2);
  margin-top: 2px;
}

/* Responsive */
@media(max-width:1050px) {
  .dgrid {
    grid-template-columns: 1fr;
  }

  .fm-settings {
    grid-template-columns: 1fr;
  }

  .hl-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ai-feats {
    grid-template-columns: 1fr 1fr;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .loc-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(max-width:900px) {
  .sidebar {
    display: none;
  }

  .dmain {
    margin-left: 0;
    max-width: 100%;
  }

  .auth-left {
    display: none;
  }

  .auth-right {
    width: 100%;
    border-left: none;
  }
}

@media(max-width:768px) {
  nav {
    padding: 0 16px;
  }

  .nlinks a:not(.ncta) {
    display: none;
  }

  .fsec {
    padding: 50px 16px;
  }

  .fgrid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 80px 16px 50px;
  }

  .muplayers {
    gap: 12px;
  }

  .elosec {
    padding: 40px 16px;
  }

  .ctasec {
    padding: 50px 16px;
  }

  .hacts {
    flex-direction: column;
    align-items: center;
  }

  .dmain {
    padding: 14px 12px;
  }

  .srow {
    grid-template-columns: 1fr 1fr;
  }

  .dheader {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .hl-grid {
    grid-template-columns: 1fr;
  }

  .ai-hero {
    flex-direction: column;
    text-align: center;
  }

  .ai-feats {
    grid-template-columns: 1fr;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

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

  .loc-map {
    height: 260px;
  }

  .fm-settings {
    grid-template-columns: 1fr;
  }
}

/* ═══════ CHALLENGES ═══════ */
.chall-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--b);
}

.chall-item:last-child {
  border-bottom: none;
}

.chall-av {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.chall-info {
  flex: 1;
}

.chall-name {
  font-weight: 700;
  font-size: 13px;
}

.chall-elo {
  font-weight: 600;
  color: var(--accent);
  font-size: 11px;
  margin-left: 6px;
}

.chall-meta {
  font-size: 11px;
  color: var(--t2);
  margin-top: 3px;
}

.chall-time {
  font-size: 10px;
  color: var(--t3);
  margin-top: 2px;
}

.chall-acts {
  display: flex;
  gap: 6px;
}

/* ═══════ TOURNAMENTS ═══════ */
.tourn-card {
  background: var(--card);
  border: 1px solid var(--b);
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 12px;
  transition: all .25s;
  position: relative;
  overflow: hidden;
}

.tourn-card:hover {
  box-shadow: var(--sm);
  transform: translateY(-2px);
}

.tourn-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad);
}

.tourn-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.tourn-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 15px;
}

.tourn-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: capitalize;
}

.tourn-badge.open {
  background: var(--asoft);
  color: var(--accent);
}

.tourn-badge.live {
  background: var(--gsoft);
  color: var(--green);
}

.tourn-badge.done {
  background: var(--bg2);
  color: var(--t3);
}

.tourn-meta {
  display: flex;
  gap: 14px;
  font-size: 11px;
  color: var(--t2);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.tourn-meta span {
  display: flex;
  align-items: center;
  gap: 3px;
}

.tourn-bracket {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin: 20px 0;
}

.bracket-round {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 16px;
}

.bracket-match {
  background: var(--card);
  border: 1px solid var(--b);
  border-radius: 8px;
  padding: 8px 12px;
}

.bracket-player {
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  margin: 2px 0;
  background: var(--bg2);
}

.bracket-player.you {
  background: var(--asoft);
  color: var(--accent);
}

.bracket-player.tbd {
  background: var(--bg3);
  color: var(--t3);
  font-style: italic;
}

/* ═══════ MESSAGES ═══════ */
.msg-list {
  max-height: 400px;
  overflow-y: auto;
}

.msg-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  cursor: pointer;
  transition: background .15s;
}

.msg-item:hover {
  background: var(--bg2);
}

.msg-item.active {
  background: var(--asoft);
}

.msg-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.msg-info {
  flex: 1;
  min-width: 0;
}

.msg-name {
  font-weight: 600;
  font-size: 12px;
}

.msg-preview {
  font-size: 11px;
  color: var(--t3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-meta {
  text-align: right;
}

.msg-time {
  font-size: 10px;
  color: var(--t3);
}

.msg-unread {
  width: 16px;
  height: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
}

.msg-thread {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
}

.thread-msg {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12px;
}

.thread-msg.received {
  background: var(--bg2);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.thread-msg.sent {
  background: var(--grad);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.thread-text {
  line-height: 1.5;
}

.thread-time {
  font-size: 9px;
  opacity: .7;
  margin-top: 4px;
}

.msg-compose {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--b);
}

.msg-compose input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--b);
  border-radius: 20px;
  background: var(--input);
  font-size: 12px;
  color: var(--t);
  outline: none;
}

.msg-compose button {
  padding: 10px 20px;
  background: var(--grad);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}

/* ═══════ GAME ITEMS & H2H ═══════ */
.game-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--b);
}

.game-item:last-child {
  border-bottom: none;
}

.game-result {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
}

.game-result.win {
  background: var(--gsoft);
  color: var(--green);
}

.game-result.loss {
  background: rgba(239, 68, 68, .12);
  color: #ef4444;
}

.game-info {
  flex: 1;
}

.game-opp {
  font-weight: 700;
  font-size: 13px;
}

.game-score {
  font-size: 11px;
  color: var(--t2);
  margin-top: 2px;
}

.game-meta {
  text-align: right;
  font-size: 10px;
  color: var(--t3);
}

.game-elo {
  font-weight: 700;
}

.game-meta .game-elo {
  color: var(--green);
}

.game-result.loss+.game-info+.game-meta .game-elo {
  color: #ef4444;
}

.game-sport {
  color: var(--t2);
  margin-bottom: 2px;
}

.h2h-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--b);
}

.h2h-item:last-child {
  border-bottom: none;
}

.h2h-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.h2h-info {
  flex: 1;
}

.h2h-name {
  font-weight: 600;
  font-size: 12px;
}

.h2h-record {
  font-size: 11px;
  margin-top: 2px;
}

.h2h-wins {
  color: var(--green);
  font-weight: 700;
}

.h2h-losses {
  color: #ef4444;
  font-weight: 700;
}

.h2h-bar {
  width: 80px;
  height: 8px;
  background: var(--bg2);
  border-radius: 4px;
  overflow: hidden;
}

.h2h-fill {
  height: 100%;
  background: var(--grad);
  border-radius: 4px;
}

.achv {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ═══════ SCOUT MODE ═══════ */
.scout-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--b);
  border-radius: var(--r);
  padding: 16px;
  margin-bottom: 10px;
  transition: all .25s;
}

.scout-card:hover {
  box-shadow: var(--sm);
  transform: translateY(-2px);
}

.scout-rank {
  font-size: 20px;
}

.scout-av {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.scout-info {
  flex: 1;
}

.scout-name {
  font-weight: 700;
  font-size: 14px;
}

.scout-age {
  font-weight: 500;
  color: var(--t3);
  font-size: 11px;
  margin-left: 6px;
}

.scout-stats {
  font-size: 11px;
  color: var(--accent);
  margin-top: 2px;
}

.scout-trend {
  font-size: 10px;
  color: var(--green);
  margin-top: 2px;
}

.scout-acts {
  display: flex;
  gap: 6px;
}

.opp-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--b);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 8px;
  transition: all .25s;
}

.opp-card:hover {
  box-shadow: var(--sl);
  border-color: var(--b2);
}

.opp-av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.opp-info {
  flex: 1;
  min-width: 0;
}

.opp-name {
  font-weight: 700;
  font-size: 13px;
}

.opp-meta {
  font-size: 10px;
  color: var(--t3);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.opp-stats {
  text-align: right;
  flex-shrink: 0;
  margin-right: 8px;
}

.opp-elo {
  font-family: 'Sora';
  font-weight: 800;
  font-size: 14px;
  color: var(--accent);
}

.opp-record {
  font-size: 10px;
  color: var(--t3);
  margin-top: 2px;
}

.opp-acts {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ═══ NEW: Heatmap ═══ */
.heatmap-grid {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

.heatmap-cell {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--bg2);
  transition: all .2s;
  cursor: pointer;
  position: relative;
}

.heatmap-cell:hover {
  transform: scale(1.3);
  z-index: 2;
}

.heatmap-cell.l1 {
  background: rgba(230, 59, 46, .15);
}

.heatmap-cell.l2 {
  background: rgba(230, 59, 46, .35);
}

.heatmap-cell.l3 {
  background: rgba(230, 59, 46, .55);
}

.heatmap-cell.l4 {
  background: var(--accent);
}

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  color: var(--t3);
  margin-top: 8px;
}

.heatmap-legend span {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

/* ═══ NEW: Season Summary ═══ */
.season-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.season-item {
  background: var(--bg2);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.season-val {
  font-family: 'Sora';
  font-weight: 800;
  font-size: 18px;
  color: var(--accent);
}

.season-lbl {
  font-size: 9px;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}

/* ═══ NEW: Highlight Cards Enhanced ═══ */
.hl-card {
  background: var(--card);
  border: 1px solid var(--b);
  border-radius: var(--r);
  overflow: hidden;
  cursor: pointer;
  transition: all .25s;
  position: relative;
}

.hl-card:hover {
  box-shadow: var(--sl);
  transform: translateY(-2px);
}

.hl-thumb {
  width: 100%;
  height: 160px;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  position: relative;
}

.hl-thumb::after {
  content: '▶';
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  background: var(--grad);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
}

.hl-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 8px;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 600;
}

.hl-views {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 7px;
  background: rgba(0, 0, 0, .5);
  color: #fff;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 600;
}

.hl-dur {
  position: absolute;
  bottom: 8px;
  left: 8px;
  padding: 2px 7px;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 600;
}

.hl-info {
  padding: 12px;
}

.hl-info h4 {
  font-family: 'Sora';
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 2px;
}

.hl-info p {
  font-size: 10px;
  color: var(--t3);
}

.hl-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px 10px;
}

.hl-likes {
  font-size: 10px;
  color: var(--t3);
  display: flex;
  gap: 10px;
}

.hl-likes span {
  cursor: pointer;
  transition: color .15s;
}

.hl-likes span:hover {
  color: var(--accent);
}

.hl-player {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  color: var(--t2);
}

.hl-player-av {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
}

/* ═══ Mobile Menu ═══ */
.mob-menu-btn {
  display: none;
  background: none;
  border: 1.5px solid var(--b);
  border-radius: 7px;
  padding: 4px 10px;
  font-size: 16px;
  cursor: pointer;
  color: var(--t);
  transition: all .2s;
}

.mob-menu-btn:hover {
  background: var(--bg2);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .3);
  z-index: 49;
}

.sidebar-overlay.open {
  display: block;
}

/* ═══ Extra polish ═══ */
.scard:nth-child(1) .scval {
  color: var(--accent);
}

.scard:nth-child(3) .scval {
  color: var(--green);
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--b2);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--t4);
}

/* ═══ Responsive updates ═══ */
@media(max-width:900px) {
  .mob-menu-btn {
    display: block;
  }

  .sidebar.open {
    display: flex !important;
    z-index: 51;
    box-shadow: var(--sxl);
  }

  .msg-wrap {
    grid-template-columns: 1fr;
  }

  .msg-sidebar-card {
    max-height: 200px;
  }
}

@media(max-width:768px) {
  .prof-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .prof-header>div:last-child {
    margin-left: 0;
  }

  .tourn-bracket {
    flex-direction: column;
    gap: 12px;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .season-grid {
    grid-template-columns: 1fr;
  }

  .opp-card {
    flex-wrap: wrap;
  }

  .opp-stats {
    text-align: left;
  }

  .opp-acts {
    width: 100%;
    margin-top: 4px;
  }
}

@media print {

  nav,
  .sidebar {
    display: none !important;
  }

  .dmain {
    margin-left: 0 !important;
  }
}

/* ═══════════════════════════════
   LIVE MAP
═══════════════════════════════ */
.live-pulse {
  animation: pulse 2s infinite;
}

@keyframes livePulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .5;
  }
}

.live-game-card {
  background: var(--card);
  border: 1px solid var(--b);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all .25s;
  position: relative;
  overflow: hidden;
}

.live-game-card:hover {
  box-shadow: var(--sm);
  transform: translateY(-1px);
}

.live-game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--green);
}

.live-game-card .lg-sport {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--gsoft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.live-game-card .lg-info {
  flex: 1;
  min-width: 0;
}

.live-game-card .lg-title {
  font-weight: 700;
  font-size: 13px;
}

.live-game-card .lg-meta {
  font-size: 10px;
  color: var(--t3);
  margin-top: 2px;
}

.live-game-card .lg-status {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
}

.lg-status.live {
  background: var(--gsoft);
  color: var(--green);
}

.lg-status.open {
  background: var(--asoft);
  color: var(--accent);
}

.ltp-card {
  background: var(--card);
  border: 1px solid var(--b);
  border-radius: var(--r);
  padding: 12px 16px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all .2s;
}

.ltp-card:hover {
  box-shadow: var(--ss);
  border-color: var(--b2);
}

.ltp-card .ltp-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.ltp-card .ltp-info {
  flex: 1;
}

.ltp-card .ltp-name {
  font-weight: 700;
  font-size: 12px;
}

.ltp-card .ltp-meta {
  font-size: 10px;
  color: var(--t3);
  margin-top: 1px;
}

.ltp-card .ltp-acts {
  display: flex;
  gap: 5px;
}

.broadcast-active {
  background: var(--grad) !important;
  color: #fff !important;
  border-color: transparent !important;
  animation: pulse 2s infinite;
}

.broadcast-active span {
  color: #fff !important;
}

/* ═══════════════════════════════
   RUNNING
═══════════════════════════════ */
.trail-card {
  background: var(--card);
  border: 1px solid var(--b);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all .25s;
  cursor: pointer;
}

.trail-card:hover {
  box-shadow: var(--sm);
  transform: translateY(-1px);
}

.trail-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(22, 163, 74, .08), rgba(37, 99, 235, .08));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.trail-info {
  flex: 1;
  min-width: 0;
}

.trail-title {
  font-weight: 700;
  font-size: 13px;
}

.trail-meta {
  font-size: 10px;
  color: var(--t3);
  margin-top: 2px;
}

.trail-stats {
  text-align: right;
  flex-shrink: 0;
}

.trail-dist {
  font-family: 'Sora';
  font-weight: 800;
  font-size: 14px;
  color: var(--green);
}

.trail-pace {
  font-size: 10px;
  color: var(--t3);
  margin-top: 2px;
}

.wk-bar-wrap {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 100px;
  padding: 8px 0;
}

.wk-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.wk-bar-fill {
  width: 100%;
  border-radius: 4px 4px 0 0;
  background: var(--grad);
  min-height: 2px;
  transition: height .5s;
}

.wk-bar-label {
  font-size: 9px;
  color: var(--t3);
  font-weight: 600;
}

.wk-bar-val {
  font-size: 9px;
  font-weight: 700;
  color: var(--t2);
}

.pace-zone {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--b);
}

.pace-zone:last-child {
  border-bottom: none;
}

.pz-color {
  width: 8px;
  height: 24px;
  border-radius: 3px;
}

.pz-info {
  flex: 1;
}

.pz-name {
  font-weight: 600;
  font-size: 11px;
}

.pz-range {
  font-size: 9px;
  color: var(--t3);
}

.pz-pct {
  font-family: 'Sora';
  font-weight: 700;
  font-size: 12px;
}

/* ═══════════════════════════════
   LIVE RACES
═══════════════════════════════ */
.race-track-wrap {
  margin: 10px 0;
}

.race-track {
  height: 32px;
  background: var(--bg2);
  border-radius: 16px;
  position: relative;
  margin-bottom: 8px;
  overflow: visible;
}

.race-track-fill {
  height: 100%;
  border-radius: 16px;
  background: var(--grad);
  transition: width .5s;
  position: absolute;
  top: 0;
  left: 0;
}

.race-track-fill.opp {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.race-runner {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  transition: left .5s;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.race-runner span {
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .2));
}

.race-runner-label {
  font-size: 8px;
  font-weight: 700;
  color: var(--t2);
  white-space: nowrap;
  margin-top: -2px;
}

.you-runner .race-runner-label {
  color: var(--accent);
}

.opp-runner .race-runner-label {
  color: var(--blue);
}

.opp-runner span {
  transform: scaleX(-1);
}

.race-card {
  background: var(--card);
  border: 1px solid var(--b);
  border-radius: var(--r);
  padding: 16px;
  margin-bottom: 10px;
  transition: all .25s;
}

.race-card:hover {
  box-shadow: var(--sm);
  transform: translateY(-1px);
}

.race-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.race-card-title {
  font-family: 'Sora';
  font-weight: 700;
  font-size: 14px;
}

.race-card-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
}

.race-card-badge.open {
  background: var(--asoft);
  color: var(--accent);
}

.race-card-badge.live {
  background: var(--gsoft);
  color: var(--green);
}

.race-card-badge.done {
  background: var(--bg2);
  color: var(--t3);
}

.race-card-meta {
  display: flex;
  gap: 14px;
  font-size: 11px;
  color: var(--t2);
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.race-card-meta span {
  display: flex;
  align-items: center;
  gap: 3px;
}

.race-card-players {
  display: flex;
  gap: -4px;
  margin-bottom: 10px;
}

.race-card-players .rcp-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  border: 2px solid var(--card);
  margin-left: -6px;
}

.race-card-players .rcp-av:first-child {
  margin-left: 0;
}

.race-card-acts {
  display: flex;
  gap: 6px;
}

.race-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--b);
}

.race-result:last-child {
  border-bottom: none;
}

.rr-pos {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}

.rr-pos.gold {
  background: rgba(234, 179, 8, .1);
  color: #eab308;
}

.rr-pos.silver {
  background: var(--bg2);
  color: var(--t3);
}

.rr-info {
  flex: 1;
}

.rr-name {
  font-weight: 700;
  font-size: 13px;
}

.rr-meta {
  font-size: 10px;
  color: var(--t3);
  margin-top: 2px;
}

.rr-time {
  font-family: 'Sora';
  font-weight: 800;
  font-size: 14px;
  text-align: right;
}

/* ═══ Race finished overlay ═══ */
.race-finish-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn .3s;
}

.race-finish-card {
  background: var(--card);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: var(--sxl);
  animation: scaleIn .4s;
}

.race-finish-card h2 {
  font-family: 'Sora';
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 6px;
}

.race-finish-card .rfc-time {
  font-family: 'Sora';
  font-size: 42px;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.race-finish-card .rfc-sub {
  font-size: 13px;
  color: var(--t2);
  margin: 6px 0 20px;
}

/* ═══ Broadcast form ═══ */
.broadcast-form {
  background: var(--card);
  border: 1px solid var(--b);
  border-radius: var(--r);
  padding: 16px;
  margin-bottom: 14px;
  display: none;
  animation: fadeUp .3s;
}

.broadcast-form.open {
  display: block;
}

.broadcast-form .bf-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.broadcast-form .bf-row>* {
  flex: 1;
}

.bf-loc-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--t3);
  padding: 6px 0;
}

.bf-loc-status .bf-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* ═══ Transport mode tabs ═══ */
.transport-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
}

.transport-tab {
  flex: 1;
  padding: 10px 8px;
  border: 1.5px solid var(--b);
  border-radius: 10px;
  background: var(--card);
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  font-size: 11px;
  font-weight: 600;
  color: var(--t2);
}

.transport-tab:hover {
  border-color: var(--b2);
  background: var(--bg2);
}

.transport-tab.active {
  border-color: var(--accent);
  background: var(--asoft);
  color: var(--accent);
}

.transport-tab .tt-icon {
  font-size: 20px;
  display: block;
  margin-bottom: 3px;
}

.transport-tab .tt-label {
  font-size: 10px;
}

/* ═══ GPS status indicator ═══ */
.gps-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  margin-left: 8px;
}

.gps-status.searching {
  background: rgba(234, 179, 8, .1);
  color: #eab308;
}

.gps-status.locked {
  background: var(--gsoft);
  color: var(--green);
}

.gps-status.error {
  background: var(--rsoft);
  color: var(--red);
}

.gps-status .gps-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s infinite;
}

/* ═══ Transport tab detail ═══ */
.transport-tab .tt-detail {
  display: block;
  font-size: 8px;
  color: var(--t4);
  margin-top: 2px;
  font-weight: 500;
  letter-spacing: .3px;
}

.transport-tab.active .tt-detail {
  color: var(--accent);
  opacity: .7;
}

/* ═══ Run Setup Panel ═══ */
.run-setup {
  animation: fadeUp .3s;
}

/* ═══ Trail Mode Badge ═══ */
.trail-mode-badge {
  display: inline-block;
  padding: 1px 7px;
  color: #fff;
  border-radius: 8px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-right: 5px;
  vertical-align: middle;
}

/* ═══ Run Active Card ═══ */
.run-active-card {
  border: 2px solid var(--accent);
  background: linear-gradient(135deg, var(--card), var(--asoft));
  border-radius: var(--r);
  padding: 20px;
  transition: all .3s;
}

/* ═══ Save Activity Modal ═══ */
.save-act-stats {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px 0;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--b);
}

.sas-item {
  text-align: center;
  min-width: 60px;
}

.sas-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 4px;
}

.sas-val {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--t);
}

.sas-lbl {
  font-size: 9px;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 2px;
}

/* ═══ Scale In animation ═══ */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ═══ Video Upload Modal ═══ */
.upload-preview {
  padding: 24px;
  border: 2px dashed var(--b);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  margin-bottom: 14px;
  background: var(--bg2);
}

.upload-preview:hover {
  border-color: var(--accent);
  background: var(--asoft);
}

.upload-preview .up-icon {
  font-size: 36px;
  margin-bottom: 6px;
}

.upload-preview .up-text {
  font-size: 12px;
  color: var(--t2);
}

.upload-preview .up-file {
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  margin-top: 4px;
}

.video-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .85);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn .2s;
  cursor: pointer;
}

.video-lightbox-content {
  max-width: 700px;
  width: 90%;
  text-align: center;
  animation: scaleIn .3s;
}

.video-lightbox-content .vlb-title {
  font-family: 'Sora';
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.video-lightbox-content .vlb-meta {
  font-size: 11px;
  color: rgba(255, 255, 255, .6);
  margin-bottom: 16px;
}

.video-lightbox-content .vlb-placeholder {
  width: 100%;
  height: 360px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
}

.video-lightbox-content .vlb-close {
  margin-top: 16px;
  padding: 10px 28px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}

/* ═══ League System ═══ */
.league-hero {
  background: linear-gradient(135deg, var(--bg2), rgba(230, 59, 46, .04));
  border-radius: var(--r);
  padding: 24px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--b);
}

.league-hero-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.league-hero-text h2 {
  font-family: 'Sora';
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 2px;
}

.league-hero-text p {
  font-size: 11px;
  color: var(--t2);
}

.league-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  margin-left: auto;
}

.league-progress {
  margin-bottom: 16px;
}

.league-progress-bar {
  height: 10px;
  background: var(--bg2);
  border-radius: 5px;
  overflow: hidden;
  margin-top: 6px;
}

.league-progress-fill {
  height: 100%;
  border-radius: 5px;
  transition: width .5s;
}

.league-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--t3);
  margin-top: 4px;
}

.league-table-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--b);
  transition: background .15s;
}

.league-table-row:last-child {
  border-bottom: none;
}

.league-table-row:hover {
  background: var(--bg2);
}

.league-table-row.me {
  background: var(--asoft);
  border-radius: 8px;
}

.league-table-row.promo {
  border-left: 3px solid var(--green);
}

.league-table-row.relegate {
  border-left: 3px solid var(--red);
}

.ltr-pos {
  width: 24px;
  font-weight: 800;
  font-size: 13px;
  text-align: center;
  flex-shrink: 0;
}

.ltr-av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.ltr-info {
  flex: 1;
  min-width: 0;
}

.ltr-name {
  font-weight: 700;
  font-size: 12px;
}

.ltr-meta {
  font-size: 9px;
  color: var(--t3);
  margin-top: 1px;
}

.ltr-pts {
  font-family: 'Sora';
  font-weight: 800;
  font-size: 14px;
  color: var(--accent);
}

.league-zone-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.league-zone-label.promo {
  color: var(--green);
}

.league-zone-label.relegate {
  color: var(--red);
}

/* ═══ Training Log ═══ */
.training-card {
  background: var(--card);
  border: 1px solid var(--b);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all .2s;
}

.training-card:hover {
  box-shadow: var(--ss);
}

.training-card .tc-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.training-card .tc-info {
  flex: 1;
}

.training-card .tc-title {
  font-weight: 700;
  font-size: 13px;
}

.training-card .tc-meta {
  font-size: 10px;
  color: var(--t3);
  margin-top: 2px;
}

.training-card .tc-dur {
  font-family: 'Sora';
  font-weight: 800;
  font-size: 14px;
  text-align: right;
}

/* ═══ Weekly Challenges ═══ */
.wc-card {
  background: var(--card);
  border: 1px solid var(--b);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 8px;
  transition: all .2s;
}

.wc-card:hover {
  box-shadow: var(--ss);
}

.wc-card .wc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.wc-card .wc-icon {
  font-size: 18px;
}

.wc-card .wc-title {
  font-weight: 700;
  font-size: 12px;
  flex: 1;
}

.wc-card .wc-xp {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  background: var(--asoft);
  padding: 2px 8px;
  border-radius: 10px;
}

.wc-card .wc-bar {
  height: 6px;
  background: var(--bg2);
  border-radius: 3px;
  overflow: hidden;
}

.wc-card .wc-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--grad);
  transition: width .5s;
}

.wc-card .wc-progress-text {
  font-size: 9px;
  color: var(--t3);
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
}

.wc-card.done {
  opacity: .6;
}

.wc-card.done .wc-fill {
  background: var(--green);
}

/* ═══ Player Comparison Modal ═══ */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  margin: 14px 0;
}

.compare-col {
  text-align: center;
}

.compare-col.left {
  text-align: right;
}

.compare-col.right {
  text-align: left;
}

.compare-label {
  padding: 8px 14px;
  font-size: 9px;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.compare-val {
  padding: 6px 14px;
  font-family: 'Sora';
  font-weight: 800;
  font-size: 16px;
}

.compare-val.better {
  color: var(--green);
}

.compare-val.worse {
  color: var(--red);
}

.compare-vs {
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--t4);
}

.compare-header {
  text-align: center;
  margin-bottom: 14px;
}

.compare-header .ch-av {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 4px;
}

.compare-header .ch-name {
  font-family: 'Sora';
  font-weight: 700;
  font-size: 14px;
}

.compare-header .ch-elo {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
}