:root {
  --bg: #0b1210;
  --card: #131d19;
  --line: #22322b;
  --text: #eef5f1;
  --muted: #8fa59b;
  --green: #22c55e;
  --gold: #f5c542;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 16px; }

header.top { border-bottom: 1px solid var(--line); background: #0e1713; }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-size: 22px; font-weight: 800; }
.logo span { color: var(--green); }
nav a { margin-inline-start: 16px; color: var(--muted); font-size: 14px; }
nav a:hover { color: var(--text); }

.hero { padding: 36px 0 20px; }
.hero h1 { font-size: 26px; line-height: 1.4; }
.hero p { color: var(--muted); margin-top: 8px; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px 0 32px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.lcard {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 12px; text-align: center; transition: border-color .15s, transform .15s;
}
.lcard:hover { border-color: var(--green); transform: translateY(-2px); }
.lcard .ico { font-size: 30px; }
.lcard h3 { font-size: 15px; margin-top: 6px; }
.lcard small { color: var(--muted); font-size: 12px; }

.page-title { padding: 24px 0 8px; font-size: 22px; font-weight: 800; }
.tabs { display: flex; gap: 8px; margin: 8px 0 16px; }
.tabs button {
  flex: 1; background: var(--card); color: var(--muted); border: 1px solid var(--line);
  padding: 10px; border-radius: 10px; font: inherit; cursor: pointer;
}
.tabs button.on { color: #04140a; background: var(--green); border-color: var(--green); font-weight: 700; }

.box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 16px; }
.box h2 { font-size: 15px; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--gold); }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 9px 8px; text-align: center; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 12px; border-bottom: 1px solid var(--line); }
tr + tr td { border-top: 1px solid #1a2822; }
td.team { text-align: start; display: flex; align-items: center; gap: 8px; min-width: 150px; }
td.team img { width: 22px; height: 22px; object-fit: contain; }
td.pts { font-weight: 800; color: var(--green); }
td.pos { color: var(--muted); width: 28px; }
tr.top4 td.pos { color: var(--green); font-weight: 700; }

.match {
  display: grid; grid-template-columns: 1fr 74px 1fr; align-items: center; gap: 6px;
  padding: 12px 14px; border-top: 1px solid #1a2822;
}
.match:first-of-type { border-top: 0; }
.match .t { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.match .t.away { justify-content: flex-start; }
.match img { width: 24px; height: 24px; object-fit: contain; }
.match .mid { text-align: center; }
.match .score { font-weight: 800; font-size: 17px; direction: ltr; }
.match .when { color: var(--muted); font-size: 12px; }
.badge { display: inline-block; font-size: 11px; color: #04140a; background: var(--gold); padding: 1px 8px; border-radius: 99px; }

.state { color: var(--muted); text-align: center; padding: 40px 0; }
.err { color: #ff8a8a; }

footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; text-align: center; padding: 20px 16px 36px; margin-top: 24px; }
