*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* === DARK THEME (default) === */
:root,
[data-theme="dark"] {
  --bg-deep: #07090f;
  --bg-card: #0f1628;
  --bg-card-hover: #141d33;
  --border: #1a2340;
  --border-light: #243055;
  --text-primary: #e8edf5;
  --text-secondary: #7a89a8;
  --text-muted: #4a5578;
  --ice-blue: #38bdf8;
  --ice-glow: rgba(56, 189, 248, 0.15);
  --gold: #d4a843;
  --gold-light: #e8c466;
  --gold-bg: rgba(212, 168, 67, 0.08);
  --gold-border: rgba(212, 168, 67, 0.3);
  --gold-glow: rgba(212, 168, 67, 0.15);
  --group-a: #38bdf8;
  --group-b: #c084fc;
  --playoff: #fb923c;
  --final-gold: #fbbf24;
  --red-accent: #9b1b30;
  --nav-bg: rgba(7, 9, 15, 0.85);
  --noise-opacity: 0.03;
  --card-shadow: none;
  --flag-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* === LIGHT THEME === */
[data-theme="light"] {
  --bg-deep: #f0f2f5;
  --bg-card: #ffffff;
  --bg-card-hover: #f7f8fa;
  --border: #dce1e8;
  --border-light: #c5cdd8;
  --text-primary: #1a1e2c;
  --text-secondary: #5a6478;
  --text-muted: #8a93a5;
  --ice-blue: #0c7bb3;
  --ice-glow: rgba(12, 123, 179, 0.1);
  --gold: #b8892a;
  --gold-light: #9a7320;
  --gold-bg: rgba(184, 137, 42, 0.07);
  --gold-border: rgba(184, 137, 42, 0.3);
  --gold-glow: rgba(184, 137, 42, 0.1);
  --group-a: #0c7bb3;
  --group-b: #8b5cf6;
  --playoff: #d97706;
  --final-gold: #ca8a04;
  --red-accent: #9b1b30;
  --nav-bg: rgba(240, 242, 245, 0.9);
  --noise-opacity: 0.015;
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --flag-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* === THEME TOGGLE === */
.theme-toggle {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  z-index: 10;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-secondary);
}

.theme-toggle:hover {
  border-color: var(--border-light);
  color: var(--text-primary);
  transform: scale(1.08);
}

.theme-toggle svg {
  transition: transform 0.3s ease;
}

.theme-toggle:hover svg {
  transform: rotate(20deg);
}

.theme-toggle .icon-sun {
  display: none;
}

.theme-toggle .icon-moon {
  display: block;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}

/* === NOISE TEXTURE OVERLAY === */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* === ICE LINE DECORATIONS === */
.ice-line {
  position: fixed;
  background: linear-gradient(90deg, transparent, var(--ice-blue), transparent);
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}

.ice-line-top {
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
}

.ice-line-mid {
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
}

/* === HERO === */
.hero {
  position: relative;
  padding: 3rem 1.5rem 2rem;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 100px;
  padding: 0.35rem 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ice-blue);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.year-tabs {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--bg-card);
  position: relative;
  z-index: 1;
}

.year-tabs a {
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.25s ease;
}

.year-tabs a:hover {
  color: var(--text-primary);
}

.year-tabs a.active {
  background: var(--ice-glow);
  color: var(--ice-blue);
}

/* === SECTION NAV === (vertically centred with the theme toggle; 44px touch targets) */
.site-nav {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 1.75rem;
  margin: -1.95rem 0 1rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0 0.25rem;
  font: 600 0.88rem 'DM Sans', system-ui, sans-serif;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.site-nav a svg {
  width: 16px;
  height: 16px;
}

.site-nav a[hidden] {
  display: none;
}

.site-nav a:hover {
  color: var(--text-primary);
}

.site-nav a.active {
  color: var(--text-primary);
  border-bottom-color: var(--gold);
}

@media (max-width: 600px) {
  .site-nav {
    gap: 1.1rem;
  }

  .site-nav a {
    font-size: 0.8rem;
  }

  .site-nav a svg {
    display: none;
  }
}

.hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 8vw, 6rem);
  letter-spacing: 0.04em;
  line-height: 0.95;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}

.hero h1 .year {
  display: block;
  font-size: 0.45em;
  color: var(--ice-blue);
  letter-spacing: 0.15em;
}

.hero-meta {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
}

.latvia-next {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding: 0.6rem 1.2rem;
  background: var(--gold-bg);
  border: 1px solid var(--gold-border);
  border-radius: 12px;
  font-size: 0.85rem;
  color: var(--gold-light);
  position: relative;
  z-index: 1;
}

