/* Feierabendkraft Stats – gleiche Farben wie index.html (Sonnenuntergang) */
:root {
  --bg: #161226;
  --surface: #1e1832;
  --surface-2: #262040;
  --border: #322a52;
  --text: #f2ede4;
  --muted: #948bad;
  --sun: #f59b40;
  --sun-soft: rgba(245, 155, 64, 0.14);
  --grass: #60af3a;
  --danger: #c43e56;
  --diamond: #5fd8e0;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15.5px; line-height: 1.55;
}
a { color: var(--sun); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 2px; }

.horizon {
  height: 120px; position: relative; overflow: hidden;
  background: linear-gradient(to bottom,
    #2b184a 0 12.5%, #4a1f5e 12.5% 25%, #6d2669 25% 37.5%, #9a3064 37.5% 50%,
    #c43e56 50% 62.5%, #e05d44 62.5% 75%, #f59b40 75% 87.5%, #fdcd5c 87.5% 100%);
}
.horizon .sun {
  position: absolute; left: 50%; bottom: -20px; width: 72px; height: 72px; transform: translateX(-50%);
  background: #ffeca0; box-shadow: 0 0 0 10px rgba(255, 236, 160, 0.22);
  clip-path: polygon(25% 0, 75% 0, 75% 12.5%, 87.5% 12.5%, 87.5% 25%, 100% 25%, 100% 75%, 87.5% 75%, 87.5% 87.5%, 75% 87.5%, 75% 100%, 25% 100%, 25% 87.5%, 12.5% 87.5%, 12.5% 75%, 0 75%, 0 25%, 12.5% 25%, 12.5% 12.5%, 25% 12.5%);
}
.horizon .ground {
  position: absolute; left: 0; right: 0; bottom: 0; height: 18px;
  background: linear-gradient(90deg, #1d2a1c 0 25%, #24331f 25% 50%, #1d2a1c 50% 75%, #24331f 75% 100%);
  background-size: 32px 100%;
}
.hero-text {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding-bottom: 18px;
}
.hero-text h1 {
  font-size: clamp(26px, 5vw, 40px); letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: 800; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

nav.topnav {
  position: sticky; top: 0; z-index: 10; display: flex; gap: 4px; flex-wrap: wrap;
  background: rgba(22,18,38,0.92); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border); padding: 10px 16px;
}
nav.topnav a { color: var(--muted); font-size: 13.5px; padding: 6px 10px; border-radius: 6px; }
nav.topnav a:hover, nav.topnav a.active { color: var(--text); background: var(--surface-2); text-decoration: none; }

main { max-width: 1080px; margin: 0 auto; padding: 32px 16px 80px; }
.intro { text-align: center; margin-bottom: 28px; }
.intro h2 { font-size: 26px; margin-bottom: 4px; }
.intro p { color: var(--muted); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--grass); box-shadow: 0 0 0 3px rgba(96,175,58,.25); }
.live.stale::before { background: var(--danger); box-shadow: 0 0 0 3px rgba(196,62,86,.25); }

section { margin-bottom: 44px; }
section > h3 {
  font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sun);
  font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 10px;
}
section > h3::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.hint { color: var(--muted); font-size: 13px; margin: -6px 0 14px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }

/* Auf einen Blick */
.glance { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.glance .card { text-align: center; }
.glance .num { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.glance .lbl { color: var(--muted); font-size: 13px; }
@media (max-width: 720px) { .glance { grid-template-columns: repeat(2, 1fr); } }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
@media (max-width: 720px) { .duo { grid-template-columns: 1fr; } }
.fact { border-left: 3px solid var(--sun); background: var(--sun-soft); border-radius: 0 12px 12px 0; }
.fact strong { display: block; color: var(--sun); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 4px; }
.fact button { margin-top: 8px; background: none; border: 1px solid rgba(245,155,64,.4); color: var(--sun); border-radius: 6px; padding: 3px 10px; font: inherit; font-size: 12.5px; cursor: pointer; }
.dims { display: flex; flex-direction: column; gap: 8px; }
.dims .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.badge { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.badge.locked { background: rgba(196,62,86,0.18); color: #ff9aae; border: 1px solid rgba(196,62,86,0.4); }
.badge.open { background: rgba(96,175,58,0.18); color: #b8e6a0; border: 1px solid rgba(96,175,58,0.4); }
.badge.afk { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }

/* Online + Events */
.online { display: flex; flex-wrap: wrap; gap: 10px; }
.online a { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px 4px 4px; color: var(--text); }
.online a:hover { border-color: var(--muted); text-decoration: none; }
.empty { color: var(--muted); font-size: 14px; }
.events { list-style: none; }
.events li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 14.5px; }
.events li:last-child { border-bottom: 0; }
.events .ico { width: 22px; text-align: center; flex: none; }
.events .when { margin-left: auto; color: var(--muted); font-size: 12.5px; white-space: nowrap; padding-left: 8px; }
.events .txt { color: #d9d3e6; }

/* Bestenlisten */
.boards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 900px) { .boards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .boards { grid-template-columns: 1fr; } }
.board h4 { font-size: 16px; margin-bottom: 0; }
.board .sub { color: var(--muted); font-size: 12.5px; margin-bottom: 10px; }
.board ol { list-style: none; counter-reset: r; }
.board li { counter-increment: r; display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; }
.board li::before { content: counter(r); width: 20px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.board li:nth-child(1)::before { content: "🥇"; }
.board li:nth-child(2)::before { content: "🥈"; }
.board li:nth-child(3)::before { content: "🥉"; }
.board li a { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board li .val { margin-left: auto; font-variant-numeric: tabular-nums; color: #d9d3e6; white-space: nowrap; }
.board li.none { color: var(--muted); }
.board li.none::before { content: ""; }

canvas.head { width: 24px; height: 24px; image-rendering: pixelated; border-radius: 4px; flex: none; background: var(--surface-2); }
canvas.head.big { width: 40px; height: 40px; }

/* Spielerseite */
.profile { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin-bottom: 32px; }
.profile canvas.body { width: 96px; height: 192px; image-rendering: pixelated; flex: none; }
.profile h2 { font-size: 30px; }
.profile .meta { color: var(--muted); font-size: 14px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 720px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile .lbl { color: var(--muted); font-size: 13px; }
.tile .num { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tile .rank { font-size: 12.5px; color: var(--sun); }
.more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 24px; }
@media (max-width: 720px) { .more { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .more { grid-template-columns: 1fr; } }
.more div { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 14.5px; }
.more span:last-child { font-variant-numeric: tabular-nums; }
.favs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 900px) { .favs { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .favs { grid-template-columns: 1fr; } }
.favs h4 { font-size: 14px; margin-bottom: 8px; }
.favs ol { margin-left: 18px; font-size: 14px; color: #d9d3e6; }
.favs li { display: flex; justify-content: space-between; gap: 8px; }
.favs li span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }

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

/* Server-Leistung */
.perf { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
@media (max-width: 900px) { .perf { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .perf { grid-template-columns: repeat(2, 1fr); } }
.perf .card { text-align: center; padding: 14px 10px; }
.perf .num { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.perf .num.good { color: #b8e6a0; } .perf .num.ok { color: #fdcd5c; } .perf .num.bad { color: #ff9aae; }
.perf .lbl { color: var(--muted); font-size: 12.5px; }
.perf .of { display: block; font-size: 11.5px; opacity: .8; }
.hint.pf-good::before, .hint.pf-ok::before, .hint.pf-bad::before, .hint.pf-off::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.hint.pf-good::before { background: var(--grass); } .hint.pf-ok::before { background: #fdcd5c; }
.hint.pf-bad::before, .hint.pf-off::before { background: var(--danger); }
.chart { margin-top: 12px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; font-size: 14px; margin-bottom: 10px; }
.legend { color: var(--muted); font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-left: 8px; }
.legend .l-tps { background: var(--sun); } .legend .l-pl { background: rgba(95,216,224,.45); height: 9px; }
#pf-chart { width: 100%; height: 160px; display: block; background: var(--surface-2); border-radius: 8px; }
#pf-chart .tps { fill: none; stroke: var(--sun); stroke-width: 2; stroke-linejoin: round; }
#pf-chart .pl { fill: rgba(95,216,224,.35); }
#pf-chart .warn { stroke: rgba(196,62,86,.55); stroke-width: 1; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; }
.axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 11.5px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.chart .foot { color: var(--muted); font-size: 12.5px; margin-top: 8px; }
