:root {
  --bg: #F8F6F2;
  --bg-2: #FCFBF8;
  --panel: rgba(255,255,255,0.84);
  --panel-strong: rgba(255,255,255,0.92);
  --panel-tint: #F2EEE7;
  --text: #17181C;
  --muted: #6C6F76;
  --line: #E7DED1;
  --primary: #2563EB;
  --secondary: #06B6D4;
  --accent: #F97316;
  --success: #27AE60;
  --danger: #EB5757;
  --map-ocean: #DDF1FF;
  --country: #EEF1F4;
  --country-border: #9AA7B5;
  --shadow: 0 18px 44px rgba(26, 33, 46, 0.08);
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(37,99,235,0.08), transparent 18%),
    radial-gradient(circle at left center, rgba(6,182,212,0.08), transparent 20%),
    radial-gradient(circle at 75% 20%, rgba(249,115,22,0.06), transparent 14%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
body {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
}
.tr-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,0.80);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
.tr-logo {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.tr-nav-links, .tr-nav-right, .tr-cta-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.tr-nav-links a, .tr-nav-chip {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--muted);
  transition: .2s ease;
}
.tr-nav-links a.active, .tr-nav-links a:hover, .tr-nav-chip:hover {
  color: var(--text);
  background: rgba(255,255,255,0.76);
}
.tr-page { margin-top: 20px; display: grid; gap: 24px; }
.tr-hero, .tr-panel, .tr-banner-card, .tr-summary-card, .tr-mode-card, .tr-map-wrap, .tr-results-main {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.tr-hero {
  min-height: 580px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 48px;
  background: linear-gradient(135deg, rgba(255,255,255,0.86), rgba(245,241,234,0.92));
}
.tr-hero-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.curve {
  position: absolute;
  border-radius: 999px;
  filter: blur(8px);
}
.curve-a {
  width: 460px;
  height: 460px;
  right: 4%;
  top: -8%;
  background: radial-gradient(circle, rgba(37,99,235,0.18) 0%, transparent 65%);
}
.curve-b {
  width: 360px;
  height: 360px;
  left: -6%;
  bottom: -10%;
  background: radial-gradient(circle, rgba(6,182,212,0.14) 0%, transparent 65%);
}
.curve-c {
  width: 280px;
  height: 12px;
  right: 12%;
  top: 30%;
  transform: rotate(-16deg);
  background: linear-gradient(90deg, transparent, rgba(249,115,22,.75), transparent);
}
.tr-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(0,0,0,0.03) 0.8px, transparent 0.8px);
  background-size: 28px 28px;
  opacity: .18;
  pointer-events: none;
}
.tr-hero-content { position: relative; z-index: 1; max-width: 860px; }
.tr-eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--primary);
}
.tr-hero h1, .tr-page-title, .tr-game-title, .tr-results-main h1 {
  margin: 0;
  font-size: clamp(48px, 8vw, 92px);
  line-height: .94;
  letter-spacing: -.06em;
}
.tr-subtitle {
  margin: 16px 0 0;
  font-size: clamp(18px, 2.2vw, 26px);
  color: var(--muted);
}
.tr-subcopy, .tr-banner-card p, .tr-mode-card p, .tr-feature-panel p, .tr-panel p:not(.tr-eyebrow) {
  color: var(--muted);
  line-height: 1.65;
}
.tr-btn {
  min-height: 52px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  font-weight: 700;
}
.tr-btn:hover, .tr-mode-card:hover { transform: scale(1.03); }
.tr-btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 14px 28px rgba(37,99,235,.18);
}
.tr-btn-secondary {
  background: rgba(255,255,255,.88);
  color: var(--text);
  border-color: var(--line);
}
.tr-full { width: 100%; }
.tr-section, .tr-banner-row, .tr-library-section { display: grid; gap: 18px; }
.tr-section-head { display: flex; justify-content: space-between; align-items: end; }
.tr-section-head h2, .tr-library-section h2, .tr-feature-panel h2, .tr-panel h3 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.04;
  letter-spacing: -.04em;
}
.tr-card-grid { display: grid; gap: 22px; }
.tr-card-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tr-card-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tr-mode-card {
  padding: 24px;
  display: block;
  min-height: 230px;
  background: linear-gradient(180deg, rgba(255,255,255,0.90), rgba(247,243,236,0.92));
}
.tr-mode-card.live { box-shadow: 0 20px 42px rgba(37,99,235,.10); }
.tr-mode-card.muted { background: linear-gradient(180deg, rgba(255,255,255,.74), rgba(243,239,231,.86)); }
.tr-mode-card::after {
  content: '';
  position: absolute;
  right: -18px;
  bottom: -24px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,0.10), transparent 65%);
}
.tr-card-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(37,99,235,.10);
  font-size: 24px;
}
.tr-mode-card h3 {
  margin: 18px 0 10px;
  font-size: 28px;
  letter-spacing: -.03em;
}
.tr-card-tag {
  display: inline-flex;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(37,99,235,.10);
  color: var(--primary);
}
.tr-banner-card {
  padding: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.86), rgba(241,247,255,0.94));
}
.tr-stats-row, .tr-dual-row, .tr-summary-row, .tr-hub-grid, .tr-results-layout, .tr-game-layout {
  display: grid;
  gap: 22px;
}
.tr-stats-row { grid-template-columns: 1.2fr .8fr; }
.tr-summary-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tr-summary-card {
  padding: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.90), rgba(242,237,229,0.94));
}
.tr-summary-card span, .tr-mini-stats span, .tr-status-row span, .tr-score-card span, .tr-progress-line span, .tr-leader-mini span, .tr-results-main p {
  color: var(--muted);
  font-size: 13px;
}
.tr-summary-card strong, .tr-mini-stats strong, .tr-status-row strong, .tr-score-card strong, .tr-progress-line strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  font-weight: 800;
}
.tr-panel { padding: 24px; background: var(--panel-strong); }
.tr-progress-stack, .tr-status-stack, .tr-score-grid, .tr-recent-list, .tr-action-stack { display: grid; gap: 14px; }
.tr-progress-line, .tr-status-row, .tr-score-card, .tr-recent-list a, .tr-leader-mini li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.tr-progress-bar {
  height: 12px;
  border-radius: 999px;
  background: var(--panel-tint);
  overflow: hidden;
}
.tr-progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}
.tr-mini-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tr-mini-stats.vertical { grid-template-columns: 1fr; }
.tr-leader-mini { list-style: none; margin: 0; padding: 0; }
.tr-leader-mini li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.tr-leader-mini li:last-child { border-bottom: 0; }
.tr-hub-grid { grid-template-columns: 1.25fr .75fr .75fr; }
.tr-dual-row { grid-template-columns: 1fr 1fr; }
.tr-feature-panel { min-height: 320px; }
.tr-feature-panel .tr-btn { margin-top: 14px; }
.tr-game-top {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
}
.tr-game-layout { grid-template-columns: 1.1fr .46fr; }
.tr-map-wrap {
  padding: 16px;
  min-height: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.90), rgba(242,247,251,0.96));
}
#map {
  width: 100%;
  min-height: 680px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #cfe0ef;
}
.tr-game-side { display: grid; gap: 18px; }
.tr-score-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tr-score-card {
  padding: 16px;
  border-radius: 18px;
  background: var(--panel-tint);
  border: 1px solid var(--line);
}
.tr-results-layout { grid-template-columns: 1.15fr .85fr; }
.tr-results-main {
  padding: 34px;
  display: grid;
  place-items: center;
  min-height: 440px;
  text-align: center;
  background: linear-gradient(135deg, rgba(255,255,255,0.90), rgba(243,248,255,0.96));
}
.tr-results-side { display: grid; gap: 18px; }
.tr-action-stack .tr-btn { width: 100%; }
.leaflet-container {
  background: var(--map-ocean);
}
.leaflet-control-zoom a { color: var(--text); }
.leaflet-interactive {
  cursor: pointer;
  transition: all .2s ease;
}
@media (max-width: 1100px) {
  .tr-card-grid-4, .tr-card-grid-3, .tr-stats-row, .tr-hub-grid, .tr-dual-row, .tr-results-layout, .tr-game-layout {
    grid-template-columns: 1fr;
  }
  .tr-mini-stats, .tr-summary-row { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { width: min(100% - 20px, 1440px); }
  .tr-nav, .tr-banner-card, .tr-hero, .tr-game-top {
    flex-direction: column;
    align-items: stretch;
  }
  .tr-nav-links, .tr-nav-right, .tr-cta-row {
    width: 100%;
    justify-content: flex-start;
  }
  #map { min-height: 460px; }
  .tr-hero { min-height: 440px; padding: 28px; }
}
