:root {
  --mx-green: #013f2d;
  --mx-green-2: #006847;
  --mx-green-3: #0fd28a;
  --mx-black: #040706;
  --mx-ink: #f8fbfa;
  --mx-muted: rgba(248, 251, 250, 0.68);
  --mx-line: rgba(255, 255, 255, 0.12);
  --mx-red: #ce1126;
  --mx-gold: #d6a821;
  --mx-card: rgba(8, 18, 15, 0.78);
  --mx-card-2: rgba(255, 255, 255, 0.07);
  --mx-shadow: 0 22px 80px rgba(0, 0, 0, 0.34);
  --mx-radius: 8px;
}

body.football-app {
  background:
    radial-gradient(circle at 16% -10%, rgba(0, 104, 71, 0.36), transparent 34rem),
    radial-gradient(circle at 84% 8%, rgba(214, 168, 33, 0.16), transparent 30rem),
    linear-gradient(135deg, #020403 0%, #07120f 46%, #020302 100%) !important;
  color: var(--mx-ink);
}

body.football-app::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.88), transparent 76%);
}

.app-header,
.fth-matchday-nav,
.mx-premium-dock {
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  background: rgba(3, 9, 7, 0.76) !important;
  border-color: var(--mx-line) !important;
}

.app-brand span {
  background: linear-gradient(135deg, var(--mx-green-2), var(--mx-gold)) !important;
  color: #fff !important;
}

.app-cta,
.follow-button,
.newsletter-form button,
.mx-btn {
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  background: linear-gradient(135deg, var(--mx-green-2), #024630 58%, #0b1612) !important;
  box-shadow: 0 14px 34px rgba(0, 104, 71, 0.28) !important;
  color: #fff !important;
}

.ghost-link,
.text-link,
.mx-ghost {
  color: #ecfff8 !important;
}

.mx-premium-home,
.mx-premium-shell {
  width: min(1220px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 72px;
}

.mx-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: 18px;
  min-height: 520px;
  align-items: stretch;
}

.mx-hero,
.mx-panel,
.mx-card,
.mx-strip,
.mx-table,
.mx-hub-card,
.mx-community-card,
.mx-dock-card {
  border: 1px solid var(--mx-line);
  border-radius: var(--mx-radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
    var(--mx-card);
  box-shadow: var(--mx-shadow);
}

.mx-hero__copy {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 5vw, 58px);
  border-radius: var(--mx-radius);
  background:
    linear-gradient(140deg, rgba(0, 104, 71, 0.55), rgba(4, 7, 6, 0.72) 52%, rgba(206, 17, 38, 0.18)),
    url("assets/fth-social-card.png");
  background-size: cover;
  background-position: center;
}

.mx-hero__copy::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(to top, rgba(3, 7, 6, 0.88), transparent);
}

.mx-hero__copy > * {
  position: relative;
  z-index: 1;
}

