:root {
  --wc-navy: #17133d;
  --wc-purple: #4b2bbf;
  --wc-blue: #1a9fff;
  --wc-pink: #f45aa6;
  --wc-yellow: #ffd166;
  --wc-panel: rgba(255, 255, 255, 0.09);
  --wc-panel-border: rgba(255, 255, 255, 0.16);
  --wc-text: #f8f7ff;
  --wc-muted: rgba(248, 247, 255, 0.68);
}

* { box-sizing: border-box; }
html { scroll-padding-top: 5rem; }

body.app-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(244, 90, 166, .32), transparent 30rem),
    radial-gradient(circle at 80% 10%, rgba(26, 159, 255, .28), transparent 28rem),
    linear-gradient(135deg, #0d0a28, var(--wc-navy) 55%, #0e1231);
  color: var(--wc-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.text-white-75 { color: rgba(255,255,255,.75); }
.text-muted-light { color: var(--wc-muted); }

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: #fff;
  font-weight: 800;
  letter-spacing: -.02em;
}
.brand-mark span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wc-yellow), var(--wc-pink));
  color: #1b143a;
  font-size: .85rem;
  font-weight: 900;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 800;
  font-size: .78rem;
  color: var(--wc-yellow);
}

.btn-primary {
  background: linear-gradient(135deg, var(--wc-blue), var(--wc-purple));
  border: 0;
  box-shadow: 0 1rem 2rem rgba(26, 159, 255, .24);
}
.btn-primary:hover { filter: brightness(1.08); }

.landing { min-height: 100vh; }
.hero-calendar,
.panel-card,
.dashboard-hero,
.hero-stat-card {
  background: var(--wc-panel);
  border: 1px solid var(--wc-panel-border);
  backdrop-filter: blur(18px);
  border-radius: 1.5rem;
}
.hero-calendar { padding: 1.25rem; transform: rotate(-1.3deg); }
.hero-calendar-top { padding: .75rem 1rem 1.2rem; color: var(--wc-muted); }
.hero-match {
  padding: 1rem;
  border-radius: 1rem;
  margin-bottom: .85rem;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.14);
  display: grid;
  gap: .2rem;
}
.hero-match-good { box-shadow: inset 4px 0 0 var(--wc-yellow); }
.hero-match-late { opacity: .38; filter: grayscale(.45); }
.hero-time { font-size: .8rem; color: var(--wc-yellow); font-weight: 800; }

.app-header {
  background: rgba(10, 8, 28, .74);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.dashboard-hero {
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
}
.hero-stat-card {
  min-width: 12rem;
  padding: 1rem;
  text-align: center;
}
.hero-stat-number { display: block; font-size: 2.25rem; line-height: 1; font-weight: 900; color: var(--wc-yellow); }
.hero-stat-label { display: block; color: var(--wc-muted); font-size: .86rem; }

.app-tabs .nav-link,
.knockout-tabs .nav-link {
  color: rgba(255,255,255,.78);
  border: 1px solid rgba(255,255,255,.12);
  margin-right: .5rem;
  border-radius: 999px;
}
.app-tabs .nav-link.active,
.knockout-tabs .nav-link.active {
  color: #17133d;
  background: var(--wc-yellow);
  border-color: var(--wc-yellow);
  font-weight: 800;
}


.fav-only-control .btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-weight: 800;
}
.fav-only-control .btn-check:checked + .btn {
  background: var(--wc-yellow);
  border-color: var(--wc-yellow);
  color: #17133d;
  box-shadow: 0 .5rem 1.4rem rgba(255,209,102,.16);
}
.timeline-actions {
  min-width: fit-content;
}

.week-strip {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: .75rem;
  overflow-x: auto;
  overflow-y: visible;
  padding-top: .35rem;
  padding-bottom: .25rem;
  scroll-padding-inline: 1rem;
  scrollbar-width: none;
}
.week-strip::-webkit-scrollbar { display: none; }
.day-chip {
  flex: 0 0 120px;
  width: 120px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 1rem;
  background: rgba(255,255,255,.08);
  color: white;
  padding: .85rem .9rem;
  text-align: left;
  min-height: 5.25rem;
  transition: .18s ease;
}
.day-chip:hover,
.day-chip.active { background: rgba(255,255,255,.18); transform: translateY(-2px); }
.day-chip.active { border-color: var(--wc-yellow); box-shadow: 0 .5rem 2rem rgba(255, 209, 102, .18); }
.day-chip.current-day:not(.active) { border-color: rgba(255,209,102,.55); }
.day-chip strong { display: block; }
.day-chip small { color: var(--wc-muted); }
.day-chip .badge { background: rgba(255,255,255,.16); }

