/* =============================================
   POKÉLINK LEGENDS — STYLESHEET
   Dark eSports Premium Theme
   ============================================= */

:root {
  --black:       #05050a;
  --black-2:     #0a0a14;
  --black-3:     #0f0f1e;
  --surface:     #12121f;
  --surface-2:   #1a1a2e;
  --surface-3:   #1e1e35;
  --border:      rgba(255,255,255,0.07);
  --border-glow: rgba(255,200,50,0.25);

  --gold:        #f5c842;
  --gold-light:  #ffe484;
  --gold-dark:   #c9941a;
  --electric:    #3d9eff;
  --electric-2:  #00c8ff;
  --purple:      #9b5de5;
  --purple-2:    #c77dff;
  --fire:        #ff4757;
  --fire-2:      #ff6b81;
  --silver:      #b0bec5;
  --bronze:      #cd7f32;
  --green:       #2ed573;

  --text:        #e8e8f0;
  --text-muted:  #7a7a9a;
  --text-dim:    #4a4a6a;

  --font-display: 'Cinzel Decorative', serif;
  --font-title:   'Cinzel', serif;
  --font-body:    'Rajdhani', sans-serif;

  --radius:      12px;
  --radius-lg:   20px;
  --transition:  0.3s cubic-bezier(0.4,0,0.2,1);

  --glow-gold:   0 0 30px rgba(245,200,66,0.35), 0 0 60px rgba(245,200,66,0.15);
  --glow-blue:   0 0 30px rgba(61,158,255,0.35), 0 0 60px rgba(61,158,255,0.15);
  --glow-purple: 0 0 30px rgba(155,93,229,0.35), 0 0 60px rgba(155,93,229,0.15);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--black);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* ── SCROLLBAR ──────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--black-2); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 3px; }

/* ── NAVBAR ─────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  height: 68px;
  background: rgba(5,5,10,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(5,5,10,0.97);
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.brand-icon { font-size: 1.4rem; filter: drop-shadow(0 0 8px var(--gold)); }
.brand-accent { color: var(--gold); }

.nav-links {
  display: flex;
  gap: 0.25rem;
}
.nav-links a {
  display: block;
  padding: 0.4rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover {
  color: var(--gold);
  background: rgba(245,200,66,0.08);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── HERO ───────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 68px 2rem 4rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(61,158,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61,158,255,0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: orbFloat 8s ease-in-out infinite;
}
.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(155,93,229,0.3), transparent 70%);
  top: -100px; left: -100px;
  animation-delay: 0s;
}
.orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(245,200,66,0.2), transparent 70%);
  top: 10%; right: -80px;
  animation-delay: -3s;
}
.orb-3 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(61,158,255,0.25), transparent 70%);
  bottom: 5%; left: 30%;
  animation-delay: -5s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(20px,-30px) scale(1.05); }
  66% { transform: translate(-15px,20px) scale(0.95); }
}

.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.particle {
  position: absolute;
  width: 3px; height: 3px;
  background: var(--gold);
  border-radius: 50%;
  animation: particleFly linear infinite;
  opacity: 0;
}
@keyframes particleFly {
  0% { opacity: 0; transform: translateY(100vh) scale(0); }
  10% { opacity: 0.8; }
  90% { opacity: 0.4; }
  100% { opacity: 0; transform: translateY(-100px) scale(1.5); }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  border: 1px solid rgba(245,200,66,0.4);
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--gold);
  background: rgba(245,200,66,0.05);
  margin-bottom: 1.5rem;
  animation: fadeSlideDown 0.8s ease both;
}

.hero-icon {
  display: block;
  font-size: clamp(3rem, 8vw, 5rem);
  margin-bottom: 0.5rem;
  animation: fadeSlideDown 0.8s 0.1s ease both;
  filter: drop-shadow(0 0 20px rgba(245,200,66,0.7));
}

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1em;
  margin-bottom: 2rem;
  animation: fadeSlideDown 0.8s 0.2s ease both;
}
.title-line-1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.05em;
  text-shadow: 0 0 40px rgba(255,255,255,0.1);
}
.title-line-2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 25px rgba(245,200,66,0.5));
  letter-spacing: 0.1em;
}

.hero-taglines {
  margin-bottom: 2.5rem;
  animation: fadeSlideDown 0.8s 0.35s ease both;
}
.tagline {
  font-family: var(--font-title);
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  line-height: 1.9;
}
.tagline.t2 { color: var(--electric); }
.tagline.t3 { color: var(--gold); }

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #000;
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  border-radius: 50px;
  box-shadow: var(--glow-gold);
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
  animation: fadeSlideDown 0.8s 0.5s ease both;
}
.hero-cta:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 0 50px rgba(245,200,66,0.6), 0 0 100px rgba(245,200,66,0.3);
  filter: brightness(1.1);
}
.cta-icon { font-size: 1.2rem; }
.cta-arrow { transition: transform var(--transition); }
.hero-cta:hover .cta-arrow { transform: translateX(4px); }

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  text-transform: uppercase;
  animation: fadeSlideDown 1s 1s ease both;
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; height: 40px; }
  50% { opacity: 1; height: 55px; }
}

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── SECTIONS ───────────────────────────────── */
.section {
  padding: 6rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}
