:root {
  --bg-0: #050913;
  --bg-1: #08111f;
  --bg-2: #0d1830;
  --bg-3: #132246;

  --panel: rgba(255, 255, 255, 0.07);
  --panel-2: rgba(255, 255, 255, 0.045);
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.2);

  --text: #f7f8ff;
  --muted: #aeb8d3;
  --muted-2: #8792b2;

  --primary: #7d8dff;
  --primary-2: #a56cff;
  --cyan: #59d9ff;

  --good: #9af1be;
  --warn: #ffd88b;
  --bad: #ffb0b8;

  --bronze: #c0c7d6;
  --silver: #edf3ff;
  --gold: #ffe88a;
  --legend: #d6a7ff;
  --immortal: #ff6dc0;
  --immortal-2: #af7aff;
  --challenger: #ff3866;
  --challenger-2: #ff224f;

  --shadow-md: 0 14px 30px rgba(0, 0, 0, 0.24);
  --shadow-lg: 0 22px 54px rgba(0, 0, 0, 0.34);

  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(125, 141, 255, 0.18), transparent 24%),
    radial-gradient(circle at 92% 10%, rgba(165, 108, 255, 0.16), transparent 22%),
    radial-gradient(circle at 48% 100%, rgba(89, 217, 255, 0.08), transparent 28%),
    linear-gradient(180deg, #09101f 0%, #050913 55%, #03050d 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

/* =========================
   Background
========================= */
.bg-orb {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  filter: blur(60px);
  pointer-events: none;
  opacity: 0.82;
}

.orb-1 {
  width: 320px;
  height: 320px;
  top: -70px;
  left: -90px;
  background: rgba(125, 141, 255, 0.18);
}

.orb-2 {
  width: 260px;
  height: 260px;
  top: 120px;
  right: -70px;
  background: rgba(165, 108, 255, 0.16);
}

.orb-3 {
  width: 220px;
  height: 220px;
  bottom: -70px;
  left: 35%;
  background: rgba(89, 217, 255, 0.08);
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 92%);
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.02;
  background-image:
    radial-gradient(circle at 20% 20%, #fff 0.6px, transparent 0.7px),
    radial-gradient(circle at 80% 40%, #fff 0.6px, transparent 0.7px),
    radial-gradient(circle at 60% 80%, #fff 0.6px, transparent 0.7px),
    radial-gradient(circle at 30% 70%, #fff 0.6px, transparent 0.7px);
  background-size: 120px 120px;
}

/* =========================
   Layout
========================= */
.shell {
  position: relative;
  z-index: 1;
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 18px;
}

.leaderboard-shell {
  padding-bottom: 64px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.brand-wrap {
  max-width: 760px;
}

.eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #c7d0ec;
  opacity: 0.92;
}

.topbar h1 {
  margin: 6px 0 8px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.03;
  letter-spacing: -0.03em;
  font-weight: 900;
}

.top-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.back-btn {
  min-width: 132px;
  background: linear-gradient(135deg, #3146d9, #6f5bff);
  border: none;
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.38);
}

.back-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 15px 34px rgba(99, 102, 241, 0.5);
}

.nav-icon-btn {
  min-width: 132px;
}

.nav-icon-btn.active {
  border-color: rgba(125, 141, 255, 0.45);
  background: linear-gradient(135deg, rgba(125, 141, 255, 0.16), rgba(165, 108, 255, 0.12));
  box-shadow: 0 8px 22px rgba(125, 141, 255, 0.12);
}

.btn-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
}

.btn-icon img {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter:
    brightness(0)
    invert(1)
    drop-shadow(0 0 8px rgba(255, 255, 0, 0.55));
}

/* =========================
   Buttons / Inputs
========================= */
.topbar .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.topbar .btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--line-strong);
}

.topbar .btn.ghost {
  background: rgba(255, 255, 255, 0.04);
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  font-size: 0.82rem;
  color: var(--muted);
}

.field.compact {
  min-width: 118px;
}

.field.wide {
  min-width: 240px;
}

.field input,
.field select {
  width: 100%;
  min-height: 50px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  outline: none;
  font-size: 0.94rem;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background-color 0.16s ease;
}

.field input::placeholder {
  color: var(--muted-2);
}

