/* ==========================================================================
   BASKETBALL ORACLE — DESIGN SYSTEM
   Aesthetic: Hardwood Mysticism × Neural Arena
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Antonio:wght@400;700&family=JetBrains+Mono:wght@400;500;700&family=Manrope:wght@400;500;700&display=swap");

/* ----- TOKENS --------------------------------------------------------------- */
:root {
  /* core palette */
  --court-void: #050505;
  --court-black: #0a0908;
  --court-coal: #11100e;
  --court-slate: #1a1816;
  --hardwood: #1f1410;
  --hardwood-warm: #2b1c14;
  --hardwood-glow: #3a2418;

  /* signal accents */
  --ember: #ff5a1f;          /* basketball ember orange */
  --ember-glow: #ff7d3b;
  --ember-deep: #c93b00;
  --electric: #00e5ff;       /* court line cyan */
  --electric-deep: #00b8d4;
  --gold: #f4c443;           /* championship gold */
  --gold-deep: #b8860b;
  --blood: #c1272d;          /* clutch red */

  /* neutrals */
  --bone: #f5efe4;
  --bone-dim: #d6cfc1;
  --ash: #8a847a;
  --smoke: #5a554d;

  /* type stack */
  --display: "Antonio", "Bebas Neue", impact, sans-serif;
  --serif: "Antonio", "Bebas Neue", "Impact", sans-serif;  /* kept as alias to display font for legacy refs */
  --mono: "JetBrains Mono", "Courier New", monospace;
  --body: "Manrope", system-ui, sans-serif;

  /* spacing scale */
  --gap-xs: 0.5rem;
  --gap-sm: 1rem;
  --gap-md: 1.75rem;
  --gap-lg: 3rem;
  --gap-xl: 5rem;
  --gap-2xl: 8rem;

  /* type scale */
  --t-mega: clamp(4rem, 14vw, 14rem);
  --t-display: clamp(3rem, 9vw, 8rem);
  --t-h1: clamp(2.25rem, 5vw, 4.5rem);
  --t-h2: clamp(1.75rem, 3.5vw, 3rem);
  --t-h3: clamp(1.25rem, 2vw, 1.75rem);
  --t-body: 1rem;
  --t-sm: 0.875rem;
  --t-xs: 0.75rem;
  --t-mono: 0.78rem;

  --maxw: 1440px;
  --gutter: clamp(1rem, 4vw, 4rem);

  --transition: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ----- RESET ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--court-void); color: var(--bone); }
body {
  font-family: var(--body);
  font-size: var(--t-body);
  line-height: 1.5;
  font-weight: 400;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv02", "cv03", "cv04";
  background-color: var(--court-void);
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(255, 90, 31, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(0, 229, 255, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.4) 0%, transparent 80%);
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* Selection */
::selection { background: var(--ember); color: var(--court-void); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--court-coal); }
::-webkit-scrollbar-thumb { background: var(--ember-deep); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--ember); }

/* ----- GLOBAL TEXTURES ----------------------------------------------------- */
body::before {
  /* film grain */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.18;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.85'/></svg>");
}

body::after {
  /* subtle scanline */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background-image: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 3px,
    rgba(0, 0, 0, 0.06) 3px,
    rgba(0, 0, 0, 0.06) 4px
  );
  mix-blend-mode: multiply;
}

/* ----- TYPOGRAPHY UTILITIES ------------------------------------------------ */
.display { font-family: var(--display); font-weight: 700; line-height: 0.85; letter-spacing: -0.02em; text-transform: uppercase; }
.serif { font-family: var(--display); font-weight: 400; line-height: 0.95; letter-spacing: -0.01em; }
.mono { font-family: var(--mono); font-weight: 400; letter-spacing: 0.02em; text-transform: uppercase; font-size: var(--t-mono); }
.label {
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ember);
}

/* ----- LAYOUT --------------------------------------------------------------- */
.shell { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--gap-2xl) 0; position: relative; }
.section--tight { padding: var(--gap-xl) 0; }

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ember-deep) 50%, transparent);
  opacity: 0.5;
}

/* ----- HEADER / NAV --------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(5, 5, 5, 0.85) 0%, rgba(5, 5, 5, 0) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.4s var(--transition);
}

.nav.scrolled {
  background: rgba(5, 5, 5, 0.95);
  border-bottom: 1px solid rgba(255, 90, 31, 0.15);
  padding: 0.85rem var(--gutter);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bone);
}

.brand__mark {
  width: 32px; height: 32px;
  position: relative;
}

.brand__name { line-height: 1; display: flex; flex-direction: column; gap: 3px; }
.brand__name span:first-child { font-size: 1.05rem; }
.brand__name span:last-child {
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  color: var(--ember);
  font-weight: 400;
  white-space: nowrap;
}
@media (max-width: 1100px) {
  .brand__name span:last-child { display: none; }
}

.nav__links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav__link {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone-dim);
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.3s var(--transition);
}

.nav__link::before {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--ember);
  transition: right 0.4s var(--transition);
}

.nav__link:hover, .nav__link.active { color: var(--bone); }
.nav__link:hover::before, .nav__link.active::before { right: 0; }

.nav__cta {
  padding: 0.65rem 1.25rem;
  background: var(--ember);
  color: var(--court-void);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--transition);
}

.nav__cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bone);
  transform: translateX(-101%);
  transition: transform 0.4s var(--transition);
  z-index: 0;
}

.nav__cta span { position: relative; z-index: 1; }
.nav__cta:hover::before { transform: translateX(0); }

.nav__menu-toggle {
  display: none;
  width: 28px; height: 28px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.nav__menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--bone);
  transition: all 0.3s var(--transition);
}

@media (max-width: 880px) {
  .nav__links { display: none; }
  .nav__menu-toggle { display: flex; }
  .nav__links.open {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--court-coal) !important;
    padding: 1.5rem var(--gutter) !important;
    border-bottom: 1px solid var(--ember-deep);
    align-items: flex-start;
    z-index: 200;
  }
  .nav__cta { display: none; }
}

/* ----- HERO ----------------------------------------------------------------- */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  padding: 8rem var(--gutter) 4rem;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero__court {
  position: absolute;
  inset: 0;
  background-image:
    /* 3-point arc */
    radial-gradient(ellipse 800px 600px at 50% 100%, transparent 65%, rgba(255, 90, 31, 0.12) 65.5%, rgba(255, 90, 31, 0.12) 66%, transparent 66.5%),
    /* free throw circle */
    radial-gradient(circle 200px at 50% 100%, transparent 80%, rgba(0, 229, 255, 0.1) 80.5%, rgba(0, 229, 255, 0.1) 81%, transparent 81.5%);
  opacity: 0.6;
}

