/* ===========================================================================
   Football Hub — shared design system.
   App-style mobile column (480px), DM Sans, brand pink, card surfaces.
   Component prefixes: fbm (match row) / fbl (league block) / fbt (table) /
   fbs (scorers) / fbn (news) / fbd (date strip) / fbh (hero).
   =========================================================================== */
:root {
  --brand: #f0335b;
  --brand-dark: #c42849;
  --brand-light: #ff6b87;
  --live: #e8123c;
  --gold: #f5c518;
  --bg: #f4f5f7;
  --card: #ffffff;
  --ink: #15161a;
  --muted: #7c828c;
  --line: #e9ebef;
  --line-soft: #f1f2f5;
  --shadow-sm: 0 4px 14px rgba(20, 22, 30, 0.06);
  --shadow-md: 0 10px 26px rgba(20, 22, 30, 0.1);
  --grad: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 100%);
  --radius: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.fb-body {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}
.fb-app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  box-shadow: var(--shadow-md);
}
.fb-content { flex: 1; padding: 12px 12px calc(16px + env(safe-area-inset-bottom, 0px)); }

/* ------------------------------------------------------------- header */
.fb-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--grad);
  padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 4px 16px rgba(196, 40, 73, 0.28);
}
.fb-iconbtn {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255, 255, 255, 0.18); color: #fff; text-decoration: none;
  font-size: 0.95rem; border: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.fb-iconbtn:active { background: rgba(255, 255, 255, 0.32); }
.fb-iconbtn.spin i { animation: fbSpin 0.8s linear infinite; }
@keyframes fbSpin { to { transform: rotate(360deg); } }
.fb-htitle { color: #fff; flex: 1; min-width: 0; line-height: 1.15; }
.fb-htitle .t {
  font-size: 1.06rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fb-htitle .s { display: block; font-size: 0.68rem; font-weight: 400; opacity: 0.85; margin-top: 1px; }
.fb-live-pill {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
  background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.04em;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.fb-live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55); animation: fbPulse 1.4s infinite;
}
@keyframes fbPulse {
  0% { box-shadow: 0 0 0 0 rgba(232, 18, 60, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(232, 18, 60, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 18, 60, 0); }
}

/* ------------------------------------------------------------- cards */
.fb-card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); margin-bottom: 14px; overflow: hidden;
}
.fb-card-pad { padding: 14px; }
.fb-sec-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 2px 4px 9px;
}
.fb-sec-head h2 {
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--ink);
}
.fb-sec-head h2 span { color: var(--brand-dark); }
.fb-sec-link {
  font-size: 0.72rem; font-weight: 800; color: var(--brand-dark);
  text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap;
}

/* update flash after a silent background refresh */
.fb-just-updated { animation: fbFlash 1.1s ease-out 1; }
@keyframes fbFlash {
  0% { box-shadow: 0 0 0 2px rgba(240, 51, 91, 0.35), var(--shadow-sm); }
  100% { box-shadow: var(--shadow-sm); }
}

