/* =========================================================
   EHScore Web — stylesheet
   Color tokens pulled 1:1 from the Android app's colors.xml
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #0F172A;          /* bg_dark */
  --bg-elevated: #1E293B; /* card_bg */
  --border: #334155;      /* card_stroke */
  --accent: #10B981;      /* green_accent */
  --accent-dim: rgba(16, 185, 129, .14);
  --teal: #328880;        /* selected_color — live minute indicator */
  --teal-dim: rgba(50, 136, 128, .16);
  --green: #459C49;       /* full-time */
  --red: #FB3D30;         /* cancelled / postponed */
  --red-dim: rgba(251, 61, 48, .14);
  --orange: #F59E0B;
  --text: #F1F5F9;
  --text-light: #94A3B8;
  --text-muted: #64748B;
  --radius: 14px;
  --radius-sm: 9px;
  --header-h: 58px;
  --nav-h: 62px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
body {
  padding-top: var(--header-h);
  padding-bottom: calc(var(--nav-h) + 8px);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; display: block; }

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 12px;
}

/* ---------- Top header ---------- */
.top-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(15, 23, 42, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}
.top-header .inner {
  max-width: 720px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: .2px;
}
.brand .dot { color: var(--accent); }
.page-title {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 19px;
}
.header-icons { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  transition: background .15s;
}
.icon-btn:hover { background: var(--bg-elevated); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }

/* language switcher */
.lang-switch-wrap { display: flex; align-items: center; }
.lang-switcher {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-light);
  border-radius: 8px;
  padding: 7px 8px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}
.lang-switcher:hover { border-color: var(--accent); color: var(--text); }
.back-header .lang-switch-wrap { margin-left: auto; flex: 0 0 auto; }

/* search bar (slides down under header) */
.search-bar {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 12px;
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease, padding .25s ease;
}
.search-bar.open { max-height: 56px; padding: 8px 12px; }
.search-bar input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.search-bar input:focus { border-color: var(--accent); }
.search-bar input::placeholder { color: var(--text-muted); }

/* ---------- Date tabs ---------- */
.date-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 12px 12px 4px;
  scrollbar-width: none;
}
.date-tabs::-webkit-scrollbar { display: none; }
.date-tab {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-light);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}
.date-tab.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}
.date-tab:hover:not(.active) { color: var(--text); }

/* ---------- League group card ---------- */
.league-group {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 10px 0;
  overflow: hidden;
}
.league-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.league-head img { width: 20px; height: 20px; object-fit: contain; border-radius: 4px; background: #0b1220; }
.league-head .name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.league-head .name span { color: var(--text-muted); font-weight: 500; }
.league-head { cursor: pointer; }
.league-head .chev { width: 16px; height: 16px; color: var(--text-muted); flex: 0 0 auto; }
.league-head:hover .chev { color: var(--accent); }

/* ---------- Match row ---------- */
.match-row {
  display: grid;
  grid-template-columns: 1fr 66px 1fr;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.match-row:last-child { border-bottom: none; }
.match-row:hover { background: rgba(255,255,255,.02); }

.team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.team.away { flex-direction: row-reverse; text-align: right; }
.team img { width: 24px; height: 24px; object-fit: contain; flex: 0 0 auto; }
.team .tname {
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.match-center { text-align: center; }
.match-score {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: .5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.match-time {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
}
.match-date-sm { font-size: 10.5px; color: var(--text-muted); margin-top: 2px; }

.st-live { color: var(--teal); }
.st-live .match-time::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  margin-right: 5px;
  animation: pulse 1.2s infinite;
}
.st-done .match-time { color: var(--green); }
.st-bad .match-time { color: var(--red); }
.st-upcoming .match-time { color: var(--text-light); }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .35; transform: scale(.7); }
}

/* ---------- Empty / loading / error states ---------- */
.state-box {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.state-box .emoji { font-size: 34px; margin-bottom: 10px; }
.state-box .title { color: var(--text-light); font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.state-box .sub { font-size: 12.5px; }

.spinner {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  margin: 0 auto 12px;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Live badge on Live page ---------- */
.live-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px 0;
  color: var(--text-light);
  font-size: 12.5px;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red);
  animation: pulse 1.2s infinite;
}
.refresh-btn {
  margin-left: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-light);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
}
.refresh-btn:hover { color: var(--accent); border-color: var(--accent); }
.refresh-btn svg { width: 14px; height: 14px; }
.refresh-btn.spinning svg { animation: spin .7s linear infinite; }

/* ---------- Bottom nav ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(15, 23, 42, .96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 50;
}
.bottom-nav .inner {
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  display: flex;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
}
.nav-item svg { width: 21px; height: 21px; }
.nav-item.active { color: var(--accent); }

/* ---------- misc ---------- */
.section-pad { padding-top: 4px; }
.date-picker-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px; height: 1px;
}

