/* GameplayHD – Seiten-Layout
   Farben aus Logo (Gold -> Violett) und dem Nacht-Screenshot der Lobby. */

@font-face {
  font-family: "Monocraft";
  src: url("/fonts/Monocraft.otf") format("opentype");
  font-display: swap;
}

:root {
  --bg: #0c0f16;
  --bg-raised: #131824;
  --bg-sunken: #090b11;
  --line: #222a3a;
  --line-strong: #2f3a50;
  --text: #e6e8ee;
  --muted: #9099ad;
  --faint: #626c82;
  --gold: #e2a33a;
  --gold-dark: #b47d22;
  --violet: #7a5cf0;
  --green: #4cc38a;
  --red: #e5594f;

  --radius: 6px;
  --wrap: 1120px;
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  --font-mc: "Monocraft", ui-monospace, monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

img { max-width: 100%; display: block; }

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 .5em;
  letter-spacing: .01em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.mc { font-family: var(--font-mc); letter-spacing: 0; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 15, 22, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.4rem;
}
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.brand b { font-weight: 700; }
.brand span { color: var(--gold); }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  color: var(--muted);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-weight: 500;
}
.nav a:hover { color: var(--text); background: var(--bg-raised); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); }
.nav .nav-discord { color: var(--text); background: #5865f2; margin-left: 8px; }
.nav .nav-discord:hover { background: #4752c4; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: var(--radius);
  padding: 6px 12px;
  font: inherit;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px 20px 16px;
  }
  .nav.open { display: flex; }
  .nav .nav-discord { margin: 8px 0 0; text-align: center; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--bg-raised);
  color: var(--text);
  font: 600 1rem var(--font);
  cursor: pointer;
}
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #1a1205; }
.btn-gold:hover { background: #efb24a; border-color: #efb24a; }
.btn-discord { background: #5865f2; border-color: #5865f2; }
.btn-discord:hover { background: #4752c4; border-color: #4752c4; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: min(78vh, 680px);
  display: flex;
  align-items: flex-end;
  background: var(--bg-sunken) url("/images/site/hero-night.jpg") center 35% / cover no-repeat;
}
@media (max-width: 960px) {
  .hero { background-image: url("/images/site/hero-night-960.jpg"); }
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12,15,22,.15) 0%, rgba(12,15,22,.35) 45%, var(--bg) 100%),
    linear-gradient(90deg, rgba(12,15,22,.75) 0%, rgba(12,15,22,0) 70%);
}
.hero .wrap { position: relative; z-index: 1; padding-bottom: 56px; padding-top: 120px; }
.hero h1 { margin-bottom: .2em; }
.hero h1 span { color: var(--gold); }
.hero-lead { font-size: 1.2rem; max-width: 34em; color: #d3d7e0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; align-items: center; }

/* Server-IP zum Kopieren */
.ip-box {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 16px;
  background: rgba(9, 11, 17, .85);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text);
  font: inherit;
}
.ip-box:hover { border-color: var(--gold); }
.ip-box .mc { font-size: 1.15rem; color: var(--gold); }
.ip-box .hint { font-size: .8rem; color: var(--muted); border-left: 1px solid var(--line-strong); padding-left: 12px; }
.ip-box.copied .hint { color: var(--green); }

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: .95rem;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.on { background: var(--green); box-shadow: 0 0 0 3px rgba(76,195,138,.18); }
.dot.off { background: var(--red); }

/* ---------- Sections ---------- */

.section { padding: 72px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head p { margin: 0; color: var(--muted); max-width: 36em; }
.page-head { padding-top: 56px; padding-bottom: 8px; }
.page-head p { color: var(--muted); max-width: 40em; font-size: 1.1rem; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }

.mode-card { display: flex; flex-direction: column; }
.mode-card .icon {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  margin-bottom: 16px;
}
.facts { list-style: none; padding: 0; margin: 16px 0 0; border-top: 1px solid var(--line); }
.facts li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.facts li span:first-child { color: var(--muted); }

.steps { counter-reset: step; }
.step { position: relative; padding-left: 52px; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--gold);
}
.step code, .card code {
  font-family: var(--font-mc);
  color: var(--gold);
  background: var(--bg-sunken);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: .9em;
}

/* ---------- Tabellen / Listen ---------- */

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table th { color: var(--muted); font-weight: 500; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr:hover td { background: rgba(255,255,255,.02); }
.player { display: flex; align-items: center; gap: 10px; }
.player img { width: 24px; height: 24px; image-rendering: pixelated; border-radius: 3px; }
.rank-no { color: var(--faint); width: 3ch; font-variant-numeric: tabular-nums; }
.rank-no.top { color: var(--gold); font-weight: 600; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tab {
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 7px 14px;
  border-radius: 999px;
  font: 500 .95rem var(--font);
  cursor: pointer;
}
.tab:hover { color: var(--text); border-color: var(--line-strong); }
.tab[aria-selected="true"] { color: #1a1205; background: var(--gold); border-color: var(--gold); }

.empty { color: var(--muted); padding: 28px 12px; text-align: center; }

.field { display: flex; gap: 8px; flex-wrap: wrap; }
.input {
  flex: 1;
  min-width: 200px;
  background: var(--bg-sunken);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  padding: 11px 14px;
  font: inherit;
}
.input:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }

/* ---------- Team ---------- */

.member { display: flex; align-items: center; gap: 14px; }
.member img { width: 56px; height: 56px; image-rendering: pixelated; border-radius: 4px; background: var(--bg-sunken); }
.member .name { font-weight: 600; }
.badge {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid currentColor;
  color: color-mix(in srgb, var(--c, var(--muted)) 60%, #fff);
}
.rank-name { color: color-mix(in srgb, var(--c, var(--text)) 65%, #fff); }

/* ---------- Ränge ---------- */

.rank-row { display: grid; grid-template-columns: 180px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.rank-row h3 { margin: 0; }
.rank-row p { margin: 0; color: var(--muted); }
.rank-group { margin-top: 40px; }
.rank-group > h2 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
@media (max-width: 640px) { .rank-row { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- Status ---------- */

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; }
.stat .label { color: var(--muted); font-size: .9rem; }
.stat .value { font-family: var(--font-head); font-size: 2rem; font-weight: 700; }
.motd {
  font-family: var(--font-mc);
  background: #000 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Crect width='32' height='32' fill='%23302520'/%3E%3Crect width='16' height='16' fill='%233a2d26'/%3E%3Crect x='16' y='16' width='16' height='16' fill='%233a2d26'/%3E%3C/svg%3E");
  padding: 14px 16px;
  border-radius: 4px;
  line-height: 1.5;
  font-size: .95rem;
  color: #aaa;
  white-space: pre-line;
}

/* ---------- Text-Seiten (Recht) ---------- */

.prose { max-width: 760px; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.4em; }
.prose p, .prose li { color: #c9cdd8; }
.prose ul { padding-left: 1.2em; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0;
  margin-top: 40px;
  color: var(--faint);
  font-size: .9rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: var(--muted); }
.site-footer p { margin: 0; max-width: 32em; }

/* ---------- Hilfen ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  padding: 10px 18px;
  border-radius: var(--radius);
  opacity: 0;
  transition: .2s;
  pointer-events: none;
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.skeleton { color: transparent !important; background: var(--line); border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .toast { transition: none; }
}
