@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  line-height: 1.5;
  background-color: #0b0f16;
  color: #e9edf5;
  --bg: #0b0f16;
  --panel: #121826;
  --panel-strong: #182133;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e9edf5;
  --muted: #9aa4b2;
  --accent: #8ee6ff;
  --accent-strong: #5ad0f5;
  --accent-2: #d8a7ff;
  --accent-3: #fdd28e;
  --success: #a5f4c5;
  --warning: #f5c380;
  --danger: #ff9db0;
  --shadow: 0 18px 45px rgba(6, 10, 20, 0.55);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 800px at 20% 10%, rgba(142, 230, 255, 0.12) 0%, transparent 60%),
    radial-gradient(900px 700px at 80% 0%, rgba(216, 167, 255, 0.14) 0%, transparent 60%),
    linear-gradient(160deg, #0b0f16 0%, #0f1624 35%, #0a111d 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 70% 70%, rgba(253, 210, 142, 0.12), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.site-header {
  background: rgba(12, 16, 26, 0.38);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  animation: header-in 0.8s ease-out both;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.title-block {
  max-width: 520px;
}

.site-title {
  margin: 0.15rem 0;
  font-family: "Bebas Neue", "Space Grotesk", sans-serif;
  font-size: clamp(2.6rem, 4vw, 3.6rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.subtitle {
  margin: 0;
  color: var(--muted);
}

.header-tabs {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.25rem 1.2rem;
  max-width: 1320px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.tab-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(18, 24, 38, 0.65);
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(6, 10, 20, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.tab-link:hover {
  transform: translateY(-1px);
  color: var(--text);
  background: rgba(24, 33, 51, 0.85);
  border-color: rgba(142, 230, 255, 0.35);
}

.tab-link.is-active {
  background: linear-gradient(135deg, rgba(142, 230, 255, 0.35), rgba(216, 167, 255, 0.3));
  border-color: rgba(142, 230, 255, 0.65);
  color: #0b0f16;
  box-shadow: 0 12px 26px rgba(6, 10, 20, 0.45), 0 0 0 1px rgba(142, 230, 255, 0.3) inset;
  transform: translateY(-1px);
}

.tab-link:focus-visible {
  outline: 2px solid rgba(142, 230, 255, 0.7);
  outline-offset: 2px;
}

.eyebrow {
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--accent);
}

.server-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.club-side {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.club-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.club-icon {
  width: 88px;
  height: 88px;
  border-radius: 8px;
  border: 1px solid rgba(142, 230, 255, 0.35);
  background: radial-gradient(circle at 30% 20%, rgba(142, 230, 255, 0.25), transparent 60%),
    linear-gradient(160deg, rgba(18, 24, 38, 0.95) 0%, rgba(30, 42, 62, 0.95) 100%);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(6, 10, 20, 0.45);
}

.club-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.club-icon-fallback {
  font-family: "Bebas Neue", "Space Grotesk", sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
}

.site-title .tm-name,
.subtitle .tm-name {
  font-family: inherit;
  letter-spacing: inherit;
}

main.container {
  padding-top: 2.5rem;
  padding-bottom: 3.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.dashboard {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  min-height: 0;
}

.panel {
  background: linear-gradient(160deg, rgba(18, 24, 38, 0.95) 0%, rgba(15, 22, 34, 0.92) 100%);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}

.actions-grid {
  display: grid;
  gap: 1rem;
}

.action-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.2rem 1.4rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 28, 42, 0.78);
}

.action-card--placeholder {
  border-style: dashed;
  background: rgba(15, 22, 34, 0.55);
}

.action-text h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.action-text p {
  margin: 0;
}

.action-controls {
  display: grid;
  gap: 0.5rem;
  justify-items: end;
}

.action-button {
  border: 1px solid rgba(142, 230, 255, 0.6);
  background: linear-gradient(135deg, rgba(142, 230, 255, 0.25), rgba(216, 167, 255, 0.25));
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.action-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(6, 10, 20, 0.35);
}

.action-button:disabled,
.action-button.is-disabled,
.action-button.is-loading {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.action-status {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.panel-header h2 {
  margin: 0 0 0.25rem;
  font-size: 1.6rem;
}

.panel-header p {
  margin: 0;
}

.map-filters {
  display: flex;
  flex-direction: row;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.filter-chip {
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(24, 33, 51, 0.6);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.filter-group + .filter-group {
  padding-left: 0.5rem;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.filter-chip:hover {
  color: var(--text);
  border-color: rgba(142, 230, 255, 0.4);
  background: rgba(30, 42, 62, 0.8);
  transform: translateY(-1px);
}

.filter-chip.is-active {
  color: #0b0f16;
  border-color: rgba(142, 230, 255, 0.7);
  background: linear-gradient(135deg, rgba(142, 230, 255, 0.45), rgba(216, 167, 255, 0.4));
  box-shadow: 0 8px 18px rgba(6, 10, 20, 0.35), 0 0 0 1px rgba(142, 230, 255, 0.25) inset;
}

.coming-soon {
  text-align: center;
  align-items: center;
  justify-content: center;
  min-height: clamp(240px, 40vh, 420px);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.coming-soon h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.coming-soon .muted {
  max-width: 420px;
}

.panel-footer {
  margin-top: 1.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.map-list,
.active-map {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.map-list {
  width: min(840px, 100%);
  height: clamp(360px, 62vh, 720px);
  padding: 1.2rem;
  overflow: hidden;
  min-height: 0;
}

.map-list .panel-header {
  margin-bottom: 1rem;
}

.map-list h2 {
  text-transform: capitalize;
}

.map-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  padding-right: 0.35rem;
  margin-right: -0.35rem;
}

.map-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(24, 33, 51, 0.72);
}

.map-item.is-active {
  border-color: rgba(142, 230, 255, 0.5);
  box-shadow: 0 0 0 1px rgba(142, 230, 255, 0.2), 0 12px 24px rgba(10, 18, 34, 0.55);
  background: linear-gradient(145deg, rgba(34, 52, 74, 0.88), rgba(24, 33, 51, 0.8));
}

.map-meta {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.map-name {
  font-weight: 600;
  display: block;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-author {
  color: var(--muted);
  font-size: 0.78rem;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-stats {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.map-stats > * {
  flex: 0 0 auto;
}

.map-list .badge,
.map-list .status {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  text-align: center;
}

.map-list .badge {
  min-width: 15ch;
}

.map-list .status {
  min-width: 7.2rem;
}

.map-list .panel-footer,
.active-map .panel-footer {
  margin-top: auto;
}

.badge {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid transparent;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.badge-wr {
  background: rgba(142, 230, 255, 0.18);
  border-color: rgba(142, 230, 255, 0.35);
  color: var(--accent);
}

.badge-at {
  background: rgba(165, 244, 197, 0.18);
  border-color: rgba(165, 244, 197, 0.35);
  color: var(--success);
}

.badge-muted {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.status {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.06);
}

.status-live {
  color: var(--success);
  border: 1px solid rgba(165, 244, 197, 0.35);
  background: rgba(165, 244, 197, 0.12);
}

.status-beaten {
  color: var(--success);
  background: rgba(165, 244, 197, 0.12);
}

.status-unbeaten {
  color: var(--warning);
  background: rgba(245, 195, 128, 0.16);
}

.pill {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.pill-live {
  background: rgba(90, 208, 245, 0.2);
  color: var(--accent);
}

.pill-accent {
  background: rgba(216, 167, 255, 0.2);
  color: var(--accent-2);
}

.pill-soft {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.pill-outline {
  border: 1px solid rgba(142, 230, 255, 0.35);
  color: var(--accent);
  background: rgba(142, 230, 255, 0.08);
}

.active-map .panel-header {
  align-items: center;
}

.stats-inline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.active-body {
  display: grid;
  gap: 1.6rem;
}

.map-hero {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 1.2fr);
  gap: 1.5rem;
  align-items: center;
}

.thumb {
  position: relative;
  height: 220px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(140deg, rgba(90, 208, 245, 0.3), transparent 60%),
    linear-gradient(220deg, rgba(216, 167, 255, 0.3), transparent 55%),
    linear-gradient(160deg, #1a2433 0%, #2a3a52 100%);
  overflow: hidden;
}

.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(11, 15, 22, 0.75) 100%);
}

.thumb-label {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 1;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-3);
}

.map-summary p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.chip {
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.stat-card {
  padding: 1rem 1.2rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 28, 42, 0.88);
}

.stat-label {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
}

.stat-value {
  margin: 0.35rem 0 0.25rem;
  font-size: 1.6rem;
  font-weight: 600;
}

.stat-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.next-map {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.muted {
  color: var(--muted);
}

.stagger-item {
  opacity: 0;
  transform: translateY(14px);
  animation: reveal 0.7s ease-out forwards;
  animation-delay: var(--delay, 0s);
}

.tm-name {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  letter-spacing: 0.2px;
}

.tm-shadow {  
  text-shadow: 0 1px 0 rgba(0,0,0,0.55);
}


@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes header-in {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .dashboard {
    grid-template-columns: 1fr;
  }

  .map-hero {
    grid-template-columns: 1fr;
  }

  .panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .map-filters {
    align-items: flex-start;
  }

  .stats-inline {
    justify-content: flex-start;
  }

  .action-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .action-controls {
    justify-items: start;
  }

  .club-side,
  .club-meta {
    justify-content: flex-start;
  }

  .club-icon {
    width: 154px;
    height: 69px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 1.5rem 1.1rem;
  }

  .site-header {
    text-align: left;
  }

  .panel {
    padding: 1.2rem;
  }

  .club-side {
    width: 100%;
    justify-content: space-between;
  }

  .header-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;    
  }

  .tab-link {
    padding: 0.45rem 0.9rem;
  }

  .map-item {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .map-stats {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .map-list .badge,
  .map-list .status {
    min-width: 0;
  }
}

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