.hero__particles {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(2px 2px at 20% 30%, var(--ember), transparent),
    radial-gradient(1px 1px at 60% 70%, var(--electric), transparent),
    radial-gradient(2px 2px at 80% 20%, var(--gold), transparent),
    radial-gradient(1px 1px at 40% 90%, var(--ember-glow), transparent),
    radial-gradient(2px 2px at 90% 50%, var(--electric), transparent),
    radial-gradient(1px 1px at 10% 70%, var(--gold), transparent);
  background-size: 600px 600px;
  animation: drift 60s linear infinite;
  opacity: 0.3;
}

@keyframes drift {
  0% { background-position: 0 0; }
  100% { background-position: 600px 600px; }
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
}

.hero__meta {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2rem;
}

.hero__meta-divider {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, var(--ember-deep), transparent);
}

.hero__title {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.hero__line-1 {
  font-family: var(--display);
  font-size: var(--t-display);
  font-weight: 400;
  line-height: 0.9;
  color: var(--bone);
  letter-spacing: -0.02em;
}

.hero__line-1 em {
  font-style: normal;
  color: var(--ember);
  position: relative;
}

.hero__line-2 {
  font-family: var(--display);
  font-size: var(--t-mega);
  line-height: 0.8;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  color: var(--bone);
  background: linear-gradient(180deg, var(--bone) 0%, var(--bone-dim) 60%, transparent 95%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}

.hero__line-2::after {
  content: "BASKETBALL";
  position: absolute;
  inset: 0;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1px rgba(255, 90, 31, 0.18);
  z-index: -1;
  transform: translate(8px, 8px);
}

.hero__sub {
  margin-top: 2rem;
  max-width: 540px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--bone-dim);
}

.hero__sub strong { color: var(--bone); font-weight: 500; }

.hero__cta-row {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.hero__ticker {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  border-top: 1px solid rgba(255, 90, 31, 0.15);
  border-bottom: 1px solid rgba(255, 90, 31, 0.15);
  background: rgba(0, 0, 0, 0.4);
  overflow: hidden;
  z-index: 2;
}

.hero__ticker-track {
  display: flex;
  gap: 3rem;
  white-space: nowrap;
  animation: scroll 60s linear infinite;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bone-dim);
}

.hero__ticker-track span { display: inline-flex; gap: 0.65rem; align-items: center; }
.hero__ticker-track strong { color: var(--ember); font-weight: 700; }
.hero__ticker-track .dot { color: var(--ember); }

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ----- BUTTONS -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1.75rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn--primary {
  background: var(--ember);
  color: var(--court-void);
  border-color: var(--ember);
  box-shadow: 0 0 0 0 rgba(255, 90, 31, 0.6);
}

.btn--primary:hover {
  background: var(--ember-glow);
  border-color: var(--ember-glow);
  box-shadow: 0 0 30px rgba(255, 90, 31, 0.4), 0 0 0 1px var(--ember-glow);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--bone);
  border: 1px solid var(--smoke);
}

.btn--ghost:hover {
  border-color: var(--bone);
  background: rgba(245, 239, 228, 0.04);
}

.btn--cyan {
  background: transparent;
  color: var(--electric);
  border: 1px solid var(--electric);
}

.btn--cyan:hover {
  background: var(--electric);
  color: var(--court-void);
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.4);
}

.btn__arrow {
  width: 14px; height: 14px;
  transition: transform 0.3s var(--transition);
}

.btn:hover .btn__arrow { transform: translateX(4px); }

/* ----- SECTION HEADER ------------------------------------------------------- */
.shead {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: end;
  margin-bottom: 3rem;
}

.shead__num {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ember);
  letter-spacing: 0.2em;
}

.shead__title {
  font-family: var(--display);
  font-size: var(--t-h1);
  line-height: 0.9;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-top: 0.5rem;
}

.shead__title em {
  font-family: var(--display);
font-weight: 400;
  text-transform: none;
  color: var(--ember);
  letter-spacing: -0.01em;
}

.shead__line {
  height: 1px;
  background: linear-gradient(90deg, var(--ember-deep), transparent);
  margin-bottom: 1rem;
}

.shead__sub {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--ash);
  text-transform: uppercase;
}

