@import url("https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Manrope:wght@300;400;600;700&display=swap");

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-2: #ffffff;
  --card: #ffffff;
  --ink: #0b2b3a;
  --muted: #22577a;
  --accent: #38a3a5;
  --accent-2: #57cc99;
  --border: rgba(34, 87, 122, 0.2);
  --shadow: 0 20px 40px rgba(34, 87, 122, 0.12);
  --sport-indicator-filter: brightness(0) saturate(100%) opacity(0.88);
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1a24;
  --bg-2: #15283a;
  --card: #182b3d;
  --ink: #e8f2f8;
  --muted: #9dc3d8;
  --accent: #73d2c6;
  --accent-2: #7ee6b2;
  --border: rgba(157, 195, 216, 0.3);
  --shadow: 0 20px 40px rgba(5, 10, 16, 0.4);
  --sport-indicator-filter: brightness(0) saturate(100%) invert(1) opacity(0.88);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, var(--bg-2), var(--bg));
  color: var(--ink);
  min-height: 100vh;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.site-header {
  position: relative;
  margin-top: 10px;
  padding: 18px 18px 14px;
  border-radius: 18px;
  background: linear-gradient(
    135deg,
    rgba(56, 163, 165, 0.14),
    rgba(87, 204, 153, 0.08)
  );
  border: 1px solid rgba(34, 87, 122, 0.18);
}

.site-header-row {
  display: block;
}

.site-header-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
}

.site-header-main {
  padding-right: 56px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-kicker {
  margin: 0 0 6px;
  font-size: 0.82rem;
  color: var(--muted);
}

.site-kicker a {
  text-decoration: none;
}

.site-kicker a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-header h1 {
  margin: 0;
  font-family: "DM Serif Display", ui-serif, Georgia, serif;
  font-size: clamp(1.7rem, 2.6vw, 2.4rem);
  letter-spacing: 0.01em;
}

.site-header p {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 70ch;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink);
  box-shadow: none;
  padding: 8px 12px;
  font-size: 0.85rem;
}

:root {
  --theme-toggle-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1 1 11.21 3a7 7 0 1 0 9.79 9.79z"/></svg>');
}

:root[data-theme="dark"] {
  --theme-toggle-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="4"/><path d="M12 2v2"/><path d="M12 20v2"/><path d="M4.93 4.93l1.41 1.41"/><path d="M17.66 17.66l1.41 1.41"/><path d="M2 12h2"/><path d="M20 12h2"/><path d="M6.34 17.66l-1.41 1.41"/><path d="M19.07 4.93l-1.41 1.41"/></svg>');
}

.theme-toggle.icon-only {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle.icon-only::before {
  content: "";
  width: 18px;
  height: 18px;
  background: var(--ink);
  -webkit-mask: var(--theme-toggle-icon) no-repeat center / contain;
  mask: var(--theme-toggle-icon) no-repeat center / contain;
}

.theme-toggle:hover {
  background: rgba(56, 163, 165, 0.1);
  transform: none;
  box-shadow: none;
}

.controls {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--border);
}

.control {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.control label {
  font-size: 0.85rem;
  color: var(--muted);
}

.control .control-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.control-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}

input[type="search"] {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  min-height: 32px;
  font-size: 16px;
  flex: 1 1 140px;
  width: 100%;
  outline: none;
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  min-height: 30px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 0.79rem;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pill.is-active {
  background: rgba(47, 111, 109, 0.12);
  border-color: rgba(47, 111, 109, 0.45);
  color: var(--accent);
  font-weight: 600;
}

.multi-select {
  position: relative;
  width: 100%;
}

.multi-select-box {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  width: 100%;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
}

.multi-select-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(56, 163, 165, 0.15);
}

.token-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.token-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(56, 163, 165, 0.12);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
}

.token-pill button {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.options {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 200px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  padding: 6px;
  z-index: 20;
  box-shadow: 0 10px 20px rgba(34, 87, 122, 0.12);
}

.options.is-open {
  display: grid;
  gap: 4px;
}

.option-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--card);
  font-size: 0.85rem;
  cursor: pointer;
}

