/* World Cup 2026 Guide — single stylesheet */
:root {
  --ink: #0d1b2a;
  --ink-soft: #3a4a5c;
  --paper: #ffffff;
  --paper-soft: #f4f6f9;
  --line: #dde3eb;
  --brand: #006a4e;       /* deep pitch green */
  --brand-2: #d62828;     /* accent red */
  --accent: #e9b13a;      /* trophy gold */
  --link: #0a558c;
  --max: 1100px;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(13,27,42,.08), 0 4px 12px rgba(13,27,42,.04);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper-soft);
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.2rem; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 1.5em 0 .5em; color: var(--ink); }
h1 { font-size: 2.1rem; margin-top: .6em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.18rem; }
p, ul, ol, table { margin: .5em 0 1em; }
ul, ol { padding-left: 1.4em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

/* Top bar */
.topbar { background: var(--brand); color: #fff; padding: .7rem 0; position: sticky; top: 0; z-index: 20; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .8rem; }
.brand { color: #fff; font-weight: 700; font-size: 1.1rem; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-block; margin-right: .3em; }
.topnav { display: flex; gap: 1rem; flex-wrap: wrap; }
.topnav a { color: #ffffffdd; font-weight: 500; }
.topnav a:hover { color: #fff; text-decoration: none; }

/* Crumbs */
.crumbs { font-size: .9rem; color: var(--ink-soft); padding-top: .8rem; }
.crumbs span[aria-hidden] { margin: 0 .35em; color: #aab2bd; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--brand) 0%, #004f3a 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  margin: 1.2rem 0 1.6rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.hero-inner { display: flex; align-items: center; gap: 2rem; }
.hero-text { flex: 1; min-width: 0; }
.hero-graphic { flex: 0 0 90px; display: flex; align-items: center; justify-content: center; }
.hero h1 { color: #fff; font-size: 2.4rem; margin-top: 0; }
.hero p.lede { font-size: 1.15rem; max-width: 60ch; color: #f3fffb; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 1.2rem; font-size: .95rem; }
.hero .meta strong { display: block; font-size: 1.4rem; color: var(--accent); }
.countdown { font-variant-numeric: tabular-nums; }

/* Stadium SVG graphic */
.stadium-svg { width: 78px; height: 90px; filter: drop-shadow(0 4px 14px rgba(0,0,0,0.3)); }

/* Cards */
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card .meta { color: var(--ink-soft); font-size: .9rem; }

/* Tables */
table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
th, td { padding: .55rem .7rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #eef2f6; font-weight: 600; font-size: .9rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); }
tr:last-child td { border-bottom: 0; }
table.compact td, table.compact th { padding: .4rem .55rem; font-size: .94rem; }

/* Group grid */
.groups-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.group-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.group-card h3 { margin: 0 0 .4em; display: flex; align-items: baseline; justify-content: space-between; }
.group-card h3 .badge { background: var(--accent); color: var(--ink); padding: .1em .55em; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.group-card ul { list-style: none; padding: 0; margin: 0; }
.group-card li { padding: .35rem 0; border-bottom: 1px solid var(--line); }
.group-card li:last-child { border-bottom: 0; }
.flag { display: inline-block; margin-right: .35em; }

/* Match list */
.matches { display: grid; gap: .55rem; }
.match { display: grid; grid-template-columns: 110px 1fr auto; gap: .8rem; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .9rem; }
.match .when { color: var(--ink-soft); font-size: .9rem; }
.match .teams { font-weight: 600; }
.match .where { color: var(--ink-soft); font-size: .9rem; text-align: right; }
.match.is-knockout { border-left: 4px solid var(--brand-2); }
.match.is-final    { border-left: 4px solid var(--accent); background: #fffbea; }

/* Signup */
.signup { background: var(--ink); color: #fff; padding: 2rem 0; margin-top: 2rem; }
.signup h2 { color: #fff; margin-top: 0; }
.signup p { color: #d8dfe8; }
.signup-form { display: flex; gap: .5rem; flex-wrap: wrap; max-width: 520px; }
.signup-form input[type=email] { flex: 1; min-width: 220px; padding: .7rem .85rem; border-radius: 6px; border: 0; font-size: 1rem; }
.signup-form button { background: var(--accent); color: var(--ink); border: 0; padding: .7rem 1.2rem; border-radius: 6px; font-weight: 700; font-size: 1rem; cursor: pointer; }
.signup-form button:hover { background: #f0c45a; }
.signup-form .hp { position: absolute; left: -9999px; }

/* Footer */
.footer { background: #07111d; color: #c5cfdb; padding: 1.5rem 0; font-size: .9rem; }
.footer a { color: #9bc6ff; }

/* FAQ */
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; margin: .5rem 0; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details[open] summary { margin-bottom: .5em; }

/* Utility */
.muted { color: var(--ink-soft); }
.tag { display: inline-block; background: #e7eef5; color: var(--ink-soft); padding: .15em .55em; border-radius: 999px; font-size: .78rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.tag.is-host { background: var(--accent); color: var(--ink); }
.tag.is-debut { background: #cdebd6; color: #08502a; }

/* Filter bar */
.filter { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: .8rem 0; }
.filter input, .filter select { padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 6px; font-size: .95rem; background: var(--paper); }

/* Language picker */
.lang-picker { display: flex; gap: .25rem; flex-wrap: wrap; }
.lang-btn {
  background: none; border: none; cursor: pointer;
  font-size: 1.3rem; padding: .1rem .15rem; border-radius: 4px;
  line-height: 1; opacity: .55; transition: opacity .15s, transform .15s;
}
.lang-btn:hover { opacity: .9; transform: scale(1.15); }
.lang-btn.active { opacity: 1; filter: drop-shadow(0 0 3px rgba(255,255,255,0.6)); transform: scale(1.1); }

.hero .data-verified { font-size: .8rem; color: rgba(255,255,255,0.6); margin-top: .6rem; margin-bottom: 0; }
.hero .data-verified a { color: rgba(255,255,255,0.75); text-decoration: underline; }

/* Responsive */
@media (max-width: 700px) {
  .hero { padding: 1.6rem 1rem; }
  .hero h1 { font-size: 1.8rem; }
  .hero-inner { flex-direction: column; }
  .hero-graphic { display: none; }
  .match { grid-template-columns: 1fr; }
  .match .where { text-align: left; }
}

/* ===== Restored enhanced components (hero CTA, starting-soon, results, news, predictions) ===== */
.hero-cta { margin-top: 1rem; }
.hero-cta-btn { display: inline-block; background: var(--brand); color: #fff; font-weight: 700; padding: .6rem 1.1rem; border-radius: var(--radius); text-decoration: none; box-shadow: var(--shadow); }
.hero-cta-btn:hover { filter: brightness(1.08); }
.hero-cta-note { font-size: .8rem; margin: .4rem 0 0; color: var(--ink-soft); display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.hero-cta-logo, .bet-cta-logo, .topbar-powered-logo { vertical-align: middle; height: 1.3em; width: auto; }

.live-now, .starting-soon, .results-home, .news-list { margin: 1.5rem 0; }
.live-src { font-size: .78rem; }

.upcoming-list { display: grid; gap: .5rem; }
.upcoming-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: .3rem .8rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .8rem; box-shadow: var(--shadow); }
.upcoming-row .u-teams { font-weight: 600; }
.upcoming-row .u-when { text-align: right; font-variant-numeric: tabular-nums; }
.upcoming-row .ko-timer { font-weight: 800; color: var(--brand); }
.ko-live-badge { background: #c0392b; color: #fff; }
.upcoming-row .bet-link { background: var(--brand); color: #fff; text-decoration: none; font-weight: 700; padding: .25rem .6rem; border-radius: 6px; font-size: .85rem; }
.upcoming-row .u-meta { grid-column: 1 / -1; font-size: .76rem; }

.results-home .results-list { display: grid; gap: .4rem; }
.result-row { display: flex; align-items: center; gap: .1rem .6rem; flex-wrap: wrap; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .34rem .8rem; box-shadow: var(--shadow); }
.result-row .r-team { font-weight: 600; }
.result-row .r-home { margin-left: auto; text-align: right; }
.result-row .r-score { font-weight: 800; font-size: 1rem; background: var(--brand); color: #fff; border-radius: 6px; padding: .05rem .5rem; }
.result-row .r-meta { width: 100%; font-size: .76rem; line-height: 1.2; }
.results-more { display: contents; }
.results-more > summary { cursor: pointer; list-style: none; text-align: center; font-weight: 700; color: var(--brand); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .8rem; box-shadow: var(--shadow); user-select: none; }
.results-more > summary::-webkit-details-marker { display: none; }
.results-more > summary:hover { background: var(--brand); color: #fff; }
.results-more > summary::after { content: " ▾"; }
.results-more[open] > summary::after { content: " ▴"; }
.results-more > .result-row { margin-top: .4rem; }
.results-more-count { font-weight: 600; opacity: .7; }

.news-item { border-bottom: 1px solid var(--line); padding: .8rem 0; }
.news-item h2 { margin: .3rem 0; font-size: 1.15rem; }
.news-meta { font-size: .8rem; }
.news-src { font-size: .8rem; margin: .3rem 0 0; }

/* Predictions & match win-probability */
.pred-disclaimer { background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: var(--radius); padding: .5rem .8rem; font-size: .85rem; }
.odds-bars { display: grid; gap: .45rem; margin: 1rem 0 1.5rem; }
.odds-row { display: grid; grid-template-columns: minmax(9rem, 12rem) 1fr auto; align-items: center; gap: .6rem; }
.odds-team { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.odds-bar-track { background: var(--line); border-radius: 6px; height: 1.15rem; overflow: hidden; }
.odds-bar-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #2a9d8f); border-radius: 6px; }
.odds-val { min-width: 2.6rem; text-align: right; font-variant-numeric: tabular-nums; }
.pred-table { width: 100%; border-collapse: collapse; margin: .5rem 0 1.5rem; font-variant-numeric: tabular-nums; }
.pred-table th, .pred-table td { padding: .4rem .5rem; border-bottom: 1px solid var(--line); text-align: center; }
.pred-table th:first-child, .pred-table td:first-child { text-align: left; }
.pred-how { display: grid; gap: .5rem; padding-left: 1.1rem; }
.wdl-bar { display: flex; height: 1.9rem; border-radius: var(--radius); overflow: hidden; font-size: .8rem; font-weight: 700; color: #fff; box-shadow: var(--shadow); }
.wdl-bar span { display: flex; align-items: center; justify-content: center; min-width: 0; overflow: hidden; }
.wdl-h { background: var(--brand); }
.wdl-d { background: #6c757d; }
.wdl-a { background: #2a9d8f; }
.wdl-legend { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; margin: .5rem 0; font-size: .82rem; }
.wdl-legend .sw { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.wdl-legend .sw-h { background: var(--brand); }
.wdl-legend .sw-d { background: #6c757d; }
.wdl-legend .sw-a { background: #2a9d8f; }
.mp-score { margin: .4rem 0 .8rem; }

/* Language picker + powered-by (restored) */
.lang-btn.active { font-weight: 800; text-decoration: underline; }
.topbar-powered { display: inline-flex; align-items: center; gap: .3rem; text-decoration: none; }
.topbar-powered-label { font-size: .7rem; color: var(--ink-soft); }
.hero-graphic { display: flex; justify-content: center; }

/* Live match kept in the same "Starting soon" card frame, marked with a red accent */
.upcoming-row.is-live { border-color: #c0392b; box-shadow: 0 0 0 1px #c0392b, var(--shadow); }
.upcoming-row.is-live .ko-timer { color: #c0392b; }
.ko-live-badge { animation: koLivePulse 1.6s ease-in-out infinite; }
@keyframes koLivePulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

/* Live score shown inside the Starting soon card */
.u-score { font-weight: 800; background: #c0392b; color: #fff; border-radius: 6px; padding: .02rem .45rem; }
.upcoming-row.is-live .u-teams { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }

/* Tournament-complete: champion banner + summary */
.champion-banner { background: linear-gradient(120deg, color-mix(in srgb, var(--brand) 12%, var(--paper)), var(--paper)); border: 1px solid var(--line); border-left: 4px solid #e9b13a; border-radius: var(--radius); padding: .9rem 1.1rem; margin: 1.2rem 0; box-shadow: var(--shadow); }
.champion-banner h2 { margin: 0 0 .35rem; }
.tournament-summary { margin: 1.2rem 0 1.6rem; }
