:root {
  --bg-top: #061426;
  --bg-bottom: #020914;

  --logo-white: #f7fbff;
  --logo-cyan: #59dfff;
  --logo-cyan-strong: #27c8ff;
  --logo-green: #55f0c1;
  --logo-shadow: rgba(23, 182, 255, 0.34);
}


/* ==========================================================
   GLOBAL SETTINGS
   Grundinställningar för hela sidan.
   ========================================================== */

* {
  box-sizing: border-box;
}


html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}


body {
  min-height: 100vh;

  /* Hindrar bara sidscrollning i sidled.
     Vertikal scroll tillåts så sidan fungerar när vi bygger fler sektioner. */
  overflow-x: hidden;
  overflow-y: auto;

  position: relative;

  background:
    radial-gradient(circle at 50% 115%,
      rgba(12, 44, 79, 0.32),
      transparent 48%),
    linear-gradient(180deg,
      var(--bg-top) 0%,
      var(--bg-bottom) 100%);
}


/* =========================
   AURORA BACKGROUND
   ========================= */

.aurora {
  position: fixed;

  right: -18vw;
  bottom: -26vh;

  width: 78vw;
  height: 118vh;

  pointer-events: none;

  opacity: 0.72;

  filter:
    blur(34px) saturate(125%);

  transform: rotate(-16deg);
  transform-origin: bottom right;

  background:
    radial-gradient(ellipse at 72% 88%,
      rgba(63, 255, 197, 0.32) 0%,
      rgba(63, 255, 197, 0.12) 24%,
      transparent 50%),
    radial-gradient(ellipse at 56% 60%,
      rgba(55, 186, 255, 0.30) 0%,
      rgba(55, 186, 255, 0.10) 28%,
      transparent 54%),
    radial-gradient(ellipse at 42% 37%,
      rgba(103, 86, 255, 0.22) 0%,
      rgba(103, 86, 255, 0.07) 24%,
      transparent 48%);

  mask-image:
    linear-gradient(to top left,
      #000 0%,
      #000 48%,
      transparent 82%);

  -webkit-mask-image:
    linear-gradient(to top left,
      #000 0%,
      #000 48%,
      transparent 82%);
}


.aurora::before,
.aurora::after {
  content: "";

  position: absolute;

  border-radius: 50%;

  filter: blur(24px);
}


.aurora::before {
  width: 32vw;
  height: 88vh;

  right: 20%;
  bottom: 1%;

  background:
    linear-gradient(to top,
      rgba(33, 255, 190, 0.20),
      rgba(47, 191, 255, 0.13) 48%,
      rgba(95, 87, 255, 0.04) 74%,
      transparent 94%);

  transform:
    skewX(-12deg) rotate(8deg);
}


.aurora::after {
  width: 22vw;
  height: 72vh;

  right: 2%;
  bottom: 8%;

  background:
    linear-gradient(to top,
      rgba(75, 255, 202, 0.18),
      rgba(59, 176, 255, 0.10) 55%,
      transparent 92%);

  transform:
    skewX(15deg) rotate(-5deg);
}


/* ==========================================================
   MATCHINTEL MOTION LOGO
   ========================================================== */

.matchintel-logo {
  position: absolute;

  top: -40px;
  left: 30px;

  display: inline-flex;
  align-items: center;

  min-width: 260px;
  height: 66px;

  padding: 0 10px 0 6px;

  z-index: 50;

  text-decoration: none;
  color: inherit;

  border-radius: 16px;

  cursor: pointer;

  isolation: isolate;

  -webkit-tap-highlight-color: transparent;
}


/* Slight premium hover without restarting layout */

.matchintel-logo:hover {
  background:
    linear-gradient(90deg,
      rgba(255, 255, 255, 0.018),
      rgba(84, 215, 255, 0.035),
      transparent 80%);
}


.matchintel-logo:focus-visible {
  outline:
    2px solid rgba(89, 223, 255, 0.78);

  outline-offset: 4px;
}


/* =========================
   VECTOR FOOTBALL
   ========================= */

.logo-ball-wrap {
  position: relative;

  width: 47px;
  height: 47px;

  flex: 0 0 47px;

  margin-right: 10px;

  display: grid;
  place-items: center;

  transform-origin: center;

  will-change:
    transform,
    opacity,
    filter;
}


.logo-ball {
  position: relative;

  width: 43px;
  height: 43px;

  z-index: 2;

  overflow: visible;

  filter:
    drop-shadow(0 6px 10px rgba(0, 0, 0, 0.30)) drop-shadow(0 0 7px rgba(50, 205, 255, 0.22));

  transform-origin: center;

  will-change: transform;
}


/* Bollens vita ytterdel */

.ball-shell {
  fill: #ffffff;

  stroke: var(--logo-cyan);
  stroke-width: 2;
}


/* Ger SVG-bollen ett mjukare och rundare utseende */

.ball-inner {
  fill: rgba(255, 255, 255, 0.97);

  stroke:
    color-mix(in srgb,
      var(--logo-cyan) 28%,
      transparent);

  stroke-width: 0.85;
}


/* Highlight på fotbollen */

.ball-highlight {
  fill: rgba(255, 255, 255, 0.72);

  opacity: 0.78;
}


/* Den blå färgen följer MatchIntel-loggans accentfärg */

