:root {
  color-scheme: dark;
  --bg: #020816;
  --panel: rgba(7, 21, 42, 0.84);
  --line: rgba(84, 167, 255, 0.24);
  --line-strong: rgba(84, 167, 255, 0.58);
  --text: #f6f9ff;
  --muted: #a7bad5;
  --blue: #2b86ff;
  --blue-2: #56b9ff;
  --yellow: #ffca28;
  --capitals: #47c7ff;
  --history: #a987ff;
  --bible: #43e1aa;
  --shadow: 0 24px 80px rgba(0, 95, 255, 0.14);
  --radius: 28px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 82% 8%, rgba(31, 111, 255, 0.17), transparent 30rem),
    radial-gradient(circle at 14% 44%, rgba(0, 145, 255, 0.08), transparent 25rem),
    linear-gradient(180deg, #020816 0%, #030a18 55%, #061224 100%);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }
svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.container { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(2,8,22,0.86);
  backdrop-filter: blur(18px);
}

.nav {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 14px; font-weight: 950; letter-spacing: 0.15em; font-size: 15px; }
.brand img { width: 52px; height: 52px; border-radius: 16px; box-shadow: 0 8px 28px rgba(15, 111, 255, 0.34); }
.nav-links { display: flex; gap: 22px; align-items: center; color: var(--muted); font-size: 14px; font-weight: 800; }
.nav-links a:hover { color: var(--text); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font: inherit;
  font-weight: 900;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, #1475ff, #2c9cff);
  border-color: rgba(125,202,255,0.72);
  box-shadow: 0 10px 35px rgba(16,113,255,0.32);
}

.hero { padding: 38px 0 56px; border-bottom: 1px solid rgba(255,255,255,0.045); }
.hero-center { display: flex; align-items: center; flex-direction: column; text-align: center; }

.hero-brand { position: relative; display: flex; align-items: center; flex-direction: column; margin-bottom: 14px; }
.hero-brand::before { content: ""; position: absolute; inset: 18% -26%; z-index: -1; border-radius: 50%; background: rgba(27, 111, 255, 0.20); filter: blur(82px); }

.hero-symbol {
  display: block;
  width: 208px;
  height: 208px;
  border-radius: 50px;
  box-shadow: 0 26px 74px rgba(0, 96, 255, 0.24), 0 0 0 1px rgba(111, 191, 255, 0.18);
}

.hero-wordmark { margin-top: 3px; font-size: clamp(34px, 3.9vw, 48px); font-style: italic; font-weight: 950; letter-spacing: 0.18em; text-indent: 0.18em; color: #f8fbff; }
.kicker { color: var(--blue-2); text-transform: uppercase; letter-spacing: 0.20em; font-size: 12px; font-weight: 950; }

h1 { margin: 10px 0 12px; max-width: 860px; font-size: clamp(46px, 6.2vw, 78px); line-height: 0.99; letter-spacing: -0.07em; }
h1 span { color: #dcebff; }

.hero-lead { max-width: 760px; margin: 0; color: #c4d5ee; font-size: clamp(18px, 1.9vw, 22px); line-height: 1.55; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-actions-centered { justify-content: center; }

.section { padding: 76px 0; }
.compact-top { padding-top: 34px; }

.section-soft {
  background: linear-gradient(180deg, rgba(8, 25, 49, 0.34), rgba(4, 13, 28, 0.14));
  border-top: 1px solid rgba(255,255,255,0.035);
  border-bottom: 1px solid rgba(255,255,255,0.035);
}

.section h2 { margin: 10px 0 14px; max-width: 1100px; font-size: clamp(36px, 5.2vw, 66px); line-height: 1.03; letter-spacing: -0.058em; }
.arena-section-title { max-width: 900px !important; font-size: clamp(40px, 5vw, 62px) !important; line-height: 1.01 !important; }
.section-lead { max-width: 820px; color: var(--muted); font-size: 18px; line-height: 1.65; }

.page-hero { padding: 72px 0 28px; }
.page-title { margin: 12px 0; }

.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-top: 28px; }

.card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card h3 { margin: 12px 0 8px; font-size: 22px; }
.card p { margin: 0; color: var(--muted); line-height: 1.6; }

.icon,
.arena-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 19px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.015));
  color: var(--blue-2);
}

.arena-icon svg { width: 31px; height: 31px; stroke-width: 2; filter: drop-shadow(0 4px 12px currentColor); }
.value-card { min-height: 202px; }