/* ------------------------------------------------------------ tabs */
.fb-tabs {
  display: flex; gap: 5px; padding: 8px 10px;
  background: #fff; border-bottom: 1px solid var(--line);
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.fb-tabs::-webkit-scrollbar { display: none; }
.fb-tab {
  flex: 0 0 auto; border: none; cursor: pointer;
  background: var(--line-soft); color: #4a4f59;
  font-family: inherit; font-size: 0.8rem; font-weight: 700;
  padding: 8px 14px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.fb-tab .cnt {
  font-size: 0.64rem; font-weight: 800; min-width: 17px; text-align: center;
  padding: 1px 5px; border-radius: 999px; background: rgba(0, 0, 0, 0.08);
}
.fb-tab.active { background: var(--brand); color: #fff; }
.fb-tab.active .cnt { background: rgba(255, 255, 255, 0.28); }
.fb-tab.live.active { background: var(--live); }
.fb-tab.live .fb-live-dot { background: var(--live); }
.fb-tab.live.active .fb-live-dot { background: #fff; }

/* sticky tab bars under the header */
.fb-sticky { position: sticky; z-index: 30; }

/* -------------------------------------------------------- date strip */
.fbd-strip {
  display: flex; gap: 6px; padding: 9px 10px;
  background: #fff; border-bottom: 1px solid var(--line);
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.fbd-strip::-webkit-scrollbar { display: none; }
.fbd-day {
  flex: 0 0 auto; min-width: 54px;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fff; cursor: pointer; font-family: inherit;
  padding: 6px 8px; text-align: center; line-height: 1.2;
  -webkit-tap-highlight-color: transparent;
}
.fbd-day .dow { display: block; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.05em; color: var(--muted); text-transform: uppercase; }
.fbd-day .dnum { display: block; font-size: 0.92rem; font-weight: 800; color: var(--ink); margin-top: 1px; }
.fbd-day.active { background: var(--grad); border-color: transparent; }
.fbd-day.active .dow, .fbd-day.active .dnum { color: #fff; }
.fbd-day.today:not(.active) { border-color: var(--brand-light); }
.fbd-day.today:not(.active) .dow { color: var(--brand-dark); }

/* --------------------------------------------------------- match row */
.fbm-row {
  display: grid; grid-template-columns: 52px 1fr 14px;
  align-items: center; gap: 8px; padding: 9px 12px;
  text-decoration: none; color: inherit;
  border-bottom: 1px solid var(--line-soft);
  -webkit-tap-highlight-color: transparent;
}
.fbm-row:last-child { border-bottom: none; }
.fbm-row:active { background: #fafafb; }
.fbm-state { text-align: center; font-size: 0.7rem; font-weight: 700; color: var(--muted); line-height: 1.25; overflow-wrap: anywhere; }
.fbm-state.live { color: var(--live); font-weight: 800; }
.fbm-state.live::after {
  content: ""; display: block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--live); margin: 3px auto 0; animation: fbPulse 1.4s infinite;
}
.fbm-state.fin { color: #9aa0a8; }
.fbm-teams { min-width: 0; display: grid; gap: 5px; }
.fbm-team { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 8px; }
.fbm-logo, .fbm-team .fb-logo { width: 20px; height: 20px; object-fit: contain; }
.fbm-name { font-size: 0.9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fbm-score { font-size: 0.95rem; font-weight: 800; min-width: 16px; text-align: right; }
.fbm-score.dash { color: #c8ccd2; font-weight: 600; }
.fbm-team.win .fbm-name { font-weight: 700; }
.fbm-team.lose .fbm-name, .fbm-team.lose .fbm-score { color: var(--muted); }
.fbm-chev { color: #cfd3da; font-size: 0.8rem; text-align: center; }

/* ------------------------------------------------------ league block */
.fbl-block { background: var(--card); border-radius: 14px; margin-bottom: 10px; overflow: hidden; box-shadow: var(--shadow-sm); }
.fbl-head {
  display: flex; align-items: center; gap: 9px; padding: 10px 12px; cursor: pointer;
  background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
  border-bottom: 1px solid var(--line-soft);
  -webkit-tap-highlight-color: transparent;
}
.fbl-flag {
  width: 24px; height: 24px; border-radius: 7px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad); color: #fff; font-size: 0.64rem; font-weight: 800;
}
.fbl-meta { flex: 1; min-width: 0; }
.fbl-cat { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.06em; color: var(--brand-dark); text-transform: uppercase; }
.fbl-name { font-size: 0.88rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fbl-table-link {
  flex-shrink: 0; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.04em;
  color: var(--brand-dark); background: #fff1f5; border: 1px solid #ffd3df;
  border-radius: 999px; padding: 4px 10px; text-decoration: none; text-transform: uppercase;
}
.fbl-count { font-size: 0.72rem; font-weight: 700; color: var(--muted); flex-shrink: 0; }
.fbl-caret { color: var(--muted); font-size: 0.78rem; transition: transform 0.2s; flex-shrink: 0; }
.fbl-block.collapsed .fbl-caret { transform: rotate(-90deg); }
.fbl-block.collapsed .fbl-matches { display: none; }

/* --------------------------------------------------- standings table */
.fbt-wrap { overflow-x: auto; }
.fbt { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.fbt thead th {
  font-size: 0.64rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--muted); text-align: left; padding: 9px 6px;
  border-bottom: 1px solid var(--line); background: #fafbfc;
  position: sticky; top: 0;
}
.fbt td { padding: 8px 6px; border-bottom: 1px solid var(--line-soft); }
.fbt tr:last-child td { border-bottom: none; }
.fbt .c { text-align: center; }
.fbt thead th:first-child, .fbt td:first-child { padding-left: 12px; }
.fbt thead th:last-child, .fbt td:last-child { padding-right: 12px; }
.fbt .pts { font-weight: 800; color: var(--brand-dark); }
.fbt-team { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.fbt-logo { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; }
.fbt-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; max-width: 128px; display: inline-block; }
.fbt-row { cursor: default; }
.fbt-row.link { cursor: pointer; }
.fbt-row.link:active { background: #fafafb; }
.fbt-row.hl td { background: #fff1f5; }
.fbt-row.hl .fbt-name { color: var(--brand-dark); font-weight: 800; }
.fbt-row:nth-child(-n+4) td:first-child { box-shadow: inset 3px 0 0 #22a565; }
.fbt-row:nth-last-child(-n+3) td:first-child { box-shadow: inset 3px 0 0 var(--live); }

/* form badges */
.fb-form { display: inline-flex; gap: 3px; }
.fb-form-b {
  width: 17px; height: 17px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.58rem; font-weight: 800; color: #fff;
}
.fb-form-b.w { background: #22a565; }
.fb-form-b.d { background: #b6bcc4; }
.fb-form-b.l { background: var(--live); }

/* -------------------------------------------------------- top scorers */
.fbs-row {
  display: grid; grid-template-columns: 24px 34px 1fr auto;
  align-items: center; gap: 10px; padding: 9px 12px;
  text-decoration: none; color: inherit; border-bottom: 1px solid var(--line-soft);
  -webkit-tap-highlight-color: transparent;
}
.fbs-row:last-child { border-bottom: none; }
a.fbs-row { cursor: pointer; }
a.fbs-row:active { background: #fafafb; }
.fbs-rank {
  width: 22px; height: 22px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad); color: #fff; font-size: 0.68rem; font-weight: 900;
}
.fbs-photo { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #f3f4f6; }
.fbs-main { min-width: 0; }
.fbs-name { font-size: 0.9rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fbs-team { font-size: 0.72rem; color: var(--muted); display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.fbs-team-logo { width: 14px; height: 14px; object-fit: contain; }
.fbs-stats { text-align: right; line-height: 1.2; }
.fbs-goals { display: block; font-size: 1.02rem; font-weight: 900; color: var(--brand-dark); }
.fbs-assists { font-size: 0.66rem; font-weight: 700; color: var(--muted); }

/* -------------------------------------------------------------- news */
.fbn-card {
  display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: center;
  padding: 10px 12px; text-decoration: none; color: inherit;
  border-bottom: 1px solid var(--line-soft);
}
.fbn-card:last-child { border-bottom: none; }
a.fbn-card { cursor: pointer; }
a.fbn-card:active { background: #fafafb; }
.fbn-img { width: 92px; height: 60px; border-radius: 10px; overflow: hidden; background: #f3f4f6; }
.fbn-photo { width: 100%; height: 100%; object-fit: cover; }
.fbn-title {
  font-size: 0.84rem; font-weight: 700; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.fbn-meta { font-size: 0.68rem; color: var(--muted); margin-top: 4px; }
.fbn-card.noimg { grid-template-columns: 1fr; }

/* ------------------------------------------------------------- notes */
.fb-note { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 30px 16px; line-height: 1.5; }
.fb-note i { font-size: 1.7rem; display: block; margin-bottom: 10px; color: var(--brand-light); }
.fb-note.err i { color: var(--brand); }
.fb-retry {
  display: inline-block; margin-top: 12px; cursor: pointer;
  background: var(--brand); color: #fff; border: none; font-family: inherit;
  padding: 9px 18px; border-radius: 999px; font-weight: 700; font-size: 0.8rem;
}

/* --------------------------------------------------------- skeletons */
.fb-skel-block { padding: 10px 12px; display: grid; gap: 12px; }
.fb-skel-row { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; }
.fb-skel-row .sk-num { grid-template-columns: none; }
.fb-skel { display: block; border-radius: 7px; background: linear-gradient(90deg, #eef0f3 25%, #f7f8fa 45%, #eef0f3 65%); background-size: 200% 100%; animation: fbShimmer 1.2s infinite; }
.fb-skel.sk-state { height: 26px; }
.fb-skel-lines { display: grid; gap: 6px; }
.fb-skel.sk-line { height: 12px; width: 100%; }
.fb-skel.sk-line.short { width: 62%; }
.fb-skel.sk-num { height: 18px; width: 26px; }
@keyframes fbShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ------------------------------------------------------ hero (match) */
.fbh-hero {
  background:
    radial-gradient(circle at left 18%, rgba(255, 255, 255, 0.1) 0, rgba(255, 255, 255, 0) 46%),
    radial-gradient(circle at right 16%, rgba(255, 255, 255, 0.08) 0, rgba(255, 255, 255, 0) 44%),
    linear-gradient(145deg, #0a0a0d 0%, #121217 52%, #1a1a20 100%);
  border-radius: 20px; padding: 16px 14px 18px; color: #fff;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35); margin-bottom: 14px;
  position: relative;
}
.fbh-league { text-align: center; margin-bottom: 14px; line-height: 1.3; }
.fbh-league .cat { font-size: 0.64rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-light); }
.fbh-league .name { font-size: 0.92rem; font-weight: 700; opacity: 0.96; }
.fbh-league a { color: inherit; text-decoration: none; }
.fbh-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.fbh-team { text-align: center; min-width: 0; display: grid; justify-items: center; gap: 8px; }
.fbh-team img { height: 52px; max-width: 70px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4)); }
.fbh-team .tname { font-size: 0.9rem; font-weight: 700; line-height: 1.2; }
.fbh-mid { text-align: center; min-width: 96px; }
.fbh-score { font-size: 2.7rem; font-weight: 900; line-height: 0.95; letter-spacing: -0.03em; }
.fbh-vs { font-size: 1.2rem; font-weight: 800; opacity: 0.7; letter-spacing: 0.06em; }
.fbh-badge {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 4px 11px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); color: #fff;
}
.fbh-badge.live { background: var(--live); }
.fbh-badge.live .dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: fbPulse 1.4s infinite; }

/* info rows (match/player pages) */
.fb-info-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-bottom: 1px solid var(--line-soft);
}
.fb-info-row:last-child { border-bottom: none; }
.fb-info-key { font-size: 0.8rem; color: var(--muted); font-weight: 600; display: inline-flex; align-items: center; gap: 9px; }
.fb-info-key i { width: 16px; text-align: center; color: var(--brand); }
.fb-info-val { font-size: 0.86rem; font-weight: 700; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.fb-info-val.live { color: var(--live); }
.fb-info-val a { color: var(--brand-dark); text-decoration: none; }

/* ---------------------------------------------------- league chips row */
.fb-chips {
  display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 2px 2px 12px; scrollbar-width: none;
}
.fb-chips::-webkit-scrollbar { display: none; }
.fb-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 13px 7px 8px; text-decoration: none; color: var(--ink);
  font-size: 0.76rem; font-weight: 700; white-space: nowrap;
  box-shadow: var(--shadow-sm); -webkit-tap-highlight-color: transparent;
}
.fb-chip img { width: 20px; height: 20px; object-fit: contain; border-radius: 50%; background: #f3f4f6; }
.fb-chip.active { background: var(--grad); color: #fff; border-color: transparent; }
.fb-chip .flag-letter {
  width: 20px; height: 20px; border-radius: 50%; background: #fff1f5; color: var(--brand-dark);
  display: inline-flex; align-items: center; justify-content: center; font-size: 0.62rem; font-weight: 800;
}

/* ----------------------------------------------------- live carousel */
.fb-carousel {
  display: flex; gap: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 2px 2px 6px; scrollbar-width: none; scroll-snap-type: x mandatory;
}
.fb-carousel::-webkit-scrollbar { display: none; }
.fbc-card {
  flex: 0 0 84%; scroll-snap-align: start;
  background:
    radial-gradient(circle at left 14%, rgba(255, 255, 255, 0.12) 0, rgba(255, 255, 255, 0) 44%),
    radial-gradient(circle at right 14%, rgba(255, 255, 255, 0.1) 0, rgba(255, 255, 255, 0) 42%),
    linear-gradient(145deg, #0a0a0d 0%, #14141a 55%, #1c1c23 100%);
  border-radius: 18px; padding: 12px 14px 14px; color: #fff;
  text-decoration: none; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.32);
  position: relative;
}
.fbc-league {
  text-align: center; font-size: 0.66rem; font-weight: 700; opacity: 0.85;
  margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.06em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 34px;
}
.fbc-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.fbc-team { display: grid; justify-items: center; gap: 5px; min-width: 0; }
.fbc-team img { height: 34px; max-width: 46px; object-fit: contain; filter: drop-shadow(0 3px 7px rgba(0, 0, 0, 0.35)); }
.fbc-team .n {
  font-size: 0.74rem; font-weight: 700; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fbc-score { text-align: center; min-width: 74px; }
.fbc-score .s { font-size: 1.7rem; font-weight: 900; letter-spacing: -0.02em; line-height: 1; }
.fbc-score .l { font-size: 0.62rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.85; margin-top: 4px; }
.fbc-live {
  position: absolute; top: 10px; right: 12px;
  font-size: 0.6rem; font-weight: 900; letter-spacing: 0.06em; color: #ff5d7e;
  display: inline-flex; align-items: center; gap: 4px;
}
.fbc-live::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #ff5d7e; box-shadow: 0 0 6px rgba(255, 93, 126, 0.8); }

/* ------------------------------------------- home live score board */
.fb-body.fb-home .fb-app {
  background: var(--bg);
}
.fb-body.fb-home .fb-app::before {
  content: "";
  display: block;
  width: 100%;
  background: var(--grad);
  height: 44px;
  padding-top: env(safe-area-inset-top, 0px);
  box-sizing: content-box;
  flex-shrink: 0;
}
.fb-body.fb-home .fb-content {
  padding: 0 12px calc(16px + env(safe-area-inset-bottom, 0px));
}
.fb-body.fb-home #liveSection {
  margin: -26px -12px 0px;
  padding: 0 12px 16px;
}

.fbhl-shell {
  background: var(--card);
  border-radius: 10px 10px 10px 10px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.fbhl-shell-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 14px 14px 12px;
  background: var(--card);
}
.fbhl-shell-title {
  font-size: 1.35rem; font-weight: 900; letter-spacing: 0.03em;
  text-transform: uppercase; color: var(--ink); line-height: 1.1;
}
.fbhl-shell-title span { color: var(--live); }
.fbhl-shell-link {
  font-size: 0.72rem; font-weight: 800; color: var(--brand-dark);
  text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap; flex-shrink: 0;
}
.fbhl-shell-body { padding: 0 12px 12px; }

.fbhl-hero {
  display: block; text-decoration: none; color: #fff; text-align: center;
  position: relative; overflow: hidden;
  border-radius: 16px; padding: 16px 14px 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
  -webkit-tap-highlight-color: transparent;
  background:
    url("/public/sub/images/football-live-card-bg.jpg") center / cover no-repeat;
}
.fbhl-hero::before {
  content: "";
  position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.72) 100%);
  pointer-events: none;
}
.fbhl-hero > * { position: relative; z-index: 1; }
.fbhl-hero-static { margin-bottom: 14px; cursor: default; }
.fbhl-league-link {
  color: inherit; text-decoration: none; display: inline-flex; align-items: center;
  justify-content: center; gap: 4px; max-width: 100%;
}
.fbhl-league-link i { font-size: 0.58rem; opacity: 0.75; }
.fbhl-status-wrap {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  display: flex; flex-direction: column; align-items: flex-end; gap: 3px;
}
.fbhl-live-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.62rem; font-weight: 900; letter-spacing: 0.06em;
  color: var(--live); text-transform: uppercase;
}
.fbhl-live-tag .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--live);
  box-shadow: 0 0 6px rgba(232, 18, 60, 0.7);
}
.fbhl-minute {
  font-size: 0.78rem; font-weight: 800; color: #fff; line-height: 1;
  padding-right: 2px;
}
.fbhl-league-block { text-align: center; padding: 0 52px 2px; }
.fbhl-league {
  font-size: 0.78rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.95;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fbhl-stage {
  font-size: 0.62rem; font-weight: 600; opacity: 0.72;
  margin-top: 3px; line-height: 1.3;
}
.fbhl-hero-grid {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 10px; margin-top: 14px;
}
.fbhl-side { display: grid; justify-items: center; gap: 7px; min-width: 0; }
.fbhl-logo { height: 42px; max-width: 56px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4)); }
.fbhl-side .n {
  font-size: 0.76rem; font-weight: 700; text-align: center;
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fbhl-mid { text-align: center; min-width: 96px; }
.fbhl-score {
  font-size: 2.15rem; font-weight: 900; letter-spacing: 0.02em; line-height: 1;
}
.fbhl-score .sep { margin: 0 2px; opacity: 0.9; font-weight: 800; }
.fbhl-score.vs { font-size: 1.35rem; letter-spacing: 0.1em; }
.fbhl-kick { font-size: 0.76rem; font-weight: 800; margin-top: 5px; opacity: 0.88; }
.fbhl-meta-bar {
  display: flex; align-items: center; justify-content: center;
  margin: 14px auto 0; max-width: 100%;
}
.fbhl-meta-item {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px; padding: 6px 14px;
  font-size: 0.68rem; font-weight: 700;
}
.fbhl-stats-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: auto; min-width: 148px; margin: 14px auto 0;
  padding: 9px 18px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #fff; font-family: inherit;
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.07em;
  text-align: center; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.fbhl-stats-btn.is-open { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.35); }
.fbhl-stats-btn i { font-size: 0.58rem; opacity: 0.9; }

.fbhl-status-btn,
.fbhl-meta-btn {
  display: block; margin: 0 auto; padding: 0; border: none; background: none;
  color: inherit; font: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.fbhl-status-btn.is-open .fbhl-live-tag,
.fbhl-meta-btn.is-open .fbhl-meta-item { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35); }

/* -------------------------------------------- live match stats panel */
.fbms-wrap { margin-top: 10px; }
.fbms-section-block { margin-top: 14px; margin-bottom: 14px; }
.fbms-wrap-visible { margin-top: 0; }
.fbms-panel {
  background: var(--card); color: var(--ink); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-soft);
}
.fbms-body { padding: 4px 12px 12px; background: var(--card); }
.fbms-section { margin-top: 8px; }
.fbms-sec-title {
  text-align: center; font-size: 0.62rem; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); padding: 10px 0 6px;
}
.fbms-row {
  display: grid; grid-template-columns: 34px 1fr 34px;
  align-items: center; gap: 8px; padding: 12px 0 8px;
}
.fbms-val {
  font-size: 0.82rem; font-weight: 800; line-height: 1; color: var(--ink);
}
.fbms-val.home { text-align: left; }
.fbms-val.away { text-align: right; }
.fbms-mid { position: relative; min-width: 0; padding-top: 18px; }
.fbms-track {
  display: flex; align-items: center; height: 4px;
  background: #eceef1; border-radius: 2px; overflow: hidden;
}
.fbms-half { flex: 1; display: flex; height: 4px; min-width: 0; }
.fbms-half.home { justify-content: flex-end; }
.fbms-half.away { justify-content: flex-start; }
.fbms-bar { height: 4px; min-width: 0; border-radius: 1px; transition: width 0.25s ease; }
.fbms-bar.home { background: var(--live); }
.fbms-bar.away { background: #3d4450; }
.fbms-label {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  font-size: 0.72rem; font-weight: 600; color: var(--muted);
  white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.fbms-empty {
  text-align: center; color: var(--muted); font-size: 0.78rem;
  padding: 24px 16px 28px; line-height: 1.45; background: var(--card);
}

.fbhl-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.fbhl-row {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  background: var(--card); border-radius: 14px; padding: 10px 12px;
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm);
  -webkit-tap-highlight-color: transparent;
}
.fbhl-row:active { background: #fafafb; }
.fbhlr-team { display: flex; align-items: center; gap: 7px; min-width: 0; }
.fbhlr-team.home { justify-content: flex-start; }
.fbhlr-team.away { justify-content: flex-end; }
.fbhlr-logo { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0; }
.fbhlr-team .n {
  font-size: 0.74rem; font-weight: 700; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 96px;
}
.fbhlr-mid { text-align: center; min-width: 72px; }
.fbhlr-score {
  display: inline-block; font-size: 0.88rem; font-weight: 900; color: var(--ink);
  background: #f3f4f6; border-radius: 8px; padding: 4px 10px; line-height: 1.2;
}
.fbhlr-mid.live .fbhlr-score { background: #ffe8ee; color: var(--live); }
.fbhlr-status { font-size: 0.62rem; font-weight: 700; color: var(--muted); margin-top: 3px; }

/* ------------------------------------------- home widget league head */
.fbw-head {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
}
.fbw-league {
  font-size: 0.88rem; font-weight: 800; color: var(--ink); line-height: 1.25;
}
.fbw-sub {
  font-size: 0.68rem; font-weight: 600; color: var(--muted); margin-top: 3px;
}

/* ------------------------------------------- home top teams widget */
.fbth-widget {
  background: var(--card); border-radius: var(--radius);
  padding: 6px 0; box-shadow: var(--shadow-sm); overflow: hidden;
}
.fbth-row {
  display: grid; grid-template-columns: 28px 28px 1fr auto auto auto;
  align-items: center; gap: 8px; padding: 10px 12px;
  text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line-soft);
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}
.fbth-row:last-child { border-bottom: none; }
a.fbth-row { cursor: pointer; }
a.fbth-row:active { background: #fafafb; }
.fbth-rank {
  width: 22px; height: 22px; border-radius: 50%; background: #ffe8ee; color: var(--live);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.68rem; font-weight: 900;
}
.fbth-logo { width: 24px; height: 24px; object-fit: contain; }
.fbth-name {
  font-size: 0.8rem; font-weight: 700; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.fbth-pld { font-size: 0.68rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.fbth-pts { font-size: 0.88rem; font-weight: 900; color: var(--live); min-width: 28px; text-align: right; }
.fbth-row .fb-form { justify-self: end; }

/* -------------------------------------------------------- player card */
.fbp-card {
  background: var(--grad); border-radius: 20px; color: #fff;
  padding: 20px 16px; text-align: center; margin-bottom: 14px;
  box-shadow: 0 14px 28px rgba(196, 40, 73, 0.35);
}
.fbp-photo {
  width: 92px; height: 92px; border-radius: 50%; object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.65); background: #fff; margin-bottom: 10px;
}
.fbp-name { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.01em; }
.fbp-pos { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.9; margin-top: 3px; }
.fbp-teamchip {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 12px;
  background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px; padding: 6px 14px; color: #fff; text-decoration: none;
  font-size: 0.8rem; font-weight: 700;
}
.fbp-teamchip img { width: 18px; height: 18px; object-fit: contain; }

/* league/team header card */
.fb-page-head {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border-radius: var(--radius);
  padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow-sm);
}
.fb-page-head img { width: 46px; height: 46px; object-fit: contain; }
.fb-page-head .pm { flex: 1; min-width: 0; }
.fb-page-head .pt { font-size: 1.02rem; font-weight: 800; line-height: 1.2; }
.fb-page-head .ps { font-size: 0.74rem; color: var(--muted); margin-top: 2px; }

/* ------------------------------------------------------------- ads */
.ad-wrap { margin: 0 0 14px; min-height: 0; border-radius: 12px; overflow: hidden; }
.ad-wrap ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; height: 0 !important; }
.ad-wrap:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none !important; }

/* ------------------------------------------------------------ footer */
.fb-footer { text-align: center; padding: 16px 16px 24px; font-size: 0.74rem; color: var(--muted); }
.fb-footer a { color: var(--brand); text-decoration: none; }
