/* Leagues website — shared design system.
   Tier colors are reused verbatim from core-api's ProgressionTier (single source of truth in
   the plugin) — keep these hex values in sync if that enum's colors ever change. */

:root {
  --bg: #0d0f13;
  --surface: #161a21;
  --surface-raised: #1e232c;
  --border: #2a303b;
  --text: #e8e6e3;
  --text-muted: #9aa3b1;
  --accent: #7dd3fc;

  --tier-bronze: #cd7f32;
  --tier-iron: #c0c0c0;
  --tier-gold: #ffd700;
  --tier-diamond: #4aedd9;
  --tier-netherite: #4a4e4d;

  --ok: #4ade80;
  --bad: #f87171;

  --tile-bg: #1c2b40;
  --tile-border: #3a5578;
  --tile-bg-hover: #223554;

  --radius: 10px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header nav {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
}

.site-header .brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  margin-right: auto;
}

.site-header .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-header .nav-links a {
  color: var(--text-muted);
  font-weight: 500;
}

.site-header .nav-links a.active,
.site-header .nav-links a:hover {
  color: var(--text);
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

h1 {
  font-size: 1.75rem;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
}

.page-subtitle {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid currentColor;
}

.tier-bronze { color: var(--tier-bronze); }
.tier-iron { color: var(--tier-iron); }
.tier-gold { color: var(--tier-gold); }
.tier-diamond { color: var(--tier-diamond); }
.tier-netherite { color: var(--tier-netherite); }

/* Relics page: centered per-tier sections, relics shown as prominent cards first, default
   stat bonuses as smaller pill chips below. */

.relic-tier {
  text-align: center;
  margin-bottom: 3rem;
}

.relic-tier-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
}

.relic-tier-header .tier-icon {
  width: 56px;
  height: 56px;
  font-size: 1.5rem;
}

.relic-tier-header h2 {
  margin: 0;
}

.relic-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.relic-card {
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  width: 240px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.relic-card:hover {
  background: var(--tile-bg-hover);
  transform: translateY(-2px);
}

.relic-card strong {
  display: block;
  font-size: 1.05rem;
  margin-top: 0.25rem;
}

.relic-item-badge {
  display: inline-block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}

.relic-description {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
}

.section-divider-label {
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.perk-mini-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.perk-mini-card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.78rem;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.perk-mini-card strong {
  font-size: 0.78rem;
}

.perk-mini-description {
  color: var(--text-muted);
}

/* Collapsible tier sections (Tasks page) */

.tier-section-collapsible {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 1rem;
}

.tier-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: none;
  border: none;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.tier-header:hover {
  background: var(--surface-raised);
}

/* Medallion-style tier icon: a colored ring with a background-colored gap between the glyph
   and the outer ring, so it reads as a coin/badge rather than a flat circle. */
.tier-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid currentColor;
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: var(--bg);
}

.tier-header-text {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.tier-header-text strong {
  font-size: 1.05rem;
}

.tier-chevron {
  flex: 0 0 auto;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.tier-section-collapsible.expanded .tier-chevron {
  transform: rotate(180deg);
}

.tier-tasks-panel {
  display: none;
  padding: 0 1.25rem 1.25rem;
}

.tier-section-collapsible.expanded .tier-tasks-panel {
  display: block;
}

.task-tile {
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  border-radius: var(--radius);
  padding: 1rem;
  transition: background 0.15s ease;
}

.task-tile:hover {
  background: var(--tile-bg-hover);
}

.task-tile-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}

.task-points {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  white-space: nowrap;
}

.task-category {
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0.4rem 0 0;
}

.task-description {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--text);
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
}

.stat-tile {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  min-width: 140px;
}

.stat-tile .label {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-tile .value {
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 0.15rem;
}

.progress-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-bar .fill {
  height: 100%;
  background: var(--accent);
}

.status-ok { color: var(--ok); }
.status-bad { color: var(--bad); }

.list-plain {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-plain li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.list-plain li:last-child {
  border-bottom: none;
}

.empty-state {
  color: var(--text-muted);
  font-style: italic;
}

.map-frame-wrapper {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--surface);
}

.map-frame-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.map-offline {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--surface);
  color: var(--text-muted);
  text-align: center;
  padding: 1rem;
}

.roadmap-stage {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.roadmap-marker {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 0.4rem;
  background: var(--accent);
}

.roadmap-marker.done { background: var(--ok); }

.roadmap-body h3 {
  margin: 0 0 0.25rem;
}

.roadmap-status {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