.latvia-next .flag-tiny {
  width: 22px;
  height: 15px;
  border-radius: 2px;
  object-fit: cover;
}

/* === DATE NAV === */
.date-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 1rem;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.date-nav-inner {
  display: flex;
  gap: 0.25rem;
  max-width: 1200px;
  margin: 0 auto;
  justify-content: center;
}

.date-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
  min-width: 42px;
  position: relative;
}

.date-nav a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.date-nav a.active {
  color: var(--ice-blue);
  background: var(--ice-glow);
}

.date-nav a.has-latvia {
  color: var(--gold);
}

.date-nav a.has-latvia.active {
  background: var(--gold-glow);
}

.date-nav a .nav-day {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  line-height: 1;
}

.date-nav a .nav-flag {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  right: 2px;
}

.date-nav a .nav-month {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.date-nav .nav-divider {
  width: 1px;
  background: var(--border);
  margin: 0 0.35rem;
  align-self: stretch;
}

/* === MAIN CONTENT === */
.content {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 1rem 4rem;
  position: relative;
  z-index: 1;
}

/* === DAY SECTION === */
.day-section {
  margin-top: 2.5rem;
  scroll-margin-top: 4.5rem;
}

.day-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.day-date {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  letter-spacing: 0.03em;
  color: var(--text-primary);
}

.day-name {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.day-header .phase-tag {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.phase-tag.group {
  color: var(--ice-blue);
  background: var(--ice-glow);
}

.phase-tag.qf {
  color: var(--playoff);
  background: rgba(251, 146, 60, 0.12);
}

.phase-tag.sf {
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.12);
}

.phase-tag.final {
  color: var(--final-gold);
  background: rgba(251, 191, 36, 0.12);
}

/* === TIME SLOT === */
.time-slot {
  margin-bottom: 1rem;
}

.time-slot-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

.time-slot-label .clock-icon {
  width: 12px;
  height: 12px;
  opacity: 0.5;
}

.games-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* === GAME CARD === */
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: background 0.3s;
}

.game-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  transform: translateY(-1px);
}

.game-card:hover::before {
  background: linear-gradient(90deg, transparent, var(--ice-blue), transparent);
}

/* === LATVIA HIGHLIGHT === */
.game-card.latvia {
  background: linear-gradient(135deg, rgba(155, 27, 48, 0.13), rgba(212, 168, 67, 0.15), rgba(155, 27, 48, 0.1));
  border-color: rgba(212, 168, 67, 0.45);
  border-width: 1.5px;
}

.game-card.latvia::before {
  background: linear-gradient(90deg, var(--red-accent), var(--gold), var(--red-accent));
  height: 2.5px;
}

.game-card.latvia:hover {
  background: linear-gradient(135deg, rgba(155, 27, 48, 0.18), rgba(212, 168, 67, 0.2), rgba(155, 27, 48, 0.14));
  border-color: rgba(212, 168, 67, 0.6);
}

[data-theme="light"] .game-card.latvia {
  background: linear-gradient(135deg, rgba(155, 27, 48, 0.08), rgba(212, 168, 67, 0.12), rgba(155, 27, 48, 0.06));
  border-color: rgba(155, 27, 48, 0.3);
}

[data-theme="light"] .game-card.latvia:hover {
  background: linear-gradient(135deg, rgba(155, 27, 48, 0.12), rgba(212, 168, 67, 0.16), rgba(155, 27, 48, 0.1));
  border-color: rgba(155, 27, 48, 0.45);
}

/* === PULSE EFFECT FOR TODAY === */
/* PULSE: mainī "8px" (izplešanās) un "0.25" (caurspīdīgums) lai regulētu efektu */
@keyframes pulse-border {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(212, 168, 67, 0.5),
      0 0 20px rgba(212, 168, 67, 0.15);
  }

  50% {
    box-shadow: 0 0 0 7px rgba(212, 168, 67, 0.25),
      0 0 40px rgba(212, 168, 67, 0.25);
  }
}

@keyframes pulse-border-regular {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.35),
      0 0 12px rgba(56, 189, 248, 0.1);
  }

  50% {
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15),
      0 0 25px rgba(56, 189, 248, 0.15);
  }
}

.game-card.today-game {
  animation: pulse-border-regular 2.5s ease-in-out infinite;
}

.game-card.today-game.latvia {
  animation: pulse-border 2s ease-in-out infinite;
}

.today-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--ice-blue);
}

.game-card.latvia .today-badge {
  background: rgba(212, 168, 67, 0.2);
  color: var(--gold-light);
}

/* === TEAM DISPLAY === */
.team {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 70px;
}