.mx-kicker,
.mx-chip,
.mx-mini-label {
  color: var(--mx-gold);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mx-hero h1 {
  max-width: 760px;
  margin: 10px 0 14px;
  font-size: clamp(2.45rem, 6vw, 5.6rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.mx-hero p {
  max-width: 690px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.58;
}

.mx-hero__actions,
.mx-action-row,
.mx-mode-row,
.mx-tabs,
.mx-quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.mx-btn,
.mx-ghost,
.mx-tab,
.mx-mode {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: var(--mx-radius);
  text-decoration: none;
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.mx-ghost,
.mx-tab,
.mx-mode {
  border: 1px solid var(--mx-line);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.mx-btn:hover,
.mx-ghost:hover,
.mx-tab:hover,
.mx-mode:hover,
.mx-card:hover,
.mx-hub-card:hover {
  transform: translateY(-2px);
  border-color: rgba(214, 168, 33, 0.42);
}

.mx-hero__live {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.mx-score-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--mx-line);
  border-radius: var(--mx-radius);
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--club-a, #006847) 34%, transparent), transparent 42%),
    radial-gradient(circle at 88% 0%, color-mix(in srgb, var(--club-b, #ce1126) 28%, transparent), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
}

.mx-score-card.is-live::before {
  content: "";
  position: absolute;
  inset: 0;
  border-left: 3px solid var(--mx-red);
}

.mx-score-card__teams,
.mx-match-row,
.mx-player-row,
.mx-news-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
}

.mx-team-side:last-child {
  text-align: right;
}

.mx-team-side strong,
.mx-player-row strong,
.mx-news-row strong {
  display: block;
  color: #fff;
}

.mx-score {
  min-width: 68px;
  text-align: center;
  font-size: 1.55rem;
  font-weight: 900;
  color: #fff;
}

.mx-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.mx-span-3 { grid-column: span 3; }
.mx-span-4 { grid-column: span 4; }
.mx-span-5 { grid-column: span 5; }
.mx-span-6 { grid-column: span 6; }
.mx-span-7 { grid-column: span 7; }
.mx-span-8 { grid-column: span 8; }
.mx-span-12 { grid-column: span 12; }

.mx-panel,
.mx-card,
.mx-strip,
.mx-table,
.mx-hub-card,
.mx-community-card {
  padding: 18px;
}

.mx-section-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: end;
  margin: 28px 0 12px;
}

.mx-section-head h2,
.mx-panel h2,
.mx-card h3 {
  margin: 3px 0 0;
  color: #fff;
  letter-spacing: 0;
}

.mx-section-head p,
.mx-panel p,
.mx-card p,
.mx-muted {
  color: var(--mx-muted);
}

.mx-table {
  overflow: hidden;
}

.mx-table-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) repeat(5, minmax(34px, 54px));
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mx-table-row:first-child {
  border-top: 0;
}

.mx-table-row strong {
  color: #fff;
}

.mx-rank {
  color: var(--mx-gold);
  font-weight: 900;
}

.mx-stat-pill,
.mx-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.mx-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.mx-club-card,
.mx-player-card,
.mx-news-card {
  display: grid;
  gap: 10px;
  min-height: 172px;
  padding: 16px;
  border: 1px solid var(--mx-line);
  border-radius: var(--mx-radius);
  background:
    radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--club-a, #006847) 22%, transparent), transparent 42%),
    radial-gradient(circle at 88% 12%, color-mix(in srgb, var(--club-b, #d6a821) 18%, transparent), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
  color: #fff;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease;
}

.mx-club-card:hover,
.mx-player-card:hover,
.mx-news-card:hover {
  transform: translateY(-3px);
  border-color: rgba(214, 168, 33, 0.48);
}

.mx-crest,
.mx-avatar {
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--club-a, var(--mx-green-2)), var(--club-b, var(--mx-black)));
  color: #fff;
  font-weight: 900;
  overflow: hidden;
  flex: 0 0 auto;
}

.mx-crest.has-image,
.mx-avatar.has-image,
.mx-table-crest.has-image,
.mx-inline-crest.has-image {
  background: rgba(255, 255, 255, 0.94);
}

.mx-crest img,
.mx-avatar img,
.mx-table-crest img,
.mx-inline-crest img {
  display: block;
  width: 82%;
  height: 82%;
  object-fit: contain;
}

.mx-avatar {
  width: 62px;
  height: 62px;
  border-radius: 14px;
}

.mx-avatar.is-silhouette {
  position: relative;
  isolation: isolate;
}

.mx-avatar.is-silhouette::before {
  content: "";
  position: absolute;
  top: 11px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  z-index: -1;
}

.mx-avatar.is-silhouette::after {
  content: "";
  position: absolute;
  bottom: 5px;
  width: 44px;
  height: 28px;
  border-radius: 50% 50% 10px 10px;
  background: rgba(255, 255, 255, 0.88);
  z-index: -1;
}

.mx-table-team {
  display: inline-flex !important;
  min-width: 0;
  gap: 8px;
  align-items: center;
}

.mx-table-crest,
.mx-inline-crest {
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--club-a, var(--mx-green-2)), var(--club-b, var(--mx-black)));
  color: #fff;
  font-weight: 900;
}

.mx-table-crest {
  width: 28px;
  height: 28px;
  font-size: 0.65rem;
}

.mx-inline-crest {
  width: 18px;
  height: 18px;
  margin-right: 4px;
  vertical-align: -4px;
}

.mx-league-logo,
.mx-hero-league-logo {
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #07120f;
  font-weight: 900;
}

.mx-league-logo {
  width: 52px;
  height: 52px;
}

.mx-hero-league-logo {
  width: 74px;
  height: 74px;
  margin-top: 18px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.mx-league-logo img,
.mx-hero-league-logo img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}

.mx-league-card {
  align-content: start;
}

.mx-form-strip {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.mx-form-dot {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  color: #07120f;
  font-size: 0.7rem;
  font-weight: 900;
}

.mx-form-dot.is-g,
.mx-form-dot.is-w {
  background: #22c55e;
}

.mx-form-dot.is-e,
.mx-form-dot.is-d {
  background: #facc15;
}

.mx-form-dot.is-p,
.mx-form-dot.is-l {
  background: #ef4444;
  color: #fff;
}

.mx-table-form {
  justify-self: end;
}

.mx-momentum {
  position: relative;
  height: 124px;
  overflow: hidden;
  border-radius: var(--mx-radius);
  background:
    linear-gradient(to top, rgba(15, 210, 138, 0.18) 0 44%, transparent 44% 56%, rgba(206, 17, 38, 0.18) 56%),
    rgba(255, 255, 255, 0.045);
}

.mx-momentum::before {
  content: "";
  position: absolute;
  inset: 18px 12px;
  background: linear-gradient(90deg, var(--mx-green-3) 0 18%, var(--mx-gold) 18% 36%, var(--mx-red) 36% 47%, var(--mx-green-3) 47% 78%, var(--mx-gold) 78%);
  clip-path: polygon(0 64%, 12% 36%, 22% 48%, 34% 18%, 48% 54%, 61% 28%, 74% 70%, 86% 34%, 100% 52%, 100% 100%, 0 100%);
  opacity: 0.9;
}

.mx-pitch {
  position: relative;
  min-height: 250px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--mx-radius);
  background:
    linear-gradient(90deg, transparent 49%, rgba(255, 255, 255, 0.18) 49% 51%, transparent 51%),
    radial-gradient(circle at 50% 50%, transparent 0 47px, rgba(255, 255, 255, 0.16) 48px 49px, transparent 50px),
    linear-gradient(135deg, #07543c, #063224);
}

.mx-pitch span {
  position: absolute;
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #06120f;
  font-size: 0.76rem;
  font-weight: 900;
}

.mx-heatmap {
  min-height: 230px;
  border-radius: var(--mx-radius);
  background:
    radial-gradient(circle at 28% 38%, rgba(206, 17, 38, 0.72), transparent 22%),
    radial-gradient(circle at 62% 60%, rgba(214, 168, 33, 0.7), transparent 20%),
    radial-gradient(circle at 42% 72%, rgba(15, 210, 138, 0.48), transparent 20%),
    linear-gradient(135deg, #07543c, #05241a);
}

.mx-premium-dock {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 60;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 28px));
  padding: 10px;
  border: 1px solid var(--mx-line);
  border-radius: var(--mx-radius);
  box-shadow: var(--mx-shadow);
}

.mx-premium-dock__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.mx-premium-dock button {
  min-height: 34px;
  border: 1px solid var(--mx-line);
  border-radius: var(--mx-radius);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-weight: 800;
}

.global-search-result {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.global-search-result__visual {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mx-green-2), var(--mx-gold));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
}

.global-search-result__visual.has-image {
  background: rgba(255, 255, 255, 0.94);
}

.global-search-result__visual img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}

body.fth-mode-compact .mx-card,
body.fth-mode-compact .mx-panel,
body.fth-mode-compact .mx-hub-card {
  padding: 12px;
}

body.fth-mode-compact .mx-section-head {
  margin-top: 18px;
}

body.fth-mode-tv .app-header,
body.fth-mode-tv .fth-matchday-nav,
body.fth-mode-tv .app-footer {
  display: none;
}

body.fth-mode-tv .mx-premium-home,
body.fth-mode-tv .mx-premium-shell {
  width: min(1500px, calc(100% - 44px));
}

body.fth-mode-stadium {
  background:
    radial-gradient(circle at 50% 0%, rgba(214, 168, 33, 0.22), transparent 34rem),
    linear-gradient(135deg, #001b13, #030504 60%, #160207) !important;
}

.mx-skeleton {
  position: relative;
  overflow: hidden;
}

.mx-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.13), transparent);
  animation: mxShimmer 1.6s infinite;
}

@keyframes mxShimmer {
  to { transform: translateX(100%); }
}

@media (max-width: 920px) {
  .mx-hero,
  .mx-grid {
    display: block;
  }

  .mx-hero__live,
  .mx-panel,
  .mx-card,
  .mx-strip,
  .mx-table,
  .mx-hub-card,
  .mx-community-card {
    margin-top: 12px;
  }

  .mx-section-head {
    display: block;
  }

  .mx-table-row {
    grid-template-columns: 28px minmax(0, 1fr) 38px 38px 38px;
  }

  .mx-table-row span:nth-last-child(-n + 2) {
    display: none;
  }

  .mx-premium-dock {
    position: sticky;
    bottom: 0;
    width: auto;
    margin: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
