:root {
  --bg: #0b1633;
  --card: #132347;
  --card-2: #172b58;
  --muted: #8ca3c7;
  --accent: #f59e0b;
  --accent-strong: #ffb84d;
  --white: #ffffff;
  --border: rgba(255,255,255,0.12);
  --surface: rgba(12, 26, 57, 0.86);
  --gradient: linear-gradient(135deg, #f59e0b 0%, #ffb84d 100%);
  --radial-glow: radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background:
    var(--radial-glow),
    radial-gradient(circle at 85% -20%, rgba(245, 158, 11, 0.12), transparent 42%),
    var(--bg);
  color: var(--white);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

.sports-main {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 60px;
  display: grid;
  gap: 18px;
}

.sports-hero {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: clamp(20px, 3vw, 32px);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 24px;
  background: rgba(11, 22, 51, 0.85);
}

.sports-hero-media {
  position: absolute;
  inset: 0;
  background: var(--hero-bg, linear-gradient(135deg, rgba(9, 18, 40, 0.9), rgba(15, 36, 70, 0.7)));
  background-size: var(--hero-bg-size, cover);
  background-position: var(--hero-bg-position, center);
  background-repeat: no-repeat;
  opacity: 0.55;
  z-index: 0;
}

.sports-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(9, 18, 40, 0.95) 0%, rgba(15, 36, 70, 0.6) 100%);
  z-index: 1;
}

.sports-hero-logo-wrap {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 2;
  pointer-events: none;
}

.sports-hero-logo {
  width: min(360px, 48vw);
  max-height: 240px;
  object-fit: contain;
  opacity: 0.6;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.45));
}

.sports-hero-content,
.sports-hero-card {
  position: relative;
  z-index: 3;
}

.sports-kicker {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--muted);
  font-weight: 700;
}

.sports-hero-title {
  font-size: clamp(30px, 4vw, 52px);
  margin: 10px 0 8px;
}

.sports-hero-subtitle {
  color: #cfe3ff;
  max-width: 560px;
  line-height: 1.5;
  margin: 0;
}

.sports-hero-meta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sports-hero-pill {
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(15, 30, 60, 0.65);
}

.sports-hero-card {
  background: rgba(12, 25, 50, 0.85);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: center;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
}

.sports-hero-card.is-empty {
  opacity: 0.65;
}

.sports-hero-card-media {
  width: 78px;
  height: 78px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.sports-hero-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sports-hero-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sports-hero-card-title {
  font-size: 20px;
  font-weight: 700;
}

.sports-hero-card-meta {
  color: var(--muted);
  font-size: 12px;
}

.sports-hero-card-stadium {
  color: #b8cdf1;
  font-size: 12px;
}

.sports-hero-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sports-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--card);
  color: var(--white);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.sports-btn.primary {
  background: var(--gradient);
  border: none;
  color: #05223a;
}

.sports-btn.saved {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.6);
  color: #fde68a;
}

.sports-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.sports-search {
  background: rgba(19, 35, 71, 0.88);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.sports-search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
}

.sports-search-bar input {
  flex: 1 1 240px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0f1f40;
  color: var(--white);
  padding: 0 14px;
  outline: none;
}

.sports-search-bar input:focus {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

.sports-search-bar button {
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--white);
  padding: 0 16px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sports-search-suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #0f2147;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 10;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
}

.sports-search-suggest.show {
  display: flex;
}

.sports-suggest-item {
  border: 1px solid transparent;
  background: rgba(15, 30, 60, 0.7);
  color: var(--white);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
}

.sports-suggest-item:hover {
  border-color: rgba(245, 158, 11, 0.6);
  background: rgba(245, 158, 11, 0.12);
}

.sports-suggest-item .suggest-name {
  font-weight: 600;
}

.sports-suggest-item .suggest-meta {
  color: var(--muted);
  font-size: 12px;
}

.sports-search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sports-search-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.sports-search-filters label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  min-width: 160px;
}

.sports-search-filters select {
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0f1f40;
  color: var(--white);
  padding: 0 12px;
  font-size: 13px;
  outline: none;
}

.sports-search-filters select:focus {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

@media (max-width: 768px) {
  .sports-search-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .sports-search-filters label {
    width: 100%;
    min-width: 0;
  }
}

.sports-search-tag {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(15, 30, 60, 0.65);
  cursor: pointer;
}

.sports-results {
  background: rgba(19, 35, 71, 0.9);
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
}

.sports-results-head {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.sports-results-head h2 {
  margin: 0 0 4px;
  font-size: 22px;
}

.sports-results-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.sports-grid {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 260px));
  gap: 14px;
  justify-content: start;
}