.option-item:hover {
  background: rgba(56, 163, 165, 0.08);
  border-color: rgba(56, 163, 165, 0.2);
}

.option-item.is-selected {
  background: rgba(56, 163, 165, 0.14);
  border-color: rgba(56, 163, 165, 0.3);
  color: var(--accent);
  font-weight: 600;
}

.advanced {
  border: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
  grid-column: 1 / -1;
}

.advanced summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
  list-style: none;
  text-decoration: underline;
  text-decoration-color: rgba(56, 163, 165, 0.35);
  text-underline-offset: 3px;
}

.advanced summary:hover {
  color: var(--accent);
  text-decoration-color: rgba(56, 163, 165, 0.6);
}

.advanced[open] summary {
  margin-bottom: 12px;
}

.advanced summary::-webkit-details-marker {
  display: none;
}

.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: rgba(56, 163, 165, 0.18);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  padding: 0 4px;
  text-decoration: none;
}

.advanced-panel {
  display: grid;
  gap: 18px;
}

.advanced .control {
  margin: 0;
}

.advanced .control + .control {
  margin-top: 18px;
}

@media (min-width: 760px) {
  .controls {
    grid-template-columns: minmax(360px, 2fr) minmax(260px, 1.2fr) minmax(260px, 1.2fr);
    align-items: start;
  }

  .control-sports {
    min-width: 0;
  }

  .control-country {
    min-width: 0;
  }

  .advanced {
    justify-self: stretch;
    width: 100%;
  }

  .advanced-panel {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 18px;
  }

  .advanced .control + .control {
    margin-top: 0;
  }
}

@media (max-width: 620px) {
  .control-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .control-sports .pill-group {
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 8px;
    padding-bottom: 0;
  }

  .control-sports .pill {
    padding: 6px 12px;
    min-height: 34px;
    font-size: 0.82rem;
  }
}

.buttons {
  align-content: end;
  gap: 10px;
}

button {
  padding: 10px 14px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 20px rgba(47, 111, 109, 0.2);
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(47, 111, 109, 0.25);
}

button.ghost {
  background: var(--card);
  color: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: none;
}


.status {
  margin-top: 20px;
  color: var(--muted);
  min-height: 24px;
}

.date-banner {
  margin-top: 10px;
  min-height: 42px;
  padding: 6px 0;
  border-radius: 0;
  background: transparent;
  border: none;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 12px;
  z-index: 10;
  box-shadow: none;
}

.date-banner-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.date-banner-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.date-nav-today.is-reserved-hidden {
  visibility: hidden;
  pointer-events: none;
}

.date-banner button {
  box-shadow: none;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.date-banner button:hover {
  transform: none;
  box-shadow: none;
}

.date-label {
  margin: 0;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 4px 6px;
  border-radius: 7px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(56, 163, 165, 0.06);
}

.view-toggle-button {
  min-width: 52px;
  height: 28px;
  padding: 0 10px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.view-toggle-button.is-active {
  background: var(--card);
  color: var(--accent);
  border: 1px solid rgba(47, 111, 109, 0.24);
}

.view-toggle-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.subtle-toggle {
  height: 30px;
  padding: 0 10px;
  font-size: 0.78rem;
  line-height: 1;
}

.subtle-toggle:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.date-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  color: var(--accent);
  border: 1px solid transparent;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  font-size: 0.96rem;
  line-height: 1;
  box-shadow: none;
}

.date-nav:hover {
  background: rgba(56, 163, 165, 0.12);
  border-color: rgba(34, 87, 122, 0.18);
}

.date-nav-today {
  width: auto;
  min-width: 0;
  height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid rgba(34, 87, 122, 0.18);
  background: transparent;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
}

.date-nav-today:hover {
  background: rgba(56, 163, 165, 0.08);
  color: var(--accent);
}

.matches {
  margin-top: 10px;
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
}

.match-day-group {
  display: grid;
}

.match-day-group + .match-day-group {
  border-top: 1px solid var(--border);
}

.match-day-heading {
  margin: 0;
  padding: 12px 16px 10px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(56, 163, 165, 0.05);
  border-bottom: 1px solid var(--border);
}

.empty-state {
  padding: 18px 16px;
}

.empty-state h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.empty-state p {
  margin: 8px 0 0;
  color: var(--muted);
}

.empty-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.empty-link {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}

.empty-link:hover {
  color: var(--accent);
  border-color: rgba(56, 163, 165, 0.35);
  background: rgba(56, 163, 165, 0.08);
}

.match-card {
  position: relative;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  display: grid;
  grid-template-columns: 24px 80px minmax(220px, 1.4fr) minmax(180px, 1fr) minmax(220px, 1fr);
  align-items: center;
  column-gap: 16px;
  font-size: 0.95rem;
}

.match-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
  z-index: 1;
}

