:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --text: #16202c;
  --muted: #5b6878;
  --border: #dde3ea;
  --accent: #1fa34a;
  --accent-text: #ffffff;
  --link: #127a37;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08);
}
:root[data-theme="dark"] {
  --bg: #0e1319;
  --surface: #161d26;
  --surface-2: #1d2631;
  --text: #e6ebf1;
  --muted: #9aa7b6;
  --border: #29333f;
  --accent: #2ecc63;
  --accent-text: #08130c;
  --link: #5fdc8a;
  --shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  transition: background .2s, color .2s;
}
a { color: var(--link); }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.site-header .wrap {
  display: flex; align-items: center; gap: 16px;
  min-height: 60px; flex-wrap: wrap;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 1.2rem; color: var(--text); text-decoration: none;
}
.logo-mark {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: var(--accent-text);
  display: grid; place-items: center; font-size: .9rem;
}
.logo-img { height: 54px; width: auto; max-width: 180px; object-fit: contain; display: block; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.nav a {
  color: var(--text); text-decoration: none; font-weight: 600; font-size: .92rem;
  padding: 6px 10px; border-radius: 6px;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface-2); color: var(--link); }
.theme-toggle {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  border-radius: 999px; padding: 6px 12px; cursor: pointer; font: inherit; font-size: .9rem;
}

/* Content */
main { padding: 28px 0 40px; }
h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); line-height: 1.25; margin: 0 0 12px; }
h2 { font-size: 1.3rem; margin: 0 0 12px; }
h3 { font-size: 1.05rem; margin: 18px 0 6px; }
.intro { color: var(--muted); font-size: 1.05rem; margin: 0; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px; margin-top: 20px; box-shadow: var(--shadow);
}
.card p:last-child { margin-bottom: 0; }

/* Grid of clubs / competitions */
.grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.grid a {
  display: block; padding: 12px 14px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  text-decoration: none; color: var(--text);
}
.grid a:hover { border-color: var(--accent); }
.grid strong { display: block; }
.grid span { color: var(--muted); font-size: .85rem; }

/* Broadcasters list */
.broadcasts { list-style: none; padding: 0; margin: 0; }
.broadcasts li {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.broadcasts li:last-child { border-bottom: 0; }
.broadcasts .comp { font-weight: 600; }
.broadcasts .plats { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .88rem;
  background: var(--surface-2); border: 1px solid var(--border);
  text-decoration: none; color: var(--link); font-weight: 600;
}
.chip:hover { border-color: var(--accent); }

/* VPN box */
.vpn { border-left: 4px solid var(--accent); }
.btn {
  display: inline-block; background: var(--accent); color: var(--accent-text);
  padding: 10px 18px; border-radius: 8px; font-weight: 700; text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }

/* FAQ */
.faq details { border-bottom: 1px solid var(--border); padding: 10px 0; }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--muted); margin: 8px 0 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font-size: .88rem; padding: 20px 0;
}
.site-footer .wrap { display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; }

/* Notice bar (config.json → notice) */
.notice-bar {
  background: #d32f2f; color: #fff; font-weight: 600; font-size: .95rem;
  text-align: center; padding: 10px 0;
}
.notice-bar a { color: #fff; text-decoration: underline; font-weight: 800; }
.notice-bar a:hover { text-decoration: none; }

.config-error {
  background: #b42318; color: #fff; padding: 10px 16px; text-align: center; font-size: .9rem;
}