.ball-panel-main {
  fill: var(--logo-cyan);

  stroke:
    color-mix(in srgb,
      var(--logo-cyan) 68%,
      #061426);

  stroke-width: 1.25;

  stroke-linejoin: round;
}


.ball-panel-accent {
  fill:
    color-mix(in srgb,
      var(--logo-cyan) 58%,
      #ffffff);

  opacity: 0.92;
}


.ball-seam-main {
  fill: none;

  stroke:
    color-mix(in srgb,
      var(--logo-cyan) 74%,
      #061426);

  stroke-width: 1.75;

  stroke-linecap: round;
  stroke-linejoin: round;
}


.ball-seam-soft {
  fill: none;

  stroke:
    color-mix(in srgb,
      var(--logo-cyan) 38%,
      #061426);

  stroke-width: 1.25;

  stroke-linecap: round;
  stroke-linejoin: round;

  opacity: 0.72;
}


.ball-glow {
  position: absolute;

  inset: 5px;

  z-index: 0;

  border-radius: 50%;

  opacity: 0;

  background:
    radial-gradient(circle,
      rgba(89, 223, 255, 0.56) 0%,
      rgba(85, 240, 193, 0.28) 38%,
      rgba(89, 223, 255, 0.07) 58%,
      transparent 74%);

  filter: blur(7px);

  transform: scale(0.65);

  will-change:
    transform,
    opacity;
}


/* =========================
   MATCHINTEL WORDMARK
   ========================= */

.logo-text {
  position: relative;

  display: inline-flex;
  align-items: baseline;

  white-space: nowrap;

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

  font-size: 31px;
  font-weight: 800;

  line-height: 1;

  letter-spacing: -1.35px;

  color: var(--logo-white);

  text-shadow:
    0 2px 14px rgba(0, 0, 0, 0.24),
    0 0 15px rgba(89, 223, 255, 0.06);
}


.logo-letter {
  display: inline-block;

  transform-origin: 50% 80%;

  will-change:
    transform,
    opacity,
    filter;

  backface-visibility: hidden;
}


.logo-intel {
  color: var(--logo-cyan);
}


/* =========================
   LIGHT SWEEP
   ========================= */

.logo-shine {
  position: absolute;

  left: 50px;
  top: 13px;

  width: 185px;
  height: 38px;

  z-index: 4;

  pointer-events: none;

  opacity: 0;

  transform:
    translateX(-120px) skewX(-19deg);

  background:
    linear-gradient(90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.02) 35%,
      rgba(255, 255, 255, 0.36) 50%,
      rgba(89, 223, 255, 0.08) 65%,
      transparent 100%);

  filter: blur(1.5px);

  mix-blend-mode: screen;

  will-change:
    transform,
    opacity;
}


/* =========================
   FINAL IDLE STATE
   ========================= */

.matchintel-logo.logo-ready .logo-ball-wrap {
  filter:
    drop-shadow(0 0 10px rgba(39, 200, 255, 0.16));
}


/* ==========================================================
   TOP 5 LEAGUES
   Huvudbehållaren för de fem ligorna.

   NYTT:
   - Bandet är låst uppe till höger.
   - Det påverkas inte av sidans vanliga dokumentflöde.
   - Linjen följer alltid ligabandet.
   ========================================================== */

.league-menu {

  /* Fixed = bandet ligger fast i viewporten */
  position: absolute;

  /* Fast höjd från toppen på desktop */
  top: -92px;

  /* CENTRERING:
     left: 50% placerar vänsterkanten vid sidans mitt.
     translateX(-50%) flyttar tillbaka halva menybredden.
     Resultat = hela ligabandet hamnar exakt i mitten. */
  left: 50%;
  transform: translateX(-50%);

  /* Flexibel bredd:
     620px på stora skärmar men aldrig bredare än viewporten minus 32px. */
  width: min(620px, calc(100vw - 32px));

  /* Ingen automatisk margin behövs eftersom vi centrerar med transform */
  margin: 0;

  /* Grid placerar ligorna bredvid varandra */
  display: grid;

  /* Fem exakt lika breda kolumner */
  grid-template-columns: repeat(5, minmax(0, 1fr));

  /* Litet mellanrum mellan ligorna */
  gap: 8px;

  /* Alla kort börjar på samma vertikala nivå */
  align-items: start;

  /* Lite utrymme under korten innan linjen */
  padding-bottom: 8px;

  /* Ligger ovanför bakgrunden men under huvudloggan */
  z-index: 40;
}


/* ==========================================================
   LINJEN UNDER LIGABANDET

   NYTT:
   Linjen är fast kopplad till .league-menu.

   bottom: 0 betyder att den alltid ligger vid ligabandets
   nederkant och inte kan flyta långt upp eller ner separat.
   ========================================================== */

.league-menu::after {
  content: "";

  position: absolute;

  left: 50%;

  /* Linjen sitter direkt under ligorna */
  bottom: 0;

  transform: translateX(-50%);

  /* Lite smalare än hela ligabandet */
  width: 94%;

  /* Tunn linje */
  height: 1px;

  /* Transparent i kanterna -> vit/blå i mitten */
  background:
    linear-gradient(90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.25) 12%,
      rgba(89, 223, 255, 0.95) 50%,
      rgba(255, 255, 255, 0.25) 88%,
      transparent 100%);

  /* Lätt blå glow */
  box-shadow:
    0 0 6px rgba(89, 223, 255, 0.30);
}


/* ==========================================================
   LEAGUE CARD
   Varje enskild liga.

   NYTT:
   Höjden är låst till 72px.
   Det förhindrar långa hover-pelare.
   ========================================================== */

.league-card {

  /* Exakt höjd istället för stor min-height */
  height: 100px;
  min-height: 72px;

  /* Flex gör det enkelt att placera logo och text */
  display: flex;

  /* Logo ovanför texten */
  flex-direction: column;

  /* Centrerar från vänster till höger */
  align-items: center;

  /* Centrerar uppifrån och ned */
  justify-content: center;

  /* Litet mellanrum mellan logo och liganamn */
  gap: 4px;

  /* Mindre padding gör hover-rutan kompakt */
  padding: 4px 6px;

  /* Rundade hörn */
  border-radius: 12px;

  /* Muspekaren blir hand */
  cursor: pointer;

  /* Förhindrar att innehåll påverkar höjden */
  overflow-x: hidden;
  overflow-y: auto;

  /* Smooth hover-animation */
  transition:
    transform 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}


/* ==========================================================
   LEAGUE LOGO
   Alla ligalogor får samma bildyta.

   VIKTIG FIX:
   Den gamla filen hade height: 425px.
   Nu är både width och height 42px.
   ========================================================== */

.league-logo {

  /* Samma bredd på alla ligalogor */
  width: 42px;

  /* Samma höjd på alla ligalogor */
  height: 42px;

  /* Hela loggan visas utan att förvrängas */
  object-fit: contain;

  /* Förhindrar att bilden växer p.g.a. flex */
  flex-shrink: 0;

  /* Ingen stor extra marginal */
  margin-bottom: 0;
}


/* ==========================================================
   LEAGUE NAME
   Texten under varje liga-logo.
   ========================================================== */

.league-name {

  font-family:
    Inter,
    Arial,
    Helvetica,
    sans-serif;

  /* Textstorlek */
  font-size: 12px;

  /* Halvfet */
  font-weight: 600;

  /* Nästan vit */
  color: rgba(255, 255, 255, 0.88);

  /* Centrerar liganamnet */
  text-align: center;

  /* Samma höjd för alla liganamn */
  min-height: 15px;

  /* Hjälper till att hålla namn på samma nivå */
  display: flex;
  align-items: center;
  justify-content: center;

  /* Förhindrar onödig radbrytning på desktop */
  white-space: nowrap;

  line-height: 1;
}


/* ==========================================================
   HOVER
   Vad som händer när musen förs över en liga.

   NYTT:
   Hover-skuggan är kortare och kompaktare.
   ========================================================== */

.league-card:hover {

  /* Bara en liten rörelse uppåt */
  transform: translateY(-3px);

  /* Svag ljus ton */
  background:
    rgba(255, 255, 255, 0.035);

  /* Mycket mindre shadow än tidigare */
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.18);
}


/* ==========================================================
   TABLET / MINDRE PC
   När skärmen är 1024px bred eller mindre.

   Bandet behåller sin fasta top-position.
   Det blir bara smalare.
   ========================================================== */

@media (max-width: 1024px) {

  .league-menu {

    /* Behåller samma vertikala position som desktop */
    top: -88px;

    /* Behåller exakt centrering även på mindre PC/platta */
    left: 50%;
    transform: translateX(-50%);

    /* Smalare men fortfarande responsiv meny */
    width: min(500px, calc(100vw - 28px));

    /* Mindre mellanrum */
    gap: 5px;
  }


  .league-card {
    height: 96px;
    min-height: 68px;
  }


  .league-logo {
    width: 36px;
    height: 36px;
  }


  .league-name {
    font-size: 10px;
  }
}


/* ==========================================================
   MOBILE
   När skärmen är 700px bred eller mindre.

   På mobil finns inte tillräckligt med plats bredvid
   MatchIntel-loggan.

   Därför flyttas ligabandet medvetet till en fast rad
   under MatchIntel-loggan.

   Det "hoppar" alltså inte dit av sig själv.
   ========================================================== */

@media (max-width: 700px) {

  .league-menu {

    /* Fortfarande fixed så bandet inte flyter runt med sidinnehållet */
    position: absolute;

    /* På mobil placeras ligorna under MatchIntel-loggan */
    top: 130px;

    /* Lika mycket luft på vänster och höger sida */
    left: 12px;
    right: 12px;

    /* Viktigt:
       Desktop använder translateX(-50%).
       På mobil stänger vi av den eftersom left/right styr bredden. */
    transform: none;

    /* Fyll utrymmet mellan vänster och höger kant */
    width: auto;

    /* Fem ligor ligger kvar på en rad */
    grid-template-columns: repeat(5, minmax(0, 1fr));

    /* Mycket litet gap för små skärmar */
    gap: 3px;

    padding-bottom: 7px;
  }


  .league-card {
    height: 88px;
    min-height: 60px;

    padding: 3px 2px;
  }


  .league-logo {
    width: 30px;
    height: 30px;
  }


  .league-name {
    font-size: 8px;

    white-space: nowrap;
  }


  /* Linjen följer fortfarande ligabandet */
  .league-menu::after {
    bottom: 0;

    width: 96%;
  }
}


/* ==========================================================
   EXTRA SMALL MOBILE
   För mycket smala telefoner, t.ex. cirka 320–420px.

   Här minskar vi endast storlek och text.
   Menyn förblir centrerad/fyller bredden och linjen följer med.
   ========================================================== */

@media (max-width: 420px) {

  .league-menu {
    top: 22px;

    left: 8px;
    right: 8px;

    gap: 2px;
  }

  .league-card {
    height: 55px;
    min-height: 55px;

    padding: 2px 1px;
  }

  .league-logo {
    width: 55px;
    height: 27px;
  }

  .league-name {
    font-size: 7px;
  }

  .league-menu::after {
    width: 98%;
  }
}


/* ==========================================================
   MATCHINTEL LOGO - MOBILE
   Gör huvudloggan något mindre på mobil.
   ========================================================== */

@media (max-width: 600px) {

  .matchintel-logo {
    top: 16px;
    left: 16px;

    min-width: 225px;
    height: 58px;
  }


  .logo-ball-wrap {
    width: 68px;
    height: 40px;

    flex-basis: 40px;

    margin-right: 8px;
  }


  .logo-ball {
    width: 37px;
    height: 37px;
  }


  .logo-text {
    font-size: 27px;
  }


  .logo-shine {
    left: 43px;

    width: 164px;
  }
}


/* ==========================================================
   ACCESSIBILITY
   Om användaren har valt reducerade animationer i systemet.
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

  .logo-ball-wrap,
  .logo-ball,
  .logo-letter,
  .logo-shine,
  .ball-glow {
    animation: none !important;
    transition: none !important;
  }
}


/* ==========================================================
   MATCH FILTER BAR
   Första raden:
   Today's matches / Tomorrow / This Week / Sort by
   ========================================================== */

.match-filter-bar {
  position: absolute;

  top: 20px;
  left: 50%;
  transform: translateX(-50%);

  width: min(620px, calc(100vw - 32px));

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 14px;

  padding: 8px 12px;

  border-radius: 12px;

  background: rgba(255, 255, 255, 0.025);

  border: 1px solid rgba(89, 223, 255, 0.10);

  backdrop-filter: blur(8px);

  z-index: 35;
}


/* ==========================================================
   DATUMKNAPPAR
   ========================================================== */

.filter-btn {
  border: none;
  background: transparent;

  color: rgba(255, 255, 255, 0.78);

  font-size: 13px;
  font-weight: 600;

  cursor: pointer;

  padding: 7px 10px;

  border-radius: 8px;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}


.filter-btn:hover {
  background: rgba(89, 223, 255, 0.08);

  color: white;

  transform: translateY(-1px);
}


.filter-btn.active {
  background: rgba(89, 223, 255, 0.12);

  color: var(--logo-cyan);
}


/* ==========================================================
   SORTERING
   ========================================================== */

.sort-wrap {
  display: flex;
  align-items: center;

  gap: 6px;

  margin-left: 8px;
}


.sort-label {
  color: rgba(255, 255, 255, 0.58);

  font-size: 12px;
}


.sort-select {
  background: rgba(6, 20, 38, 0.95);

  color: white;

  border:
    1px solid rgba(89, 223, 255, 0.18);

  border-radius: 7px;

  padding: 6px 8px;

  font-size: 12px;

  outline: none;
}


/* ==========================================================
   MARKET FILTER BAR
   Andra raden:
   1X2 / Goals / BTTS / Corners / Cards / Correct Score / Scorers
   ========================================================== */

.market-filter-bar {
  position: absolute;

  top: 70px;
  left: 50%;
  transform: translateX(-50%);

  width: min(680px, calc(100vw - 32px));

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 10px;

  padding: 7px 12px;

  border-radius: 12px;

  background: rgba(255, 255, 255, 0.018);

  border: 1px solid rgba(255, 255, 255, 0.04);

  z-index: 35;
}


/* ==========================================================
   MARKET KNAPPAR
   ========================================================== */

.market-btn {
  border: none;

  background: transparent;

  color: rgba(255, 255, 255, 0.72);

  font-size: 13px;
  font-weight: 600;

  cursor: pointer;

  padding: 7px 10px;

  border-radius: 8px;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}


.market-btn:hover {
  background: rgba(89, 223, 255, 0.08);

  color: white;

  transform: translateY(-1px);
}


.market-btn.active {
  color: var(--logo-cyan);

  background: rgba(89, 223, 255, 0.10);
}


/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 900px) {

  .match-filter-bar,
  .market-filter-bar {
    width: calc(100vw - 24px);

    gap: 6px;

    overflow-x: auto;

    justify-content: flex-start;
  }

  .filter-btn,
  .market-btn {
    flex: 0 0 auto;
  }
}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 600px) {

  .match-filter-bar {
    top: 165px;

    padding: 6px 8px;
  }

  .market-filter-bar {
    top: 215px;

    padding: 6px 8px;
  }

  .filter-btn,
  .market-btn {
    font-size: 11px;

    padding: 6px 8px;
  }

  .sort-label {
    font-size: 10px;
  }

  .sort-select {
    font-size: 10px;
  }
}