.field input:focus,
.field select:focus {
  border-color: rgba(125, 141, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(125, 141, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 9px;
  height: 9px;
  border-right: 2px solid #e6ebff;
  border-bottom: 2px solid #e6ebff;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
  opacity: 0.9;
}

.field select {
  padding-right: 40px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.field select::-ms-expand {
  display: none;
}

/* =========================
   Panels / Cards
========================= */
.panel,
.summary-card,
.spotlight-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.045)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 20px;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
}

.hero {
  margin-bottom: 18px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  align-items: stretch;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-badge {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 14px;
  padding: 8px 14px;
  border: 1px solid rgba(125, 141, 255, 0.42);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(125, 141, 255, 0.22), rgba(165, 108, 255, 0.16));
  color: #f2f5ff;
  font-size: 0.8rem;
  font-weight: 800;
}

.hero h2 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1.05;
  font-weight: 900;
  max-width: 720px;
}

.hero-text {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.72;
}

.hero-side {
  display: flex;
  align-items: stretch;
}

.spotlight-card {
  width: 100%;
  border-radius: 24px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.045)),
    linear-gradient(135deg, rgba(165, 108, 255, 0.12), rgba(125, 141, 255, 0.08));
}

.spotlight-kicker {
  margin-bottom: 10px;
  color: #dfe6ff;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

.spotlight-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

/* =========================
   Summary
========================= */
.summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.summary-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 16px;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease;
}

.summary-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg);
}

.summary-card.mine {
  background:
    linear-gradient(180deg, rgba(125, 141, 255, 0.16), rgba(255, 255, 255, 0.06)),
    linear-gradient(135deg, rgba(165, 108, 255, 0.12), rgba(255, 255, 255, 0.02));
  border-color: rgba(125, 141, 255, 0.28);
}

.summary-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

.summary-card strong {
  display: block;
  color: #fff;
  font-size: 1.26rem;
  line-height: 1.15;
}

.summary-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* =========================
   Top Tier Summary
========================= */
.top-tier-card {
  padding-bottom: 14px;
}

.top-tier-box {
  min-height: 82px;
}

.top-tier-empty {
  color: var(--muted);
  font-size: 1rem;
}

.top-tier-inner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 76px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
}

.top-tier-profile {
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  display: block;
  border-radius: 20px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 8px 18px rgba(0, 0, 0, 0.2);
}

.top-tier-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
}

.top-tier-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.top-tier-emblem {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-weight: 900;
  font-size: 1rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.16);
}

.top-tier-meta {
  min-width: 0;
  flex: 1 1 auto;
}