.timeline {
  position: relative;
  display: grid;
  gap: 1rem;
}
.timeline-empty {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--wc-muted);
}
.match-card {
  position: relative;
  border-radius: 1.25rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.14);
  padding: 1rem;
  transition: .18s ease;
  overflow: hidden;
}
.match-card:hover { transform: translateY(-2px); background: rgba(255,255,255,.14); }
.match-card.favourite {
  border-color: rgba(255,209,102,.85);
  box-shadow: 0 0 0 1px rgba(255,209,102,.24), 0 1.2rem 2.8rem rgba(255,209,102,.12);
}
.match-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 6px;
  background: var(--wc-blue);
}
.match-card.favourite::before { background: var(--wc-yellow); }
.match-main {
  display: grid;
  grid-template-columns: 5rem 1fr auto;
  gap: 1rem;
  align-items: center;
}
.match-time { color: var(--wc-yellow); font-weight: 900; font-size: 1.05rem; }
.match-date { color: var(--wc-muted); font-size: .78rem; }
.team-line {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-weight: 800;
}
.flag {
  width: 1.6rem;
  height: 1.1rem;
  border-radius: .18rem;
  object-fit: cover;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.16);
}
.match-meta { color: var(--wc-muted); font-size: .85rem; margin-top: .5rem; }
.score { font-weight: 900; font-size: 1.35rem; }
.watchability {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  color: var(--wc-muted);
  margin-top: .65rem;
}
.watchability .dot {
  width: .55rem; height: .55rem; border-radius: 50%; background: var(--wc-yellow);
}
.reminder-btn.active { background: var(--wc-yellow); border-color: var(--wc-yellow); color: #17133d; font-weight: 800; }

.best-match-item {
  padding: .85rem 0;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.best-match-item:last-child { border-bottom: 0; }
.best-match-title { font-weight: 800; }
.best-match-title-with-flags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .5rem;
}
.best-match-team {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.best-match-v {
  color: var(--wc-muted);
  font-size: .86rem;
  font-weight: 800;
}

.sleep-bar {
  height: .8rem;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  overflow: hidden;
}
.sleep-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--wc-blue), var(--wc-yellow)); }

.group-card { height: 100%; }
.group-table { color: white; margin: 0; }
.group-table th { color: rgba(255,255,255,.65); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.group-table td,
.group-table th { background: transparent; color: inherit; border-color: rgba(255,255,255,.1); vertical-align: middle; }
.group-table tbody tr:first-child td,
.group-table tbody tr:nth-child(2) td { background: rgba(255,209,102,.08); }

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: .85rem;
}
.team-card {
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  color: #fff;
  border-radius: 1rem;
  padding: .9rem;
  display: flex;
  gap: .75rem;
  align-items: center;
  cursor: pointer;
  text-align: left;
}
.team-card.active {
  border-color: var(--wc-yellow);
  background: rgba(255,209,102,.16);
}
.team-card .star { margin-left: auto; color: rgba(255,255,255,.35); font-size: 1.1rem; }
.team-card.active .star { color: var(--wc-yellow); }
.team-search { max-width: 260px; }

.knockout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.knockout-card {
  padding: 1rem;
  border-radius: 1.2rem;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.14);
  min-height: 12rem;
}
.knockout-round-title { color: var(--wc-yellow); font-weight: 900; margin-bottom: .8rem; }
.knockout-match {
  border-radius: .85rem;
  background: rgba(255,255,255,.08);
  padding: .75rem;
  margin-bottom: .6rem;
}