.section-dark {
  max-width: 100%;
  background: var(--black-2);
  padding: 6rem 2rem;
}
.section-dark > * {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  padding: 0.3rem 1rem;
  border: 1px solid rgba(245,200,66,0.25);
  border-radius: 50px;
  background: rgba(245,200,66,0.05);
}
.section-title {
  font-family: var(--font-title);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}
.section-sub {
  color: var(--text-muted);
  font-size: 1rem;
  font-family: var(--font-body);
}

/* ── RANKING CONTROLS ───────────────────────── */
.ranking-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.search-wrapper {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  flex: 1;
  max-width: 360px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-wrapper:focus-within {
  border-color: rgba(61,158,255,0.5);
  box-shadow: 0 0 0 3px rgba(61,158,255,0.1);
}
.search-icon { font-size: 0.9rem; }
.search-input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  width: 100%;
}
.search-input::placeholder { color: var(--text-dim); }

.data-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: background var(--transition), box-shadow var(--transition);
}
.status-dot.active {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: statusPulse 2s ease-in-out infinite;
}
.status-dot.error { background: var(--fire); box-shadow: 0 0 8px var(--fire); }
@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ── RANKING TABLE ──────────────────────────── */
.table-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
}
.ranking-table thead tr {
  background: linear-gradient(90deg, var(--surface-3), var(--surface-2));
  border-bottom: 1px solid rgba(245,200,66,0.2);
}
.ranking-table th {
  padding: 1rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: left;
  white-space: nowrap;
}
.ranking-table th.col-stat { text-align: center; }
.ranking-table td {
  padding: 0.9rem 1.25rem;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.ranking-table tbody tr {
  transition: background var(--transition);
  cursor: pointer;
}
.ranking-table tbody tr:hover {
  background: rgba(255,255,255,0.03);
}
.ranking-table tbody tr:last-child td { border-bottom: none; }

/* Top 3 rows */
.ranking-table tbody tr.rank-1 { background: rgba(245,200,66,0.06); }
.ranking-table tbody tr.rank-1:hover { background: rgba(245,200,66,0.1); }
.ranking-table tbody tr.rank-2 { background: rgba(176,190,197,0.04); }
.ranking-table tbody tr.rank-3 { background: rgba(205,127,50,0.04); }

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 700;
}
.rank-badge.pos-1 {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #000;
  box-shadow: var(--glow-gold);
}
.rank-badge.pos-2 {
  background: linear-gradient(135deg, #78909c, var(--silver));
  color: #000;
}
.rank-badge.pos-3 {
  background: linear-gradient(135deg, #a0522d, var(--bronze));
  color: #000;
}
.rank-badge.pos-other {
  background: var(--surface-3);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.player-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.player-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--electric));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  border: 2px solid var(--border);
  transition: border-color var(--transition);
}
.ranking-table tbody tr:hover .player-avatar {
  border-color: rgba(245,200,66,0.4);
}
.player-name {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.player-name.champion { color: var(--gold); }

.stat-cell {
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
}
.stat-cell.trophies { color: var(--gold); }
.stat-cell.silver { color: var(--silver); }
.stat-cell.bronze { color: var(--bronze); }
.stat-cell.podios { color: var(--electric); }

.rank-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--surface-3);
  border: 1px solid var(--border);
  white-space: nowrap;
  letter-spacing: 0.03em;
}

