:root {
  --bg0: #0d1118;
  --bg1: #1a2332;
  --text: #e8eef6;
  --muted: #8fa0b5;
  --line: #2a3545;
  --accent: #c9a227;
  --danger: #c45c5c;
  --panel: rgba(255, 255, 255, 0.04);
  --mine: rgba(201, 162, 39, 0.14);
  font-family: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(ellipse at top, var(--bg1) 0%, var(--bg0) 55%, #080a0e 100%);
}

a { color: var(--accent); }

.brand-link { color: inherit; text-decoration: none; }

.wrap {
  max-width: 52rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin: 0;
}

.game-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.game-nav a {
  text-decoration: none;
  color: var(--muted);
}

.game-nav a.active,
.game-nav a:hover {
  color: var(--accent);
}

.meta-line {
  color: var(--muted);
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.muted { color: var(--muted); }
.err {
  color: var(--danger);
  margin: 0 0 1rem;
}
.ok {
  color: #060;
  margin: 0 0 1rem;
}
.warn {
  color: #a60;
  margin: 0 0 1rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
  gap: 0.75rem 1rem;
  margin: 1rem 0 0;
}
.stat-grid dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.stat-grid dd {
  margin: 0.15rem 0 0;
  font-size: 1.25rem;
}

.group-row td {
  color: var(--accent);
  font-weight: 700;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1.25rem;
  margin: 1rem 0;
}

label {
  display: block;
  margin: 0.75rem 0 0.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

input[type="text"],
input[type="password"],
input[type="number"],
select {
  width: 100%;
  max-width: 20rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  background: #0a0e14;
  color: var(--text);
  font: inherit;
}

.actions { margin-top: 1.25rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }

button, .btn {
  appearance: none;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  padding: 0.45rem 0.9rem;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

button:hover, .btn:hover { background: rgba(201, 162, 39, 0.12); }
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-muted {
  border-color: var(--line);
  color: var(--muted);
}

h2 { font-size: 1.15rem; margin: 1.5rem 0 0.75rem; }

.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1.25rem;
}

@media (max-width: 700px) {
  .menu-grid { grid-template-columns: 1fr; }
}

.menu-tile {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border: 1px solid var(--line);
  padding: 1rem 0.85rem;
  text-decoration: none;
  color: var(--text);
  background: var(--panel);
  min-height: 5.5rem;
}

.menu-tile span { font-weight: 700; color: var(--accent); }
.menu-tile small { color: var(--muted); }
.menu-tile:hover { border-color: var(--accent); }
.menu-tile.muted-tile { opacity: 0.55; pointer-events: none; }
.menu-tile.muted-tile span { color: var(--muted); }

.club-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.35rem 0.75rem;
}

.club-option {
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
}

.club-option input { margin-top: 0.2rem; }

.table-wrap { overflow-x: auto; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

table.data th,
table.data td {
  border-bottom: 1px solid var(--line);
  padding: 0.4rem 0.45rem;
  text-align: left;
}

table.data th { color: var(--muted); font-weight: 600; }
table.data tr.is-mine { background: var(--mine); }
table.data tr.is-current td:first-child { font-weight: 700; }
table.data .score { text-align: center; white-space: nowrap; }

.filters label { display: inline-block; margin-right: 0.5rem; }
.filters select,
.filters input[type="number"] {
  display: inline-block;
  width: auto;
  margin-right: 1rem;
}
.your-result { font-size: 1.15rem; }
.results-details { margin-top: 1rem; color: var(--muted); }
.results-details h3 { color: var(--text); font-size: 1rem; margin: 1rem 0 0.35rem; }
.result-list { margin: 0; padding-left: 1.1rem; }
.plain-list { margin: 0.5rem 0 0; padding-left: 1.2rem; color: var(--muted); }

.cup-tie-list { list-style: none; margin: 0; padding: 0; }
.cup-tie { border-bottom: 1px solid var(--line); padding: 0.65rem 0; }
.cup-tie:last-child { border-bottom: 0; }
.cup-tie p { margin: 0.15rem 0; }