.top-tier-meta strong {
  display: block;
  font-size: 1rem;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-tier-meta span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-tier-rp {
  white-space: nowrap;
  font-size: 1rem;
  font-weight: 900;
  color: #fff;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex: 0 0 auto;
}

.top-tier-pulse {
  position: absolute;
  inset: auto auto -22px -12px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  filter: blur(20px);
  opacity: 0.28;
  pointer-events: none;
  animation: tierPulse 3s ease-in-out infinite;
}

.top-tier-inner.tier-bronze {
  border-color: rgba(192, 199, 214, 0.28);
  background: linear-gradient(180deg, rgba(192, 199, 214, 0.13), rgba(255, 255, 255, 0.03));
}

.top-tier-inner.tier-bronze .top-tier-pulse {
  background: rgba(192, 199, 214, 0.52);
}

.top-tier-inner.tier-silver {
  border-color: rgba(237, 243, 255, 0.32);
  background: linear-gradient(180deg, rgba(237, 243, 255, 0.14), rgba(255, 255, 255, 0.03));
}

.top-tier-inner.tier-silver .top-tier-pulse {
  background: rgba(237, 243, 255, 0.52);
}

.top-tier-inner.tier-gold {
  border-color: rgba(255, 232, 138, 0.38);
  background: linear-gradient(180deg, rgba(255, 232, 138, 0.16), rgba(255, 255, 255, 0.03));
}

.top-tier-inner.tier-gold .top-tier-pulse {
  background: rgba(255, 232, 138, 0.58);
}

.top-tier-inner.tier-legend {
  border-color: rgba(214, 167, 255, 0.34);
  background: linear-gradient(180deg, rgba(214, 167, 255, 0.14), rgba(255, 255, 255, 0.03));
}

.top-tier-inner.tier-legend .top-tier-pulse {
  background: rgba(214, 167, 255, 0.54);
}

.top-tier-inner.tier-immortal {
  border-color: rgba(255, 109, 192, 0.44);
  background:
    linear-gradient(135deg, rgba(255, 109, 192, 0.18), rgba(175, 122, 255, 0.14), rgba(255, 255, 255, 0.03));
}

.top-tier-inner.tier-immortal .top-tier-pulse {
  background: rgba(255, 109, 192, 0.58);
}

.top-tier-inner.tier-challenger {
  border-color: rgba(255, 56, 102, 0.62);
  background:
    linear-gradient(
      135deg,
      rgba(255, 56, 102, 0.24),
      rgba(255, 34, 79, 0.16),
      rgba(255, 255, 255, 0.03)
    );
  box-shadow:
    inset 0 0 0 1px rgba(255, 56, 102, 0.24),
    0 0 22px rgba(255, 56, 102, 0.24);
}

.top-tier-inner.tier-challenger .top-tier-pulse {
  background: rgba(255, 56, 102, 0.68);
}

/* =========================
   Board Panel
========================= */
.board-panel {
  min-width: 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head h2 {
  margin: 4px 0 0;
  font-size: 1.18rem;
}

.controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
}

/* =========================
   Table
========================= */
.table-wrap {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.rank-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 13px 10px;
  text-align: left;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: rgba(12, 19, 37, 0.96);
}

.rank-table tbody td {
  padding: 13px 10px;
  vertical-align: middle;
  border-bottom: 1px solid #ffffff12;
}

.rank-table tbody tr {
  transition: background-color 0.14s ease;
}

.rank-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.035);
}

.rank-table tbody tr.top-1 {
  background:
    linear-gradient(90deg, rgba(255, 226, 143, 0.16), rgba(255, 255, 255, 0.02));
}

.rank-table tbody tr.top-2 {
  background:
    linear-gradient(90deg, rgba(237, 243, 255, 0.11), rgba(255, 255, 255, 0.02));
}

.rank-table tbody tr.top-3 {
  background:
    linear-gradient(90deg, rgba(192, 199, 214, 0.13), rgba(255, 255, 255, 0.02));
}

.col-rank,
.cell-rank {
  width: 88px;
}

.col-player,
.cell-player {
  width: 250px;
}

.col-tier,
.cell-tier {
  width: 320px;
}

.col-rp,
.cell-rp {
  width: 90px;
}

.col-wins,
.cell-wins,
.col-losses,
.cell-losses,
.col-total,
.cell-total,
.col-rate,
.cell-rate {
  width: 88px;
}

.rank-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: #ffffff;
  min-width: 0;
}

.medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.16);
  overflow: hidden;
}

.medal img {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.26));
}

.rank-table tbody tr.top-1 .medal {
  background:
    linear-gradient(180deg, rgba(255, 226, 143, 0.26), rgba(255, 255, 255, 0.05));
  border-color: rgba(255, 226, 143, 0.34);
}

.rank-table tbody tr.top-2 .medal {
  background:
    linear-gradient(180deg, rgba(237, 243, 255, 0.22), rgba(255, 255, 255, 0.05));
  border-color: rgba(237, 243, 255, 0.3);
}

.rank-table tbody tr.top-3 .medal {
  background:
    linear-gradient(180deg, rgba(192, 199, 214, 0.22), rgba(255, 255, 255, 0.05));
  border-color: rgba(192, 199, 214, 0.3);
}

.rank-cell > span:last-child {
  min-width: 18px;
  line-height: 1;
  letter-spacing: -0.01em;
}

.player-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 2px 0;
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.player-link:hover {
  transform: translateX(1px);
  opacity: 0.98;
}

.player-avatar {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.16);
}

.player-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.player-name {
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tier-col {
  min-width: 0;
}

.rp-strong {
  color: #eaf0ff;
  font-weight: 900;
}

.winrate-good {
  color: var(--good);
  font-weight: 800;
}

.winrate-mid {
  color: var(--warn);
  font-weight: 800;
}

.winrate-low {
  color: var(--bad);
  font-weight: 800;
}

.empty {
  padding: 16px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
}

/* =========================
   Tier Card
========================= */
.tier-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 82px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 20px rgba(0, 0, 0, 0.12);
}

