/* Sam Eyde Games – nettside. Fargene samlet her, så profilen er lett å bytte. */
:root {
  --brand: #0f2a44;
  --brand-text: #ffffff;
  --accent: #e0a526;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --text: #17202a;
  --muted: #5b6774;
  --line: #dfe4ea;
  --gold: #e0a526;
  --silver: #9aa5b1;
  --bronze: #c47a3d;
  --open: #1f8a4c;
  --closed: #b3372f;
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1520;
    --surface: #152131;
    --text: #e8edf3;
    --muted: #9aa8b8;
    --line: #26354a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }

.top { background: var(--brand); color: var(--brand-text); padding: 20px 0; }
.top-inner { display: flex; align-items: center; gap: 16px; }
.logo { flex: none; }
h1 { margin: 0; font-size: 1.6rem; letter-spacing: 0.02em; }
.status { margin: 4px 0 0; font-size: 0.95rem; display: inline-flex; align-items: center; gap: 8px; }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--closed); }
.status.open::before { background: var(--open); }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 16px; padding-bottom: 8px; }
.tabs a {
  padding: 8px 14px; border-radius: 999px; text-decoration: none;
  color: var(--text); background: var(--surface); border: 1px solid var(--line); font-weight: 600;
}
.tabs a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #1d1500; }
.tabs a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

main { padding-bottom: 24px; }
h2 { font-size: 1.3rem; margin: 16px 0 12px; }
h3 { font-size: 1.1rem; margin: 24px 0 8px; }
.muted { color: var(--muted); }
.updated { margin: -8px 0 12px; font-size: 0.85rem; }
.download { color: inherit; font-weight: 600; }
.download::before { content: "⤓ "; }
.download:hover, .download:focus-visible { color: var(--text); }

.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 8px 0 20px; align-items: end; }
.podium .card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 12px; text-align: center; border-top: 6px solid var(--line); min-width: 0;
}
.podium .p1 { border-top-color: var(--gold); padding-top: 28px; order: 2; }
.podium .p2 { border-top-color: var(--silver); order: 1; }
.podium .p3 { border-top-color: var(--bronze); order: 3; }
.medal {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  font-weight: 800; color: #1d1500; margin-bottom: 8px;
}
.p1 .medal { background: var(--gold); }
.p2 .medal { background: var(--silver); }
.p3 .medal { background: var(--bronze); }
.card .face { display: block; margin: 0 auto 8px; border-radius: 6px; }
.card .name { font-weight: 700; overflow-wrap: anywhere; }

/* Skin-ansiktene er 64×64 piksler; skarpe kanter i stedet for uskarpe ved skalering. */
.face { image-rendering: pixelated; background: var(--line); flex: none; }
.card .points { color: var(--muted); }

table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
td.place { width: 3.5rem; font-variant-numeric: tabular-nums; color: var(--muted); }
td.points, th.points { text-align: right; font-variant-numeric: tabular-nums; }
td.name { overflow-wrap: anywhere; }
td.name .player { display: flex; align-items: center; gap: 10px; min-width: 0; }
td.name .face { border-radius: 4px; }
tr:last-child td { border-bottom: none; }

.months { list-style: none; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.months a {
  display: block; padding: 12px 14px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600;
}
.months a:hover, .months a:focus-visible { border-color: var(--accent); }

.notice { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--closed); padding: 12px 16px; border-radius: var(--radius); }

.footer { border-top: 1px solid var(--line); padding-top: 12px; padding-bottom: 32px; font-size: 0.9rem; }

@media (max-width: 520px) {
  h1 { font-size: 1.3rem; }
  .podium { grid-template-columns: 1fr; }
  .podium .p1, .podium .p2, .podium .p3 { order: 0; padding-top: 16px; }
  th, td { padding: 8px; }
}