/* ----- LEADERBOARD CARDS --------------------------------------------------- */
.lb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 1px;
  background: rgba(255, 90, 31, 0.15);
  border: 1px solid rgba(255, 90, 31, 0.15);
}

.lb-card {
  background: var(--court-coal);
  padding: 1.75rem;
  position: relative;
  transition: all 0.3s var(--transition);
}

.lb-card:hover { background: var(--court-slate); }

.lb-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 90, 31, 0.15);
}

.lb-card__title {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.lb-card__icon {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--ember);
  letter-spacing: 0.2em;
}

.lb-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 1rem;
  padding: 0.75rem 0;
  align-items: center;
  border-bottom: 1px dashed rgba(245, 239, 228, 0.06);
  transition: all 0.2s ease;
}

.lb-row:last-child { border-bottom: 0; }
.lb-row:hover { padding-left: 0.5rem; background: rgba(255, 90, 31, 0.04); }

.lb-row__rank {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--smoke);
  letter-spacing: 0.05em;
}

.lb-row:nth-child(1) .lb-row__rank,
.lb-row.first .lb-row__rank { color: var(--gold); font-weight: 700; }

.lb-row__name {
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--bone);
}

.lb-row__name a:hover { color: var(--ember); }

.lb-row__val {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ember);
  letter-spacing: 0.02em;
}

/* ----- LEGEND CARDS / TOP PLAYERS ------------------------------------------ */
.legends {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.legend-card {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--hardwood);
  cursor: pointer;
  transition: transform 0.5s var(--transition);
}

.legend-card:hover { transform: translateY(-6px); }

.legend-card__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: all 0.7s var(--transition);
  filter: grayscale(60%) contrast(1.1) brightness(0.9);
}

.legend-card:hover .legend-card__img {
  filter: grayscale(0%) contrast(1.2) brightness(1.05);
  transform: scale(1.05);
}

.legend-card__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--hardwood) 0%, var(--court-coal) 100%);
  font-family: var(--display);
  font-size: 4rem;
  font-weight: 700;
  color: rgba(255, 90, 31, 0.25);
}

.legend-card__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0%, transparent 40%, rgba(5, 5, 5, 0.75) 75%, rgba(5, 5, 5, 0.95) 100%);
  z-index: 1;
}

.legend-card__rank {
  position: absolute;
  top: 1rem; left: 1rem;
  font-family: var(--display);
  font-size: 4rem;
  line-height: 0.8;
  font-weight: 700;
  color: var(--bone);
  z-index: 2;
  text-shadow: 2px 2px 0 var(--ember-deep);
  mix-blend-mode: difference;
}

.legend-card__rank::before { content: "#"; color: var(--ember); font-size: 1.2rem; vertical-align: super; margin-right: 4px; }

.legend-card__rings {
  position: absolute;
  top: 1rem; right: 1rem;
  display: flex;
  gap: 2px;
  z-index: 2;
}

.legend-card__ring {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px var(--gold);
}

.legend-card__body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.5rem;
  z-index: 2;
}

.legend-card__name {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.95;
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}

.legend-card__nick {
  font-family: var(--display);
font-size: 0.95rem;
  color: var(--ember-glow);
  margin-bottom: 0.85rem;
}

.legend-card__stats {
  display: flex;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--bone-dim);
  text-transform: uppercase;
}

.legend-card__stats strong { color: var(--bone); font-weight: 700; }

/* ----- ORACLE CHAT (FULL PAGE) --------------------------------------------- */
.oracle {
  min-height: 100vh;
  padding: 8rem var(--gutter) 4rem;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0;
  max-width: var(--maxw);
  margin: 0 auto;
}

@media (max-width: 980px) {
  .oracle { grid-template-columns: 1fr; }
  .oracle__sidebar { order: 2; margin-top: 2rem; }
}

.oracle__sidebar {
  border-right: 1px solid rgba(255, 90, 31, 0.15);
  padding: 0 2rem 0 0;
}

@media (max-width: 980px) { .oracle__sidebar { border-right: 0; padding: 0; } }

.oracle__sidebar-title {
  font-family: var(--display);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ember);
  margin-bottom: 1rem;
}

.oracle__suggest {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.85rem 1rem;
  margin-bottom: 0.5rem;
  background: var(--court-coal);
  border: 1px solid rgba(255, 90, 31, 0.15);
  font-family: var(--body);
  font-size: 0.85rem;
  color: var(--bone-dim);
  cursor: pointer;
  transition: all 0.3s var(--transition);
  font-style: italic;
}

.oracle__suggest:hover {
  border-color: var(--ember);
  color: var(--bone);
  background: var(--court-slate);
  transform: translateX(4px);
}

.oracle__main {
  padding: 0 0 0 2rem;
  display: flex;
  flex-direction: column;
  min-height: 70vh;
}

@media (max-width: 980px) { .oracle__main { padding: 0; } }

.oracle__head {
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 90, 31, 0.15);
  padding-bottom: 1.5rem;
}

.oracle__head-title {
  font-family: var(--display);
font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.oracle__head-title em { color: var(--ember); }

.oracle__head-sub {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--ash);
  text-transform: uppercase;
}

.oracle__feed {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1rem 0;
  margin-bottom: 1rem;
  overflow-y: auto;
  max-height: 60vh;
}