/* ── LOADING / EMPTY STATES ─────────────────── */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 4rem 2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.loader {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem;
  color: var(--text-dim);
  font-size: 0.95rem;
  gap: 0.5rem;
}

/* ── RANK GROUPS ────────────────────────────── */
.rank-groups-container {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.rank-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.rank-group-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.75rem;
  border-bottom: 1px solid var(--border);
}
.rank-group-icon { font-size: 1.8rem; }
.rank-group-name {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.rank-group-count {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--surface-3);
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
  border: 1px solid var(--border);
}

.rank-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border);
}
.rank-card {
  background: var(--surface);
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: background var(--transition);
}
.rank-card:hover { background: var(--surface-2); }
.rank-card-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--electric));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
}
.rank-card-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}
.rank-card-stat {
  font-size: 0.8rem;
  color: var(--gold);
}

/* ── AWARDS ─────────────────────────────────── */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.award-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.award-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 0%, rgba(255,255,255,0.03), transparent);
  pointer-events: none;
}
.award-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  box-shadow: var(--glow-gold);
}

.award-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  display: block;
  filter: drop-shadow(0 0 12px rgba(245,200,66,0.5));
}
.award-title {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 1rem;
  text-transform: uppercase;
}
.award-player {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.award-value {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.award-value strong {
  color: var(--text);
  font-weight: 700;
}

/* ── HALL OF FAME ───────────────────────────── */
.hof-container {
  max-width: 1400px;
  margin: 0 auto;
}

.hof-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.hof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.hof-card {
  position: relative;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid rgba(245,200,66,0.25);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.hof-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--purple), var(--gold), var(--electric));
}
.hof-card::after {
  content: '⚜️';
  position: absolute;
  font-size: 8rem;
  opacity: 0.04;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.hof-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px rgba(245,200,66,0.15);
}

.hof-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--gold-dark), var(--electric));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin: 0 auto 1rem;
  border: 3px solid rgba(245,200,66,0.4);
  box-shadow: 0 0 30px rgba(245,200,66,0.3);
}
.hof-name {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.3rem;
  letter-spacing: 0.05em;
}
.hof-rank-badge {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.hof-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}
.hof-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}
.hof-stat-value {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
}
.hof-stat-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── RANKS SECTION ──────────────────────────── */
.ranks-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  border-bottom: none;
  transition: background var(--transition), transform var(--transition);
  position: relative;
}
.rank-item:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.rank-item:last-child { border-radius: 0 0 var(--radius) var(--radius); border-bottom: 1px solid var(--border); }
.rank-item:hover {
  background: var(--surface-2);
  z-index: 1;
  transform: scaleX(1.01);
}

.rank-item-icon { font-size: 2rem; flex-shrink: 0; }
.rank-item-info { flex: 1; }
.rank-item-name {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}
.rank-item-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.rank-item-req {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  background: rgba(245,200,66,0.08);
  border: 1px solid rgba(245,200,66,0.2);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  white-space: nowrap;
  text-align: right;
}