.profile-modal { border: 0; border-radius: 1.4rem; }
.toast { color: #111; }

@media (max-width: 991px) {
  .dashboard-hero { flex-direction: column; align-items: stretch; }
  .hero-stat-card { min-width: 0; }
  .match-main { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .day-chip { flex-basis: 105px; width: 105px; }
  .app-header .btn-link { display: none; }
  .dashboard-hero { padding: 1rem; border-radius: 1rem; }
}

/* v1.0.5: mobile app refinement */
.app-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.profile-modal.timezone-required .modal-header {
  background: linear-gradient(135deg, rgba(255,209,102,.16), rgba(26,159,255,.12));
  border-radius: 1.4rem 1.4rem 0 0;
}

@media (min-width: 641px) {
  .tab-icon { font-size: .95rem; }
}

@media (max-width: 640px) {
  body.app-body {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
  }
  .app-header nav {
    padding-top: .65rem !important;
    padding-bottom: .65rem !important;
  }
  .app-header .brand-mark span {
    width: 1.9rem;
    height: 1.9rem;
    font-size: .72rem;
  }
  .app-header .btn-outline-light,
  .app-header .btn-light {
    padding: .25rem .6rem;
    font-size: .78rem;
  }
  .dashboard-hero {
    margin-bottom: .85rem !important;
    padding: .8rem .9rem;
    border-radius: 1rem;
    gap: .75rem;
    background: rgba(255,255,255,.065);
  }
  .dashboard-hero .eyebrow {
    font-size: .65rem;
    margin-bottom: .25rem;
  }
  .dashboard-hero h1 {
    font-size: 1rem;
    line-height: 1.2;
    margin-bottom: 0 !important;
  }
  .dashboard-hero p {
    display: none;
  }
  .hero-stat-card {
    padding: .65rem .8rem;
    border-radius: .85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }
  .hero-stat-number {
    font-size: 1.45rem;
  }
  .hero-stat-label {
    font-size: .72rem;
    max-width: 6rem;
    text-align: right;
  }
  #mainTabs.app-tabs {
    position: fixed;
    left: .75rem;
    right: .75rem;
    bottom: calc(.75rem + env(safe-area-inset-bottom));
    z-index: 1040;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .35rem;
    margin: 0 !important;
    padding: .5rem;
    border-radius: 1.35rem;
    background: rgba(13,10,40,.88);
    border: 1px solid rgba(255,255,255,.16);
    box-shadow: 0 .8rem 2.5rem rgba(0,0,0,.38);
    backdrop-filter: blur(18px);
  }
  #mainTabs.app-tabs .nav-item {
    width: 100%;
  }
  #mainTabs.app-tabs .nav-link {
    width: 100%;
    min-height: 3.55rem;
    margin: 0;
    border-radius: 1rem;
    flex-direction: column;
    justify-content: center;
    gap: .22rem;
    font-size: .68rem;
    font-weight: 800;
    line-height: 1;
    background: transparent;
  }
  #mainTabs.app-tabs .nav-link.active {
    background: linear-gradient(135deg, var(--wc-yellow), #fff3bd);
    color: #17133d;
  }
  #mainTabs.app-tabs .tab-icon {
    font-size: 1.25rem;
  }
  #mainTabs.app-tabs .tab-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .week-strip {
    gap: .55rem;
    padding-top: .45rem;
    padding-bottom: .35rem;
    margin-top: -.1rem;
  }
  .day-chip:hover,
  .day-chip.active {
    transform: none;
  }
  .panel-card {
    border-radius: 1.1rem;
  }
  .toast-container {
    bottom: calc(5.75rem + env(safe-area-inset-bottom)) !important;
  }
}

@media (max-width: 575.98px) {
  .timeline-actions {
    width: 100%;
    justify-content: space-between !important;
  }
  .fav-only-control .btn,
  #todayBtn {
    min-height: 2.45rem;
  }
}

/* v1.0.8: social preview + near-kickoff countdown */
.match-countdown {
  display: inline-flex;
  align-items: center;
  margin-top: .25rem;
  padding: .16rem .48rem;
  border-radius: 999px;
  background: rgba(255,209,102,.16);
  color: var(--wc-yellow);
  border: 1px solid rgba(255,209,102,.26);
  font-size: .72rem;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}
.match-countdown-inline {
  display: inline-flex;
  align-items: center;
  margin-top: .35rem;
  padding: .12rem .42rem;
  border-radius: 999px;
  background: rgba(255,209,102,.13);
  color: var(--wc-yellow);
  border: 1px solid rgba(255,209,102,.22);
  font-weight: 800;
}


.status-live-text {
  color: #76f7c7 !important;
  font-weight: 900;
}
.match-card.status-live {
  border-color: rgba(118,247,199,.42);
}
.match-card.status-live::before {
  background: #76f7c7;
}
.match-card.status-awaiting-score .score {
  opacity: .72;
}