/* ==========================================================
   ändrar färg på Ligue 1, Serie A och Bundesliga
   ========================================================== */

.ligue1-logo {
  filter: brightness(0) invert(1) drop-shadow(0 0 6px rgba(89, 223, 255, 0.35));
}


/* ==========================================================
   HOMEPAGE CONTENT LAYOUT
   These sections are visual placeholders until backend wiring.
   ========================================================== */

.homepage-main {
  position: relative;
  z-index: 5;

  width: min(1180px, calc(100% - 32px));

  /*
    Existing navigation and filter bars occupy the upper area.
    This margin keeps real page content safely below them.
  */
  margin: 200px auto 0;

  padding-bottom: 32px;
}


/* ==========================================================
   ADVERTISEMENT PLACEHOLDER
   Reserved space. No advertising provider is connected.
   ========================================================== */

.ad-slot {
  position: relative;
  top: 120px;

  width: min(760px, 100%);
  min-height: 150px;

  margin: 0 auto 28px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 4px;

  border:
    1px dashed rgba(255, 255, 255, 0.12);

  border-radius: 14px;

  background:
    rgba(255, 255, 255, 0.012);

  color:
    rgba(255, 255, 255, 0.40);
}

.ad-slot-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ad-slot-note {
  font-size: 12px;
}

.ad-slot-second {
  top: -360px;

  width: 450px;
  min-height: 75px;

  margin: 0 auto 20px;
}



/* ==========================================================
   GENERIC HOMEPAGE SECTION
   ========================================================== */

.home-section {
  margin-top: 24px;

  padding: 22px;

  border:
    1px solid rgba(89, 223, 255, 0.08);

  border-radius: 18px;

  background:
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.024),
      rgba(255, 255, 255, 0.010));

  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.10);

  backdrop-filter: blur(10px);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 16px;

  margin-bottom: 18px;
}

.section-heading h1,
.section-heading h2 {
  margin: 4px 0 0;

  color: var(--logo-white);

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

  font-size: clamp(21px, 2.3vw, 30px);
  line-height: 1.15;
}

.section-eyebrow {
  display: inline-block;

  color: var(--logo-cyan);

  font-family:
    Inter,
    Arial,
    sans-serif;

  font-size: 10px;
  font-weight: 800;

  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-status-pill,
.ai-required-badge {
  flex: 0 0 auto;

  padding: 6px 9px;

  border-radius: 999px;

  font-family:
    Inter,
    Arial,
    sans-serif;

  font-size: 10px;
  font-weight: 700;

  color: rgba(255, 255, 255, 0.65);

  background:
    rgba(255, 255, 255, 0.035);

  border:
    1px solid rgba(255, 255, 255, 0.07);
}

.ai-required-badge {
  color: var(--logo-cyan);

  border-color:
    rgba(89, 223, 255, 0.17);

  background:
    rgba(89, 223, 255, 0.055);
}


/* ==========================================================
   FEATURED MATCHES
   ========================================================== */

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 14px;
}

.placeholder-match-card {
  min-height: 150px;

  padding: 18px;

  border-radius: 14px;

  background:
    rgba(2, 9, 20, 0.42);

  border:
    1px solid rgba(255, 255, 255, 0.045);
}

.placeholder-match-card strong {
  display: block;

  margin-top: 7px;

  color: rgba(255, 255, 255, 0.92);

  font-size: 15px;
}

.placeholder-match-card p {
  margin:
    8px 0 0;

  color:
    rgba(255, 255, 255, 0.50);

  font-size: 12px;
  line-height: 1.55;
}

.placeholder-kicker {
  color: var(--logo-cyan);

  font-size: 9px;
  font-weight: 800;

  letter-spacing: 0.11em;
  text-transform: uppercase;
}


/* ==========================================================
   GLOBAL BEST SINGLE
   ========================================================== */

.global-best-placeholder {
  display: flex;
  align-items: center;

  gap: 16px;

  padding: 20px;

  border-radius: 14px;

  background:
    radial-gradient(circle at 15% 50%,
      rgba(89, 223, 255, 0.08),
      transparent 28%),
    rgba(2, 9, 20, 0.42);

  border:
    1px solid rgba(89, 223, 255, 0.10);
}

.global-best-icon {
  flex: 0 0 auto;

  width: 48px;
  height: 48px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  color: var(--logo-cyan);

  background:
    rgba(89, 223, 255, 0.075);

  box-shadow:
    0 0 22px rgba(89, 223, 255, 0.08);
}

.global-best-placeholder strong {
  color: rgba(255, 255, 255, 0.92);
}

.global-best-placeholder p {
  margin: 6px 0 0;

  color: rgba(255, 255, 255, 0.50);

  font-size: 12px;
  line-height: 1.55;
}


/* ==========================================================
   TODAY'S MATCHES EMPTY STATE
   ========================================================== */

.matches-container {
  min-height: 180px;

  display: grid;
  place-items: center;
}