.match-sport {
  width: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.match-card.is-finished {
  opacity: 0.58;
  filter: grayscale(0.2);
}

.match-card.is-collapsed {
  display: none;
}

.match-card.is-ongoing {
  box-shadow: inset 3px 0 0 rgba(115, 210, 198, 0.75);
}

.match-card:last-child {
  border-bottom: none;
}

.match-time {
  display: block;
  margin: 0;
  font-weight: 600;
  color: var(--accent);
}

.match-title {
  margin: 0;
  font-size: inherit;
  font-weight: 700;
}

.match-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
}

.sport-indicator {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
  filter: var(--sport-indicator-filter);
}

.channels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow: hidden;
}

.channel-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(214, 127, 66, 0.15);
  color: #8c4b20;
  font-size: 0.8rem;
  white-space: nowrap;
}


.site-footer {
  margin-top: 18px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
}

:root[data-theme="dark"] .site-footer {
  background: rgba(24, 43, 61, 0.65);
}

.footer-links {
  position: static;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 12px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 2px;
}

.footer-meta {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.footer-more-links {
  margin-top: 12px;
  display: grid;
  gap: 12px;
  max-height: 320px;
  overflow: auto;
  padding: 4px 2px 2px;
}

.footer-link-group {
  display: grid;
  gap: 8px;
}

.footer-link-heading {
  margin: 0;
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.footer-link-items {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.footer-link-items a {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  border-bottom: 1px solid transparent;
}

@media (min-width: 760px) {
  .footer-link-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 14px;
  }
}

.footer-link-items a:hover {
  color: var(--accent);
  border-bottom-color: rgba(56, 163, 165, 0.45);
}

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

.page-card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 10px 22px rgba(34, 87, 122, 0.08);
}

.page-card h2 {
  margin: 0;
  font-size: 1.05rem;
}

.page-card h3 {
  margin: 14px 0 0;
  font-size: 0.96rem;
}

.page-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.seo-top-nav {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.seo-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(56, 163, 165, 0.08);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
}

.seo-nav-link:hover {
  background: rgba(56, 163, 165, 0.14);
  border-color: rgba(56, 163, 165, 0.3);
  color: var(--accent);
}

.seo-home-hub,
.seo-content {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.seo-section-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.seo-copy-card h2 {
  margin: 0;
  font-size: 1.04rem;
}

.seo-copy-card p + p {
  margin-top: 12px;
}

.seo-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.seo-list li + li {
  margin-top: 8px;
}

.seo-link-grid {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.seo-grid-link {
  display: block;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(56, 163, 165, 0.05);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.seo-grid-link:hover {
  background: rgba(56, 163, 165, 0.1);
  border-color: rgba(56, 163, 165, 0.32);
  color: var(--accent);
}

.seo-preview-intro {
  margin-top: 10px;
}

.seo-empty-copy {
  margin: 12px 0 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  .date-banner {
    align-items: center;
    gap: 10px;
  }

  .date-banner-main {
    flex: 1;
    min-width: 0;
  }

  .date-label {
    flex: 1;
    text-align: center;
  }

  .date-banner-actions {
    justify-content: flex-end;
  }

  .match-card {
    grid-template-columns: 1fr;
    row-gap: 8px;
    align-items: start;
    text-align: left;
  }

  .match-time,
  .match-title,
  .match-meta,
  .match-sport,
  .channels {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .seo-section-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .date-banner {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .date-banner-main {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }

  .date-banner-actions {
    width: 100%;
    justify-content: space-between;
  }
}