@media (max-width: 991px) {
  .match-countdown {
    margin-bottom: .05rem;
  }
}


/* v1.0.9: mobile first-open layout stabilisation */
.best-matches-panel {
  overflow: visible;
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 4rem;
  }
  .best-matches-panel {
    scroll-margin-top: 4.5rem;
  }
}


/* v1.0.10: delayed best-match render for mobile first-open stability */
.best-matches-panel.is-loading {
  min-height: 15.5rem;
}
.best-matches-loader {
  min-height: 11rem;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: .85rem;
  padding: .85rem 0 .35rem;
  color: var(--wc-text);
  animation: bestPanelFadeIn .32s ease both;
}
.best-matches-loader strong {
  display: block;
  font-size: .96rem;
}
.best-matches-loader span {
  display: block;
  margin-top: .18rem;
  color: var(--wc-muted);
  font-size: .82rem;
  line-height: 1.35;
}
.loader-ball {
  width: 2.55rem;
  height: 2.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,209,102,.16);
  border: 1px solid rgba(255,209,102,.32);
  animation: loaderBallBounce 1.15s ease-in-out infinite;
}
.loader-lines {
  grid-column: 1 / -1;
  display: grid;
  gap: .45rem;
  margin-top: .65rem;
}
.loader-lines i {
  display: block;
  height: .72rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,.10), rgba(255,255,255,.22), rgba(255,255,255,.10));
  background-size: 220% 100%;
  animation: loaderShimmer 1.2s linear infinite;
}
.loader-lines i:nth-child(2) { width: 82%; animation-delay: .12s; }
.loader-lines i:nth-child(3) { width: 58%; animation-delay: .24s; }
@keyframes loaderBallBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-.28rem) rotate(10deg); }
}
@keyframes loaderShimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}
@keyframes bestPanelFadeIn {
  from { opacity: 0; transform: translateY(.25rem); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .best-matches-loader,
  .loader-ball,
  .loader-lines i { animation: none; }
}

@media (max-width: 640px) {
  .best-matches-panel.is-loading {
    min-height: 16rem;
  }
  .best-matches-loader {
    min-height: 11.75rem;
  }
}

/* v1.0.18: refined app tab icons */
.app-tabs .nav-link {
  color: rgba(255,255,255,.82);
}
.app-tabs .nav-link:hover,
.app-tabs .nav-link:focus {
  color: #fff;
}
.app-tabs .nav-link.active {
  color: #17133d;
}
.app-tabs .tab-icon {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: .65rem;
  color: currentColor;
  transition: transform .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.app-tabs .tab-icon svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.app-tabs .tab-icon-teams svg {
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.45;
}
.app-tabs .nav-link.active .tab-icon {
  transform: translateY(-1px);
}
@media (min-width: 641px) {
  .app-tabs .tab-icon {
    width: 1.35rem;
    height: 1.35rem;
  }
  .app-tabs .tab-icon svg {
    width: 1.05rem;
    height: 1.05rem;
  }
}
@media (max-width: 640px) {
  #mainTabs.app-tabs .tab-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: .9rem;
    background: rgba(255,255,255,.07);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
    color: rgba(255,255,255,.88);
  }
  #mainTabs.app-tabs .tab-icon svg {
    width: 1.35rem;
    height: 1.35rem;
  }
  #mainTabs.app-tabs .nav-link.active .tab-icon {
    background: rgba(23,19,61,.12);
    box-shadow: inset 0 0 0 1px rgba(23,19,61,.12), 0 .35rem 1rem rgba(0,0,0,.14);
    color: #17133d;
  }
  #mainTabs.app-tabs .nav-link:not(.active):active .tab-icon {
    transform: scale(.96);
  }
}

/* v1.0.19: PWA installed-app tab icon reliability */
.app-tabs .tab-icon svg,
#mainTabs.app-tabs .tab-icon svg {
  opacity: 1;
  visibility: visible;
  overflow: visible;
  flex: 0 0 auto;
}
@media (display-mode: standalone), (display-mode: fullscreen) {
  #mainTabs.app-tabs .tab-icon {
    display: inline-flex !important;
  }
  #mainTabs.app-tabs .tab-icon svg {
    display: block !important;
  }
}