.sports-card {
  background: #0f2147;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: visible;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.sports-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.6);
}

.sports-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  background: #0b1c35;
  overflow: hidden;
  border-radius: 18px 18px 14px 14px;
}

.sports-card-media.is-loading,
.sports-card-logo.is-loading {
  position: relative;
  overflow: hidden;
}

.sports-card-media.is-loading::before,
.sports-card-logo.is-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.12) 48%, rgba(255,255,255,0.02) 100%),
    linear-gradient(160deg, rgba(23,43,88,0.96), rgba(11,22,51,0.98));
  background-size: 220px 100%, 100% 100%;
  background-repeat: no-repeat;
  animation: sportsImageShimmer 1.15s linear infinite;
  z-index: 0;
  pointer-events: none;
}

.sports-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
  opacity: 0;
  filter: blur(10px);
  transition: opacity 220ms ease, filter 220ms ease;
}

.sports-card-media img[data-ready="1"],
.sports-card-logo img[data-ready="1"] {
  opacity: 1;
  filter: blur(0);
}

.sports-card[data-media-fit="contain"] .sports-card-media img {
  object-fit: contain;
  background: #0b1633;
  padding: 16px;
}

.sports-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 22, 51, 0.05) 0%, rgba(11, 22, 51, 0.7) 100%);
}

.sports-card-logo {
  position: absolute;
  bottom: 12px;
  left: 12px;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #0b1633;
  border: 1px solid var(--border);
  padding: 8px;
  z-index: 2;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.25);
}

.sports-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

@keyframes sportsImageShimmer {
  from { background-position: -220px 0, 0 0; }
  to { background-position: calc(100% + 220px) 0, 0 0; }
}

.sports-card-body {
  padding: 32px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.sports-card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.sports-card-meta {
  color: var(--muted);
  font-size: 12px;
}

.sports-card-stadium {
  color: #abc5e8;
  font-size: 12px;
  margin-top: auto;
}

.sports-card-actions {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  position: relative;
  z-index: 2;
}

.card-menu-btn {
  border: 1px solid var(--border);
  background: rgba(15, 30, 60, 0.65);
  color: var(--white);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.card-menu-btn:hover {
  border-color: rgba(245, 158, 11, 0.6);
  color: #fde68a;
  transform: translateY(-1px);
}

.sports-card.is-active {
  border-color: rgba(245, 158, 11, 0.9);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.35), 0 12px 26px rgba(0, 0, 0, 0.35);
}

.sports-empty,
.sports-loading {
  padding: 32px 16px 40px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  display: none;
}

.sports-empty.visible,
.sports-loading.visible {
  display: block;
}

.sports-toast {
  position: fixed;
  right: 20px;
  bottom: 24px;
  background: rgba(12, 25, 50, 0.95);
  border: 1px solid var(--border);
  color: var(--white);
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  display: none;
  z-index: 2000;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.sports-toast.show {
  display: block;
}

.sports-toast.error {
  border-color: rgba(248, 113, 113, 0.6);
  color: #fecaca;
}

@media (max-width: 900px) {
  .sports-hero {
    grid-template-columns: 1fr;
  }

  .sports-hero-card {
    justify-content: flex-start;
  }

  .sports-hero-logo {
    width: min(300px, 70vw);
    max-height: 200px;
    opacity: 0.5;
  }

  .sports-card-logo {
    bottom: 10px;
  }
}

@media (max-width: 600px) {
  .sports-main {
    width: min(100%, calc(100% - 24px));
    padding-bottom: 80px;
  }

  .sports-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 12px 0 0;
  }

  .sports-card {
    min-height: 0;
  }

  .sports-card-media {
    aspect-ratio: 1 / 1.04;
  }

  .sports-card[data-media-fit="contain"] .sports-card-media img {
    padding: 12px;
  }

  .sports-card-logo {
    width: 52px;
    height: 52px;
    left: 10px;
    bottom: 10px;
    padding: 7px;
    border-radius: 14px;
  }

  .sports-card-body {
    padding: 26px 12px 12px;
    gap: 5px;
  }

  .sports-card-title {
    font-size: 14px;
  }

  .sports-card-meta,
  .sports-card-stadium {
    font-size: 11px;
  }

  .sports-card-actions {
    margin-top: 6px;
  }

  .card-menu-btn {
    width: 32px;
    height: 32px;
  }

  .sports-toast {
    left: 16px;
    right: 16px;
  }
}
