:root {
  --bg: #0c3a1f; --bg2: #14532d; --panel: #0f2f1b; --line: rgba(255, 255, 255, 0.13);
  --fg: #f8fafc; --muted: #a7c4b0; --accent: #facc15; --danger: #f87171;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); }
a { color: var(--accent); }
img { max-width: 100%; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

header.top { position: sticky; top: 0; z-index: 5; background: rgba(12, 58, 31, 0.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand .ball { width: 0.8em; height: 0.8em; vertical-align: -0.1em; margin: 0 0.03em; filter: drop-shadow(0 2px 0 #000); }
.brand { font-weight: 900; font-size: 22px; letter-spacing: 0.5px; color: var(--accent); text-decoration: none; text-shadow: 0 2px 0 #000; }
header nav { margin-left: auto; display: flex; align-items: center; gap: 14px; }
header nav a { color: var(--fg); text-decoration: none; font-weight: 600; }
header nav a:hover { color: var(--accent); }
.lang { background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; font: inherit; }
.avatar { width: 28px; height: 28px; border-radius: 50%; vertical-align: middle; object-fit: cover; background: var(--bg2); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 16px system-ui, sans-serif; padding: 12px 20px; border-radius: 12px; border: 0; background: #1f6b3a; color: var(--fg); cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--accent); color: #1c1917; }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.danger { background: transparent; border: 1px solid var(--danger); color: var(--danger); }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: 0.5; cursor: default; }

.hero { background: radial-gradient(ellipse at 70% 0%, #1f7a3f 0%, transparent 60%), repeating-linear-gradient(0deg, var(--bg2) 0 64px, #166534 64px 128px); border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.hero h1 { font-size: clamp(40px, 7vw, 68px); line-height: 1; margin: 0 0 16px; font-weight: 900; text-shadow: 0 4px 0 #000; }
.hero h1 span { color: var(--accent); }
.hero p { font-size: 19px; color: #e2efe6; max-width: 520px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.phone { justify-self: center; width: min(280px, 70vw); aspect-ratio: 412 / 915; border-radius: 32px; border: 8px solid #0b0f0c; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); overflow: hidden; background: #2f8a3c; }
.phone img { width: 100%; height: 100%; object-fit: cover; display: block; }

section { padding: 56px 0; }
section h2 { font-size: 30px; margin: 0 0 24px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); }
.card .icon { font-size: 26px; }
.download { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.download ol { color: var(--muted); padding-left: 20px; }
.muted { color: var(--muted); }
footer { padding: 28px 0 40px; color: var(--muted); font-size: 14px; }

/* Fan zone */
.fanzone { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 24px; padding-top: 32px; padding-bottom: 48px; }
.fanzone h1 { margin: 0 0 6px; }
.matches { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 10px; }
.matches li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; }
.matches li:hover, .matches li:focus-visible { border-color: var(--accent); outline: none; }
.matches li.on { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.25); }
.matches .teams { display: flex; flex-direction: column; gap: 2px; font-weight: 700; }
.matches .team { display: flex; align-items: center; gap: 8px; }
.matches .shirt { width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(255, 255, 255, 0.4); }
.matches .score { font: 800 24px system-ui, sans-serif; align-self: center; }
.matches .meta { grid-column: 1 / -1; display: flex; gap: 12px; font-size: 13px; }
.tag.live { background: #b91c1c; color: #fff; }
.player .screen { position: sticky; top: 76px; aspect-ratio: 16 / 10; width: 100%; border-radius: 16px; overflow: hidden; background: #0b2a17; border: 1px solid var(--line); }
.player iframe { width: 100%; height: 100%; border: 0; display: block; }
.player .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
@media (max-width: 760px) {
  .fanzone { grid-template-columns: 1fr; }
  .player { order: -1; }
  .player .screen { position: static; aspect-ratio: 9 / 12; }
}

/* Account page */
.account { max-width: 640px; padding: 40px 16px 64px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.account h1 { margin: 0; }
#me, #signin { display: flex; flex-direction: column; gap: 16px; }
.profile { display: flex; gap: 16px; align-items: center; }
.profile img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--bg2); }
.profile .name { font-size: 22px; font-weight: 800; }
form.inline { display: flex; gap: 8px; flex-wrap: wrap; }
input[type=text] { flex: 1; min-width: 180px; font: 16px system-ui, sans-serif; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: #0b2a17; color: var(--fg); }
ul.rows { list-style: none; padding: 0; margin: 0; }
ul.rows li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
ul.rows li:last-child { border-bottom: 0; }
ul.rows .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.code { font: 800 28px ui-monospace, monospace; letter-spacing: 4px; color: var(--accent); }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #1c1917; font-weight: 700; }
.providers { display: flex; flex-direction: column; gap: 10px; }
.notice { padding: 12px 14px; border-radius: 12px; background: #3f1d1d; border: 1px solid var(--danger); }
.notice.ok { background: #14361f; border-color: #4ade80; }
[hidden] { display: none !important; }

@media (max-width: 720px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 36px; }
  header nav .hide-sm { display: none; }
}