.matches-container.homepage-today-grid {
  min-height: 0;
  display: grid;
  place-items: initial;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.empty-state {
  max-width: 520px;

  padding: 26px;

  text-align: center;

  color: rgba(255, 255, 255, 0.52);
}

.empty-state-ball {
  margin-bottom: 10px;

  font-size: 26px;

  opacity: 0.9;
}

.empty-state strong {
  display: block;

  color: rgba(255, 255, 255, 0.88);
}

.empty-state p {
  margin: 8px 0 0;

  font-size: 12px;
  line-height: 1.55;
}


/* ==========================================================
   SYSTEM STATUS
   ========================================================== */

.system-status-grid {
  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 10px;
}

.status-item {
  padding: 14px;

  border-radius: 12px;

  background:
    rgba(2, 9, 20, 0.34);

  border:
    1px solid rgba(255, 255, 255, 0.04);
}

.status-item span {
  display: block;

  color:
    rgba(255, 255, 255, 0.44);

  font-size: 10px;
}

.status-item strong {
  display: block;

  margin-top: 5px;

  color:
    rgba(255, 255, 255, 0.84);

  font-size: 12px;
}


/* ==========================================================
   FOOTER
   ========================================================== */

.site-footer {
  position: relative;
  z-index: 5;

  width: min(1180px, calc(100% - 32px));

  margin: 28px auto 0;

  padding:
    26px 4px max(28px, env(safe-area-inset-bottom));

  color:
    rgba(255, 255, 255, 0.48);

  font-family:
    Inter,
    Arial,
    sans-serif;
}

.site-footer::before {
  content: "";

  display: block;

  height: 1px;

  margin-bottom: 24px;

  background:
    linear-gradient(90deg,
      transparent,
      rgba(89, 223, 255, 0.42),
      transparent);
}

.footer-brand {
  display: flex;
  flex-direction: column;

  gap: 5px;
}

.footer-brand strong {
  color:
    rgba(255, 255, 255, 0.90);

  font-size: 16px;
}

.footer-brand span {
  font-size: 11px;
}

.footer-links {
  margin-top: 18px;

  display: flex;
  flex-wrap: wrap;

  gap: 8px 18px;
}

.footer-links a,
.footer-cookie-button {
  border: 0;
  padding: 0;

  background: transparent;

  color:
    rgba(255, 255, 255, 0.62);

  font:
    inherit;

  font-size: 11px;

  text-decoration: none;

  cursor: pointer;
}

.footer-links a:hover,
.footer-cookie-button:hover {
  color: var(--logo-cyan);
}

.footer-responsible {
  margin-top: 20px;

  display: flex;
  flex-wrap: wrap;

  gap: 6px 18px;

  font-size: 10px;
}

.footer-bottom {
  margin-top: 18px;

  display: flex;
  justify-content: space-between;

  gap: 16px;

  font-size: 9px;
}


/* ==========================================================
   COOKIE SETTINGS MODAL
   ========================================================== */

.cookie-modal-backdrop {
  position: fixed;
  inset: 0;

  z-index: 1000;

  display: grid;
  place-items: center;

  padding: 16px;

  background:
    rgba(0, 4, 11, 0.72);

  backdrop-filter: blur(8px);
}

.cookie-modal-backdrop[hidden] {
  display: none;
}

.cookie-modal {
  position: relative;

  width: min(560px, 100%);

  max-height: min(680px, calc(100vh - 32px));

  overflow-y: auto;

  padding: 24px;

  border-radius: 18px;

  color: rgba(255, 255, 255, 0.70);

  background:
    linear-gradient(180deg,
      rgba(10, 30, 52, 0.98),
      rgba(3, 12, 25, 0.99));

  border:
    1px solid rgba(89, 223, 255, 0.18);

  box-shadow:
    0 22px 80px rgba(0, 0, 0, 0.48);
}

.cookie-modal h2 {
  margin: 5px 0 10px;

  color: white;
}

.cookie-modal p {
  font-size: 12px;
  line-height: 1.6;
}

.cookie-close {
  position: absolute;

  right: 14px;
  top: 12px;

  width: 32px;
  height: 32px;

  border: 0;
  border-radius: 50%;

  background:
    rgba(255, 255, 255, 0.05);

  color: white;

  font-size: 20px;
  cursor: pointer;
}

.cookie-row {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 16px;

  margin-top: 10px;

  padding: 13px;

  border-radius: 11px;

  background:
    rgba(255, 255, 255, 0.025);

  border:
    1px solid rgba(255, 255, 255, 0.045);
}

.cookie-row strong,
.cookie-row span {
  display: block;
}

.cookie-row strong {
  color:
    rgba(255, 255, 255, 0.86);

  font-size: 12px;
}

.cookie-row div span {
  margin-top: 3px;

  color:
    rgba(255, 255, 255, 0.46);

  font-size: 10px;
}

.cookie-always-on,
.cookie-off {
  flex: 0 0 auto;

  padding: 4px 7px;

  border-radius: 999px;

  font-size: 9px;
  font-weight: 800;
}

.cookie-always-on {
  color: var(--logo-cyan);

  background:
    rgba(89, 223, 255, 0.08);
}

.cookie-off {
  color:
    rgba(255, 255, 255, 0.50);

  background:
    rgba(255, 255, 255, 0.04);
}

.cookie-legal-note a {
  color: var(--logo-cyan);
}


/* ==========================================================
   LEGAL / INFORMATION PAGES
   ========================================================== */

.legal-body {
  min-height: 100vh;

  overflow-x: hidden;
  overflow-y: auto;
}

.legal-shell {
  position: relative;
  z-index: 5;

  width: min(900px, calc(100% - 32px));

  margin: 120px auto 0;

  padding-bottom: 40px;
}

.legal-hero {
  padding: 24px;

  border-radius: 18px;

  border:
    1px solid rgba(89, 223, 255, 0.10);

  background:
    rgba(255, 255, 255, 0.018);
}

.legal-hero h1 {
  margin: 6px 0 8px;

  color: white;

  font-family:
    Inter,
    Arial,
    sans-serif;

  font-size: clamp(26px, 5vw, 40px);
}

.legal-hero p {
  max-width: 720px;

  margin: 0;

  color:
    rgba(255, 255, 255, 0.58);

  font-size: 13px;
  line-height: 1.65;
}

.legal-updated {
  display: inline-block;

  margin-top: 12px;

  color:
    rgba(255, 255, 255, 0.38);

  font-size: 10px;
}

.legal-warning {
  margin-top: 16px;

  padding: 14px;

  border-radius: 12px;

  color:
    rgba(255, 255, 255, 0.68);

  background:
    rgba(255, 186, 73, 0.055);

  border:
    1px solid rgba(255, 186, 73, 0.16);

  font-size: 11px;
  line-height: 1.55;
}

.legal-card {
  margin-top: 16px;

  padding: 22px;

  border-radius: 16px;

  background:
    rgba(255, 255, 255, 0.016);

  border:
    1px solid rgba(255, 255, 255, 0.045);

  color:
    rgba(255, 255, 255, 0.64);

  font-family:
    Inter,
    Arial,
    sans-serif;

  font-size: 12px;
  line-height: 1.72;
}

.legal-card h2 {
  margin:
    0 0 10px;

  color:
    rgba(255, 255, 255, 0.94);

  font-size: 17px;
}

.legal-card h3 {
  margin:
    18px 0 7px;

  color:
    rgba(255, 255, 255, 0.84);

  font-size: 13px;
}

.legal-card ul {
  padding-left: 18px;
}

.legal-card a {
  color: var(--logo-cyan);
}

.legal-table {
  width: 100%;

  border-collapse: collapse;

  margin-top: 12px;
}

.legal-table th,
.legal-table td {
  padding:
    10px 8px;

  text-align: left;
  vertical-align: top;

  border-bottom:
    1px solid rgba(255, 255, 255, 0.055);
}

.legal-table th {
  color:
    rgba(255, 255, 255, 0.78);

  font-size: 10px;
}

.legal-table td {
  color:
    rgba(255, 255, 255, 0.55);

  font-size: 10px;
}

.legal-placeholder {
  padding: 2px 5px;

  border-radius: 5px;

  color: #ffd89a;

  background:
    rgba(255, 190, 90, 0.075);

  border:
    1px solid rgba(255, 190, 90, 0.12);
}


/* ==========================================================
   RESPONSIVE HOMEPAGE CONTENT
   ========================================================== */

@media (max-width: 900px) {

  .homepage-main {
    margin-top: 365px;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .system-status-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .footer-bottom {
    flex-direction: column;
  }
}


@media (max-width: 700px) {

  .homepage-main {
    /*
      On mobile the navigation stacks lower.
      Leave enough space before first content section.
    */
    margin-top: 330px;
  }

  .home-section {
    padding: 16px;
  }

  .ad-slot {
    min-height: 72px;
  }

  .section-heading {
    align-items: flex-start;
  }

  .global-best-placeholder {
    align-items: flex-start;
  }

  .legal-shell {
    margin-top: 95px;
  }
}


@media (max-width: 480px) {

  .homepage-main,
  .site-footer,
  .legal-shell {
    width:
      calc(100% - 20px);
  }

  .system-status-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    flex-direction: column;
  }

  .home-section,
  .legal-card,
  .legal-hero {
    border-radius: 13px;
  }
}


/* ==========================================================
   TEMPORARY BUTTON CLICK FEEDBACK
   ========================================================== */

.filter-btn.ui-clicked,
.market-btn.ui-clicked {
  color: var(--logo-cyan);

  background:
    rgba(89, 223, 255, 0.10);

  transform:
    translateY(0) scale(0.96);
}



/* ==========================================================
   LEAGUE LINKS
   League cards are now real links to their own pages.
   ========================================================== */

.league-link {
  color: inherit;
  text-decoration: none;
}


/* ==========================================================
   ACCOUNT / PLAN / LANGUAGE AREA
   Page-positioned (absolute), so it does NOT follow scrolling.
   ========================================================== */

.top-account-area {
  position: absolute;

  top: -170px;
  right: 23px;

  z-index: 10;

  display: flex;
  align-items: center;
  justify-content: flex-end;

  gap: 2px;

  max-width: calc(50vw - 50px);

  font-family:
    Inter,
    Arial,
    sans-serif;
}

.account-plan-badge {
  padding: 7px 10px;

  border-radius: 999px;

  color: var(--logo-cyan);

  background: rgba(89, 223, 255, 0.08);

  border: 1px solid rgba(89, 223, 255, 0.15);

  font-size: 10px;
  font-weight: 800;

  white-space: nowrap;
}

.account-user-button,
.purchase-plan-button {
  border: 1px solid rgba(255, 255, 255, 0.08);

  border-radius: 9px;

  padding: 7px 10px;

  background: rgba(255, 255, 255, 0.025);

  color: rgba(255, 255, 255, 0.78);

  font-size: 10px;
  font-weight: 700;

  white-space: nowrap;

  cursor: pointer;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.account-user-button:hover,
.purchase-plan-button:hover {
  color: white;

  background: rgba(89, 223, 255, 0.06);

  border-color: rgba(89, 223, 255, 0.18);
}

.purchase-plan-button {
  color: var(--logo-cyan);
}

.language-control {
  display: flex;
  align-items: center;

  gap: 5px;
}

.language-label {
  color: rgba(255, 255, 255, 0.42);

  font-size: 9px;
}

.language-select {
  min-width: 88px;

  padding: 6px 7px;

  border-radius: 8px;

  border: 1px solid rgba(255, 255, 255, 0.08);

  background: rgba(4, 14, 28, 0.96);

  color: rgba(255, 255, 255, 0.80);

  font-size: 10px;

  outline: none;
}


/* ==========================================================
   PURCHASE PLAN MODAL
   Modal itself is fixed because it must cover the viewport.
   ========================================================== */

.plan-modal-backdrop {
  position: fixed;
  inset: 0;

  z-index: 1200;

  display: grid;
  place-items: center;

  padding: 16px;

  background: rgba(0, 4, 11, 0.78);

  backdrop-filter: blur(9px);
}

.plan-modal-backdrop[hidden] {
  display: none;
}

.plan-modal {
  position: relative;

  width: min(1020px, 100%);

  max-height: calc(100vh - 32px);

  overflow-y: auto;

  padding: 26px;

  border-radius: 20px;

  background:
    linear-gradient(180deg,
      rgba(10, 30, 52, 0.99),
      rgba(3, 12, 25, 0.99));

  border: 1px solid rgba(89, 223, 255, 0.16);

  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.50);

  color: rgba(255, 255, 255, 0.70);
}

.plan-modal h2 {
  margin: 5px 0 8px;

  color: white;
}

.plan-intro,
.plan-note {
  color: rgba(255, 255, 255, 0.52);

  font-size: 11px;
  line-height: 1.55;
}

.plan-close {
  position: absolute;

  top: 12px;
  right: 14px;

  width: 34px;
  height: 34px;

  border: 0;
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.05);

  color: white;

  font-size: 20px;

  cursor: pointer;
}

.plan-grid {
  margin-top: 22px;

  display: grid;

  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 14px;
}

.plan-card {
  position: relative;

  min-height: 360px;

  display: flex;
  flex-direction: column;

  padding: 20px;

  border-radius: 16px;

  background: rgba(255, 255, 255, 0.020);

  border: 1px solid rgba(255, 255, 255, 0.055);
}

.featured-plan {
  border-color: rgba(89, 223, 255, 0.24);

  background:
    linear-gradient(180deg,
      rgba(89, 223, 255, 0.055),
      rgba(255, 255, 255, 0.016));
}

.premium-max-plan {
  border-color: rgba(85, 240, 193, 0.18);
}

.plan-popular {
  position: absolute;

  top: 12px;
  right: 12px;

  padding: 4px 7px;

  border-radius: 999px;

  color: var(--logo-cyan);

  background: rgba(89, 223, 255, 0.08);

  font-size: 8px;
  font-weight: 800;

  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plan-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;

  gap: 12px;
}

.plan-name {
  color: white;

  font-size: 18px;
  font-weight: 800;
}

.plan-card-head strong {
  color: var(--logo-cyan);

  font-size: 11px;
}

.plan-card ul {
  flex: 1;

  margin: 18px 0;

  padding-left: 18px;

  color: rgba(255, 255, 255, 0.58);

  font-size: 11px;
  line-height: 1.65;
}

.plan-card li+li {
  margin-top: 6px;
}

.plan-cta {
  width: 100%;

  border: 0;
  border-radius: 10px;

  padding: 10px 12px;

  background:
    linear-gradient(90deg,
      var(--logo-cyan-strong),
      var(--logo-cyan));

  color: #03101d;

  font-size: 10px;
  font-weight: 900;

  cursor: pointer;
}

.plan-cta.secondary {
  background: rgba(255, 255, 255, 0.045);

  color: rgba(255, 255, 255, 0.55);
}


/* ==========================================================
   EMPTY LEAGUE PAGES
   ========================================================== */

.league-empty-page {
  min-height: 100vh;

  overflow-x: hidden;
  overflow-y: auto;
}

.league-empty-shell {
  position: relative;
  z-index: 5;

  min-height: 100vh;


}

/* Flyttar bara MatchIntel-loggan på ligasidorna */
.league-empty-page .matchintel-logo {
  top: 250px;
}

