/* =========================================================================
 * styles.css — FIFA World Cup 2026 · Lịch thi đấu
 * ===================================================================== */

:root {
  --bg:        #0a0e1a;
  --bg-2:      #111729;
  --card:      #161d33;
  --card-2:    #1c2540;
  --border:    #27314f;
  --text:      #eef2ff;
  --muted:     #93a0c4;
  --muted-2:   #5f6c92;
  --accent:    #00d4a0;   /* xanh ngọc */
  --accent-2:  #ff4d6d;   /* hồng đỏ */
  --gold:      #ffcc33;
  --live:      #ff3b5c;
  --radius:    16px;
  --shadow:    0 10px 40px rgba(0,0,0,.45);
  --maxw:      1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ---------- Header ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 400px at 20% -10%, rgba(0,212,160,.18), transparent 60%),
    radial-gradient(1000px 400px at 90% 0%, rgba(255,77,109,.16), transparent 55%),
    linear-gradient(180deg, #0c1224, var(--bg));
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 38px 38px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, #000, transparent);
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 20px 36px;
  text-align: center;
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(0,212,160,.1);
  border: 1px solid rgba(0,212,160,.3);
  padding: 6px 14px; border-radius: 999px;
}
.hero h1 {
  font-size: clamp(34px, 7vw, 64px);
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 18px 0 6px;
  background: linear-gradient(90deg, #fff, #b9c6ff 60%, var(--accent));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .sub {
  font-size: clamp(15px, 2.5vw, 19px);
  font-weight: 700; letter-spacing: .3em;
  color: var(--gold);
  text-transform: uppercase;
}
.hero .daterange {
  margin-top: 14px; font-size: 17px; font-weight: 600; color: var(--text);
}
.hero .hosts { margin-top: 6px; color: var(--muted); font-size: 15px; }

.stats {
  display: flex; justify-content: center; gap: 14px; flex-wrap: wrap;
  margin-top: 26px;
}
.stat {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 22px; min-width: 110px;
  backdrop-filter: blur(6px);
}
.stat .num { font-size: 28px; font-weight: 800; color: var(--accent); }
.stat .lbl { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

.tz-note {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 20px;
  font-size: 13px; color: var(--muted);
  background: rgba(255,204,51,.08);
  border: 1px solid rgba(255,204,51,.25);
  padding: 5px 12px; border-radius: 999px;
}
.source-badge {
  margin-top: 12px; font-size: 12px; font-weight: 600;
  color: var(--muted); letter-spacing: .02em;
}
.match .meta .city { font-size: 11px; color: var(--muted-2); margin-top: 2px; }

/* ---------- Tabs / Controls ---------- */
.controls {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10,14,26,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.controls-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto;
  font: inherit; font-weight: 600; font-size: 14px;
  color: var(--muted); cursor: pointer;
  background: transparent; border: 1px solid var(--border);
  padding: 8px 16px; border-radius: 999px;
  white-space: nowrap; transition: all .15s;
}
.tab:hover { color: var(--text); border-color: var(--muted-2); }
.tab.active {
  color: #04221c; background: var(--accent); border-color: var(--accent);
}
.searchbar { display: flex; gap: 10px; flex-wrap: wrap; }
.searchbar input {
  flex: 1; min-width: 180px;
  font: inherit; color: var(--text);
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px;
}
.searchbar input::placeholder { color: var(--muted-2); }
.searchbar input:focus { outline: none; border-color: var(--accent); }
.group-filter {
  font: inherit; color: var(--text);
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px; cursor: pointer;
}
.refresh-btn {
  font: inherit; font-weight: 700; color: #04221c;
  background: var(--accent); border: 1px solid var(--accent);
  border-radius: 10px; padding: 10px 16px; cursor: pointer;
  white-space: nowrap; transition: opacity .15s;
}
.refresh-btn:hover { opacity: .9; }
.refresh-btn:disabled { opacity: .6; cursor: default; }

/* ---------- Main ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 28px 20px 80px; }

.day-group { margin-bottom: 30px; }
.day-head {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 14px; padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}
.day-head .date { font-size: 18px; font-weight: 800; }
.day-head .weekday { font-size: 14px; color: var(--muted); font-weight: 600; }
.day-head .count { margin-left: auto; font-size: 13px; color: var(--muted-2); }

/* ---------- Match card ---------- */
.match {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: 14px; align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 10px;
  transition: transform .12s, border-color .12s, background .12s;
}
.match:hover { transform: translateY(-2px); border-color: var(--accent); background: var(--card-2); }

.match .time { text-align: center; }
.match .time .hh { font-size: 19px; font-weight: 800; color: var(--accent); }
.match .time .local { font-size: 11px; color: var(--muted-2); margin-top: 2px; }
.match .time .ft {
  font-size: 13px; font-weight: 800; color: #04221c;
  background: var(--accent); border-radius: 6px; padding: 2px 0;
}
.match.played { border-color: rgba(0,212,160,.35); }
.odds {
  margin-top: 4px; font-size: 12px; color: var(--muted);
  background: rgba(124,140,255,.08);
  border: 1px solid rgba(124,140,255,.22);
  border-radius: 8px; padding: 4px 9px; display: inline-flex; gap: 5px; align-items: center;
  flex-wrap: wrap;
}
.odds b { color: var(--text); font-weight: 700; }
.odds .ohcap { color: var(--accent-2); }
.odds .oline { color: var(--muted-2); font-weight: 600; }
.team-row.win .tname { color: var(--text); }
.team-row.win .score { color: var(--gold); }
.team-row:not(.win) .score { color: var(--muted); }
.match.played .team-row:not(.win) .tname { color: var(--muted); }

.match .teams { display: flex; flex-direction: column; gap: 6px; }
.team-row { display: flex; align-items: center; gap: 10px; }
.team-row .logo {
  width: 26px; height: 26px; object-fit: contain; flex: 0 0 26px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 18px;
}
.team-row .logo.ph { background: var(--card-2); border-radius: 6px; }
.team-row .tname { font-weight: 700; font-size: 16px; }
.team-row .score {
  margin-left: auto; font-weight: 800; font-size: 18px; color: var(--accent);
  min-width: 22px; text-align: right;
}
.team-row.tbd .tname { color: var(--muted); font-weight: 600; font-style: italic; }
.vs { font-size: 11px; color: var(--muted-2); padding-left: 36px; letter-spacing: .1em; }

.match .meta { text-align: right; max-width: 220px; }
.match .meta .round {
  display: inline-block; font-size: 11px; font-weight: 700;
  color: var(--gold); background: rgba(255,204,51,.1);
  border: 1px solid rgba(255,204,51,.25);
  padding: 2px 9px; border-radius: 999px; margin-bottom: 6px;
}
.match .meta .venue { font-size: 13px; color: var(--text); }
.match .meta .city { font-size: 12px; color: var(--muted); }

/* ---------- Standings ---------- */
.standings-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px;
}
.gtable {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.gtable h3 {
  font-size: 15px; padding: 12px 16px; background: var(--card-2);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.gtable h3 .pill {
  font-size: 11px; color: var(--accent); background: rgba(0,212,160,.1);
  border: 1px solid rgba(0,212,160,.3); padding: 1px 8px; border-radius: 999px;
}
.gtable table { width: 100%; border-collapse: collapse; }
.gtable td, .gtable th {
  padding: 9px 12px; text-align: center; font-size: 13px;
  border-top: 1px solid var(--border);
}
.gtable th { color: var(--muted-2); font-weight: 600; font-size: 11px; text-transform: uppercase; }
.gtable td.team { text-align: left; font-weight: 600; }
.gtable td.team .logo {
  width: 20px; height: 20px; object-fit: contain; margin-right: 8px;
  vertical-align: middle;
}
.gtable td.team .logo.ph { display: inline-block; }
.gtable tbody tr:nth-child(-n+2) td { background: rgba(0,212,160,.05); }
.gtable tbody tr:nth-child(-n+2) td.rank { color: var(--accent); font-weight: 800; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 24px 20px; text-align: center;
  color: var(--muted-2); font-size: 13px;
}
footer a { color: var(--muted); }

.empty {
  text-align: center; padding: 60px 20px; color: var(--muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .match { grid-template-columns: 64px 1fr; }
  .match .meta { grid-column: 1 / -1; text-align: left; padding-left: 78px; max-width: none; }
  .team-row .tname { font-size: 15px; }
}