.msg {
  max-width: 85%;
  display: flex;
  gap: 0.85rem;
  animation: fadeUp 0.4s var(--transition);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg--user { align-self: flex-end; flex-direction: row-reverse; }
.msg--oracle { align-self: flex-start; }

.msg__avatar {
  flex-shrink: 0;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.msg--oracle .msg__avatar {
  background: var(--ember);
  color: var(--court-void);
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(255, 90, 31, 0.3);
}

.msg--user .msg__avatar {
  background: transparent;
  color: var(--electric);
  border: 1px solid var(--electric);
  border-radius: 50%;
}

.msg__body {
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  line-height: 1.6;
  position: relative;
}

.msg--oracle .msg__body {
  background: var(--court-coal);
  border-left: 2px solid var(--ember);
  color: var(--bone);
}

.msg--user .msg__body {
  background: var(--hardwood-warm);
  border-right: 2px solid var(--electric);
  color: var(--bone);
}

.msg__body strong {
  color: var(--ember-glow);
  font-weight: 600;
}

.msg__body em {
  color: var(--gold);
  font-style: italic;
}

.msg__body .stat-callout {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background: rgba(255, 90, 31, 0.15);
  border-left: 2px solid var(--ember);
  font-family: var(--mono);
  font-size: 0.85rem;
  margin: 0.15rem 0.25rem;
  color: var(--ember-glow);
}

.oracle__input-row {
  display: flex;
  gap: 0;
  border-top: 1px solid rgba(255, 90, 31, 0.15);
  padding-top: 1.5rem;
  position: sticky;
  bottom: 0;
  background: var(--court-void);
}

.oracle__prompt-mark {
  flex-shrink: 0;
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  color: var(--ember);
  font-size: 1rem;
  border: 1px solid rgba(255, 90, 31, 0.3);
  border-right: 0;
}

.oracle__input {
  flex: 1;
  padding: 1rem 1.25rem;
  background: var(--court-coal);
  border: 1px solid rgba(255, 90, 31, 0.3);
  border-right: 0;
  font-family: var(--body);
  font-size: 0.95rem;
  color: var(--bone);
  outline: none;
  transition: all 0.3s var(--transition);
}

.oracle__input::placeholder { color: var(--smoke); font-style: italic; }
.oracle__input:focus { border-color: var(--ember); background: var(--court-slate); }

.oracle__send {
  padding: 0 1.5rem;
  background: var(--ember);
  color: var(--court-void);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s var(--transition);
}

.oracle__send:hover { background: var(--ember-glow); }

/* Oracle "thinking" loader */
.oracle__thinking {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.oracle__thinking span {
  width: 6px; height: 6px;
  background: var(--ember);
  border-radius: 50%;
  animation: pulse 1.2s infinite;
}

.oracle__thinking span:nth-child(2) { animation-delay: 0.15s; }
.oracle__thinking span:nth-child(3) { animation-delay: 0.3s; }

@keyframes pulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

/* ----- DATA TABLE / FULL LEADERBOARD --------------------------------------- */
.lb-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 90, 31, 0.15);
}

.lb-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--body);
}

.lb-table thead th {
  background: var(--court-coal);
  padding: 1rem 1.25rem;
  text-align: left;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ember);
  border-bottom: 1px solid var(--ember-deep);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

.lb-table thead th:hover { background: var(--court-slate); }
.lb-table thead th.sorted { color: var(--bone); }
.lb-table thead th.sorted::after { content: " ↓"; color: var(--ember); }
.lb-table thead th.sorted.asc::after { content: " ↑"; }

.lb-table tbody tr {
  transition: background 0.2s ease;
  border-bottom: 1px dashed rgba(245, 239, 228, 0.06);
}

.lb-table tbody tr:hover { background: rgba(255, 90, 31, 0.05); }

.lb-table td {
  padding: 1rem 1.25rem;
  font-size: 0.92rem;
  vertical-align: middle;
}

.lb-table .rank-cell {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--smoke);
  width: 80px;
}

.lb-table tbody tr:nth-child(1) .rank-cell,
.lb-table tbody tr.top-3 .rank-cell { color: var(--gold); }

.lb-table .name-cell {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 240px;
}

.lb-table .name-cell img {
  width: 40px; height: 40px;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  filter: grayscale(40%);
}

.lb-table .name-cell .name {
  font-weight: 600;
  color: var(--bone);
  display: block;
  font-size: 0.95rem;
}

.lb-table .name-cell .nick {
  font-family: var(--display);
font-size: 0.78rem;
  color: var(--ember);
}

.lb-table .stat-cell {
  font-family: var(--mono);
  color: var(--bone-dim);
  text-align: right;
}

.lb-table .stat-cell.featured {
  color: var(--ember);
  font-weight: 700;
  font-size: 1.05rem;
}

/* ----- PLAYER PROFILE ------------------------------------------------------ */
.profile-hero {
  position: relative;
  min-height: 90vh;
  padding: 8rem var(--gutter) 4rem;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: var(--maxw);
  margin: 0 auto;
  align-items: center;
}

@media (max-width: 880px) {
  .profile-hero { grid-template-columns: 1fr; gap: 2rem; }
}

.profile-hero__img-wrap {
  position: relative;
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, var(--hardwood) 0%, var(--court-coal) 100%);
  overflow: hidden;
}

.profile-hero__img-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255, 90, 31, 0.03) 10px, rgba(255, 90, 31, 0.03) 11px);
  z-index: 1;
  pointer-events: none;
}

.profile-hero__img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: contrast(1.1);
}

.profile-hero__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%; height: 100%;
  font-family: var(--display);
  font-size: 12rem;
  color: rgba(255, 90, 31, 0.2);
}

.profile-hero__rank {
  position: absolute;
  top: 1rem; right: 1rem;
  z-index: 3;
  background: var(--ember);
  color: var(--court-void);
  padding: 0.5rem 1rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
}