/* ==========================================================
   RESPONSIVE ACCOUNT / PLAN AREA
   ========================================================== */

@media (max-width: 1100px) {

  .top-account-area {
    top: 92px;

    left: 18px;
    right: 18px;

    max-width: none;

    flex-wrap: wrap;

    justify-content: center;
  }
}

@media (max-width: 760px) {

  .top-account-area {
    top: 86px;

    left: 10px;
    right: 10px;

    gap: 5px;
  }

  .language-label {
    display: none;
  }

  .plan-grid {
    grid-template-columns: 1fr;
  }

  .plan-card {
    min-height: auto;
  }
}

@media (max-width: 440px) {

  .account-plan-badge,
  .account-user-button,
  .purchase-plan-button {
    padding: 6px 7px;

    font-size: 9px;
  }

  .language-select {
    min-width: 74px;

    font-size: 9px;
  }
}

/* ==========================================================
   API-CONNECTED WEBSITE LAYER
   Keeps the existing MatchIntel dark-blue/cyan design.
   No Ops Dashboard green styling is reused.
   ========================================================== */

.league-link {
  color: inherit;
  text-decoration: none;
}

.data-page {
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

.data-page-main {
  position: relative;
  z-index: 5;
  width: min(1180px, calc(100% - 32px));
  margin: 370px auto 0;
  padding-bottom: 32px;
}

.data-feed-section {
  padding: 22px;
  border: 1px solid rgba(89, 223, 255, 0.09);
  border-radius: 18px;
  background:
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.024),
      rgba(255, 255, 255, 0.010));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.10);
  backdrop-filter: blur(10px);
}

.data-page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.data-page-heading h1 {
  margin: 4px 0 0;
  color: var(--logo-white);
  font-family: Inter, Arial, sans-serif;
  font-size: clamp(22px, 3vw, 32px);
}

.api-live-badge {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(89, 223, 255, 0.14);
  background: rgba(89, 223, 255, 0.06);
  color: var(--logo-cyan);
  font: 700 10px Inter, Arial, sans-serif;
}

.api-live-badge.api-offline {
  color: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.league-window-bar {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(680px, calc(100vw - 32px));
  z-index: 36;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;

  padding: 8px 12px;
  border: 1px solid rgba(89, 223, 255, 0.10);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(8px);
}

.data-window-btn {
  border: 0;
  border-radius: 8px;
  padding: 7px 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  font: 600 12px Inter, Arial, sans-serif;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.data-window-btn:hover {
  color: white;
  background: rgba(89, 223, 255, 0.07);
}

.data-window-btn.active {
  color: var(--logo-cyan);
  background: rgba(89, 223, 255, 0.11);
}

.website-match-list {
  display: grid;
  gap: 10px;
}

.website-match-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;

  padding: 14px 16px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.045);
  background: rgba(2, 9, 20, 0.42);
  color: inherit;
  text-decoration: none;

  transition:
    transform .2s ease,
    border-color .2s ease,
    background .2s ease;
}

.website-match-card:hover {
  transform: translateY(-2px);
  border-color: rgba(89, 223, 255, 0.14);
  background: rgba(89, 223, 255, 0.028);
}

.website-match-main {
  min-width: 0;
}

.website-match-league {
  color: rgba(255, 255, 255, 0.40);
  font: 700 9px Inter, Arial, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.website-match-teams {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.92);
  font: 800 15px Inter, Arial, sans-serif;
}

.website-match-meta {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.48);
  font: 500 10px Inter, Arial, sans-serif;
}

.website-match-action {
  color: var(--logo-cyan);
  font: 800 10px Inter, Arial, sans-serif;
  white-space: nowrap;
}

.website-match-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.homepage-today-card {
  display: block;
  min-width: 0;
  padding: 18px;
  border-radius: 16px;
  min-height: 168px;
}

.homepage-today-card .website-match-main {
  min-width: 0;
}

.homepage-today-card .website-match-league {
  color: rgba(255, 255, 255, 0.42);
  font: 700 10px Inter, Arial, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.homepage-today-card .website-match-teams {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.95);
  font: 850 16px Inter, Arial, sans-serif;
  line-height: 1.38;
}

.homepage-today-card .website-match-meta {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.52);
  font: 500 12px Inter, Arial, sans-serif;
}

.homepage-today-card .website-match-action {
  color: var(--logo-cyan);
  font: 800 11px Inter, Arial, sans-serif;
}

.homepage-today-card .market-preview {
  margin-top: 14px;
}

.homepage-today-card .market-preview-cell {
  min-height: 64px;
}

.market-preview {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: 7px;
  margin-top: 3px;
}

.market-preview-cell {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.035);
  background: rgba(255, 255, 255, 0.018);
}

.market-preview-cell span {
  display: block;
  color: rgba(255, 255, 255, 0.42);
  font: 700 8px Inter, Arial, sans-serif;
  text-transform: uppercase;
}

.market-preview-cell strong {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.88);
  font: 800 13px Inter, Arial, sans-serif;
}

.market-preview-cell small {
  display: block;
  margin-top: 3px;
  color: rgba(89, 223, 255, 0.66);
  font: 600 8px Inter, Arial, sans-serif;
}

.matchintel-loading,
.matchintel-empty,
.matchintel-error {
  padding: 28px;
  text-align: center;
  border-radius: 13px;
  border: 1px dashed rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.46);
  font: 600 11px Inter, Arial, sans-serif;
}

.matchintel-error {
  color: rgba(255, 255, 255, 0.65);
}


@media (max-width: 980px) {
  .matches-container.homepage-today-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   MATCH ANALYSIS PAGE
   ========================================================== */

.match-analysis-main {
  position: relative;
  z-index: 5;
  width: min(1180px, calc(100% - 32px));
  margin: 120px auto 0;
  padding-bottom: 40px;
}

.match-analysis-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;

  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(89, 223, 255, 0.09);
  background: rgba(255, 255, 255, 0.018);
}

.back-link {
  color: var(--logo-cyan);
  text-decoration: none;
  font: 700 10px Inter, Arial, sans-serif;
}

.match-analysis-title h1 {
  margin: 5px 0 0;
  color: white;
  font: 800 clamp(20px, 3vw, 30px) Inter, Arial, sans-serif;
}

.match-analysis-title p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.46);
  font: 500 10px Inter, Arial, sans-serif;
}

.match-analysis-status {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--logo-cyan);
  background: rgba(89, 223, 255, 0.07);
  border: 1px solid rgba(89, 223, 255, 0.12);
  font: 800 9px Inter, Arial, sans-serif;
}

.match-market-tabs {
  margin-top: 12px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.045);
  background: rgba(255, 255, 255, 0.016);
}

.match-market-tab {
  flex: 0 0 auto;
  border: 0;
  border-radius: 8px;
  padding: 7px 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  font: 700 10px Inter, Arial, sans-serif;
  cursor: pointer;
}

.match-market-tab.active {
  color: var(--logo-cyan);
  background: rgba(89, 223, 255, 0.08);
}

.match-analysis-content {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.analysis-panel {
  padding: 18px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.045);
  background: rgba(2, 9, 20, 0.42);
}

.analysis-panel h2 {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.92);
  font: 800 16px Inter, Arial, sans-serif;
}

.analysis-panel-note {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.42);
  font: 500 10px/1.55 Inter, Arial, sans-serif;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 8px;
}

.analysis-stat {
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
  border: 1px solid rgba(255, 255, 255, 0.035);
}

.analysis-stat span {
  display: block;
  color: rgba(255, 255, 255, 0.42);
  font: 700 8px Inter, Arial, sans-serif;
  text-transform: uppercase;
}

.analysis-stat strong {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.88);
  font: 800 14px Inter, Arial, sans-serif;
}

.analysis-table {
  width: 100%;
  border-collapse: collapse;
  font: 500 10px Inter, Arial, sans-serif;
}

.analysis-table th,
.analysis-table td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.analysis-table th {
  color: rgba(255, 255, 255, 0.48);
}

.analysis-table td {
  color: rgba(255, 255, 255, 0.78);
}

@media (max-width: 900px) {
  .data-page-main {
    margin-top: 350px;
  }

  .league-window-bar {
    width: calc(100vw - 24px);
    justify-content: flex-start;
    overflow-x: auto;
  }

  .match-analysis-main {
    margin-top: 105px;
  }
}

@media (max-width: 650px) {
  .data-page-main {
    width: calc(100% - 20px);
    margin-top: 320px;
  }

  .data-feed-section {
    padding: 14px;
  }

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

  .website-match-action {
    display: none;
  }

  .match-analysis-main {
    width: calc(100% - 20px);
    margin-top: 95px;
  }

  .match-analysis-hero {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================
   HOMEPAGE API FIX
   Uses the existing MatchIntel dark-blue / cyan visual language.
   ========================================================== */

.featured-grid .matchintel-loading,
.featured-grid .matchintel-empty,
.featured-grid .matchintel-error {
  grid-column: 1 / -1;
}

.featured-api-card {
  display: block;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 14px;
  background: rgba(2, 9, 20, 0.42);
  color: inherit;
  text-decoration: none;
  transition:
    transform .2s ease,
    border-color .2s ease,
    background .2s ease;
}

.featured-api-card:hover {
  transform: translateY(-2px);
  border-color: rgba(89, 223, 255, 0.14);
  background: rgba(89, 223, 255, 0.028);
}

.featured-api-card strong {
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.92);
  font: 800 14px Inter, Arial, sans-serif;
}

.featured-api-card p {
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.50);
  font: 500 10px Inter, Arial, sans-serif;
}