@media (min-width: 760px) {
  .match-row { grid-template-columns: 1fr 90px 1fr; }
}

/* =========================================================
   Phase 2 — Standings / Match details / Team / Player
   ========================================================= */

/* ---------- Back header (used by inner pages) ---------- */
.back-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(15, 23, 42, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
}
.back-header .back-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  color: var(--text-light);
  flex: 0 0 auto;
}
.back-header .back-btn:hover { background: var(--bg-elevated); color: var(--text); }
.back-header .back-btn svg { width: 20px; height: 20px; }
.back-header .bh-title {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.back-header .bh-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* ---------- Detail hero (match / team / player header) ---------- */
.detail-hero {
  margin-top: var(--header-h);
  padding: 20px 16px 16px;
  background: linear-gradient(180deg, rgba(16,185,129,.08), transparent 70%);
  border-bottom: 1px solid var(--border);
}
.hero-league {
  text-align: center;
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 14px;
}
.hero-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}
.hero-team { text-align: center; }
.hero-team a { color: inherit; }
.hero-team img { width: 52px; height: 52px; object-fit: contain; margin: 0 auto 8px; }
.hero-team .hname { font-size: 13px; font-weight: 700; line-height: 1.25; }
.hero-score {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 30px;
  text-align: center;
  min-width: 90px;
}
.hero-score .hs-status { font-size: 12px; font-weight: 700; color: var(--text-light); margin-top: 4px; }
.hero-meta {
  text-align: center;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 14px;
}

/* ---------- Share result button (match.php) ---------- */
.hero-share { display: flex; justify-content: center; margin-top: 14px; }
.share-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-light);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.share-btn:hover { color: var(--accent); border-color: var(--accent); }
.share-btn:disabled { opacity: .6; cursor: default; }
.share-btn svg { width: 15px; height: 15px; }
.share-btn.loading svg { animation: spin .8s linear infinite; }

/* ---------- Pill tabs (page-level, e.g. Events/H2H/Lineup/Stats) ---------- */
.pill-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 12px;
  position: sticky;
  top: var(--header-h);
  background: var(--bg);
  z-index: 20;
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.pill-tabs::-webkit-scrollbar { display: none; }
.pill-tab {
  flex: 0 0 auto;
  padding: 8px 15px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-light);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.pill-tab.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

/* ---------- Event list (match events tab) ---------- */
.event-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.event-item:last-child { border-bottom: none; }
.event-time {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 13px;
  color: var(--accent);
  min-width: 34px;
}
.event-icon { font-size: 17px; flex: 0 0 auto; }
.event-body { flex: 1; min-width: 0; }
.event-player { font-size: 13.5px; font-weight: 600; }
.event-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }
.event-team-logo { width: 18px; height: 18px; object-fit: contain; flex: 0 0 auto; }