.profile-hero__rank::before { content: "#"; font-size: 0.85rem; vertical-align: super; }

.profile-hero__meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ember);
}

.profile-hero__meta span:not(:last-child)::after {
  content: "—";
  margin-left: 1rem;
  color: var(--smoke);
}

.profile-hero__nick {
  font-family: var(--display);
font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: var(--ember-glow);
  line-height: 1;
  margin-bottom: 0.65rem;
}

.profile-hero__name {
  font-family: var(--display);
  font-size: clamp(2.5rem, 7vw, 6rem);
  line-height: 0.85;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.profile-hero__bio {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--bone-dim);
  margin-bottom: 2rem;
  max-width: 540px;
}

.profile-hero__stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid rgba(255, 90, 31, 0.2);
}

.profile-hero__stat-row > div {
  padding: 1rem;
  border-right: 1px solid rgba(255, 90, 31, 0.2);
}
.profile-hero__stat-row > div:last-child { border-right: 0; }

.profile-hero__stat-row .label {
  display: block;
  margin-bottom: 0.4rem;
}

.profile-hero__stat-row .stat {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--bone);
  line-height: 1;
}

.profile-hero__stat-row .gold .stat { color: var(--gold); }
.profile-hero__stat-row .ember .stat { color: var(--ember); }
.profile-hero__stat-row .cyan .stat { color: var(--electric); }

/* ----- STAT GRID FOR PLAYER PAGE ------------------------------------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: rgba(255, 90, 31, 0.15);
  border: 1px solid rgba(255, 90, 31, 0.15);
  margin-top: 2rem;
}

.stat-grid__cell {
  padding: 1.5rem 1rem;
  background: var(--court-coal);
  text-align: center;
}

.stat-grid__label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 0.5rem;
}

.stat-grid__val {
  font-family: var(--display);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--bone);
  line-height: 1;
}

/* ----- RECORDS LIST -------------------------------------------------------- */
.records-list {
  display: grid;
  gap: 0;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 90, 31, 0.15);
}

.records-list li {
  list-style: none;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(255, 90, 31, 0.15);
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.records-list .num {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ember);
  line-height: 0.9;
}

.records-list .text {
  font-family: var(--display);
font-size: 1.4rem;
  line-height: 1.4;
  color: var(--bone);
}

/* ----- PLAYERS GRID -------------------------------------------------------- */
.player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.player-tile {
  position: relative;
  aspect-ratio: 3/4;
  background: var(--hardwood);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s var(--transition);
  display: block;
}

.player-tile:hover { transform: translateY(-4px); }

.player-tile__img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(60%) contrast(1.05);
  transition: all 0.5s var(--transition);
}

.player-tile:hover .player-tile__img {
  filter: grayscale(0%) contrast(1.1);
  transform: scale(1.04);
}

.player-tile__placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 3rem;
  color: rgba(255, 90, 31, 0.3);
  background: linear-gradient(135deg, var(--hardwood) 0%, var(--court-coal) 100%);
}

.player-tile__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, transparent 45%, rgba(5, 5, 5, 0.8) 80%, rgba(5, 5, 5, 0.95) 100%);
  z-index: 1;
}

.player-tile__rank {
  position: absolute;
  top: 0.85rem; left: 0.85rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  background: var(--ember);
  color: var(--court-void);
  padding: 0.25rem 0.5rem;
  font-weight: 700;
  z-index: 2;
}

/* Unranked: muted, ghosted treatment so the eye still parses "this isn't top 100"
   without the ember badge competing with the actual top 100 ranks. */
.player-tile__rank--unrkd {
  background: transparent;
  color: var(--bone-dim);
  border: 1px solid rgba(244, 196, 67, 0.4);
  letter-spacing: 0.18em;
  padding: 0.2rem 0.45rem;
  font-size: 0.62rem;
}

.player-tile__body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1rem;
  z-index: 2;
}

.player-tile__name {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: -0.01em;
}

.player-tile__stats {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--ember-glow);
  margin-top: 0.5rem;
}

/* ----- FILTER BAR ---------------------------------------------------------- */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255, 90, 31, 0.15);
  border-bottom: 1px solid rgba(255, 90, 31, 0.15);
}

.filter-pill {
  padding: 0.55rem 1.1rem;
  background: transparent;
  color: var(--bone-dim);
  border: 1px solid var(--smoke);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s var(--transition);
}

.filter-pill:hover { border-color: var(--ember); color: var(--bone); }
.filter-pill.active {
  background: var(--ember);
  color: var(--court-void);
  border-color: var(--ember);
  font-weight: 700;
}

.search-input {
  flex: 1;
  min-width: 240px;
  padding: 0.55rem 1rem;
  background: var(--court-coal);
  border: 1px solid var(--smoke);
  font-family: var(--body);
  font-size: 0.9rem;
  color: var(--bone);
  outline: none;
  transition: border 0.3s ease;
}

.search-input::placeholder { color: var(--smoke); font-style: italic; }
.search-input:focus { border-color: var(--ember); }

/* ----- FOOTER -------------------------------------------------------------- */
.footer {
  border-top: 1px solid rgba(255, 90, 31, 0.15);
  padding: var(--gap-xl) var(--gutter) var(--gap-md);
  position: relative;
}

.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

@media (max-width: 720px) { .footer__inner { grid-template-columns: 1fr; gap: 2rem; } }

.footer__lead {
  font-family: var(--display);
font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
}

.footer__lead em { color: var(--ember); }