.featured-api-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.featured-api-league {
  color: rgba(255, 255, 255, 0.38);
  font: 700 8px Inter, Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.featured-api-meta {
  margin-top: 10px;
  color: rgba(89, 223, 255, 0.66);
  font: 600 9px Inter, Arial, sans-serif;
}

.global-best-live strong {
  display: block;
  margin-top: 5px;
}

.global-best-open {
  display: inline-block;
  margin-top: 8px;
  color: var(--logo-cyan);
  text-decoration: none;
  font: 700 10px Inter, Arial, sans-serif;
}

.global-best-open:hover {
  text-decoration: underline;
}

.system-status-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.status-item strong {
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .system-status-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================
   MATCH ANALYSIS V2 — PUBLIC MATCHINTEL DESIGN
   ========================================================== */

/* Move match title/content clearly below all top navigation bars. */
.match-analysis-page .match-analysis-main {
  width: min(1180px, calc(100% - 32px));
  margin: 315px auto 0;
  padding-bottom: 44px;
}

.match-analysis-hero-v2 {
  display: block;
  padding: 20px;
}

.match-hero-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.match-analysis-title-v2 {
  margin-top: 14px;
}

.match-analysis-title-v2 h1 {
  margin: 5px 0 0;
  color: rgba(255,255,255,.96);
  font: 850 clamp(24px, 3vw, 34px) Inter, Arial, sans-serif;
}

.match-analysis-title-v2 p {
  margin-top: 7px;
}

.match-hero-1x2,
.three-way-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 18px;
}

.match-metric-card {
  min-width: 0;
  padding: 13px 14px;
  border-radius: 11px;
  border: 1px solid rgba(89,223,255,.08);
  background: rgba(2,9,20,.44);
}

.match-metric-label {
  display: block;
  color: rgba(255,255,255,.42);
  font: 800 9px Inter, Arial, sans-serif;
  letter-spacing: .06em;
}

.match-metric-value {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  min-height: 23px;
}

.match-metric-card small {
  display: block;
  margin-top: 6px;
  color: var(--logo-cyan);
  font: 650 8px Inter, Arial, sans-serif;
}

.metric-probability {
  color: rgba(255,255,255,.95);
  font: 850 14px Inter, Arial, sans-serif;
}

.metric-odds {
  color: #7ddfff;
  font: 700 11px Inter, Arial, sans-serif;
}

.metric-ev {
  font: 750 10px Inter, Arial, sans-serif;
}

.metric-ev-positive {
  color: #66e7aa;
}

.metric-ev-negative {
  color: #ff7f8d;
}

.metric-edge-tag {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 4px 7px;
  border-radius: 999px;
  border: 1px solid rgba(126,205,255,.20);
  background: rgba(126,205,255,.07);
  color: #83dbff;
  font: 800 8px Inter, Arial, sans-serif;
}

.metric-edge-tag.metric-negative {
  border-color: rgba(89,163,218,.25);
  background: rgba(30,76,110,.18);
  color: #82d9ff;
}

.metric-edge-tag.metric-neutral {
  border-color: rgba(89,163,218,.30);
  background: rgba(40,82,113,.22);
  color: #9ce2ff;
}

.metric-edge-tag.metric-value {
  border-color: rgba(76,223,148,.30);
  background: rgba(21,104,65,.22);
  color: #5af09f;
}

.metric-edge-tag.metric-strong-value {
  border-color: rgba(76,223,148,.42);
  background: rgba(15,112,65,.28);
  color: #4dffa1;
}

.metric-empty-value {
  display: inline-block;
  min-width: 1px;
  min-height: 18px;
}

/* Expected metrics + BTTS side by side */
.overview-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.25fr) minmax(260px, .75fr);
  gap: 12px;
}

.overview-top-grid > .analysis-panel {
  margin: 0;
}

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

.expected-group h3,
.market-subsection h3 {
  margin: 0 0 9px;
  color: rgba(255,255,255,.90);
  font: 800 13px Inter, Arial, sans-serif;
}

.expected-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.expected-value-card {
  min-width: 0;
  padding: 10px 8px;
  text-align: center;
  border-radius: 10px;
  border: 1px solid rgba(89,223,255,.08);
  background: rgba(2,9,20,.38);
}

.expected-value-card span {
  display: block;
  color: rgba(255,255,255,.42);
  font: 700 8px Inter, Arial, sans-serif;
}

.expected-value-card strong {
  display: block;
  margin-top: 5px;
  color: rgba(255,255,255,.94);
  font: 850 14px Inter, Arial, sans-serif;
}

.btts-metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btts-side-panel .btts-metric-grid {
  grid-template-columns: 1fr;
}

/* Market sections */
.full-market-panel {
  overflow: hidden;
}

.market-subsection + .market-subsection,
.team-market-grid {
  margin-top: 20px;
}

.team-market-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.analysis-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.analysis-market-table {
  min-width: 620px;
}

.analysis-market-table th:first-child,
.analysis-market-table td:first-child {
  width: 76px;
}

.analysis-market-table td {
  vertical-align: middle;
}

.analysis-market-table td:not(:first-child) {
  min-width: 230px;
}

.analysis-market-table td .metric-probability,
.analysis-market-table td .metric-odds,
.analysis-market-table td .metric-ev,
.analysis-market-table td .metric-edge-tag {
  margin-right: 5px;
}

.market-line {
  color: rgba(255,255,255,.86) !important;
  font-weight: 800;
}

.market-table-empty {
  min-height: 28px;
}

/* Correct score */
.score-probability-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.score-probability-card {
  padding: 10px;
  border: 1px solid rgba(89,223,255,.06);
  border-radius: 9px;
  background: rgba(2,9,20,.38);
  text-align: center;
}

.score-probability-card span {
  display: block;
  color: rgba(255,255,255,.54);
  font: 700 9px Inter, Arial, sans-serif;
}

.score-probability-card strong {
  display: block;
  margin-top: 4px;
  color: rgba(255,255,255,.94);
  font: 850 13px Inter, Arial, sans-serif;
}

/* Premium AI if a real persisted Best Single exists. */
.premium-ai-public {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 8px;
}

.premium-ai-public > div {
  padding: 11px;
  border-radius: 9px;
  border: 1px solid rgba(89,223,255,.06);
  background: rgba(2,9,20,.38);
}

.premium-ai-public span {
  display: block;
  color: rgba(255,255,255,.40);
  font: 700 8px Inter, Arial, sans-serif;
  text-transform: uppercase;
}

.premium-ai-public strong {
  display: block;
  margin-top: 5px;
  color: rgba(255,255,255,.90);
  font: 800 12px Inter, Arial, sans-serif;
}

@media (max-width: 1000px) {
  .match-analysis-page .match-analysis-main {
    margin-top: 305px;
  }

  .overview-top-grid {
    grid-template-columns: 1fr;
  }

  .btts-side-panel .btts-metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  .expected-metrics-grid,
  .team-market-grid {
    grid-template-columns: 1fr;
  }

  .score-probability-grid {
    grid-template-columns: repeat(4, minmax(0,1fr));
  }
}

@media (max-width: 700px) {
  .match-analysis-page .match-analysis-main {
    width: calc(100% - 20px);
    margin-top: 330px;
  }

  .match-hero-1x2,
  .three-way-metric-grid {
    grid-template-columns: 1fr;
  }

  .expected-metrics-grid {
    grid-template-columns: 1fr;
  }

  .btts-metric-grid,
  .btts-side-panel .btts-metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  .expected-values {
    grid-template-columns: repeat(3, minmax(0,1fr));
  }

  .premium-ai-public {
    grid-template-columns: 1fr 1fr;
  }

  .score-probability-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}


/* ==========================================================
   SCORESTATIX BRAND + ENTITY VISUALS
   ========================================================== */

.matchintel-logo {
  min-width: 285px;
}

.logo-text {
  font-size: 30px;
}

/* Team logos globally */
.entity-team-logo {
  width: 25px;
  height: 25px;
  object-fit: contain;
  flex: 0 0 25px;
  display: inline-block;
  vertical-align: middle;
}

.website-match-teams-with-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.website-team-name,
.featured-teams-with-logos > span:not(.featured-vs) {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.website-vs,
.featured-vs {
  color: rgba(255,255,255,.32);
  font-size: .82em;
}

.featured-teams-with-logos {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

/* Match hero team identity */
.match-analysis-title-v2 h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.match-title-team {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.entity-team-logo.match-title-logo {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}

.match-title-vs {
  color: rgba(255,255,255,.35);
  font-size: .55em;
  font-weight: 650;
}

/* Player photos */
.scorer-player-cell {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.entity-player-photo {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 1px solid rgba(89,223,255,.10);
  background: rgba(255,255,255,.025);
}

.entity-player-photo-empty {
  display: inline-block;
}

/* Sportmonks prediction publication box */
.sportmonks-predictions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
}

.sportmonks-prediction-card {
  padding: 13px;
  border: 1px solid rgba(89,223,255,.08);
  border-radius: 11px;
  background: rgba(2,9,20,.38);
}

.sportmonks-prediction-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.04);
}

.sportmonks-prediction-head strong {
  color: rgba(255,255,255,.92);
  font: 800 12px Inter,Arial,sans-serif;
}

.sportmonks-prediction-head span {
  color: var(--logo-cyan);
  font: 750 8px Inter,Arial,sans-serif;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.sportmonks-prediction-values {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(105px,1fr));
  gap: 7px;
  margin-top: 10px;
}

.sportmonks-prediction-values > div {
  padding: 9px;
  border-radius: 8px;
  background: rgba(255,255,255,.018);
}

.sportmonks-prediction-values span {
  display: block;
  color: rgba(255,255,255,.42);
  font: 650 8px Inter,Arial,sans-serif;
  text-transform: capitalize;
}

.sportmonks-prediction-values strong {
  display: block;
  margin-top: 4px;
  color: rgba(255,255,255,.91);
  font: 850 13px Inter,Arial,sans-serif;
}

/* ==========================================================
   MATCH PAGE HEADER COLLISION FIX
   The date/market bars stay where they are; the analysis hero
   begins clearly below them.
   ========================================================== */
.match-analysis-page .match-analysis-main {
  margin-top: 405px;
}

@media (max-width: 1000px) {
  .match-analysis-page .match-analysis-main {
    margin-top: 390px;
  }
}

@media (max-width: 700px) {
  .match-analysis-page .match-analysis-main {
    margin-top: 405px;
  }

  .sportmonks-predictions-grid {
    grid-template-columns: 1fr;
  }

  .match-analysis-title-v2 h1 {
    gap: 8px;
  }

  .entity-team-logo.match-title-logo {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }
}


/* ==========================================================
   SCORESTATIX MATCH PAGE — ALTERNATIVE 3 TOP
   Only the top/header/fixture hero is redesigned.
   Analysis content below remains unchanged.
   ========================================================== */

/* Compact premium top structure on match pages. */
.match-analysis-page .matchintel-logo {
  top: 18px;
  left: 28px;
}

.match-analysis-page .top-account-area {
  top: 22px;
  right: 28px;
}

.match-analysis-page .league-menu {
  top: 82px;
  width: min(760px, calc(100vw - 360px));
}

/* One clean date/navigation bar before the hero. */
.match-analysis-page .match-filter-bar {
  top: 158px;
  width: min(760px, calc(100vw - 32px));
}

/* Alternative 3 has the match-specific tabs BELOW the hero,
   so the old global market bar is removed only from match pages. */
.match-analysis-page .market-filter-bar {
  display: none;
}

/* Raise the whole match area substantially compared with the old page,
   but keep safe clearance under the top navigation. */
.match-analysis-page .match-analysis-main {
  width: min(1180px, calc(100% - 32px));
  margin: 224px auto 0;
  padding-bottom: 44px;
}

/* Stadium-like hero: real team logos/data, CSS atmosphere only. */
.match-analysis-page .match-analysis-hero-v3 {
  position: relative;
  min-height: 265px;
  overflow: hidden;
  padding: 18px 24px 24px;

  border: 1px solid rgba(89, 223, 255, 0.12);
  border-radius: 20px;

  background:
    radial-gradient(circle at 50% 112%,
      rgba(51, 204, 164, 0.20) 0%,
      rgba(28, 132, 157, 0.12) 25%,
      transparent 51%),
    radial-gradient(circle at 8% 5%,
      rgba(160, 224, 255, 0.20),
      transparent 27%),
    radial-gradient(circle at 92% 5%,
      rgba(160, 224, 255, 0.20),
      transparent 27%),
    linear-gradient(180deg,
      rgba(13, 40, 66, 0.94) 0%,
      rgba(5, 22, 39, 0.97) 54%,
      rgba(3, 15, 28, 0.99) 100%);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.025),
    0 20px 48px rgba(0,0,0,.18);
}