/* v1.0.20: team fixture detail view */
.team-details-link,
.group-team-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  padding: .15rem .1rem;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font: inherit;
  font-weight: 800;
  text-align: left;
  border-radius: .55rem;
  cursor: pointer;
}
.team-details-link:hover,
.team-details-link:focus-visible,
.group-team-button:hover,
.group-team-button:focus-visible {
  color: var(--wc-yellow);
  outline: none;
  background: rgba(255,209,102,.08);
}
.team-card {
  position: relative;
}
.team-card:hover,
.team-card:focus-visible {
  background: rgba(255,255,255,.13);
  border-color: rgba(255,255,255,.28);
  outline: none;
}
.team-card.active:hover,
.team-card.active:focus-visible {
  border-color: var(--wc-yellow);
  background: rgba(255,209,102,.2);
}
.team-card-title {
  min-width: 0;
  flex: 1 1 auto;
}
.team-fav-toggle {
  margin-left: auto;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.5);
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.team-fav-toggle:hover,
.team-fav-toggle:focus-visible,
.team-fav-toggle.active {
  color: var(--wc-yellow);
  border-color: rgba(255,209,102,.5);
  background: rgba(255,209,102,.14);
  outline: none;
}
.team-details-modal .modal-header .modal-title {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.team-details-modal .modal-header .flag {
  width: 1.9rem;
  height: 1.3rem;
}
.team-details-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1rem;
  border-radius: 1rem;
  background: rgba(23,19,61,.06);
  border: 1px solid rgba(23,19,61,.08);
  margin-bottom: 1rem;
}
.team-details-fav.active {
  background: rgba(255,209,102,.18);
  color: #17133d;
  border-color: rgba(255,209,102,.7);
  font-weight: 900;
}
.team-fixture-section {
  margin-top: 1.15rem;
}
.team-fixture-section h6 {
  font-weight: 900;
  color: #17133d;
  margin-bottom: .65rem;
}
.team-fixture-list {
  display: grid;
  gap: .7rem;
}
.team-fixture-empty {
  padding: .85rem 1rem;
  border-radius: .85rem;
  background: rgba(23,19,61,.05);
  color: rgba(23,19,61,.62);
  font-size: .9rem;
}
.team-fixture-item {
  display: grid;
  grid-template-columns: 5.25rem 1fr auto;
  gap: .85rem;
  align-items: center;
  padding: .85rem;
  border-radius: 1rem;
  background: rgba(23,19,61,.055);
  border: 1px solid rgba(23,19,61,.08);
}
.team-fixture-item.status-live {
  border-color: rgba(31,172,120,.32);
  background: rgba(31,172,120,.08);
}
.team-fixture-item.status-finished,
.team-fixture-item.status-awaiting-score {
  background: rgba(23,19,61,.04);
}
.team-fixture-date {
  display: grid;
  gap: .1rem;
  color: #17133d;
}
.team-fixture-date strong {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.team-fixture-date span {
  font-weight: 900;
}
.team-fixture-date small {
  color: rgba(23,19,61,.65);
}
.team-fixture-date em {
  display: inline-flex;
  width: fit-content;
  margin-top: .15rem;
  padding: .08rem .35rem;
  border-radius: 999px;
  color: #17133d;
  background: rgba(255,209,102,.42);
  font-size: .68rem;
  font-style: normal;
  font-weight: 900;
}
.team-fixture-main {
  min-width: 0;
}
.team-fixture-opponent {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem .65rem;
  color: #17133d;
}
.team-fixture-role {
  display: inline-flex;
  align-items: center;
  padding: .12rem .45rem;
  border-radius: 999px;
  background: rgba(23,19,61,.08);
  color: rgba(23,19,61,.72);
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.team-fixture-score {
  text-align: right;
  color: #17133d;
  display: grid;
  gap: .1rem;
}
.team-fixture-score strong {
  font-size: 1.2rem;
  font-weight: 950;
}
.team-fixture-score span {
  font-size: .78rem;
}
.team-fixture-score .status-live-text {
  color: #0a8a5d !important;
}
@media (max-width: 640px) {
  .team-fixture-item {
    grid-template-columns: 1fr auto;
  }
  .team-fixture-date {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: .45rem;
    flex-wrap: wrap;
  }
  .team-details-top {
    align-items: flex-start;
    flex-direction: column;
  }
  .team-details-fav {
    width: 100%;
  }
}
.team-details-modal .text-muted-light {
  color: rgba(23,19,61,.62);
}

/* v1.0.21: darker app-style popups, mobile profile icon and scan-friendly icons */
.app-header-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 800;
}
.app-header-profile-btn .tab-icon {
  width: 1.15rem;
  height: 1.15rem;
}
.app-header-profile-btn .tab-icon svg,
.modal-title-icon svg {
  width: 100%;
  height: 100%;
}
.app-header-profile-btn .tab-icon svg,
.tab-icon-profile svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.app-header-logout {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}

.profile-modal {
  color: var(--wc-text);
  background:
    radial-gradient(circle at 15% 0%, rgba(244,90,166,.24), transparent 18rem),
    radial-gradient(circle at 90% 10%, rgba(26,159,255,.2), transparent 16rem),
    linear-gradient(160deg, rgba(22,18,62,.98), rgba(8,7,24,.98));
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 1.6rem 4rem rgba(0,0,0,.48);
  overflow: hidden;
}
.profile-modal .modal-header {
  background: rgba(255,255,255,.045);
  border-bottom: 1px solid rgba(255,255,255,.10) !important;
}
.profile-modal .modal-title {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: #fff;
  font-weight: 950;
}
.modal-title-icon {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .85rem;
  background: rgba(255,209,102,.18);
  border: 1px solid rgba(255,209,102,.28);
  font-size: 1rem;
}
.profile-modal .btn-close {
  filter: invert(1) grayscale(1) brightness(1.8);
  opacity: .86;
}
.profile-modal .modal-body {
  color: var(--wc-text);
}
.profile-modal .text-muted,
.profile-modal .text-muted-light,
.team-details-modal .text-muted-light {
  color: rgba(248,247,255,.70) !important;
}
.profile-modal .form-label {
  color: rgba(248,247,255,.86);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.profile-modal .form-control,
.profile-modal .form-select {
  color: #fff;
  background-color: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.18);
}
.profile-modal .form-control:focus,
.profile-modal .form-select:focus {
  color: #fff;
  background-color: rgba(255,255,255,.11);
  border-color: rgba(255,209,102,.72);
  box-shadow: 0 0 0 .2rem rgba(255,209,102,.16);
}
.profile-modal .form-control::placeholder {
  color: rgba(248,247,255,.48);
}
.profile-modal .btn-outline-secondary {
  color: rgba(255,255,255,.86);
  border-color: rgba(255,255,255,.25);
}
.profile-modal .btn-outline-secondary:hover,
.profile-modal .btn-outline-secondary:focus-visible {
  color: #17133d;
  background: #fff;
  border-color: #fff;
}

.team-details-top,
.team-fixture-item,
.team-fixture-empty {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.12);
}
.team-details-top h6,
.team-fixture-section h6,
.team-fixture-date,
.team-fixture-opponent,
.team-fixture-score,
.team-fixture-score strong {
  color: #fff;
}
.team-fixture-date small,
.team-fixture-empty,
.team-fixture-role {
  color: rgba(248,247,255,.68);
}
.team-fixture-date em {
  color: #17133d;
  background: rgba(255,209,102,.86);
}
.team-fixture-role {
  background: rgba(255,255,255,.10);
}
.team-fixture-item.status-live {
  border-color: rgba(118,247,199,.36);
  background: rgba(118,247,199,.09);
}
.team-fixture-item.status-finished,
.team-fixture-item.status-awaiting-score {
  background: rgba(255,255,255,.055);
}
.team-fixture-score .status-live-text {
  color: #76f7c7 !important;
}
.team-details-fav.active {
  color: #17133d;
  background: var(--wc-yellow);
  border-color: var(--wc-yellow);
}