/* ---------- Team stats comparison (statistics tab) ---------- */
.stat-row { padding: 10px 14px; }
.stat-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 6px;
}
.stat-labels .val-home { color: var(--text); }
.stat-labels .val-away { color: var(--text); }
.stat-labels .stat-name { color: var(--text-muted); font-weight: 600; font-size: 11.5px; text-align: center; flex: 1; }
.stat-bar { display: flex; height: 6px; border-radius: 4px; overflow: hidden; background: var(--border); }
.stat-bar .bar-home { background: var(--accent); }
.stat-bar .bar-away { background: var(--teal); }

/* possession donut-ish bar */
.possession-wrap { display: flex; align-items: center; gap: 10px; padding: 16px 14px 6px; }
.possession-wrap .pw-num { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 15px; width: 42px; }
.possession-wrap .pw-bar { flex: 1; height: 8px; border-radius: 4px; background: var(--border); display: flex; overflow: hidden; }
.possession-wrap .pw-home { background: var(--accent); }
.possession-wrap .pw-away { background: var(--teal); }

/* ---------- Lineup pitch ---------- */
.pitch-wrap { padding: 14px; }
.formation-label {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
}
.pitch {
  background:
    linear-gradient(180deg, #14532d33, #14532d11),
    repeating-linear-gradient(180deg, #ffffff08 0 40px, transparent 40px 80px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pitch-row { display: flex; justify-content: space-around; gap: 4px; }
.pitch-player { text-align: center; width: 58px; }
.pitch-player .pp-photo-wrap {
  position: relative;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1.5px solid var(--accent);
  margin: 0 auto 4px;
  overflow: hidden;
}
.pitch-player.away .pp-photo-wrap { border-color: var(--teal); }
.pitch-player .pp-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.pitch-player .pp-num-fallback {
  display: none; /* shown via onerror when the photo 404s */
  width: 100%; height: 100%;
  align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 800;
  color: var(--accent);
}
.pitch-player.away .pp-num-fallback { color: var(--teal); }
.pitch-player .pp-badge {
  position: relative;
  margin: -12px auto 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 8.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  left: 10px;
}
.pitch-player.away .pp-badge { border-color: var(--teal); color: var(--teal); }
.pitch-player .pp-name {
  font-size: 9.5px;
  color: var(--text-light);
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bench-title { font-size: 12px; font-weight: 700; color: var(--text-light); margin: 16px 0 8px; padding: 0 14px; }
.bench-list { padding: 0 14px; display: flex; flex-direction: column; gap: 6px; }
.bench-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-light); }
.bench-photo-wrap {
  position: relative;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border);
  overflow: hidden;
  flex: 0 0 auto;
  display: block;
}
.bench-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.bench-num-fallback {
  display: none; /* shown via onerror when the photo 404s */
  width: 100%; height: 100%;
  align-items: center; justify-content: center;
  font-size: 10px; color: var(--text-muted);
}

/* ---------- H2H list ---------- */
.h2h-item {
  display: grid;
  grid-template-columns: 70px 1fr 44px 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}
.h2h-item:last-child { border-bottom: none; }
.h2h-date { color: var(--text-muted); font-size: 10.5px; }
.h2h-team { display: flex; align-items: center; gap: 6px; min-width: 0; }
.h2h-team.away { flex-direction: row-reverse; text-align: right; }
.h2h-team img { width: 16px; height: 16px; object-fit: contain; flex: 0 0 auto; }
.h2h-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h2h-score { text-align: center; font-weight: 800; font-family: 'Manrope', sans-serif; }

/* ---------- Standings table ---------- */
.standings-legend { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px 14px; font-size: 11px; color: var(--text-muted); }
.standings-legend .dotline { display: flex; align-items: center; gap: 5px; }
.standings-legend .dot { width: 8px; height: 8px; border-radius: 2px; }
.standings-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll .standings-table { min-width: 420px; }
.standings-table thead th {
  text-align: center;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 10.5px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: calc(var(--header-h) + 1px); background: var(--bg); z-index: 5;
}
.standings-table thead th.col-team { text-align: left; padding-left: 12px; }
.standings-table td { padding: 9px 4px; text-align: center; border-bottom: 1px solid var(--border); }
.standings-table tr:last-child td { border-bottom: none; }
.standings-table td.col-rank { font-weight: 700; color: var(--text-light); position: relative; padding-left: 10px; }
.standings-table td.col-rank .rank-bar { position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; }
.standings-table td.col-team {
  text-align: left;
  padding-left: 8px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: none;
}
.standings-table td.col-team img { width: 18px; height: 18px; object-fit: contain; flex: 0 0 auto; }
.standings-table td.col-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.standings-table td.col-pts { font-weight: 800; color: var(--text); }
.standings-table .form-dots { display: flex; gap: 2px; justify-content: center; }
.form-w, .form-d, .form-l {
  width: 7px; height: 7px; border-radius: 50%;
}
.form-w { background: var(--green); }
.form-d { background: var(--text-muted); }
.form-l { background: var(--red); }
.group-title { padding: 14px 14px 6px; font-size: 12.5px; font-weight: 700; color: var(--text-light); }

/* Multi-group standings (e.g. World Cup groups) — side by side on wide screens */
.standings-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.standings-grid-item { min-width: 0; }
.standings-grid-item .group-title { padding-top: 0; }
@media (min-width: 700px) {
  .standings-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
}
.wrap.wide { max-width: 1100px; }

/* ---------- Squad list ---------- */
.squad-section-title { padding: 14px 14px 8px; font-size: 12.5px; font-weight: 700; color: var(--text-light); }
.squad-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.squad-row:last-child { border-bottom: none; }
.squad-row .sq-num {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--bg-elevated); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text-light); flex: 0 0 auto;
}
.squad-row .sq-photo { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--bg-elevated); flex: 0 0 auto; }
.squad-row .sq-name { font-size: 13.5px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.squad-row .sq-age { font-size: 11.5px; color: var(--text-muted); }

/* ---------- Player hero ---------- */
.player-hero {
  margin-top: var(--header-h);
  padding: 22px 16px 18px;
  text-align: center;
  background: linear-gradient(180deg, rgba(16,185,129,.08), transparent 70%);
  border-bottom: 1px solid var(--border);
}
.player-hero .p-photo { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; margin: 0 auto 10px; border: 2px solid var(--border); background: var(--bg-elevated); }
.player-hero .p-name { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 19px; }
.player-hero .p-team { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 6px; font-size: 13px; color: var(--text-light); }
.player-hero .p-team img { width: 16px; height: 16px; object-fit: contain; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); margin: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.info-cell { background: var(--bg); padding: 10px 6px; text-align: center; }
.info-cell .ic-val { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 14px; }
.info-cell .ic-label { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

.player-stat-card { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.player-stat-card:last-child { border-bottom: none; }
.psc-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; margin-bottom: 8px; }
.psc-head img { width: 16px; height: 16px; object-fit: contain; }
.psc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.psc-item { text-align: center; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 8px; padding: 8px 4px; }
.psc-item .psc-num { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 15px; }
.psc-item .psc-label { font-size: 9.5px; color: var(--text-muted); margin-top: 2px; }

/* generic small section title used across detail pages */
.section-title { padding: 14px 14px 6px; font-size: 12.5px; font-weight: 700; color: var(--text-light); }
.tab-body { padding-top: 4px; }
@media (min-width: 760px) {
  .h2h-item { grid-template-columns: 90px 1fr 50px 1fr; }
}

/* =========================================================
   Phase 3 — Tournament / Favorites / More / Privacy
   ========================================================= */

/* ---------- Tournament list row ---------- */
.league-list-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.league-list-row:last-child { border-bottom: none; }
.league-list-row .llr-main {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  min-width: 0;
  color: inherit;
}
.league-list-row img { width: 30px; height: 30px; object-fit: contain; flex: 0 0 auto; }
.llr-text { min-width: 0; }
.llr-name { font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.llr-country { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.fav-star {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--border);
  cursor: pointer;
  padding: 10px 14px;
  flex: 0 0 auto;
}
.fav-star.active { color: var(--orange); }

/* ---------- More menu ---------- */
.more-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: none;
  background: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.more-row:last-child { border-bottom: none; }
.more-icon { font-size: 18px; flex: 0 0 auto; }
.more-text { flex: 1; }
.more-chev { color: var(--text-muted); font-size: 18px; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  max-width: 360px;
  width: 100%;
}
.modal-title { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 16px; margin-bottom: 10px; }
.modal-body { font-size: 13px; color: var(--text-light); line-height: 1.6; margin-bottom: 16px; }
.modal-close-btn {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  border: none;
  color: #04241a;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
}




/* =========================================================
   AdSense Placement & Responsive Layout Styling
   ========================================================= */

.ad-container {
  margin: 14px 0;
  padding: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  overflow: hidden;
  min-height: 100px; /* Layout Shift প্রতিরোধ করতে */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ad-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

/* Placement specific tweaks */
.ad-top {
  margin-top: 6px;
  margin-bottom: 12px;
}

.ad-bottom {
  margin-top: 16px;
  margin-bottom: 20px;
}

/* Mobile Adjustments (Screen width under 760px) */
@media (max-width: 759px) {
  .ad-container {
    padding: 6px;
    min-height: 70px;
  }
}

/* Desktop Wide View Adjustment */
@media (min-width: 760px) {
  .ad-container {
    min-height: 110px;
    padding: 12px;
  }
}




/* ---------- Traffic Stats Badges (Live & Total) ---------- */
.stats-badge-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  margin-right: 8px;
}

.stat-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-light);
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

/* Live Badge Accent */
.stat-badge.live {
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--accent);
}

.live-dot-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 1.2s infinite;
}

