:root {
  --bg: #050505;
  --panel: #0a0a0a;
  --panel-soft: #111111;
  --text: #f7f5f3;
  --muted: #bab7b2;
  --accent: #d8ff00;
  --accent-soft: rgba(216, 255, 0, 0.16);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  --max-width: 1360px;
  --radius: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.05), transparent 22%),
    linear-gradient(180deg, #030303 0%, #090909 100%);
}

body.setup-open {
  overflow: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  height: 10px;
  z-index: 40;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    #7a1cff 0 18%,
    #6df2da 18% 52%,
    #ff5b12 52% 100%
  );
}

body::before {
  top: 0;
}

body::after {
  bottom: 0;
  background: linear-gradient(
    90deg,
    #7da6ff 0 18%,
    #0c6f52 18% 56%,
    #d8ff00 56% 100%
  );
}

.page-shell {
  position: relative;
  padding-bottom: 36px;
  overflow-x: hidden;
}

.hero {
  position: relative;
  padding-top: 34px;
  padding-bottom: 30px;
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 40%, rgba(252, 241, 187, 0.09), transparent 18%),
    radial-gradient(circle at 10% 70%, rgba(122, 28, 255, 0.08), transparent 18%),
    radial-gradient(circle at 90% 70%, rgba(255, 91, 18, 0.08), transparent 18%);
}

.hero__content,
.content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 24px;
  box-sizing: border-box;
}

.brand h1,
.hero__copy h2,
.section-heading h3,
.panel h3,
.match-card__title {
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  line-height: 0.96;
  letter-spacing: 0.005em;
}