.footer__cols {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 720px) {
  .footer__cols { grid-template-columns: 1fr; }
}

.footer__col h4 {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 1rem;
}

.footer__col a {
  display: block;
  padding: 0.35rem 0;
  font-size: 0.92rem;
  color: var(--bone-dim);
  transition: color 0.2s ease;
}

.footer__col a:hover { color: var(--bone); }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--smoke);
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 90, 31, 0.1);
}

@media (max-width: 720px) { .footer__bottom { flex-direction: column; gap: 1rem; text-align: center; } }

/* ----- ANIMATIONS / REVEAL -------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: all 0.8s var(--transition); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ----- UTILITIES ----------------------------------------------------------- */
.hidden { display: none !important; }
.text-ember { color: var(--ember); }
.text-gold { color: var(--gold); }
.text-cyan { color: var(--electric); }

/* ==========================================================================
   RESPONSIVE BREAKPOINTS — comprehensive mobile/tablet polish
   ========================================================================== */

/* Tablet (881-1100px): hide brand subtitle to save nav space */
@media (max-width: 1100px) {
  .nav__links { gap: 1.25rem; }
  .nav__link { font-size: 0.7rem; }
}

/* Tablet portrait & small laptop (721-880px) */
@media (max-width: 880px) {
  .nav { padding: 1rem var(--gutter); }
  .nav.scrolled { padding: 0.65rem var(--gutter); }
  .nav__links.open .nav__link { padding: 0.5rem 0; font-size: 0.9rem; letter-spacing: 0.12em; }
  .brand { font-size: 0.95rem; }
  .brand__mark { width: 28px; height: 28px; }
  .brand__name span:first-child { font-size: 0.95rem; }

  /* Hero */
  .hero { min-height: auto; padding: 7rem var(--gutter) 4rem; }
  .hero__line-2::after { transform: translate(4px, 4px); }
  .hero__ticker { height: 44px; }
  .hero__ticker-track { font-size: 0.7rem; gap: 2rem; }
  .hero__cta-row { flex-direction: column; align-items: stretch; }
  .hero__cta-row .btn { justify-content: center; }

  /* Section heads */
  .shead { grid-template-columns: 1fr; gap: 0.5rem; }

  /* Profile hero */
  .profile-hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 7rem var(--gutter) 3rem;
    min-height: auto;
  }
  .profile-hero__img-wrap { aspect-ratio: 4/3; max-width: 480px; margin: 0 auto; width: 100%; }
  .profile-hero__stat-row .stat { font-size: 1.5rem; }

  /* Compare */
  .compare__rail { grid-template-columns: 1fr; }
  .compare__vs {
    height: 50px;
    padding: 0 1rem;
    font-size: 1.5rem;
    flex-direction: row;
    border-left: 1px solid rgba(255, 90, 31, 0.18);
    border-right: 1px solid rgba(255, 90, 31, 0.18);
  }
  .compare__row { grid-template-columns: 1fr 90px 1fr; }
  .compare__cell { padding: 0.85rem 0.85rem; font-size: 1.05rem; }
  .compare__label { padding: 0.65rem 0.4rem; }
  .compare__label-name { font-size: 0.6rem; }
  .compare__label-desc { display: none; }
  .compare__group-head { font-size: 1.1rem; padding: 1rem 0 0.5rem; }
  .compare__group-head em { font-size: 1.2rem; }
  .compare__verdict { padding: 1.25rem 1.25rem; }
}