/* Pitch/stands depth without introducing fake photographic content. */
.match-analysis-page .match-analysis-hero-v3::before {
  content: "";
  position: absolute;
  left: -5%;
  right: -5%;
  bottom: -30px;
  height: 122px;

  background:
    repeating-linear-gradient(
      90deg,
      rgba(62, 214, 166, .028) 0 70px,
      rgba(85, 231, 185, .052) 70px 140px
    ),
    linear-gradient(
      180deg,
      rgba(46, 177, 139, .06),
      rgba(9, 46, 44, .30)
    );

  border-top: 1px solid rgba(89, 223, 255, .09);
  transform: perspective(280px) rotateX(56deg);
  transform-origin: bottom;
  pointer-events: none;
}

.match-analysis-page .match-analysis-hero-v3::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;

  background:
    linear-gradient(90deg,
      transparent 0%,
      rgba(89,223,255,.035) 49.8%,
      rgba(89,223,255,.035) 50.2%,
      transparent 100%);
}

.match-stadium-light {
  position: absolute;
  top: -42px;
  width: 260px;
  height: 175px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(7px);
  opacity: .56;
  background:
    radial-gradient(circle,
      rgba(233,249,255,.50) 0%,
      rgba(105,208,255,.18) 18%,
      transparent 62%);
}

.match-stadium-light-left {
  left: -35px;
}

.match-stadium-light-right {
  right: -35px;
}

.match-hero-v3-top {
  position: relative;
  z-index: 3;

  display: grid;
  grid-template-columns: 110px 1fr 110px;
  align-items: start;
  gap: 14px;
}

.match-hero-competition {
  text-align: center;
}

.match-hero-competition .section-eyebrow {
  display: block;
  color: var(--logo-cyan);
}

.match-hero-competition strong {
  display: block;
  margin-top: 6px;
  color: rgba(255,255,255,.92);
  font: 800 13px Inter, Arial, sans-serif;
}

.match-hero-competition small {
  display: block;
  min-height: 13px;
  margin-top: 4px;
  color: rgba(255,255,255,.47);
  font: 550 9px Inter, Arial, sans-serif;
}

.match-hero-v3-top .match-analysis-status {
  justify-self: end;
}