.team.right {
  justify-content: flex-end;
  text-align: right;
}

.team .flag {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--flag-shadow);
  flex-shrink: 0;
}

.team .code {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}

.game-card.latvia .team .code {
  color: var(--gold-light);
}

.game-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 50px;
  flex-shrink: 0;
  padding: 0 0.3rem;
}

.game-time {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  color: var(--text-primary);
  letter-spacing: 0.05em;
}

.game-card.latvia .game-time {
  color: var(--gold-light);
}

.ot-mark {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  vertical-align: super;
  margin-left: 2px;
}

.group-badge {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  margin-top: 0.15rem;
}

.group-badge.ga {
  color: var(--group-a);
  background: rgba(56, 189, 248, 0.12);
}

.group-badge.gb {
  color: var(--group-b);
  background: rgba(192, 132, 252, 0.12);
}

.group-badge.qf {
  color: var(--playoff);
  background: rgba(251, 146, 60, 0.12);
}

.group-badge.sf {
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.12);
}

.group-badge.final {
  color: var(--final-gold);
  background: rgba(251, 191, 36, 0.12);
}

/* === PLAYOFF CARD === */
.game-card.playoff .team .code {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.game-card.playoff .game-time {
  color: var(--text-secondary);
}

.game-card.final-game {
  border-color: rgba(251, 191, 36, 0.3);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.04), rgba(251, 146, 60, 0.02));
}

.game-card.final-game::before {
  background: linear-gradient(90deg, transparent, var(--final-gold), transparent);
  height: 2px;
}