.tier-glow {
  position: absolute;
  left: -28px;
  bottom: -42px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.22;
  pointer-events: none;
}

.tier-card-left {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  width: 100%;
}

.tier-emblem {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 6px 18px rgba(0, 0, 0, 0.12);
  font-size: 1.2rem;
  font-weight: 900;
}

.tier-emblem::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03));
  opacity: 0.8;
}

.tier-emblem span {
  position: relative;
  z-index: 1;
}

.tier-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}

.tier-meta strong {
  color: #fff;
  font-size: 1rem;
  line-height: 1.14;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tier-meta span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Bronze */
.tier-bronze {
  border-color: rgba(192, 199, 214, 0.28);
  background:
    linear-gradient(180deg, rgba(192, 199, 214, 0.13), rgba(255, 255, 255, 0.03));
}

.tier-bronze .tier-emblem,
.tier-bronze .tier-meta strong {
  color: #e7edf8;
}

.tier-bronze .tier-glow {
  background: rgba(192, 199, 214, 0.42);
}

/* Silver */
.tier-silver {
  border-color: rgba(237, 243, 255, 0.32);
  background:
    linear-gradient(180deg, rgba(237, 243, 255, 0.14), rgba(255, 255, 255, 0.03));
}

.tier-silver .tier-emblem,
.tier-silver .tier-meta strong {
  color: #f5f8ff;
}

.tier-silver .tier-glow {
  background: rgba(237, 243, 255, 0.42);
}

/* Gold */
.tier-gold {
  border-color: rgba(255, 232, 138, 0.38);
  background:
    linear-gradient(180deg, rgba(255, 232, 138, 0.16), rgba(255, 255, 255, 0.03));
}

.tier-gold .tier-emblem,
.tier-gold .tier-meta strong {
  color: #fff0bb;
}

.tier-gold .tier-glow {
  background: rgba(255, 232, 138, 0.52);
}

/* Legend */
.tier-legend {
  border-color: rgba(214, 167, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(214, 167, 255, 0.14), rgba(255, 255, 255, 0.03));
}

.tier-legend .tier-emblem,
.tier-legend .tier-meta strong {
  color: #f0dcff;
}

.tier-legend .tier-glow {
  background: rgba(214, 167, 255, 0.46);
}

/* Immortal */
.tier-immortal {
  border-color: rgba(255, 109, 192, 0.44);
  background:
    linear-gradient(135deg, rgba(255, 109, 192, 0.18), rgba(175, 122, 255, 0.14), rgba(255, 255, 255, 0.03));
}

.tier-immortal .tier-emblem,
.tier-immortal .tier-meta strong {
  color: #ffd6f4;
}

.tier-immortal .tier-glow {
  background: rgba(255, 109, 192, 0.58);
}

/* Challenger */
.tier-challenger {
  border-color: rgba(255, 56, 102, 0.62);
  background:
    linear-gradient(
      135deg,
      rgba(255, 56, 102, 0.24),
      rgba(255, 34, 79, 0.16),
      rgba(255, 255, 255, 0.03)
    );
  box-shadow:
    inset 0 0 0 1px rgba(255, 56, 102, 0.24),
    0 0 20px rgba(255, 56, 102, 0.2);
}

.tier-challenger .tier-emblem,
.tier-challenger .tier-meta strong {
  color: #fff0f5;
  text-shadow: 0 0 12px rgba(255, 56, 102, 0.34);
}

.tier-challenger .tier-glow {
  background: rgba(255, 56, 102, 0.72);
}

.tier-challenger::before,
.top-tier-inner.tier-challenger::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    transparent 0%,
    transparent 38%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 62%,
    transparent 100%
  );
  transform: translateX(-130%);
  animation: fireSweepLite 4.8s linear infinite;
  opacity: 0.7;
}

.fire-core {
  animation: fireCorePulseLite 2.8s ease-in-out infinite;
  will-change: transform;
}

/* Flames */
.flame,
.top-flame {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  transform-origin: center bottom;
  border-radius: 50% 50% 48% 48% / 60% 60% 40% 40%;
  will-change: transform, opacity;
}