.match-hero-v3-fixture {
  position: relative;
  z-index: 3;

  width: min(830px, 100%);
  margin: 20px auto 0;

  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.match-hero-v3-team {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.match-hero-v3-home {
  justify-content: flex-end;
  text-align: right;
}

.match-hero-v3-away {
  justify-content: flex-start;
  text-align: left;
  flex-direction: row-reverse;
}

.match-hero-v3-team strong {
  max-width: 280px;
  color: rgba(255,255,255,.98);
  font: 850 clamp(21px, 2.5vw, 31px) Inter, Arial, sans-serif;
  line-height: 1.04;
}

.match-hero-v3-logo-shell {
  width: 92px;
  height: 92px;
  flex: 0 0 92px;

  display: grid;
  place-items: center;

  border: 1px solid rgba(89,223,255,.09);
  border-radius: 50%;

  background:
    radial-gradient(circle,
      rgba(255,255,255,.07),
      rgba(89,223,255,.02) 58%,
      transparent 70%);

  box-shadow:
    inset 0 0 24px rgba(89,223,255,.035),
    0 8px 24px rgba(0,0,0,.18);
}

.match-analysis-page .entity-team-logo.match-hero-v3-logo {
  width: 72px;
  height: 72px;
  flex-basis: 72px;
  object-fit: contain;
}

.match-hero-v3-center {
  text-align: center;
}

.match-hero-v3-center > span {
  display: block;
  color: rgba(255,255,255,.70);
  font: 750 21px Inter, Arial, sans-serif;
  letter-spacing: .08em;
}

.match-hero-v3-center small {
  display: block;
  margin-top: 8px;
  color: rgba(255,255,255,.39);
  font: 550 8px/1.45 Inter, Arial, sans-serif;
}

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

/* Tabs now behave like the clean nav immediately below the hero. */
.match-analysis-page .match-market-tabs {
  margin-top: 10px;
  padding: 7px 10px;
  border-color: rgba(89,223,255,.065);
  background: rgba(4,17,31,.74);
}

.match-analysis-page .match-market-tab {
  padding: 8px 13px;
}

.match-analysis-page .match-market-tab.active {
  color: #fff;
  background:
    linear-gradient(180deg,
      rgba(35, 192, 239, .26),
      rgba(21, 130, 170, .17));
  box-shadow:
    inset 0 -2px 0 rgba(62,215,255,.72),
    0 0 16px rgba(39,200,255,.08);
}

/* Keep EVERYTHING below the tabs in its existing layout. */
.match-analysis-page .match-analysis-content {
  margin-top: 12px;
}

/* Responsive */
@media (max-width: 1000px) {
  .match-analysis-page .league-menu {
    width: min(650px, calc(100vw - 40px));
  }

  .match-analysis-page .match-analysis-main {
    margin-top: 230px;
  }

  .match-hero-v3-fixture {
    grid-template-columns: minmax(0,1fr) 70px minmax(0,1fr);
  }

  .match-hero-v3-logo-shell {
    width: 74px;
    height: 74px;
    flex-basis: 74px;
  }

  .match-analysis-page .entity-team-logo.match-hero-v3-logo {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
  }
}

@media (max-width: 700px) {
  .match-analysis-page .matchintel-logo {
    top: 12px;
    left: 10px;
  }

  .match-analysis-page .top-account-area {
    top: 82px;
    left: 10px;
    right: 10px;
  }

  .match-analysis-page .league-menu {
    top: 132px;
    width: calc(100vw - 20px);
  }

  .match-analysis-page .match-filter-bar {
    top: 204px;
    width: calc(100vw - 20px);
  }

  .match-analysis-page .match-analysis-main {
    width: calc(100% - 20px);
    margin-top: 282px;
  }

  .match-hero-v3-top {
    grid-template-columns: 70px 1fr 70px;
  }

  .match-hero-v3-fixture {
    grid-template-columns: 1fr 38px 1fr;
    gap: 6px;
  }

  .match-hero-v3-team {
    gap: 8px;
    flex-direction: column;
    text-align: center;
  }

  .match-hero-v3-away {
    flex-direction: column;
  }

  .match-hero-v3-team strong {
    font-size: 17px;
  }

  .match-hero-v3-logo-shell {
    width: 62px;
    height: 62px;
    flex-basis: 62px;
  }

  .match-analysis-page .entity-team-logo.match-hero-v3-logo {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .match-hero-v3-center > span {
    font-size: 16px;
  }
}


/* ==========================================================
   SCORESTATIX MATCH PAGE — ALTERNATIVE 3 V2 FINE TUNING
   Goal:
   - no overlap between top bars and match hero
   - more balanced breathing room
   - match page starts higher than before, but safely
   ========================================================== */

.match-analysis-page .matchintel-logo {
  top: 14px;
}

.match-analysis-page .top-account-area {
  top: 18px;
}

.match-analysis-page .league-menu {
  top: 74px;
}

.match-analysis-page .match-filter-bar {
  top: 148px;
}

/* Keep a clean vertical gap between filters and fixture hero. */
.match-analysis-page .match-analysis-main {
  margin-top: 212px;
}

/* Slightly tighter hero to avoid wasting vertical space. */
.match-analysis-page .match-analysis-hero-v3 {
  min-height: 242px;
  padding-top: 16px;
  padding-bottom: 20px;
}

/* Bring the team matchup slightly upward inside the hero. */
.match-analysis-page .match-hero-v3-fixture {
  margin-top: 14px;
}

/* Tabs sit close to the hero without touching it. */
.match-analysis-page .match-market-tabs {
  margin-top: 8px;
}

/* Slightly reduce the blank gap before analysis starts. */
.match-analysis-page .match-analysis-content {
  margin-top: 10px;
}

@media (max-width: 1000px) {
  .match-analysis-page .league-menu {
    top: 76px;
  }

  .match-analysis-page .match-filter-bar {
    top: 150px;
  }

  .match-analysis-page .match-analysis-main {
    margin-top: 218px;
  }
}

@media (max-width: 700px) {
  .match-analysis-page .matchintel-logo {
    top: 10px;
  }

  .match-analysis-page .top-account-area {
    top: 78px;
  }

  .match-analysis-page .league-menu {
    top: 126px;
  }

  .match-analysis-page .match-filter-bar {
    top: 198px;
  }

  .match-analysis-page .match-analysis-main {
    margin-top: 266px;
  }

  .match-analysis-page .match-analysis-hero-v3 {
    min-height: 230px;
  }
}


/* ==========================================================
   SCORESTATIX MATCH PAGE — ALTERNATIVE 3 V3
   HARD NO-OVERLAP LAYOUT
   ========================================================== */

/*
  Match-page top stack:
  1) Logo/account
  2) League icons
  3) Date filter
  4) Match hero

  Every layer now has its own fixed vertical band.
*/

/* BRAND + ACCOUNT */
.match-analysis-page .matchintel-logo {
  top: 8px !important;
  left: 20px !important;
}

.match-analysis-page .top-account-area {
  top: 12px !important;
  right: 20px !important;
}

/* LEAGUE ICONS */
.match-analysis-page .league-menu {
  top: 62px !important;
  width: min(650px, calc(100vw - 360px)) !important;
}

/* DATE / TODAY / TOMORROW / WEEK BAR */
.match-analysis-page .match-filter-bar {
  top: 128px !important;
  width: min(640px, calc(100vw - 32px)) !important;
}

/* Hide the old global market bar on match analysis pages.
   The match-specific tabs remain below the fixture hero. */
.match-analysis-page .market-filter-bar {
  display: none !important;
}

/* START OF MATCH HERO
   Give the date bar a guaranteed clear zone underneath. */
.match-analysis-page .match-analysis-main {
  margin-top: 188px !important;
}

/* HERO ITSELF */
.match-analysis-page .match-analysis-hero-v3 {
  min-height: 226px !important;
  padding: 15px 22px 18px !important;
}

/* Keep the fixture content away from the upper edge of the hero. */
.match-analysis-page .match-hero-v3-top {
  margin-bottom: 6px !important;
}

.match-analysis-page .match-hero-v3-fixture {
  margin-top: 10px !important;
}

/* Match tabs sit below the hero with a small but visible gap. */
.match-analysis-page .match-market-tabs {
  margin-top: 10px !important;
}

/* Analysis begins immediately after tabs, without giant empty space. */
.match-analysis-page .match-analysis-content {
  margin-top: 10px !important;
}

/* TABLET */
@media (max-width: 1000px) {
  .match-analysis-page .matchintel-logo {
    top: 8px !important;
    left: 14px !important;
  }

  .match-analysis-page .top-account-area {
    top: 12px !important;
    right: 14px !important;
  }

  .match-analysis-page .league-menu {
    top: 64px !important;
    width: min(620px, calc(100vw - 40px)) !important;
  }

  .match-analysis-page .match-filter-bar {
    top: 130px !important;
  }

  .match-analysis-page .match-analysis-main {
    margin-top: 192px !important;
  }
}

/* MOBILE */
@media (max-width: 700px) {
  .match-analysis-page .matchintel-logo {
    top: 8px !important;
    left: 8px !important;
  }

  .match-analysis-page .top-account-area {
    top: 70px !important;
    left: 8px !important;
    right: 8px !important;
  }

  .match-analysis-page .league-menu {
    top: 118px !important;
    width: calc(100vw - 16px) !important;
  }

  .match-analysis-page .match-filter-bar {
    top: 184px !important;
    width: calc(100vw - 16px) !important;
  }

  .match-analysis-page .match-analysis-main {
    margin-top: 246px !important;
  }

  .match-analysis-page .match-analysis-hero-v3 {
    min-height: 218px !important;
  }
}


/* ==========================================================
   SCORESTATIX MATCH PAGE — V5 CLEAN STRUCTURAL FIX
   ========================================================== */

.match-analysis-page .match-page-flow-header {
  position: relative;
  z-index: 60;
  width: min(1180px, calc(100% - 32px));
  margin: 16px auto 0;
  display: grid;
  gap: 10px;
}

.match-analysis-page .match-page-flow-brand-row {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.match-analysis-page .match-page-flow-brand-row .matchintel-logo,
.match-analysis-page .match-page-flow-brand-row .top-account-area,
.match-analysis-page .match-page-flow-leagues .league-menu,
.match-analysis-page .match-page-flow-filters .match-filter-bar {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  margin: 0 !important;
}

.match-analysis-page .match-page-flow-brand-row .matchintel-logo {
  flex: 0 0 auto;
}

.match-analysis-page .match-page-flow-brand-row .top-account-area {
  flex: 0 1 auto;
  max-width: none !important;
}

.match-analysis-page .match-page-flow-leagues,
.match-analysis-page .match-page-flow-filters {
  display: flex;
  justify-content: center;
}

.match-analysis-page .match-page-flow-leagues .league-menu {
  width: min(680px, 100%) !important;
}

.match-analysis-page .match-page-flow-filters .match-filter-bar {
  width: min(680px, 100%) !important;
  display: flex !important;
}

/* Only the match page's own market tabs should appear under the hero. */
.match-analysis-page .market-filter-bar {
  display: none !important;
}

.match-analysis-page .match-analysis-main {
  width: min(1180px, calc(100% - 32px)) !important;
  margin: 12px auto 0 !important;
  padding-bottom: 44px;
}

.match-analysis-page .match-market-tabs {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 12;
  width: 100%;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  margin-top: 10px !important;
  padding: 8px 10px !important;
  border: 1px solid rgba(89,223,255,.07);
  border-radius: 12px;
  background: rgba(4,17,31,.82);
}

.match-analysis-page .match-market-tab {
  display: inline-flex !important;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 12px;
}

.match-analysis-page .match-market-tab.active {
  color: #fff;
  background: rgba(39,200,255,.13);
  box-shadow: inset 0 -2px 0 rgba(39,200,255,.75);
}

.match-analysis-page .match-analysis-content {
  margin-top: 10px !important;
}

@media (max-width: 760px) {
  .match-analysis-page .match-page-flow-header {
    width: calc(100% - 20px);
    margin-top: 10px;
    gap: 8px;
  }

  .match-analysis-page .match-page-flow-brand-row {
    min-height: auto;
    flex-direction: column;
    align-items: stretch;
  }

  .match-analysis-page .match-page-flow-brand-row .matchintel-logo {
    align-self: flex-start;
  }

  .match-analysis-page .match-page-flow-brand-row .top-account-area {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .match-analysis-page .match-page-flow-leagues .league-menu,
  .match-analysis-page .match-page-flow-filters .match-filter-bar {
    width: 100% !important;
  }

  .match-analysis-page .match-analysis-main {
    width: calc(100% - 20px) !important;
    margin-top: 10px !important;
  }
}


/* ==========================================================
   SCORESTATIX AUTH MODAL
   ========================================================== */
.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 4, 11, 0.82);
  backdrop-filter: blur(10px);
}

.auth-modal-backdrop[hidden] {
  display: none;
}

.auth-modal {
  position: relative;
  width: min(460px, 100%);
  padding: 28px;
  border-radius: 20px;
  border: 1px solid rgba(89, 223, 255, 0.17);
  background: linear-gradient(180deg, rgba(10, 30, 52, 0.995), rgba(3, 12, 25, 0.995));
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.58);
  color: rgba(255, 255, 255, 0.78);
  font-family: Inter, Arial, sans-serif;
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-size: 20px;
  cursor: pointer;
}

.auth-tabs {
  display: flex;
  gap: 6px;
  padding-right: 42px;
  margin-bottom: 20px;
}

.auth-tab {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.auth-tab.active {
  color: var(--logo-cyan);
  border-color: rgba(89, 223, 255, 0.24);
  background: rgba(89, 223, 255, 0.08);
}

.auth-modal h2 {
  margin: 4px 0 8px;
  color: white;
  font-size: 23px;
}

.auth-intro {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
  line-height: 1.55;
}

.auth-field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.auth-field span,
.auth-account-card span,
.auth-kicker {
  color: rgba(255, 255, 255, 0.46);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-field input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  padding: 12px 13px;
  outline: none;
  background: rgba(2, 10, 21, 0.84);
  color: white;
  font: inherit;
}

.auth-field input:focus {
  border-color: rgba(89, 223, 255, 0.42);
  box-shadow: 0 0 0 3px rgba(89, 223, 255, 0.07);
}

.auth-primary {
  width: 100%;
  margin-top: 6px;
  border: 1px solid rgba(89, 223, 255, 0.30);
  border-radius: 10px;
  padding: 12px 14px;
  background: rgba(89, 223, 255, 0.11);
  color: var(--logo-cyan);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.auth-primary:hover {
  background: rgba(89, 223, 255, 0.17);
}

.auth-primary:disabled {
  opacity: 0.55;
  cursor: wait;
}

.auth-link-button {
  margin-top: 12px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--logo-cyan);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.auth-status {
  min-height: 18px;
  margin-top: 14px;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
}

.auth-status.success { color: #78e8b1; }
.auth-status.warning { color: #ffd17a; }
.auth-status.error { color: #ff8f9d; }
.auth-status.working { color: rgba(255, 255, 255, 0.62); }

.auth-account-card {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}

.auth-account-card > div {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.auth-account-card strong {
  color: white;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.account-user-button.is-authenticated {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: white;
  border-color: rgba(89, 223, 255, 0.20);
}

@media (max-width: 560px) {
  .auth-modal { padding: 24px 18px 20px; }
  .auth-account-card > div { grid-template-columns: 64px 1fr; }
}


/* AUTH STEP 5 — protected-content gate.
   This is a UX layer only; the API enforces access server-side. */
.scorestatix-access-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 9, 20, 0.94);
  backdrop-filter: blur(14px);
}

.scorestatix-access-card {
  width: min(520px, 100%);
  padding: 34px;
  border: 1px solid rgba(87, 225, 211, 0.24);
  border-radius: 22px;
  background: rgba(8, 19, 37, 0.98);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
  text-align: center;
}

.scorestatix-access-card h1 { margin: 10px 0 12px; }
.scorestatix-access-card p { opacity: .82; line-height: 1.6; }
.scorestatix-access-actions {
  margin-top: 24px;
  display: grid;
  gap: 10px;
}
.scorestatix-home-link {
  display: inline-flex;
  justify-content: center;
  text-decoration: none;
}
.scorestatix-access-locked > *:not(#scorestatix-access-gate):not(#auth-modal) {
  pointer-events: none;
  user-select: none;
}