/* ── MODAL ──────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--surface);
  border: 1px solid rgba(245,200,66,0.2);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px var(--border);
}
.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: background var(--transition), color var(--transition);
}
.modal-close:hover { background: var(--fire); color: #fff; }

.modal-content { padding: 2rem; }

.modal-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}
.modal-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--electric));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  border: 3px solid rgba(245,200,66,0.3);
  flex-shrink: 0;
}
.modal-player-name {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.modal-player-rank {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.modal-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.75rem;
}
.modal-stat {
  background: var(--surface-2);
  padding: 1rem;
  text-align: center;
}
.modal-stat-value {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.modal-stat-value.gold { color: var(--gold); }
.modal-stat-value.silver { color: var(--silver); }
.modal-stat-value.bronze { color: var(--bronze); }
.modal-stat-value.blue { color: var(--electric); }
.modal-stat-value.purple { color: var(--purple-2); }
.modal-stat-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.modal-section-title {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.tournament-history {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.75rem;
}

.tournament-slot {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.5rem;
  text-align: center;
  transition: border-color var(--transition);
}
.tournament-slot.has-result {
  border-color: rgba(245,200,66,0.2);
}
.tournament-slot-number {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
}
.tournament-slot-result {
  font-size: 1.3rem;
}
.tournament-slot-text {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 0.2rem;
}

/* Distinctions row in modal */
.distinctions-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}
.distinction-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid;
  letter-spacing: 0.05em;
}
.distinction-badge.plata { background: rgba(176,190,197,0.1); border-color: rgba(176,190,197,0.3); color: var(--silver); }
.distinction-badge.bronce { background: rgba(205,127,50,0.1); border-color: rgba(205,127,50,0.3); color: var(--bronze); }

/* ── FOOTER ─────────────────────────────────── */
.footer {
  background: var(--black-2);
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  text-align: center;
}
.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.footer-copy {
  font-size: 0.82rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}
.footer-update {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ── RANK COLOR HELPERS ─────────────────────── */
.rg-campeon-eterno .rank-group-header { background: linear-gradient(90deg, rgba(155,93,229,0.12), rgba(245,200,66,0.08)); border-bottom-color: rgba(245,200,66,0.3); }
.rg-campeon-eterno .rank-group-name { background: linear-gradient(90deg, var(--gold), var(--purple-2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.rg-mitico .rank-group-header { background: linear-gradient(90deg, rgba(255,71,87,0.1), transparent); }
.rg-mitico .rank-group-name { color: var(--fire); }
.rg-leyenda .rank-group-header { background: linear-gradient(90deg, rgba(255,228,132,0.08), transparent); }
.rg-leyenda .rank-group-name { color: var(--gold-light); }
.rg-gran-maestro .rank-group-header { background: linear-gradient(90deg, rgba(255,200,50,0.07), transparent); }
.rg-gran-maestro .rank-group-name { color: var(--gold); }
.rg-maestro .rank-group-header { background: linear-gradient(90deg, rgba(0,200,255,0.07), transparent); }
.rg-maestro .rank-group-name { color: var(--electric-2); }
.rg-heroico-elite .rank-group-header { background: linear-gradient(90deg, rgba(61,158,255,0.08), transparent); }
.rg-heroico-elite .rank-group-name { color: var(--electric); }
.rg-heroico .rank-group-header { background: linear-gradient(90deg, rgba(155,93,229,0.07), transparent); }
.rg-heroico .rank-group-name { color: var(--purple-2); }
.rg-campeon .rank-group-header { background: linear-gradient(90deg, rgba(46,213,115,0.07), transparent); }
.rg-campeon .rank-group-name { color: var(--green); }

/* ── UTILITIES ──────────────────────────────── */
.no-data {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.hidden { display: none !important; }

/* ── RESPONSIVE ─────────────────────────────── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: rgba(5,5,10,0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    gap: 0.25rem;
  }
  .section, .section-dark { padding: 4rem 1.25rem; }
  .modal-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .navbar { padding: 0 1.25rem; }
  .ranking-table th, .ranking-table td { padding: 0.75rem 0.75rem; }
  .col-stat:nth-child(n+6) { display: none; }
  .hof-grid { grid-template-columns: 1fr; }
  .awards-grid { grid-template-columns: 1fr; }
  .tournament-history { grid-template-columns: repeat(5, 1fr); }
  .modal-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .rank-cards { grid-template-columns: 1fr 1fr; }
}

/* ── ANIMATIONS ─────────────────────────────── */
.fade-in {
  animation: fadeIn 0.5s ease both;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.stagger-in > * {
  animation: fadeIn 0.4s ease both;
}
.stagger-in > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-in > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-in > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-in > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-in > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-in > *:nth-child(6) { animation-delay: 0.3s; }
.stagger-in > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-in > *:nth-child(8) { animation-delay: 0.4s; }