/* Phone (601-720px) */
@media (max-width: 720px) {
  .compare__row { grid-template-columns: 1fr 70px 1fr; }
  .compare__cell { padding: 0.65rem 0.5rem; font-size: 0.95rem; }
  .records-list li { grid-template-columns: 40px 1fr; gap: 1rem; padding: 1rem 0; }
  .records-list .num { font-size: 1.4rem; }
  .records-list .text { font-size: 1.05rem; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid__cell { padding: 1rem 0.6rem; }
  .stat-grid__val { font-size: 1.6rem; }
  .lb-table thead th { font-size: 0.62rem; padding: 0.75rem 0.85rem; letter-spacing: 0.12em; }
  .lb-table td { padding: 0.7rem 0.85rem; font-size: 0.85rem; }
  .lb-table .name-cell { min-width: 200px; gap: 0.6rem; }
  .lb-table .name-cell img { width: 32px; height: 32px; }
  .lb-table .rank-cell { width: 60px; font-size: 1.1rem; }
}

/* Small phone (under 600px) */
@media (max-width: 600px) {
  :root { --gutter: 1rem; }
  .nav { padding: 0.75rem var(--gutter); }
  .hero { min-height: auto; padding-top: 6rem; }
  .hero__sub { font-size: 0.95rem; }

  .lb-grid { grid-template-columns: 1fr; }
  .legends { grid-template-columns: 1fr 1fr; gap: 0.85rem; }
  .legend-card__name { font-size: 1.1rem; }
  .legend-card__nick { font-size: 0.8rem; }
  .legend-card__stats { font-size: 0.6rem; gap: 0.55rem; }
  .legend-card__rank { font-size: 2.5rem; }

  .player-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .player-tile__name { font-size: 0.92rem; }
  .player-tile__rank { font-size: 0.6rem; }

  .filter-bar { gap: 0.4rem; padding: 1rem 0; }
  .filter-pill { font-size: 0.62rem; padding: 0.45rem 0.85rem; }
  .search-input { width: 100%; min-width: auto; }

  .profile-hero__name { font-size: clamp(2rem, 8vw, 3rem); }
  .profile-hero__stat-row { grid-template-columns: 1fr 1fr 1fr; }
  .profile-hero__stat-row > div { padding: 0.75rem 0.5rem; }
  .profile-hero__stat-row .stat { font-size: 1.3rem; }
  .profile-hero__bio { font-size: 0.95rem; }
  .profile-hero__rank { font-size: 1.1rem; padding: 0.35rem 0.65rem; }

  /* Compare on phone — even tighter */
  .compare__row { grid-template-columns: 1fr 60px 1fr; }
  .compare__cell { font-size: 0.85rem; padding: 0.55rem 0.4rem; }
  .compare__cell--left, .compare__cell--right { font-size: 1rem; }
  .compare__label-name { font-size: 0.55rem; letter-spacing: 0.1em; }
  .compare__name { font-size: 1.25rem; }
  .compare__nick { font-size: 0.85rem; }
  .compare__info { padding: 1rem; }
  .compare__select-wrap { padding: 0.75rem 1rem 1rem; }

  /* Oracle on phone */
  .oracle { padding: 6rem var(--gutter) 2rem; }
  .oracle__head-title { font-size: 2rem; }
  .msg { max-width: 95%; }
  .msg__body { font-size: 0.9rem; padding: 0.85rem 1rem; }
  .msg__avatar { width: 30px; height: 30px; font-size: 0.65rem; }
  .oracle__suggest { font-size: 0.78rem; padding: 0.7rem 0.85rem; }

  /* Tables — let them scroll */
  .lb-table-wrap { font-size: 0.85rem; }

  /* Hero ticker tighter */
  .hero__ticker-track { font-size: 0.65rem; }

  /* Sections */
  .section { padding: var(--gap-xl) 0; }
  .section--tight { padding: var(--gap-lg) 0; }
}

/* Tiny phone (under 380px) */
@media (max-width: 380px) {
  .legends { grid-template-columns: 1fr; }
  .player-grid { grid-template-columns: 1fr; }
  .compare__row { grid-template-columns: 1fr 50px 1fr; }
  .filter-pill { font-size: 0.58rem; padding: 0.4rem 0.7rem; }
}

/* ----- ABOUT/MISC PAGE STYLES ---------------------------------------------- */
.editorial {
  max-width: 760px;
  margin: 0 auto;
  padding: 8rem var(--gutter) 4rem;
}

.editorial h1 {
  font-family: var(--display);
font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 0.95;
  margin-bottom: 2rem;
}

.editorial h1 em { color: var(--ember); }

.editorial p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--bone-dim);
  margin-bottom: 1.5rem;
}

.editorial p strong { color: var(--bone); }

/* Logo SVG */
.brand__mark svg {
  width: 100%; height: 100%;
}

/* Hover glow class */
.glow-hover {
  transition: filter 0.3s ease;
}
.glow-hover:hover {
  filter: drop-shadow(0 0 12px var(--ember-glow));
}

/* ==========================================================================
   COMPARE PAGE — side-by-side player comparison
   ========================================================================== */

.compare {
  padding: 8rem var(--gutter) 4rem;
  max-width: var(--maxw);
  margin: 0 auto;
}

.compare__head {
  margin-bottom: 3rem;
}

.compare__rail {
  display: grid;
  grid-template-columns: 1fr 88px 1fr;
  gap: 0;
  margin-bottom: 3rem;
  position: relative;
  /* Force the rail above its sibling #comparisonContent so the search
     dropdown renders cleanly on top instead of being underlapped by the
     comparison rows below. */
  z-index: 20;
}

@media (max-width: 880px) {
  .compare__rail {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.compare__slot {
  background: var(--court-coal);
  border: 1px solid rgba(255, 90, 31, 0.18);
  padding: 0;
  position: relative;
  /* No overflow:hidden — the image wrap clips the photo, but the slot itself
     must let the search dropdown spill below without being chopped. */
  overflow: visible;
}

.compare__slot--left { border-right: 0; }
.compare__slot--right { border-left: 0; }

@media (max-width: 880px) {
  .compare__slot--left, .compare__slot--right { border: 1px solid rgba(255, 90, 31, 0.18); }
}

.compare__vs {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--ember);
  background: var(--court-void);
  border-top: 1px solid rgba(255, 90, 31, 0.18);
  border-bottom: 1px solid rgba(255, 90, 31, 0.18);
  position: relative;
}

.compare__vs::before, .compare__vs::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 1px;
  background: var(--ember);
  left: 0;
}

.compare__vs::before { top: 30%; opacity: 0.3; }
.compare__vs::after { bottom: 30%; opacity: 0.3; }

@media (max-width: 880px) {
  .compare__vs {
    grid-column: 1;
    height: 60px;
    border: 1px solid rgba(255, 90, 31, 0.18);
    border-left: 0; border-right: 0;
  }
}

.compare__img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--hardwood) 0%, var(--court-coal) 100%);
  overflow: hidden;
}

.compare__img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 25%;
  filter: contrast(1.1);
}

.compare__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%; height: 100%;
  font-family: var(--display);
  font-size: 5rem;
  color: rgba(255, 90, 31, 0.25);
}

.compare__rank {
  position: absolute;
  top: 0.85rem; left: 0.85rem;
  background: var(--ember);
  color: var(--court-void);
  padding: 0.3rem 0.65rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  z-index: 2;
}

.compare__rank::before { content: "#"; font-size: 0.7rem; vertical-align: super; }

.compare__info {
  padding: 1.5rem 1.5rem 1rem;
}

