:root {
  --bg: #050505;
  --panel: rgba(12,12,12,0.96);
  --panel-2: rgba(20,20,20,0.98);
  --text: #f4f4f4;
  --muted: #9ca3af;
  --accent: #ff2f2f;
  --accent-2: #ff8a00;
  --accent-soft: rgba(255,47,47,0.14);
  --border: rgba(255,255,255,0.08);
  --shadow: 0 14px 40px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Instrument Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.background {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(circle at top left, rgba(255,47,47,0.22), transparent 24%),
    radial-gradient(circle at top right, rgba(255,138,0,0.16), transparent 22%),
    linear-gradient(135deg, #040404 0%, #0b0b0b 100%);
}

.navbar { padding: 22px 0 16px; }
.navbar-content { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav-left, .nav-right { display: flex; gap: 10px; align-items: center; }
.nav-center { display: flex; align-items: center; justify-content: center; }
.server-pill {
  display: inline-flex; flex-direction: column; align-items: flex-start; padding: 8px 12px; border-radius: 999px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  color: var(--text); text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.server-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.16);
  background: rgba(255,255,255,0.08);
}
.server-pill span { font-size: 10px; letter-spacing: 0.2em; color: var(--muted); text-transform: uppercase; }
.server-pill strong { font-size: 13px; color: var(--text); }
.nav-link {
  display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none;
  padding: 10px 14px; border-radius: 999px; transition: 0.25s ease;
}
.nav-link:hover, .nav-link.active {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 20px rgba(255,47,47,0.22);
}
.logo-img { width: 120px; display: block; }

.home-section { padding: 18px 0 50px; }
.leaderboard-container {
  background: linear-gradient(180deg, rgba(15,15,15,0.98), rgba(10,10,10,0.96));
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px;
}
.hero {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 8px 0 18px; border-bottom: 1px solid var(--border); margin-bottom: 20px;
}
.eyebrow { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.hero h1 { font-size: 24px; margin-bottom: 8px; line-height: 1.25; }
.hero-text { color: var(--muted); max-width: 560px; line-height: 1.6; }
.hero-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-chip {
  min-width: 110px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,0.03); border: 1px solid var(--border);
}
.hero-chip strong { display: block; font-size: 16px; color: var(--text); }
.hero-chip span { color: var(--muted); font-size: 12px; }

.position-panel {
  margin: 18px 0;
}
.section-label-row {
  margin-bottom: 12px;
}
.section-label {
  margin: 0;
  color: var(--text);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.position-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255,255,255,0.04);
}
.position-rank {
  min-width: 72px;
  min-height: 72px;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  font-weight: 900;
  color: white;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.position-body {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}
.position-avatar {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: white;
  background: #111;
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 1.4rem;
  font-weight: 800;
}
.question-avatar {
  background: #0d0d0d;
}
.position-details {
  min-width: 0;
}
.position-name {
  font-size: 1.05rem;
  font-weight: 700;
}
.position-sub {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 4px;
}
.position-sub span {
  color: var(--text);
}
.position-overall-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-weight: 700;
  text-transform: uppercase;
}
.position-overall-pill i {
  color: #ffd166;
}
.tier-heading {
  margin-top: 22px;
}
.tier-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.region-badge {
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  font-weight: 700;
  color: #ffcb6b;
}
.tier-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tier-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 76px;
  height: 36px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tier-pill::before {
  content: none;
}
.tier-pill i,
.tier-pill svg {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  fill: currentColor;
}
.tier-pill.ht1 {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255,255,255,0.12);
  color: #ffd970;
}
.tier-pill.lt1 {
  background: rgba(145, 55, 216, 0.12);
  border-color: rgba(145, 55, 216, 0.24);
  color: #d5b3ff;
}

.controls {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  padding: 6px 0 18px;
}
.search {
  flex: 1 1 280px; min-width: 220px; padding: 13px 14px;
  border-radius: 999px; border: 1px solid var(--border); outline: none;
  color: var(--text); background: rgba(255,255,255,0.04);
}
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--border); background: rgba(255,255,255,0.04); color: var(--muted);
  padding: 9px 12px; border-radius: 999px; cursor: pointer; font: inherit; transition: 0.2s ease;
}
.chip.active {
  color: white; border-color: transparent; background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.block-page {
  padding: 36px 0;
}
.block-hero {
  max-width: 760px;
  margin: 0 auto 32px;
  text-align: center;
}
.block-hero img {
  width: 110px;
  margin-bottom: 18px;
  filter: drop-shadow(0 0 20px rgba(255,255,255,0.18));
}
.block-hero h1 {
  font-size: 34px;
  margin-bottom: 12px;
}
.block-hero p {
  color: var(--muted);
  line-height: 1.7;
}
.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.security-card {
  padding: 20px;
  border-radius: 22px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.security-card:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.16);
}
.security-card strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 8px;
}
.security-card span {
  color: var(--muted);
  font-size: 0.9rem;
}
.block-alert {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  padding: 14px 22px;
  border-radius: 999px;
  background: rgba(255, 50, 50, 0.92);
  color: white;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 999;
}
.block-alert.visible {
  opacity: 1;
}