.eyebrow,
.panel__label,
.field__label,
.results-summary,
.match-card__stage,
.match-card__badge,
.hero__mini {
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.eyebrow,
.panel__label,
.field__label,
.results-summary,
.hero__mini {
  color: var(--muted);
  font-size: 0.68rem;
}


.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand-lockup__logo,
.setup-logo {
  display: block;
  object-fit: contain;
}

.brand-lockup__logo {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
}

.brand-lockup__copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.brand-lockup__eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.panel,
.match-card {
  background: rgba(8, 8, 8, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

.hero__actions,
.panel__actions,
.match-card__actions,
.match-card__topline,
.panel__header-row,
.control-grid,
.chip-row,
.team-cloud,
.match-card__teams {
  display: flex;
  gap: 10px;
}

.hero__actions,
.panel__actions,
.match-card__actions,
.chip-row,
.team-cloud,
.match-card__teams {
  flex-wrap: wrap;
}

.panel,
.match-card,
.empty-state {
  border-radius: var(--radius);
}
.button {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, opacity 0.18s ease, border-color 0.18s ease;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 12px 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: var(--accent);
  border-color: transparent;
  color: #050505;
}

.button--ghost,
.button--secondary {
  background: #141414;
  color: var(--text);
}

.button--link {
  background: transparent;
  border: 0;
  min-height: auto;
  padding: 0;
  border-radius: 0;
  color: var(--accent);
}

.button--small {
  min-height: 36px;
  padding: 10px 12px;
  font-size: 0.78rem;
}

.hero__panel {
  width: 100%;
}

.panel {
  padding: 22px;
  background: rgba(8, 8, 8, 0.94);
}

.panel--spotlight {
  width: 100%;
  justify-content: space-between;
  border: 1px solid rgba(246, 200, 79, 0.4);
  box-shadow: inset 0 0 0 1px rgba(246, 200, 79, 0.1), var(--shadow);
}

.panel--filters {
  margin-bottom: 14px;
}

.filters-trigger {
  width: 100%;
  justify-content: space-between;
  text-transform: none;
  letter-spacing: 0.01em;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 5px 0;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  min-height: unset;
}

.filters-trigger:hover {
  transform: none;
  color: var(--text);
}

.filters-trigger::after {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-top: -4px;
  flex-shrink: 0;
}

.filters-trigger[aria-expanded="true"]::after {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.filters-summary {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.filters-grid {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.filter-block {
  display: grid;
  gap: 12px;
}

.panel--onboarding {
  padding: 18px 20px;
}

.panel--compact {
  padding: 16px 18px;
}

.panel--export-wide {
  margin-bottom: 14px;
}

.onboarding-list {
  display: grid;
  gap: 6px;
}

.onboarding-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.onboarding-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.onboarding-item strong {
  display: block;
  margin-bottom: 2px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.onboarding-item p {
  margin: 0;
  color: #d8d3cd;
  font-size: 0.78rem;
  line-height: 1.4;
}

.onboarding-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: var(--accent);
  color: #050505;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
}

.panel__meta,
.match-card__meta,
.match-card__location {
  color: #d8d3cd;
  line-height: 1.5;
}

.panel__countdown {
  margin: 10px 0 0;
  color: var(--accent);
  font-weight: 800;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.panel__header-row,
.match-card__topline {
  justify-content: space-between;
  align-items: center;
}

.content {
  padding-top: 0;
  padding-bottom: 56px;
}

.match-list-section--primary {
  margin-top: 0;
}

.control-grid {
  align-items: stretch;
  flex-direction: column;
  margin-top: 0;
}

.control-grid > .panel {
  width: 100%;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: grid;
  gap: 8px;
}

select {
  width: 100%;
  appearance: none;
  background: #101010;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 7px 12px;
  font: inherit;
  font-size: 0.82rem;
}

.filter-chip,
.team-chip,
.team-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  background: #111111;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-chip,
.team-chip {
  padding: 8px 10px;
  cursor: pointer;
  user-select: none;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.74rem;
}

.filter-chip.is-active,
.team-chip.is-active {
  background: var(--accent-soft);
  border-color: rgba(216, 255, 0, 0.7);
}

.team-pill {
  padding: 8px 10px;
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.team-pill--fav {
  border-color: rgba(216, 255, 0, 0.7);
  background: rgba(216, 255, 0, 0.08);
}

.panel--selected {
  margin-top: 20px;
  border-color: rgba(216, 255, 0, 0.4);
}

.panel--error {
  margin: 8px 0 20px;
  border-color: rgba(255, 91, 18, 0.7);
  background: rgba(35, 10, 10, 0.94);
}

.panel--setup {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 720px;
  margin: auto;
  height: fit-content;
  min-height: 0;
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 20px 24px;
  border-color: rgba(216, 255, 0, 0.45);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.6);
}

.setup-logo {
  width: 48px;
  height: 48px;
  margin-bottom: 10px;
}

.setup-tagline {
  margin: 8px 0 4px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.setup-step-card {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.setup-step-card strong {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.setup-step-card p {
  margin: 0;
  color: #d8d3cd;
  line-height: 1.35;
  font-size: 0.78rem;
}

.setup-step-card__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: var(--accent);
  color: #050505;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1rem;
  font-weight: 800;
}

.panel--setup::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
}

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

.panel--actionbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  border-color: rgba(255, 255, 255, 0.16);
}

.panel--actionbar h3 {
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
}

.panel--modal {
  position: fixed;
  inset: 56px 24px 24px;
  z-index: 80;
  overflow: auto;
  border-color: rgba(255, 255, 255, 0.18);
}

.selection-count {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 12px;
  background: #111111;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.selection-list {
  display: grid;
  gap: 10px;
  margin: 16px 0;
  padding-bottom: 96px;
}

.selection-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 16px;
  background: #101010;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.selection-item input {
  margin-top: 2px;
}

.selection-item__text {
  line-height: 1.45;
  color: #f7f5f3;
}

.match-list-section {
  margin-top: 28px;
}

.section-heading--tight {
  margin-bottom: 12px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
}

.section-heading__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.section-heading h3 {
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  font-weight: 600;
}

.results-summary {
  font-weight: 800;
}

.section-intro {
  margin-bottom: 14px;
}

.section-intro__title,
.section-intro__meta {
  margin: 0;
}

.section-intro__title {
  margin-top: 4px;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.22rem);
  font-weight: 700;
  line-height: 1.2;
}

.section-intro__meta {
  margin-top: 4px;
  color: #d8d3cd;
  font-size: 0.88rem;
  line-height: 1.4;
}

/* ── Calendar agenda view ── */
.match-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cal-day {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.cal-day__header {
  grid-column: 1 / -1;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  padding: 6px 0 4px;
  margin-bottom: 2px;
}

/* ── Match row (agenda style) ── */
.match-card {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 2px;
  align-items: center;
  padding: 8px 10px;
  background: #0d0d0d;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
}

.match-card__meta {
  grid-column: 1;
  grid-row: 1 / 3;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
  align-self: center;
  white-space: nowrap;
}

.match-card__matchup {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.match-card__team {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.match-card__team--away {
  flex-direction: row-reverse;
  text-align: right;
}

.match-card__flag {
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}

.match-card__team-name {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-card__vs {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.1em;
  flex-shrink: 0;
}

.match-card__stage {
  grid-column: 2;
  grid-row: 2;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
}

.match-card__location {
  display: none;
}

.match-card__badge {
  display: none !important;
}

.match-card__actions {
  grid-column: 3;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-self: center;
}

.match-card__actions .button {
  min-height: 26px;
  padding: 4px 10px;
  font-size: 0.6rem;
  white-space: nowrap;
}

.field--date input[type="date"] {
  width: 100%;
  appearance: none;
  background: #101010;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 7px 12px;
  font: inherit;
  font-size: 0.82rem;
  color-scheme: dark;
}

.filter-block .panel__header-row {
  margin-bottom: 2px;
}

.team-filter-dropdown {
  position: relative;
}

.team-filter-trigger {
  width: 100%;
  justify-content: space-between;
  text-transform: none;
  letter-spacing: 0.01em;
}

.team-filter-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 20;
  padding: 12px;
  border-radius: 18px;
  background: #0d0d0d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.selected-team-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.selected-team-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(216, 255, 0, 0.12);
  color: var(--text);
  border: 1px solid rgba(216, 255, 0, 0.38);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.selected-team-chip__label {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.selected-team-chip__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.8rem;
  line-height: 1;
}

.team-filter-list {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
}

.team-filter-option {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 14px;
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.team-filter-option.is-active {
  background: var(--accent-soft);
  border-color: rgba(216, 255, 0, 0.45);
}

.team-filter-option input {
  margin-top: 2px;
}

.panel__actions--modal-footer {
  position: sticky;
  bottom: -22px;
  margin: 0 -22px -22px;
  padding: 16px 22px 22px;
  background: linear-gradient(180deg, rgba(8, 8, 8, 0.7), rgba(8, 8, 8, 0.98) 28%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.export-cta {
  min-width: 300px;
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.hidden {
  display: none !important;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 32px;
  text-align: center;
  background: #080808;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  color: var(--muted);
}

@media (min-width: 860px) {
  .control-grid {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
}

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

  .match-list--hero {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding-bottom: 124px;
  }

  .hero__content,
  .content {
    padding-inline: 16px;
  }

  .cal-day {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 20px;
  }

  .section-heading,
  .panel__header-row,
  .panel--actionbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-lockup {
    align-items: flex-start;
    gap: 12px;
  }

  .brand-lockup__logo {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
  }

  .brand-lockup__eyebrow {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
  }

  .section-heading__aside {
    width: 100%;
    align-items: flex-start;
  }

  .filters-trigger {
    align-items: flex-start;
    flex-direction: column;
  }

  .export-cta {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 70;
    min-width: 0;
    min-height: 56px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  }

  .setup-grid {
    grid-template-columns: 1fr;
  }

  .setup-step-card {
    padding: 14px;
    gap: 6px;
  }

  .setup-step-card strong {
    font-size: 0.86rem;
  }

  .setup-step-card p {
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .match-card {
    grid-template-columns: 44px 1fr;
    grid-template-rows: auto auto auto;
  }

  .match-card__meta {
    grid-column: 1;
    grid-row: 1;
    font-size: 0.85rem;
    align-self: start;
    padding-top: 2px;
  }

  .match-card__matchup {
    grid-column: 2;
    grid-row: 1;
  }

  .match-card__stage {
    grid-column: 2;
    grid-row: 2;
  }

  .match-card__actions {
    grid-column: 1 / -1;
    grid-row: 3;
    flex-direction: row;
    gap: 6px;
  }

  .match-card__actions .button {
    flex: 1;
  }

  .panel--modal {
    inset: 36px 16px 16px;
  }

  .panel--setup {
    inset: 16px;
    max-width: none;
    justify-content: flex-start;
    padding: 22px;
  }

  .setup-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 12px;
  }
}