.compare__name {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.compare__nick {
  font-family: var(--display);
color: var(--ember-glow);
  font-size: 1.05rem;
  margin-bottom: 0.85rem;
}

.compare__meta {
  display: flex;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 1rem;
}

.compare__select-wrap {
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px dashed rgba(255, 90, 31, 0.15);
  position: relative;
}

.compare__select-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--smoke);
  margin-bottom: 0.5rem;
}

.compare__select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--court-void);
  border: 1px solid rgba(255, 90, 31, 0.25);
  font-family: var(--body);
  font-size: 0.92rem;
  color: var(--bone);
  cursor: pointer;
  outline: none;
  transition: all 0.3s var(--transition);
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ember) 50%),
    linear-gradient(135deg, var(--ember) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
}

.compare__select:focus, .compare__select:hover {
  border-color: var(--ember);
  background-color: var(--court-coal);
}

.compare__select option { background: var(--court-coal); color: var(--bone); }

/* Searchable selector */
.compare__search-wrap { position: relative; }

.compare__search-input {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  background: var(--court-void);
  border: 1px solid rgba(255, 90, 31, 0.25);
  font-family: var(--body);
  font-size: 0.92rem;
  color: var(--bone);
  outline: none;
  transition: all 0.3s var(--transition);
}
.compare__search-input::placeholder { color: var(--smoke); font-style: italic; }
.compare__search-input:focus, .compare__search-input:hover {
  border-color: var(--ember);
  background: var(--court-coal);
}

.compare__search-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ember);
  pointer-events: none;
  font-size: 0.85rem;
}

.compare__dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--court-coal);
  border: 1px solid var(--ember);
  max-height: 320px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}
.compare__dropdown.open { display: block; }

.compare__dropdown-empty {
  padding: 1rem;
  color: var(--smoke);
  font-style: italic;
  text-align: center;
  font-size: 0.9rem;
}

.compare__dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 90, 31, 0.08);
  transition: background 0.15s ease;
}
.compare__dropdown-item:last-child { border-bottom: 0; }
.compare__dropdown-item:hover, .compare__dropdown-item.active {
  background: rgba(255, 90, 31, 0.08);
}

.compare__dropdown-rank {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ember);
  letter-spacing: 0.1em;
  width: 36px;
  flex-shrink: 0;
}

.compare__dropdown-name {
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--bone);
  flex: 1;
}

.compare__dropdown-meta {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--smoke);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Hide native select when search is active */
.compare__select.hidden { display: none; }

/* Comparison rows */
.compare__stats {
  display: grid;
  gap: 0;
  border: 1px solid rgba(255, 90, 31, 0.18);
}

.compare__row {
  display: grid;
  grid-template-columns: 1fr 200px 1fr;
  align-items: stretch;
  border-bottom: 1px solid rgba(255, 90, 31, 0.12);
  background: var(--court-coal);
}

.compare__row:last-child { border-bottom: 0; }

@media (max-width: 720px) {
  .compare__row { grid-template-columns: 1fr 100px 1fr; }
}

.compare__cell {
  padding: 1.1rem 1.5rem;
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  position: relative;
}

.compare__cell--left { justify-content: flex-end; text-align: right; }
.compare__cell--right { justify-content: flex-start; }
.compare__cell.win { color: var(--ember); }
.compare__cell.win::before {
  content: "▸";
  margin-right: 0.5rem;
  color: var(--ember);
  font-size: 0.9rem;
}
.compare__cell--right.win::before { content: "◂"; margin-right: 0; margin-left: 0.5rem; order: 2; }
.compare__cell.lose { color: var(--smoke); }

.compare__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--court-void);
  padding: 1rem 0.75rem;
  border-left: 1px solid rgba(255, 90, 31, 0.12);
  border-right: 1px solid rgba(255, 90, 31, 0.12);
}

.compare__label-name {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ember);
  font-weight: 700;
  line-height: 1.2;
}

.compare__label-desc {
  font-family: var(--body);
  font-size: 0.7rem;
  color: var(--smoke);
  margin-top: 0.25rem;
  font-style: italic;
}

@media (max-width: 720px) {
  .compare__label-desc { display: none; }
}

/* Section divider on compare page */
.compare__group-head {
  font-family: var(--display);
  font-size: 1.4rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--bone);
  padding: 1.5rem 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.compare__group-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--ember-deep), transparent);
}

.compare__group-head em {
  font-family: var(--display);
font-weight: 400;
  text-transform: none;
  color: var(--ember);
  font-size: 1.5rem;
}

/* Verdict box */
.compare__verdict {
  margin-top: 3rem;
  padding: 2rem 2.5rem;
  background: var(--court-coal);
  border: 1px solid rgba(255, 90, 31, 0.18);
  border-left: 3px solid var(--ember);
}

.compare__verdict-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 0.75rem;
}

.compare__verdict-text {
  font-family: var(--display);
font-size: clamp(1.25rem, 2.4vw, 1.85rem);
  line-height: 1.4;
  color: var(--bone);
}

.compare__verdict-text strong {
  font-style: normal;
  color: var(--ember-glow);
  font-weight: 600;
}

/* Tied state */
.compare__cell.tied { color: var(--gold); }

/* Empty state */
.compare__empty {
  padding: 4rem 2rem;
  text-align: center;
  background: var(--court-coal);
  border: 1px dashed rgba(255, 90, 31, 0.25);
  font-family: var(--display);
font-size: 1.5rem;
  color: var(--smoke);
}
