/* ========================================
   Navigation
======================================== */
.nav-top {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: 22px;
  padding: 18px 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    rgba(2, 9, 20, 0.92);
  border-bottom: 1px solid var(--line-strong);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
}

.logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 66px;
  height: 66px;
  padding: 4px;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.logo-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(20, 190, 235, 0.28);
}

.logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.nav-tabs-shell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.nav-tabs a {
  padding: 10px 18px;
  border-radius: 999px;
  color: var(--text-soft);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.4vw, 1.55rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-tabs a:hover {
  color: var(--text);
  background: rgba(20, 190, 235, 0.12);
  box-shadow: inset 0 0 0 1px rgba(20, 190, 235, 0.2);
  transform: translateY(-1px);
}

/* ========================================
   Footer
======================================== */
.site-footer {
  margin-top: 72px;
  padding: 36px 24px 24px;
  background:
    linear-gradient(180deg, rgba(20, 190, 235, 0.06), transparent 38%),
    rgba(2, 9, 20, 0.92);
  border-top: 1px solid var(--line);
}

.footer-horizontal {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}

.footer-logo img {
  height: 34px;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px 20px;
  flex: 1;
}

.footer-links a,
.footer-creator,
.footer-copyright {
  color: var(--text-muted);
}

.footer-links a,
.footer-creator a {
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-creator a:hover {
  color: var(--accent-2);
}

.footer-creator a {
  color: var(--gold-soft);
}

.footer-copyright {
  width: min(var(--container), calc(100% - 32px));
  margin: 20px auto 0;
  padding-top: 18px;
  text-align: center;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

/* ========================================
   Shared Headings and Buttons
======================================== */
.section-title {
  color: var(--text);
  margin-bottom: 0.35rem;
}

.subtitle {
  margin-top: 10px;
  color: var(--gold-soft);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
}

.button,
.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid rgba(20, 190, 235, 0.26);
  background: linear-gradient(135deg, rgba(20, 190, 235, 0.18), rgba(20, 190, 235, 0.08));
  color: var(--text);
  padding: 0.85rem 1.2rem;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.button:hover,
.back-button:hover {
  transform: translateY(-2px);
  border-color: rgba(20, 190, 235, 0.45);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

/* ========================================
   Shared Fixture Cards
======================================== */
.match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}

.match-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 126px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 245, 252, 0.98));
  color: var(--text-dark);
  border: 1px solid rgba(9, 17, 30, 0.08);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
  overflow: hidden;
}

.match-box::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, var(--accent), var(--gold));
}

.match-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.24);
  border-color: rgba(20, 190, 235, 0.22);
}

.match-info-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.team-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.match-box .team-name {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score {
  min-width: 28px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--surface-2);
}

.vertical-line {
  width: 1px;
  align-self: stretch;
  background: linear-gradient(180deg, transparent, rgba(9, 17, 30, 0.18), transparent);
}

.match-info-right {
  min-width: 110px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  color: #4d617e;
  font-size: 0.88rem;
  font-weight: 600;
}

/* ========================================
   Modal and Match Detail
======================================== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  padding: 28px 18px;
  background: rgba(2, 9, 20, 0.72);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 26px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    linear-gradient(180deg, #0d1d32, #071425);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

.close-button {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: rotate(90deg);
}

.match-centered-container {
  display: flex;
  justify-content: center;
}

.match-card {
  width: min(960px, 100%);
  padding: 30px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(135deg, rgba(20, 190, 235, 0.08), transparent 38%),
    linear-gradient(180deg, #0d1d32, #071425);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

.match-card .match-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.match-card .match-stage {
  color: var(--gold-soft);
}

.match-card .match-score-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin: 28px 0 32px;
}

.match-card .team-name-left,
.match-card .team-name-right {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.4vw, 2.4rem);
  font-weight: 700;
}

.match-card .team-name-left {
  text-align: right;
}

.match-card .team-score {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(20, 190, 235, 0.18);
  color: var(--accent-2);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
}

.match-card .separator {
  color: var(--text-muted);
  font-size: 1.8rem;
}

.match-card .match-details-section {
  display: grid;
  grid-template-columns: 1fr 80px 1fr;
  gap: 24px;
  align-items: start;
}

.match-card .team-detail {
  padding: 20px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--text-soft);
}

.match-card .goal-icon-center {
  display: grid;
  place-items: center;
  min-height: 100%;
  color: var(--gold-soft);
  font-size: 2rem;
}

.match-card .goal-line {
  margin-bottom: 8px;
}

.match-card .card-line {
  margin-top: 10px;
  color: #ff8d8d;
  font-weight: 700;
}

.match-card .divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 16px 0;
}

/* ========================================
   Mobile
======================================== */
@media (max-width: 900px) {
  .nav-top {
    gap: 14px;
    padding: 16px 14px;
  }

  .nav-tabs {
    gap: 10px;
  }

  .nav-tabs a {
    padding: 8px 14px;
    font-size: 1.1rem;
  }

  .footer-horizontal {
    flex-direction: column;
    text-align: center;
  }

  .match-card {
    padding: 22px;
  }

  .match-card .match-score-block {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .match-card .team-name-left,
  .match-card .team-name-right {
    text-align: center;
  }

  .match-card .match-details-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-top {
    align-items: center;
    gap: 14px;
    padding: 14px 10px 12px;
  }

  .logo-link {
    width: 48px;
    height: 48px;
    padding: 2px;
  }

  .logo {
    margin: 0;
  }

  .nav-tabs {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 28px 8px 4px;
    scrollbar-width: none;
    mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.88) 0%, #000 8%, #000 84%, rgba(0, 0, 0, 0.28) 100%);
  }

  .nav-tabs::-webkit-scrollbar {
    display: none;
  }

  .nav-tabs-shell {
    position: relative;
    width: 100%;
  }

  .nav-tabs-shell::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 42px;
    border-radius: 0 16px 16px 0;
    background: linear-gradient(to right, rgba(2, 9, 20, 0), rgba(2, 9, 20, 0.96));
    pointer-events: none;
  }

  .nav-tabs a {
    flex: 0 0 auto;
    padding: 10px 14px;
    font-size: 1rem;
  }

  .match-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .match-box {
    min-height: 108px;
    padding: 16px;
    border-radius: 16px;
  }

  .match-info-right {
    min-width: 78px;
    font-size: 0.74rem;
  }

  .match-box .team-name {
    font-size: 1rem;
  }

  .score {
    font-size: 1.35rem;
  }

  .button,
  .back-button {
    width: 100%;
    padding: 0.95rem 1rem;
  }

  .modal {
    padding: 10px;
  }

  .modal-content {
    padding: 18px 16px;
    border-radius: 20px;
  }

  .match-card {
    padding: 18px 16px;
    border-radius: 20px;
  }

  .match-card .match-meta {
    font-size: 0.76rem;
    gap: 8px;
  }

  .match-card .team-score {
    width: 52px;
    height: 52px;
    font-size: 1.8rem;
  }

  .footer-horizontal,
  .footer-copyright {
    width: calc(100% - 16px);
  }

  .site-footer {
    padding: 30px 12px 18px;
  }
}