.flame::before,
.top-flame::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at 50% 72%,
    #ffe7ef 0%,
    #ff9ac0 33%,
    #ff4f86 64%,
    rgba(219, 24, 75, 0.92) 100%
  );
  box-shadow:
    0 0 8px rgba(255, 93, 143, 0.28),
    0 0 14px rgba(219, 24, 75, 0.2);
}

.flame::after,
.top-flame::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 28%;
  width: 38%;
  height: 38%;
  transform: translateX(-50%);
  border-radius: inherit;
  background: radial-gradient(
    circle,
    rgba(255, 248, 220, 0.82),
    rgba(255, 220, 120, 0.18)
  );
}

.flame-1 {
  top: 7px;
  right: 12px;
  width: 14px;
  height: 22px;
  animation: flameFlickerLite1 2.1s ease-in-out infinite;
}

.flame-2 {
  top: 14px;
  right: 25px;
  width: 10px;
  height: 16px;
  animation: flameFlickerLite2 1.9s ease-in-out infinite;
}

.flame-3 {
  top: 16px;
  right: 3px;
  width: 8px;
  height: 13px;
  animation: flameFlickerLite3 1.7s ease-in-out infinite;
}

.top-flame-1 {
  top: 6px;
  right: 13px;
  width: 16px;
  height: 25px;
  animation: flameFlickerLite1 1.9s ease-in-out infinite;
}

.top-flame-2 {
  top: 13px;
  right: 27px;
  width: 11px;
  height: 17px;
  animation: flameFlickerLite2 1.7s ease-in-out infinite;
}

.top-flame-3 {
  top: 15px;
  right: 4px;
  width: 9px;
  height: 14px;
  animation: flameFlickerLite3 1.5s ease-in-out infinite;
}

/* =========================
   Toast
========================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 70;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 10, 20, 0.94);
  color: var(--text);
  font-size: 0.92rem;
  text-align: center;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.32);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(12px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* =========================
   Motion
========================= */
@keyframes tierPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.22;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.34;
  }
}

@keyframes fireSweepLite {
  0% {
    transform: translateX(-130%);
  }
  30% {
    transform: translateX(130%);
  }
  100% {
    transform: translateX(130%);
  }
}

@keyframes fireCorePulseLite {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      0 0 0 rgba(255, 56, 102, 0),
      0 0 10px rgba(255, 56, 102, 0.14);
  }
  50% {
    transform: scale(1.035);
    box-shadow:
      0 0 16px rgba(255, 56, 102, 0.24),
      0 0 24px rgba(255, 34, 79, 0.2);
  }
}

@keyframes flameFlickerLite1 {
  0%, 100% {
    transform: translateY(0) scale(1) rotate(-1deg);
    opacity: 0.92;
  }
  50% {
    transform: translateY(-2px) scale(1.04, 1.08) rotate(2deg);
    opacity: 1;
  }
}

@keyframes flameFlickerLite2 {
  0%, 100% {
    transform: translateY(0) scale(1) rotate(2deg);
    opacity: 0.88;
  }
  50% {
    transform: translateY(-2px) scale(1.03, 1.07) rotate(-2deg);
    opacity: 0.96;
  }
}

@keyframes flameFlickerLite3 {
  0%, 100% {
    transform: translateY(0) scale(1) rotate(-2deg);
    opacity: 0.82;
  }
  50% {
    transform: translateY(-1px) scale(1.02, 1.06) rotate(1deg);
    opacity: 0.9;
  }
}

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

  .col-player,
  .cell-player {
    width: 220px;
  }

  .col-tier,
  .cell-tier {
    width: 280px;
  }
}