/* === VENUE TAG === */
.venue-tag {
  position: absolute;
  bottom: 0.35rem;
  right: 0.5rem;
  font-size: 0.5rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* === GROUPS INFO === */
.groups-section {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.group-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.group-box h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.group-box h3 .gbadge {
  font-size: 0.55rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.1em;
}

.group-box .venue-info {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.group-teams {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.group-team {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.55rem;
  background: var(--ice-glow);
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.group-team .flag-sm {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
}

.group-team.lv {
  background: var(--gold-bg);
  border: 1px solid var(--gold-border);
  color: var(--gold-light);
}

/* === FOOTER === */
.page-footer {
  text-align: center;
  padding: 2rem 1rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.page-footer a {
  color: var(--ice-blue);
  text-decoration: none;
}

.page-footer .tz-note {
  margin-top: 0.5rem;
  font-size: 0.65rem;
}

/* Static text in the calendar footer: what crawlers see without JS */
.seo-h {
  margin: 1.25rem 0 0.25rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.lat-games {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  column-gap: 1rem;
}

.lat-games time {
  margin-right: 0.35rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.faq summary {
  cursor: pointer;
  color: var(--text-secondary);
}

.faq p {
  margin: 0 0 0.5rem 1rem;
}

/* === RESPONSIVE === */
@media (max-width: 700px) {
  .games-row {
    grid-template-columns: 1fr;
  }

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

  .hero h1 {
    font-size: 2.8rem;
  }

  .hero-meta {
    flex-direction: column;
    gap: 0.4rem;
    align-items: center;
  }

  .hero-meta .dot {
    display: none;
  }

  .date-nav-inner {
    justify-content: flex-start;
  }

  .game-card {
    padding: 0.6rem 0.75rem;
  }

  .team .flag {
    width: 26px;
    height: 26px;
  }

  .team .code {
    font-size: 0.95rem;
  }

  .game-time {
    font-size: 1.1rem;
  }
}

/* === FILTER BAR === */
.filter-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--gold-light);
  display: flex;
  align-items: center;
}

.filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.02em;
}

.filter-btn:hover {
  border-color: var(--border-light);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--gold-bg);
  border-color: var(--gold-border);
  color: var(--gold-light);
}

.filter-btn.active.hide-b {
  background: rgba(192, 132, 252, 0.1);
  border-color: rgba(192, 132, 252, 0.35);
  color: var(--group-b);
}

.filter-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* === SCROLL INDICATOR ON TODAY === */
.day-section.today-section>.day-header .day-date {
  color: var(--ice-blue);
}

.day-section.today-section>.day-header::after {
  content: 'ŠODIEN';
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--ice-blue);
  background: var(--ice-glow);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-left: 0.75rem;
}

/* === SITE SKIN AD (wallpaper + top banner) === */
/* Activated by JS via body.has-ad-wallpaper when AD_CONFIG is valid */
body.has-ad-wallpaper {
  background-image: var(--ad-wallpaper-image);
  background-repeat: no-repeat;
  background-position: top center;
  background-attachment: fixed;
  background-size: cover;
}

.ad-wallpaper-link {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  z-index: 1;
  display: block;
  cursor: pointer;
}

.ad-top-banner {
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  padding: 0;
  text-align: center;
  position: relative;
  z-index: 101;
}

.ad-top-banner img {
  width: 100%;
  height: auto;
  display: block;
}

.ad-label {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

/* Sticky banner — parādās skrollējot, paliek pinned augšā.
   Caurspīdīgs fons, banneris pa visu content platumu (1230 px). */
.ad-sticky-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: transparent;
  text-align: center;
  padding: 0;
  transform: translateY(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

body.sticky-ad-visible .ad-sticky-banner {
  transform: translateY(0);
  pointer-events: auto;
}

.ad-sticky-banner a {
  display: block;
  max-width: 940px;
  margin: 0 auto;
}

.ad-sticky-banner img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
}

/* Kad sticky banneris redzams, date-nav slīd uz leju */
body.sticky-ad-visible .date-nav {
  top: 116px;
}

/* Site container — wraps page content so the wallpaper only shows
   in the side gutters, leaving the page itself on its native bg. */
body.has-ad-wallpaper .site-container {
  max-width: 940px;
  margin: 0 auto;
  background: var(--bg-deep);
  position: relative;
  z-index: 100;
  min-height: 100vh;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.45);
}

/* Mobile / small viewports: hide ad, keep clean UX */
@media (max-width: 1400px) {
  body.has-ad-wallpaper {
    background-image: none !important;
    padding-bottom: 60px; /* atstāj vietu sticky footer banerim */
  }
  .ad-wallpaper-link,
  .ad-top-banner {
    display: none !important;
  }
  body.has-ad-wallpaper .site-container {
    max-width: 100%;
    box-shadow: none;
  }
  body.sticky-ad-visible .date-nav {
    top: 0;
  }

  /* Mobile: sticky banner kļūst par footer banner pašā apakšā */
  .ad-sticky-banner {
    top: auto !important;
    bottom: 0;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.25);
  }
  .ad-sticky-banner a {
    max-width: 100%;
  }
  .ad-sticky-banner img {
    height: auto;
    width: 100%;
    max-height: 60px;
    object-fit: contain;
    object-position: center;
  }
}

@media print {
  body.has-ad-wallpaper {
    background-image: none !important;
  }
  .ad-wallpaper-link,
  .ad-top-banner,
  .ad-sticky-banner {
    display: none !important;
  }
  body.has-ad-wallpaper .site-container {
    box-shadow: none;
  }
}

/* === COOKIE CONSENT === */
.consent-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 300;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.1rem;
  border-radius: 14px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  font-size: 0.82rem;
  line-height: 1.45;
}

.consent-bar[hidden] {
  display: none;
}

.consent-bar a {
  color: var(--ice-blue);
}

.consent-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Same style for both: declining must be as easy as accepting */
.consent-actions button {
  min-height: 44px;
  padding: 0 1.1rem;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid var(--border-light);
  background: var(--bg-card-hover);
  color: var(--text-primary);
  font: 600 0.82rem 'DM Sans', system-ui, sans-serif;
}

@media (max-width: 600px) {
  .consent-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .consent-actions button {
    flex: 1;
  }
}

/* === VIDEO PAGE === */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  scroll-margin-top: 1rem;
}

.video-card.latvia {
  border-color: var(--gold-border);
  box-shadow: 0 0 0 1px var(--gold-border), var(--card-shadow);
}