@media (max-width: 640px) {
  .app-header-profile-btn {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0 !important;
    justify-content: center;
    border-radius: .95rem !important;
    color: #17133d;
    background: linear-gradient(135deg, var(--wc-yellow), #fff3bd);
    border: 0;
  }
  .app-header-profile-btn .profile-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
  }
  .app-header-profile-btn .tab-icon {
    width: 1.25rem;
    height: 1.25rem;
  }
  .mobile-slide-modal .modal-dialog {
    margin: 0;
    width: min(92vw, 430px);
    max-width: min(92vw, 430px);
    min-height: 100dvh;
    display: flex;
    align-items: stretch;
  }
  .mobile-slide-modal.fade .modal-dialog {
    transform: translateX(-105%);
    transition: transform .28s cubic-bezier(.2,.9,.2,1);
  }
  .mobile-slide-modal.show .modal-dialog {
    transform: translateX(0);
  }
  .mobile-slide-modal .modal-content {
    min-height: 100dvh;
    border-radius: 0 1.45rem 1.45rem 0;
  }
  .mobile-slide-modal .modal-body {
    overflow-y: auto;
    padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
  }
  .profile-modal .modal-title {
    font-size: 1rem;
  }
  .modal-title-icon {
    width: 1.85rem;
    height: 1.85rem;
  }
}