/* Total Badge Accent */
.stat-badge.total svg {
  width: 13px;
  height: 13px;
  color: var(--text-muted);
}

/* Mobile Devices Responsiveness */
@media (max-width: 480px) {
  .stat-badge {
    padding: 3px 6px;
    font-size: 10px;
  }
  .stat-badge.total {
    display: none; /* ছোট স্ক্রিনে জায়গা না থাকলে শুধু Live দেখাবে */
  }
}

.playstore-header-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    text-decoration: none;
    vertical-align: middle;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.playstore-header-link:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.playstore-svg-icon {
    height: 30px;        /* হেডারের সাইজ অনুযায়ী পারফেক্ট হাইট */
    width: auto;         /* হাইট অনুযায়ী ওয়াইড নিজে থেকে অ্যাডজাস্ট হবে */
    display: block;
    object-fit: contain;
}


/* ---------- Top scorer list (league.php) ---------- */
.topscorer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.topscorer-list .topscorer-row:last-child { border-bottom: none; }
.ts-rank {
  width: 22px;
  text-align: center;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 13px;
  color: var(--text-muted);
  flex: 0 0 auto;
}
.topscorer-row:nth-child(1) .ts-rank { color: #F5C518; }
.topscorer-row:nth-child(2) .ts-rank { color: #C7CDD6; }
.topscorer-row:nth-child(3) .ts-rank { color: #C98A4B; }
.ts-photo { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--bg-elevated); flex: 0 0 auto; }
.ts-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ts-name { font-size: 13.5px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-team { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-team img { width: 14px; height: 14px; object-fit: contain; flex: 0 0 auto; }
.ts-stats { text-align: right; flex: 0 0 auto; }
.ts-goals { display: block; font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 16px; color: var(--accent); }
.ts-assists { display: block; font-size: 10.5px; color: var(--text-muted); margin-top: 1px; }








/* ---------- Privacy policy body ---------- */
.policy-body h3 { font-family: 'Manrope', sans-serif; font-size: 14px; margin: 20px 0 6px; color: var(--accent); }
.policy-body h3:first-of-type { margin-top: 0; }
.policy-body p { font-size: 13px; color: var(--text-light); line-height: 1.7; margin: 0 0 10px; }
.policy-body code { background: var(--bg-elevated); padding: 1px 5px; border-radius: 4px; font-size: 12px; }