.arena { position: relative; min-height: 236px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; color: inherit; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.arena:hover { transform: translateY(-5px); box-shadow: 0 26px 86px rgba(0, 110, 255, 0.22); }
.arena:focus-visible { outline: 3px solid rgba(86, 185, 255, 0.92); outline-offset: 4px; }
.arena::after { content: ""; position: absolute; inset: auto -40px -70px auto; width: 170px; height: 170px; border-radius: 50%; filter: blur(30px); opacity: 0.26; }
.arena small { position: relative; z-index: 1; text-transform: uppercase; font-size: 10px; font-weight: 950; letter-spacing: 0.14em; }
.arena small span { opacity: 0.96; }

.arena-flags { border-color: rgba(255,202,40,0.74); background: linear-gradient(160deg, rgba(70,52,3,0.92), rgba(18,19,28,0.90)); }
.arena-flags::after { background: var(--yellow); }
.arena-flags .arena-icon, .arena-flags small { color: var(--yellow); border-color: rgba(255,202,40,0.72); }

.arena-capitals { border-color: rgba(71,199,255,0.72); background: linear-gradient(160deg, rgba(1,62,92,0.90), rgba(15,27,43,0.90)); }
.arena-capitals::after { background: var(--capitals); }
.arena-capitals .arena-icon, .arena-capitals small { color: var(--capitals); border-color: rgba(71,199,255,0.72); }

.arena-history { border-color: rgba(169,135,255,0.72); background: linear-gradient(160deg, rgba(45,29,91,0.92), rgba(20,20,40,0.90)); }
.arena-history::after { background: var(--history); }
.arena-history .arena-icon, .arena-history small { color: var(--history); border-color: rgba(169,135,255,0.72); }

.arena-bible { border-color: rgba(67,225,170,0.72); background: linear-gradient(160deg, rgba(3,73,60,0.92), rgba(12,32,36,0.90)); }
.arena-bible::after { background: var(--bible); }
.arena-bible .arena-icon, .arena-bible small { color: var(--bible); border-color: rgba(67,225,170,0.72); }

.ranking-box { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.live-panel,
.rank-preview {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(11,35,70,.94), rgba(5,17,35,.94));
  padding: 24px;
  box-shadow: var(--shadow);
}

.live-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.live-panel-header h2, .live-panel-header h3 { margin: 8px 0 0; }
.live-pill { padding: 7px 11px; border-radius: 999px; background: rgba(67,225,170,.14); border: 1px solid rgba(67,225,170,.48); color: var(--bible); font-size: 11px; font-weight: 950; letter-spacing: .14em; text-transform: uppercase; }
.status-line { min-height: 22px; margin-bottom: 8px; color: var(--muted); font-size: 14px; }

.rank-row { display: flex; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.07); color: #dceaff; }
.rank-row:last-child { border-bottom: 0; }
.live-rank-row { align-items: center; }
.rank-number { color: var(--blue-2); font-weight: 950; }
.rank-player { display: flex; flex: 1; flex-direction: column; gap: 3px; }
.rank-player small { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.mobile-record { display: none; }
.rank-meta { color: var(--muted); font-size: 13px; }
.empty-state { padding: 18px 0; color: var(--muted); line-height: 1.55; }

.ranking-toolbar,
.search-toolbar { display: flex; align-items: end; gap: 14px; margin-bottom: 16px; }
.search-toolbar { margin-top: 16px; }
.search-grow { flex: 1; }
.field-label { display: block; margin-bottom: 7px; color: var(--blue-2); font-size: 11px; font-weight: 950; letter-spacing: .14em; text-transform: uppercase; }
.field-control { min-width: 170px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(2,8,22,.72); color: var(--text); font: inherit; }
.country-field.is-hidden { display: none; }
.ranking-live-panel { margin-top: 16px; }

.ranking-table { display: grid; gap: 0; }
.ranking-table-head,
.ranking-table-row { display: grid; grid-template-columns: 64px minmax(150px,1fr) 78px 78px 78px 62px 68px 62px; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.ranking-table-head { color: var(--blue-2); font-size: 11px; font-weight: 950; letter-spacing: .14em; text-transform: uppercase; }
.ranking-table-row { color: #dceaff; }

.final-section { padding-top: 30px; }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 28px; width: min(980px, 100%); margin: 0 auto; padding: 34px 38px; border: 1px solid var(--line-strong); border-radius: 34px; background: linear-gradient(135deg, rgba(12,59,123,.90), rgba(5,21,48,.96)); box-shadow: var(--shadow); }
.cta h2 { margin: 8px 0 0; font-size: clamp(34px, 4.6vw, 56px); line-height: 1.02; letter-spacing: -0.055em; }

.footer { padding: 28px 0 42px; color: var(--muted); border-top: 1px solid rgba(255,255,255,.06); }
.footer-grid { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .ranking-box { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .nav-links a:not(.btn) { display: none; }
  .ranking-table-head { display: none; }
  .ranking-table-row { grid-template-columns: 56px minmax(150px,1fr) 70px 74px; }
  .ranking-table-row span:nth-child(n+5) { display: none; }
  .mobile-record { display: inline; }
}

@media (max-width: 640px) {
  .container { width: min(var(--max), calc(100% - 24px)); }
  .hero { padding: 34px 0 52px; }
  .hero-symbol { width: 164px; height: 164px; border-radius: 38px; }
  .hero-wordmark { font-size: 34px; }
  .arena-section-title { font-size: clamp(38px, 11vw, 52px) !important; }
  .grid-4 { grid-template-columns: 1fr; }
  .cta { align-items: flex-start; flex-direction: column; padding: 28px; }
  .ranking-toolbar, .search-toolbar { align-items: stretch; flex-direction: column; }
  .field-control { width: 100%; min-width: 0; }
}