/* v1.0.22: team links everywhere, venue hints and goal scorers */
.match-team-button,
.best-match-team-link,
.team-fixture-opponent-link {
  color: inherit;
  line-height: 1.2;
}
.match-team-button {
  padding: .08rem .1rem;
  margin-left: -.1rem;
}
.match-team-button .flag,
.best-match-team-link .flag,
.team-fixture-opponent-link .flag {
  flex: 0 0 auto;
}
.best-match-team-link {
  padding: .08rem .28rem;
  border-radius: .65rem;
}
.best-match-team-link:hover,
.best-match-team-link:focus-visible {
  color: var(--wc-yellow);
  background: rgba(255,209,102,.10);
}
.team-fixture-opponent-link {
  padding: .08rem .2rem;
}
.match-scorers {
  margin-top: .45rem;
  color: rgba(255,255,255,.72);
  font-size: .78rem;
  line-height: 1.35;
}
.team-fixture-scorers {
  color: rgba(23,19,61,.68);
  font-size: .78rem;
}

/* v1.0.23: make generated team links reliable across mobile/PWA shells */
.team-details-link,
.team-details-link * {
  pointer-events: auto;
}
.match-card .team-details-link,
.best-match-item .team-details-link,
.knockout-match .team-details-link {
  touch-action: manipulation;
}

/* v1.0.24: quick jump from match cards to the matching group table */
.match-card-actions,
.best-match-actions {
  margin-top: .65rem;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.match-group-link {
  appearance: none;
  border: 1px solid rgba(255,209,102,.36);
  background: rgba(255,209,102,.13);
  color: var(--wc-yellow);
  border-radius: 999px;
  padding: .34rem .72rem;
  font-size: .78rem;
  font-weight: 900;
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  box-shadow: 0 .55rem 1.25rem rgba(0,0,0,.14);
  touch-action: manipulation;
}
.match-group-link:hover,
.match-group-link:focus-visible {
  color: #17133d;
  background: var(--wc-yellow);
  border-color: var(--wc-yellow);
  outline: 0;
}
.match-group-link-compact {
  padding: .28rem .58rem;
  font-size: .72rem;
}
.group-card {
  scroll-margin-top: 5.25rem;
}
.group-card.group-focus-highlight {
  animation: groupFocusPulse 2.1s ease;
  border-color: rgba(255,209,102,.88);
  box-shadow: 0 0 0 2px rgba(255,209,102,.22), 0 1.2rem 2.8rem rgba(255,209,102,.13);
}
@keyframes groupFocusPulse {
  0% { transform: translateY(-2px); box-shadow: 0 0 0 0 rgba(255,209,102,.38), 0 1.2rem 2.8rem rgba(255,209,102,.10); }
  45% { transform: translateY(-4px); box-shadow: 0 0 0 8px rgba(255,209,102,.12), 0 1.2rem 2.8rem rgba(255,209,102,.18); }
  100% { transform: translateY(0); box-shadow: 0 0 0 0 rgba(255,209,102,0), 0 1.2rem 2.8rem rgba(255,209,102,.10); }
}
@media (max-width: 640px) {
  .match-card-actions {
    margin-top: .8rem;
  }
  .match-group-link {
    min-height: 2.15rem;
  }
  .group-card {
    scroll-margin-top: 4.75rem;
  }
}


/* v1.0.26: make the View Group action visible on every match card */
.match-card-actions-footer {
  position: relative;
  z-index: 2;
  padding-left: .15rem;
}
.match-card-actions-footer .match-group-link {
  width: auto;
}
@media (max-width: 640px) {
  .match-card-actions-footer {
    margin-top: .95rem;
    padding-left: 0;
  }
}


/* v1.0.27: keep View Group visible across all match-style cards */
.team-fixture-actions {
  margin-top: .45rem;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.match-card-actions-footer {
  display: flex !important;
}
