:root{
  --pitch-1:#0a3d20; --pitch-2:#0d5128; --pitch-3:#0f6b34;
  --ink:#0c1f14; --paper:#ffffff; --paper-2:#f3f7f4;
  --line:#e2ece6; --muted:#6b8478;
  --accent:#c6ff3a;          /* кислотный лайм — акцент WC */
  --accent-2:#00c2ff;        /* голубой */
  --gold:#ffcf3f;
  --shadow:0 8px 24px rgba(8,40,22,.10);
  --radius:16px;
  --maxw:1080px;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0; color:var(--ink);
  font-family:"Segoe UI",system-ui,-apple-system,Roboto,Arial,sans-serif;
  background:var(--paper-2);
  line-height:1.5;
}
a{color:inherit}
.wrap{max-width:var(--maxw); margin:0 auto; padding:0 18px}
img{max-width:100%}

/* ---------- topbar ---------- */
.topbar{
  position:sticky; top:0; z-index:20;
  background:linear-gradient(120deg,var(--pitch-1),var(--pitch-3));
  box-shadow:var(--shadow);
}
.topbar__in{display:flex; align-items:center; justify-content:space-between; height:62px; gap:16px}
.brand{display:flex; align-items:center; gap:10px; text-decoration:none; color:#fff; font-weight:600}
.brand__ball{font-size:24px}
.brand__txt{font-size:18px; letter-spacing:.3px}
.brand__txt b{color:var(--accent)}
.brand__txt i{font-style:normal; opacity:.8; font-weight:400; font-size:14px; margin-left:2px}
.nav{display:flex; gap:6px; flex-wrap:wrap}
.nav a{
  color:#dff3e6; text-decoration:none; font-size:15px; font-weight:500;
  padding:8px 13px; border-radius:999px; transition:.15s;
}
.nav a:hover{background:rgba(255,255,255,.12)}
.nav a.is-active{background:var(--accent); color:var(--pitch-1); font-weight:600}

/* ---------- hero ---------- */
.hero{
  margin:22px 0; padding:34px 28px; border-radius:var(--radius); color:#fff;
  background:
    radial-gradient(900px 400px at 80% -40%,rgba(198,255,58,.22),transparent),
    linear-gradient(120deg,var(--pitch-1),var(--pitch-2) 60%,var(--pitch-3));
  box-shadow:var(--shadow); position:relative; overflow:hidden;
}
.hero::after{
  content:""; position:absolute; right:-60px; top:-60px; width:260px; height:260px;
  border:18px solid rgba(255,255,255,.06); border-radius:50%;
}
.hero h1{margin:0 0 8px; font-size:34px; line-height:1.1}
.hero h1 span{display:inline-block; margin-left:8px; color:var(--accent)}
.hero p{margin:0 0 18px; max-width:560px; color:#d7ebdd}
.btn{
  display:inline-block; background:var(--accent); color:var(--pitch-1);
  font-weight:700; text-decoration:none; padding:12px 22px; border-radius:999px;
  transition:.15s;
}
.btn:hover{transform:translateY(-1px); box-shadow:0 6px 18px rgba(198,255,58,.35)}
.stats{display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-top:26px}
.stat{background:rgba(255,255,255,.08); border-radius:12px; padding:12px; text-align:center}
.stat b{display:block; font-size:26px; color:#fff}
.stat span{font-size:12px; color:#bcd9c6; text-transform:uppercase; letter-spacing:.5px}

/* ---------- cards ---------- */
.card{
  background:var(--paper); border:1px solid var(--line); border-radius:var(--radius);
  padding:18px 18px 20px; margin:18px 0; box-shadow:var(--shadow);
}
.card h2{margin:0 0 14px; font-size:19px}
.card__head{display:flex; align-items:center; justify-content:space-between; gap:12px}
.card__head h2{margin:0}
.card__more{display:inline-block; margin-top:12px; color:#0f6b34; font-weight:600; text-decoration:none; font-size:14px}
.card__more:hover{text-decoration:underline}
.cols{display:grid; grid-template-columns:1fr 1fr; gap:18px}
.page-h{margin:24px 0 10px; font-size:28px}
.page-h__sub{font-size:14px; color:var(--muted); font-weight:400; margin-left:8px}
.muted{color:var(--muted)}

/* ---------- match list ---------- */
.matchlist{display:flex; flex-direction:column; gap:8px}
.match{
  display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:10px;
  padding:10px 12px; border-radius:12px; background:var(--paper-2); border:1px solid var(--line);
}
.match{text-decoration:none; color:inherit; transition:.12s}
.match:hover{border-color:var(--pitch-3); box-shadow:0 4px 14px rgba(8,40,22,.10); transform:translateY(-1px)}
.match--soon{border-left:4px solid var(--accent-2)}
.match--done{border-left:4px solid var(--pitch-3)}
.team{display:flex; align-items:center; gap:9px; min-width:0}
.team--home{justify-content:flex-end; text-align:right}
.team--away{justify-content:flex-start}
.team__name{font-weight:600; font-size:15px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.team__flag{width:28px; height:28px; border-radius:50%; object-fit:cover; background:#fff; flex:0 0 auto; box-shadow:0 0 0 1px var(--line)}
.team__flag--ph{background:repeating-linear-gradient(45deg,#e8efea,#e8efea 6px,#f3f7f4 6px,#f3f7f4 12px)}
.match__mid{display:flex; flex-direction:column; align-items:center; min-width:64px}
.score{font-weight:800; font-size:20px; color:var(--ink)}
.score i{font-style:normal; margin:0 3px; color:var(--muted)}
.score--live{color:#c92a2a}
.match__time{font-weight:700; color:var(--pitch-3); background:#e6f4ea; padding:3px 10px; border-radius:999px; font-size:14px}
.score__tag{font-size:10px; font-weight:700; color:var(--muted); letter-spacing:.5px}
.score__tag--live{color:#fff; background:#c92a2a; padding:1px 7px; border-radius:999px; animation:pulse 1.4s infinite}
@keyframes pulse{50%{opacity:.55}}

/* ---------- tables ---------- */
.tbl{width:100%; border-collapse:collapse; font-size:14px}
.tbl th,.tbl td{padding:9px 6px; text-align:center; white-space:nowrap}
.tbl thead th{color:var(--muted); font-weight:600; font-size:12px; text-transform:uppercase; letter-spacing:.3px; border-bottom:2px solid var(--line)}
.tbl tbody tr{border-bottom:1px solid var(--line)}
.tbl tbody tr:last-child{border-bottom:0}
.tbl .l{text-align:left}
.tbl .b{font-weight:800}
.tbl .rank{color:var(--muted); font-weight:700; width:34px}
.tbl .pos{color:#1c8a3c; font-weight:700}
.tbl .neg{color:#c92a2a; font-weight:700}
/* ячейка «флаг + название»: НЕ flex (ломает выравнивание колонок), а inline с обрезкой */
.team-cell{white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.team-cell .team__flag{width:22px; height:22px; display:inline-block; vertical-align:middle; margin-right:7px}
.team-cell span{vertical-align:middle}

/* таблица группы: фиксированная раскладка, узкие числовые колонки, имя тянется */
.tbl--grp{table-layout:fixed}
.tbl--grp th,.tbl--grp td{padding:8px 2px; font-size:13px}
.tbl--grp th:first-child,.tbl--grp td.rank{width:26px}
.tbl--grp thead th:not(:first-child):not(.l){width:30px}
.tbl--grp .l{width:auto}

.tbl--grp tbody tr.qual{background:linear-gradient(90deg,rgba(198,255,58,.18),transparent)}
.tbl--grp tbody tr.qual .rank{color:#1c8a3c}
.tbl--rating tbody tr.lead{background:rgba(255,207,63,.10)}
.tbl--rating tbody tr.lead .b{color:#0f6b34}

/* ---------- groups grid ---------- */
.groups{display:grid; grid-template-columns:repeat(auto-fill,minmax(460px,1fr)); gap:18px}
.grp{margin:0}
.grp__h{font-size:17px; color:var(--pitch-3)}
.legend{color:var(--muted); font-size:13px; margin:6px 0 4px}
.legend--qual{display:flex; align-items:center; gap:8px; margin-top:14px}
.legend .dot{width:14px; height:14px; border-radius:4px; background:linear-gradient(90deg,rgba(198,255,58,.7),rgba(198,255,58,.2)); display:inline-block}

.day{font-size:15px; color:var(--pitch-3); margin:0 0 12px; padding-bottom:8px; border-bottom:2px dashed var(--line)}

/* ---------- match detail ---------- */
.crumb{margin:18px 0 0}
.crumb a{color:var(--pitch-3); font-weight:600; text-decoration:none}
.crumb a:hover{text-decoration:underline}
.mh__meta{text-align:center; color:var(--muted); font-size:13px; margin-bottom:14px}
.mh__board{display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:14px}
.mh__team{display:flex; align-items:center; gap:12px; min-width:0}
.mh__team--home{justify-content:flex-end; text-align:right}
.mh__team--away{justify-content:flex-start}
.mh__name{font-size:18px; font-weight:700}
.mh__flag{width:44px; height:44px; border-radius:50%; object-fit:cover; background:#fff; box-shadow:0 0 0 1px var(--line); flex:0 0 auto}
.mh__score{display:flex; flex-direction:column; align-items:center; min-width:96px}
.mh__nums{font-size:38px; font-weight:800; line-height:1}
.mh__nums i{font-style:normal; color:var(--muted); margin:0 4px}
.mh__nums--live{color:#c92a2a}
.mh__vs{font-size:24px; color:var(--muted)}
.mh__status{font-size:12px; color:var(--muted); margin-top:6px; text-transform:uppercase; letter-spacing:.5px}
.mh__status--live{color:#c92a2a; font-weight:700}
.mh__pen,.mh__adv{text-align:center; margin-top:12px; font-size:14px; color:var(--ink)}
.mh__pen b,.mh__adv b{color:var(--pitch-3)}

.ev{display:grid; grid-template-columns:1fr 1fr; gap:10px}
.ev__col--right{border-left:1px solid var(--line); padding-left:14px}
.ev__row{display:flex; gap:8px; padding:5px 0; font-size:14px}
.ev__row--r{justify-content:flex-end; text-align:right}
.ev__min{color:var(--pitch-3); font-weight:700; min-width:38px; flex:0 0 auto}
.ev__row--r .ev__min{min-width:auto}
.ev__pl{font-weight:600}
.ev__as{color:var(--muted); font-weight:400; font-size:12px}
.sm{font-size:13px; margin:4px 0}
.tag{font-style:normal; font-size:10px; font-weight:700; background:#e6f4ea; color:var(--pitch-3); padding:1px 6px; border-radius:999px; vertical-align:middle}
.tag--og{background:#fde8e8; color:#c92a2a}
.reds{display:flex; flex-direction:column; gap:8px}
.red{display:flex; align-items:center; gap:9px; font-size:14px; font-weight:600}
.red .team__flag{width:20px; height:20px}

/* ---------- footer ---------- */
.foot{margin-top:36px; padding:22px 0; background:var(--pitch-1); color:#a9c9b4; font-size:13px}
.foot a{color:var(--accent)}
.foot p{margin:3px 0}

/* ---------- responsive ---------- */
@media (max-width:760px){
  .cols{grid-template-columns:1fr}
  .hero h1{font-size:26px}
  .stats{grid-template-columns:repeat(2,1fr)}
  .nav a{padding:7px 10px; font-size:14px}
  .brand__txt i{display:none}
  .groups{grid-template-columns:1fr}
}