@media (max-width: 980px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .summary-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  }

  .panel-head {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 700px) {
  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .field.compact,
  .field.wide {
    min-width: 100%;
  }

  .top-tier-inner {
    align-items: center;
    flex-direction: row;
    gap: 10px;
  }

  .top-tier-profile {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
    border-radius: 16px;
    padding: 2px;
  }

  .top-tier-avatar {
    border-radius: 13px;
  }

  .top-tier-main {
    min-width: 0;
  }

  .top-tier-rp {
    width: auto;
    padding: 8px 10px;
    text-align: center;
  }

  .rank-table {
    table-layout: fixed;
  }

  .col-rank,
  .cell-rank {
    width: 66px;
  }

  .col-player,
  .cell-player {
    width: auto;
  }

  .col-tier,
  .cell-tier {
    width: 190px;
  }

  .col-rp,
  .cell-rp {
    width: 78px;
  }

  .rank-table thead th,
  .rank-table tbody td {
    padding: 11px 8px;
  }

  .player-avatar {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 14px;
  }

  .tier-card {
    min-height: 72px;
    padding: 10px 11px;
    border-radius: 18px;
  }

  .tier-emblem {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 1.05rem;
  }

  .tier-meta strong {
    font-size: 0.9rem;
  }

  .tier-meta span {
    font-size: 0.76rem;
  }

  .top-tier-emblem {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    border-radius: 14px;
  }
}

@media (max-width: 560px) {
  .shell {
    padding: 12px;
  }

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

  .panel,
  .summary-card {
    padding: 14px;
  }

  .topbar h1 {
    font-size: 1.72rem;
  }

  .top-actions {
    width: 100%;
  }

  .top-actions .btn {
    width: auto;
    flex: 1 1 auto;
  }

  .hero h2 {
    font-size: 1.58rem;
  }

  .hero-text,
  .spotlight-card p,
  .tier-meta span {
    font-size: 0.93rem;
  }

  .table-wrap {
    overflow: hidden;
  }

  .rank-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .rank-table thead th,
  .rank-table tbody td {
    padding: 10px 6px;
  }

  .col-rank,
  .cell-rank {
    width: 56px;
  }

  .col-player,
  .cell-player {
    width: auto;
  }

  .col-tier,
  .cell-tier {
    width: 150px;
  }

  .col-rp,
  .cell-rp {
    width: 64px;
  }

  .col-wins,
  .cell-wins,
  .col-losses,
  .cell-losses,
  .col-total,
  .cell-total,
  .col-rate,
  .cell-rate {
    display: none;
  }

  .rank-cell {
    gap: 6px;
  }

  .medal {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    border-radius: 10px;
  }

  .medal img {
    width: 20px;
    height: 20px;
  }

  .player-link {
    gap: 8px;
  }

  .player-avatar {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border-radius: 12px;
  }

  .player-name {
    font-size: 0.9rem;
  }

  .player-sub {
    display: none;
  }

  .tier-card {
    min-height: 58px;
    padding: 8px 9px;
    border-radius: 16px;
  }

  .tier-card-left {
    gap: 9px;
  }

  .tier-emblem {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 0.92rem;
  }

  .tier-emblem::before {
    inset: 6px;
    border-radius: 9px;
  }

  .tier-meta strong {
    font-size: 0.8rem;
  }

  .tier-meta span {
    display: none;
  }

  .rp-strong {
    font-size: 0.9rem;
  }

  .top-tier-main {
    width: 100%;
  }

  .top-tier-meta strong,
  .top-tier-meta span {
    white-space: normal;
  }

  .spotlight-card {
    padding: 14px;
  }

  .flame-2,
  .flame-3,
  .top-flame-2,
  .top-flame-3 {
    display: none;
  }

  .flame-1,
  .top-flame-1 {
    width: 12px;
    height: 18px;
  }

  .tier-challenger::before,
  .top-tier-inner.tier-challenger::before {
    opacity: 0.45;
    animation-duration: 6s;
  }

  .fire-core {
    animation-duration: 3.2s;
  }
}

@media (max-width: 420px) {
  .rank-table thead th,
  .rank-table tbody td {
    padding: 9px 5px;
  }

  .col-rank,
  .cell-rank {
    width: 50px;
  }

  .col-tier,
  .cell-tier {
    width: 136px;
  }

  .col-rp,
  .cell-rp {
    width: 58px;
  }

  .player-avatar {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .player-name {
    font-size: 0.84rem;
  }

  .tier-card {
    min-height: 54px;
    padding: 7px 8px;
  }

  .tier-emblem {
    width: 34px;
    height: 34px;
    font-size: 0.82rem;
  }

  .tier-card-left {
    gap: 8px;
  }

  .tier-meta strong {
    font-size: 0.74rem;
  }

  .rp-strong {
    font-size: 0.84rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 768px) {
  .bg-orb {
    display: none;
  }
}