.video-card.target {
  outline: 2px solid var(--ice-blue);
  outline-offset: 2px;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-thumb {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

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

.video-thumb .play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(7, 9, 15, 0.65);
  transition: background 0.2s ease;
}

.video-thumb .play::after {
  content: '';
  position: absolute;
  left: 26px;
  top: 20px;
  border-left: 20px solid #fff;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
}

.video-thumb:hover .play {
  background: var(--red-accent);
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-info {
  padding: 0.85rem 1rem 1rem;
}

.video-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.video-teams .side {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.video-teams img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-shadow: var(--flag-shadow);
}

.video-teams .score {
  font-size: 1.55rem;
}

.video-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.video-kinds {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.video-kinds button {
  flex: 1;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card-hover);
  color: var(--text-secondary);
  font: 600 0.78rem 'DM Sans', system-ui, sans-serif;
  cursor: pointer;
}

.video-kinds button.active {
  border-color: var(--gold-border);
  background: var(--gold-bg);
  color: var(--gold-light);
}

.video-empty {
  margin-top: 2rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px dashed var(--border-light);
  border-radius: 14px;
}

.video-empty a {
  color: var(--ice-blue);
  font-weight: 600;
  text-decoration: none;
}

/* Calendar card link to the game's video (24px+ target per WCAG 2.5.8) */
.video-link {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-top: 0.35rem;
  padding: 0 0.65rem;
  border-radius: 100px;
  font: 600 0.68rem 'DM Sans', system-ui, sans-serif;
  letter-spacing: 0.03em;
  color: var(--ice-blue);
  background: var(--ice-glow);
  text-decoration: none;
}

.video-link:hover {
  background: var(--ice-blue);
  color: #fff;
}

/* === PUSH NOTIFICATIONS === */
.notif-bell {
  position: absolute;
  top: 1.2rem;
  right: calc(1.5rem + 48px);
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.notif-bell:hover {
  color: var(--text-primary);
  border-color: var(--border-light);
}

.notif-bell.on {
  color: var(--gold);
  border-color: var(--gold-border);
}

.notif-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.4rem;
  min-height: 32px;
  padding: 0 0.85rem;
  border-radius: 100px;
  border: 0;
  background: var(--gold);
  color: #fff;
  font: 600 0.78rem 'DM Sans', system-ui, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}

.notif-cta[hidden] {
  display: none;
}

.notif-cta svg {
  width: 14px;
  height: 14px;
}

.latvia-next {
  flex-wrap: wrap;
  justify-content: center;
}

.notif-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(7, 9, 15, 0.45);
}

.notif-overlay[hidden] {
  display: none;
}

.notif-panel {
  position: relative;
  width: min(360px, 100%);
  padding: 1.25rem;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  color: var(--text-primary);
  font-family: 'DM Sans', system-ui, sans-serif;
  text-align: left;
}

.notif-panel h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 2rem 0.2rem 0;
  font: 400 1.35rem 'Bebas Neue', sans-serif;
  letter-spacing: 0.05em;
}

.notif-panel h2 img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.notif-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: var(--text-secondary);
  font-size: 1.4rem;
  cursor: pointer;
}

.notif-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.9rem;
}

.notif-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 52px;
  padding: 0.5rem 0;
  border-top: 1px solid var(--border);
  cursor: pointer;
}

.notif-row b {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
}

.notif-row small {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.notif-switch {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  position: relative;
  width: 42px;
  height: 24px;
  margin: 0;
  border-radius: 100px;
  background: var(--border-light);
  cursor: pointer;
  transition: background 0.2s ease;
}

.notif-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: left 0.2s ease;
}

.notif-switch:checked {
  background: var(--gold);
}

.notif-switch:checked::after {
  left: 21px;
}

.notif-switch:focus-visible {
  outline: 2px solid var(--ice-blue);
  outline-offset: 2px;
}

.notif-go {
  width: 100%;
  min-height: 46px;
  margin-top: 0.9rem;
  border: 0;
  border-radius: 12px;
  background: var(--gold);
  color: #fff;
  font: 600 0.9rem 'DM Sans', system-ui, sans-serif;
  cursor: pointer;
}

.notif-go:disabled {
  opacity: 0.6;
  cursor: wait;
}

.notif-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.4rem;
}

.notif-links button {
  min-height: 36px;
  border: 0;
  background: none;
  color: var(--ice-blue);
  font: 500 0.78rem 'DM Sans', system-ui, sans-serif;
  cursor: pointer;
}

.notif-status {
  min-height: 1.1em;
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.ios-steps {
  list-style: none;
  counter-reset: s;
  margin: 0.25rem 0 0;
  padding: 0;
}

.ios-steps li {
  counter-increment: s;
  display: flex;
  gap: 0.7rem;
  align-items: center;
  padding: 0.6rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.86rem;
}

.ios-steps li::before {
  content: counter(s);
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold-bg);
  color: var(--gold);
  font-weight: 700;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ios-steps small {
  color: var(--text-secondary);
  font-size: 0.72rem;
}

.ios-icon {
  width: 18px;
  height: 18px;
  vertical-align: -3px;
  color: var(--ice-blue);
}

.ios-app {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  vertical-align: -4px;
}

.ios-copy {
  min-height: 32px;
  margin: 0.15rem 0;
  padding: 0 0.7rem;
  border: 1px solid var(--gold-border);
  border-radius: 8px;
  background: var(--gold-bg);
  color: var(--gold-light);
  font: 600 0.78rem 'DM Sans', system-ui, sans-serif;
  cursor: pointer;
}

.ios-steps .k {
  display: inline-flex;
  padding: 0.05rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-weight: 600;
}

@media (max-width: 600px) {
  .notif-bell {
    right: auto;
    left: 1.5rem;
  }
}