.navbar {
  padding: 22px 0 16px;
  animation: fadeDown 0.8s ease both;
}
.nav-link {
  display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none;
  padding: 10px 14px; border-radius: 999px; transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.nav-link:hover, .nav-link.active {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 20px rgba(255,47,47,0.22);
  transform: translateY(-1px);
}
.hero {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 8px 0 18px; border-bottom: 1px solid var(--border); margin-bottom: 20px;
  animation: fadeUp 0.9s ease both;
}
.hero-copy, .hero-stats {
  animation: popIn 0.9s ease both;
}
.hero-copy { animation-delay: 0.1s; }
.hero-stats { animation-delay: 0.2s; }
.hero-chip {
  min-width: 110px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  animation: popIn 1s ease both;
}
.hero-chip:nth-child(2) { animation-delay: 0.15s; }
.hero-chip:nth-child(3) { animation-delay: 0.25s; }
.position-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255,255,255,0.04);
  animation: popIn 0.95s ease both;
}
.position-avatar {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: white;
  background: #111;
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 1.4rem;
  font-weight: 800;
  animation: float 3.5s ease-in-out infinite;
}
.position-overall-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-weight: 700;
  text-transform: uppercase;
  animation: popIn 1s ease both;
}
.tier-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  animation: fadeUp 1s ease both;
}
.tier-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 76px;
  height: 36px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  animation: badgePop 0.9s ease both;
}
.tier-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}
.tier-pill:nth-child(1) { animation-delay: 0.18s; }
.tier-pill:nth-child(2) { animation-delay: 0.22s; }
.tier-pill:nth-child(3) { animation-delay: 0.26s; }
.tier-pill:nth-child(4) { animation-delay: 0.30s; }
.tier-pill:nth-child(5) { animation-delay: 0.34s; }
.tier-pill:nth-child(6) { animation-delay: 0.38s; }
.tier-pill:nth-child(7) { animation-delay: 0.42s; }
.tier-grid article, .highlight-card, .profile-card {
  animation: fadeUp 1s ease both;
}
.tier-grid article:nth-child(1) { animation-delay: 0.12s; }
.tier-grid article:nth-child(2) { animation-delay: 0.16s; }
.tier-grid article:nth-child(3) { animation-delay: 0.20s; }
.tier-grid article:nth-child(4) { animation-delay: 0.24s; }
.highlight-card { animation-delay: 0.28s; }
.profile-card { animation-delay: 0.26s; }
.footer {
  animation: fadeUp 0.9s ease both;
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes badgePop {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

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

.workspace {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 16px;
}
.panel {
  border: 1px solid var(--border); border-radius: 18px; background: rgba(255,255,255,0.03); overflow: hidden;
}
.panel-head {
  padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--muted);
  font-size: 0.82rem; letter-spacing: 0.2em; text-transform: uppercase;
}
.roster-list { list-style: none; padding: 10px; display: grid; gap: 8px; }
.profile-card {
  display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center;
  padding: 12px; border-radius: 14px; border: 1px solid transparent; cursor: pointer; transition: 0.2s ease;
}
.profile-card:hover, .profile-card.active {
  background: rgba(255,255,255,0.05); border-color: var(--border);
}
.avatar, .detail-avatar {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; color: white; text-transform: uppercase; background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.identity strong { display: block; font-size: 0.96rem; }
.identity span { display: block; color: var(--muted); font-size: 0.84rem; margin-top: 3px; }
.score-pill { font-weight: 700; color: #ffe7d8; white-space: nowrap; }

.detail-panel { padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.empty-state {
  padding: 18px; border: 1px dashed var(--border); border-radius: 16px; color: var(--muted);
  text-align: center; min-height: 260px; display: grid; place-items: center; line-height: 1.6;
}
.detail-card {
  border: 1px solid var(--border); border-radius: 18px; padding: 16px; background: rgba(255,255,255,0.03);
}
.detail-top { display: flex; gap: 12px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.detail-avatar { width: 56px; height: 56px; }
.detail-name { font-size: 1.06rem; font-weight: 700; margin-bottom: 4px; }
.detail-sub { color: var(--muted); font-size: 0.9rem; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.badge {
  padding: 8px 10px; border-radius: 999px; border: 1px solid var(--border); background: rgba(255,255,255,0.04);
  color: var(--muted); font-size: 0.83rem;
}
.badge strong { color: white; margin-right: 4px; }
.metrics { display: grid; gap: 10px; margin-top: 14px; }
.metric { display: grid; gap: 6px; }
.metric-row { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--muted); }
.bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.note {
  padding: 12px 14px; margin-top: 14px; border-radius: 14px; background: rgba(255,47,47,0.12);
  color: #ffd2c0; border: 1px solid rgba(255,47,47,0.2); line-height: 1.5; font-size: 0.95rem;
}

.footer { padding: 20px 0 36px; color: var(--muted); }
.footer-content { width: min(1100px, calc(100% - 32px)); margin: 0 auto; }
.footer-logo img { width: 96px; margin-bottom: 8px; }
.footer-info { font-size: 14px; }

.tiers-hero {
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
}

.tiers-section {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 16px;
  align-items: start;
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tier-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  min-height: 160px;
}

.tier-card ul {
  list-style: none;
  margin-top: 10px;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.93rem;
}

.tier-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.tier-count {
  font-size: 0.86rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.bronze { border-color: rgba(205,127,50,0.28); }
.silver { border-color: rgba(192,192,192,0.28); }
.gold { border-color: rgba(255,215,0,0.28); }
.diamond { border-color: rgba(103,232,249,0.28); }

.highlight-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(255,47,47,0.12), rgba(255,138,0,0.08));
}

.highlight-head {
  font-size: 0.84rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.highlight-list {
  list-style: none;
  display: grid;
  gap: 10px;
  color: var(--text);
  line-height: 1.6;
}

.highlight-list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 8px;
  background: rgba(255,255,255,0.08);
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 900px) {
  .hero { flex-direction: column; align-items: flex-start; }
  .workspace { grid-template-columns: 1fr; }
  .tiers-section { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .navbar-content { flex-direction: column; }
  .profile-card { grid-template-columns: 44px 1fr; }
  .score-pill { grid-column: 2; justify-self: start; }
  .tier-grid { grid-template-columns: 1fr; }
}
