/* =====================================================================
   Redwood Roleplay – Gestaltung für Website und Panel
   Farben kommen aus den Einstellungen (--akzent / --akzent-2).
   ===================================================================== */

:root {
  --grund: #0a0512;
  --grund-2: #120823;
  --flaeche: #1a0d2b;
  --flaeche-2: #251438;
  --linie: #3a1c52;
  --schrift: #f0e8f8;
  --leise: #a48cc0;
  --akzent: #a04ede;
  --akzent-2: #d07ff0;
  --gut: #22c55e;
  --warn: #f59e0b;
  --schlecht: #ef4444;
  --rund: 14px;
  --rund-klein: 9px;
  --schatten: 0 18px 50px rgba(0, 0, 0, .45);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--grund);
  color: var(--schrift);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

code {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: .9em; background: var(--flaeche-2);
  padding: .12em .45em; border-radius: 5px;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 6vw, 3.1rem); }
h2 { font-size: clamp(1.3rem, 3.4vw, 1.85rem); }
h3 { font-size: 1.1rem; }
p  { margin: 0 0 1em; }

.breite  { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.schmal  { max-width: 780px; }
.block   { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.leise   { color: var(--leise); }
.klein   { font-size: .87rem; }
.center  { text-align: center; }
.gut     { color: var(--gut); }
.schlecht { color: var(--schlecht); }
.verweis { color: var(--akzent-2); text-decoration: none; font-weight: 600; }
.verweis:hover { text-decoration: underline; }

/* --------------------------------------------------------------- Kopfzeile */

.kopf {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 5, 18, .9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--linie);
  padding-top: env(safe-area-inset-top);
}
.kopf-innen { display: flex; align-items: center; gap: 1rem; min-height: 64px; }

.marke { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 800; }
.marke-logo { height: 34px; width: auto; }
.marke-name { font-size: 1.1rem; letter-spacing: .02em; }

.nav { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.nav a {
  text-decoration: none; padding: .5rem .75rem; border-radius: var(--rund-klein);
  color: var(--leise); font-weight: 600; font-size: .95rem; transition: .15s;
}
.nav a:hover { color: var(--schrift); background: var(--flaeche); }
.nav a.an { color: var(--schrift); background: var(--flaeche-2); }
.nav a.knopf { color: #fff; }

.burger {
  display: none; margin-left: auto; background: none; border: 0; cursor: pointer;
  width: 42px; height: 42px; padding: 9px; flex-direction: column; justify-content: space-between;
}
.burger span { display: block; height: 2px; background: var(--schrift); border-radius: 2px; transition: .2s; }
.burger.offen span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.burger.offen span:nth-child(2) { opacity: 0; }
.burger.offen span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

@media (max-width: 940px) {
  .burger { display: flex; }
  .nav {
    position: fixed; inset: 64px 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--grund-2); border-bottom: 1px solid var(--linie);
    padding: .75rem 1.25rem 1.5rem; gap: .15rem;
    transform: translateY(-140%); transition: transform .25s ease;
    max-height: 85vh; overflow-y: auto;
  }
  .nav.offen { transform: translateY(0); }
  .nav a { padding: .85rem .6rem; font-size: 1.05rem; }
}

/* -------------------------------------------------------------------- Knöpfe */

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .72rem 1.35rem; border-radius: var(--rund-klein); border: 1px solid transparent;
  background: var(--akzent); color: #fff; font-weight: 700; font-size: .95rem;
  text-decoration: none; cursor: pointer; transition: .15s; font-family: inherit;
}
.knopf:hover { filter: brightness(1.12); transform: translateY(-1px); }
.knopf:active { transform: none; }
.knopf.zweit { background: var(--akzent-2); color: #1a1030; }
.knopf.rand  { background: transparent; border-color: var(--linie); color: var(--schrift); }
.knopf.rand:hover { border-color: var(--akzent); }
.knopf.klein { padding: .45rem .9rem; font-size: .85rem; }
.knopf.breit { width: 100%; }
.knopf.gefahr { background: var(--schlecht); }
.knopf[disabled] { opacity: .5; pointer-events: none; }

/* ---------------------------------------------------------------------- Hero */

.hero {
  background: radial-gradient(circle at 18% 0%, rgba(160, 78, 222, .28), transparent 55%),
              radial-gradient(circle at 88% 25%, rgba(208, 127, 240, .12), transparent 50%),
              var(--grund);
  background-size: cover; background-position: center;
  padding: clamp(3rem, 9vw, 6rem) 0 clamp(2.5rem, 6vw, 3.5rem);
  border-bottom: 1px solid var(--linie);
}
.hero-innen { max-width: 800px; }
.hero-slogan { font-size: clamp(1.05rem, 2.6vw, 1.4rem); color: var(--akzent-2); font-weight: 600; margin-bottom: .5rem; }
.hero-text { color: var(--leise); font-size: 1.05rem; max-width: 62ch; }
.hero-knoepfe { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.6rem 0; }

.kennzahlen { display: flex; flex-wrap: wrap; gap: 2.2rem; margin-top: 2rem; }
.kennzahl { display: flex; flex-direction: column; }
.kennzahl-wert { font-size: 1.7rem; font-weight: 800; color: var(--akzent-2); line-height: 1.1; }
.kennzahl-text { font-size: .85rem; color: var(--leise); }

.seiten-kopf {
  padding: clamp(2.2rem, 6vw, 3.5rem) 0 1.5rem;
  border-bottom: 1px solid var(--linie);
  background: linear-gradient(180deg, rgba(160, 78, 222, .1), transparent);
}
.seiten-kopf h1 { margin-bottom: .3rem; }
.seiten-kopf p { max-width: 70ch; margin: 0; }

.abschnitt-kopf { margin-bottom: 1.5rem; }
.abschnitt-kopf p { margin: 0; }

/* --------------------------------------------------------------------- Raster */

.raster { display: grid; gap: 1.1rem; }
.raster.zwei  { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.raster.drei  { grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); }
.raster.vier  { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }

.karte {
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund);
  overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column;
  transition: .18s;
}
a.karte:hover { border-color: var(--akzent); transform: translateY(-3px); box-shadow: var(--schatten); }
.karte-inhalt { padding: 1.1rem 1.15rem 1.25rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.karte-inhalt h3 { margin: 0; }
.karte-inhalt p { margin: 0; }
.karte-bild { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.karte-fuss { display: flex; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: .6rem; }
.karte.gross .karte-inhalt { padding: 1.5rem; gap: .7rem; }
.karte.gross .knopf { align-self: flex-start; margin-top: .3rem; }

/* ---------------------------------------------------------------- Fraktionen */

.fraktion-karte { border-top: 3px solid var(--karten-farbe, var(--akzent)); }
.fraktion-logo { width: 62px; height: 62px; object-fit: contain; margin: 1.1rem 1.15rem -.3rem; }

.marker {
  display: inline-block; align-self: flex-start; padding: .18rem .6rem; border-radius: 999px;
  font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  background: var(--flaeche-2); color: var(--leise);
}
.marker.staat    { background: rgba(59, 130, 246, .18); color: #93c5fd; }
.marker.legal    { background: rgba(34, 197, 94, .16); color: #86efac; }
.marker.illegal  { background: rgba(239, 68, 68, .16); color: #fca5a5; }
.marker.twitch   { background: rgba(145, 70, 255, .18); color: #c4b5fd; }
.marker.youtube  { background: rgba(239, 68, 68, .16); color: #fca5a5; }
.marker.tiktok   { background: rgba(255, 255, 255, .1); color: #e5e5e5; }

.filter { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.4rem; }
.filter-knopf {
  padding: .45rem 1rem; border-radius: 999px; border: 1px solid var(--linie);
  background: var(--flaeche); color: var(--leise); font-weight: 600; font-size: .88rem;
  cursor: pointer; font-family: inherit; transition: .15s;
}
.filter-knopf:hover { color: var(--schrift); }
.filter-knopf.an { background: var(--akzent); border-color: var(--akzent); color: #fff; }

.fraktion-hero {
  border-bottom: 1px solid var(--linie); padding: clamp(2rem, 6vw, 3.4rem) 0;
  border-top: 4px solid var(--karten-farbe, var(--akzent));
  background-color: var(--grund-2);
}
.fraktion-hero-innen { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.fraktion-hero-logo { width: 96px; height: 96px; object-fit: contain; }
.fraktion-hero h1 { margin: .2rem 0 .3rem; }

.spalten { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 900px) { .spalten { grid-template-columns: 1fr 320px; } }
.seitenleiste .karte { position: sticky; top: 84px; }

.daten-liste { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: 0 0 1rem; }
.daten-liste dt { color: var(--leise); font-size: .85rem; }
.daten-liste dd { margin: 0; font-weight: 600; }

.mitglieder-liste { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.mitglieder-liste li {
  display: flex; justify-content: space-between; gap: 1rem; padding: .55rem .85rem;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund-klein);
}

/* ----------------------------------------------------------------- Regelwerk */

.regel-suche { margin-bottom: 1.2rem; }
.regel-suche input {
  width: 100%; padding: .85rem 1.1rem; border-radius: var(--rund-klein);
  border: 1px solid var(--linie); background: var(--flaeche); color: var(--schrift);
  font-family: inherit; font-size: 1rem;
}
.regel-suche input:focus { outline: 2px solid var(--akzent); outline-offset: 1px; }
.regel-suche p { margin: .5rem 0 0; }

.sprungmarken { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 2rem; }
.sprungmarken a {
  padding: .35rem .8rem; border-radius: 999px; background: var(--flaeche);
  border: 1px solid var(--linie); text-decoration: none; font-size: .85rem;
  color: var(--leise); font-weight: 600;
}
.sprungmarken a:hover { color: var(--schrift); border-color: var(--akzent); }

.regel-abschnitt { margin-bottom: 2.5rem; scroll-margin-top: 84px; }
.regel-liste { display: grid; gap: .7rem; }
.regel {
  background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: var(--rund); padding: 1rem 1.2rem;
}
.regel-kopf { display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap; }
.regel-kopf h3 { margin: 0; font-size: 1.02rem; }
.regel-code { color: var(--akzent-2); font-weight: 800; font-size: .9rem; white-space: nowrap; }
.regel-text { color: var(--leise); font-size: .95rem; }
.regel-text p:last-child { margin-bottom: 0; }
.regel-strafe { margin: .6rem 0 0; font-size: .85rem; color: var(--warn); }
.regel-strafe span {
  display: inline-block; background: rgba(245, 158, 11, .14); color: var(--warn);
  padding: .1rem .5rem; border-radius: 5px; font-weight: 700; margin-right: .4rem;
}
.regel.versteckt { display: none; }

/* ---------------------------------------------------------------------- Team */

.team-gruppe { margin-bottom: 2.5rem; }
.team-gruppe h2 { display: flex; align-items: center; gap: .6rem; }
.rang-punkt {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--karten-farbe, var(--akzent)); flex: none;
}
.team-karte { border-top: 3px solid var(--karten-farbe, var(--akzent)); }
.team-karte .karte-inhalt { align-items: center; text-align: center; }
.team-bild { width: 78px; height: 78px; border-radius: 50%; object-fit: cover; margin-bottom: .3rem; }
.team-bild.ersatz {
  display: grid; place-items: center; background: var(--flaeche-2);
  font-size: 1.9rem; font-weight: 800; color: var(--akzent-2);
}
.team-ueber { margin-top: .4rem !important; }

.status-punkt { font-size: .78rem; font-weight: 700; color: var(--leise); }
.status-punkt::before { content: "● "; }
.status-punkt.aktiv   { color: var(--gut); }
.status-punkt.urlaub  { color: var(--warn); }
.status-punkt.probe   { color: var(--akzent-2); }
.status-punkt.inaktiv { color: var(--leise); }

.aufruf {
  margin-top: 2.5rem; padding: 2rem 1.5rem; text-align: center;
  background: linear-gradient(135deg, rgba(160, 78, 222, .16), rgba(208, 127, 240, .07));
  border: 1px solid var(--linie); border-radius: var(--rund);
}
.aufruf h2 { margin-bottom: .3rem; }

/* --------------------------------------------------------------- Formulare */

.formular { display: grid; gap: 1.2rem; }
.feld { display: grid; gap: .35rem; }
.feld > label { font-weight: 600; font-size: .95rem; }
.feld p { margin: 0; }
.pflicht { color: var(--akzent-2); }

input[type=text], input[type=email], input[type=url], input[type=number],
input[type=password], input[type=search], input[type=date], textarea, select {
  width: 100%; padding: .7rem .9rem; border-radius: var(--rund-klein);
  border: 1px solid var(--linie); background: var(--flaeche);
  color: var(--schrift); font-family: inherit; font-size: .97rem;
}
textarea { resize: vertical; min-height: 90px; line-height: 1.55; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--akzent); outline-offset: 1px; }
input[type=color] {
  width: 56px; height: 38px; padding: 2px; border-radius: 8px;
  border: 1px solid var(--linie); background: var(--flaeche); cursor: pointer;
}

.feld.fehler input, .feld.fehler textarea, .feld.fehler select { border-color: var(--schlecht); }
.feld-fehler { color: var(--schlecht); font-size: .85rem; }

.ankreuz { display: flex; gap: .65rem; align-items: flex-start; font-weight: 400; font-size: .92rem; }
.ankreuz input { width: 18px; height: 18px; margin-top: .18rem; flex: none; accent-color: var(--akzent); }

.honigtopf { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.hinweis {
  padding: .9rem 1.1rem; border-radius: var(--rund-klein);
  background: var(--flaeche-2); border: 1px solid var(--linie);
  margin: 0 0 1.2rem; font-size: .93rem;
}
.hinweis.gut     { border-color: rgba(34, 197, 94, .45); background: rgba(34, 197, 94, .1); }
.hinweis.schlecht { border-color: rgba(239, 68, 68, .45); background: rgba(239, 68, 68, .1); }

/* ------------------------------------------------------------------- Status */

.status-kachel {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem;
  padding: 1.5rem; border-radius: var(--rund); border: 1px solid var(--linie);
  background: var(--flaeche); margin-bottom: 2rem;
}
.status-punkt-gross {
  display: inline-block; width: 12px; height: 12px; border-radius: 50%;
  margin-right: .5rem; background: var(--schlecht);
}
.status-kachel.online .status-punkt-gross { background: var(--gut); box-shadow: 0 0 0 4px rgba(34, 197, 94, .2); }
.status-zahl { font-size: 2rem; font-weight: 800; color: var(--akzent-2); }
.balken { flex: 1 1 200px; height: 8px; background: var(--flaeche-2); border-radius: 999px; overflow: hidden; }
.balken span { display: block; height: 100%; background: linear-gradient(90deg, var(--akzent), var(--akzent-2)); }

.spieler-liste { display: flex; flex-wrap: wrap; gap: .4rem; }
.spieler {
  padding: .3rem .75rem; background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: 999px; font-size: .85rem;
}

.schritte { padding-left: 1.2rem; margin: 0; display: grid; gap: .35rem; color: var(--leise); }
.schritte strong { color: var(--schrift); }

.beitrag-bild { width: 100%; border-radius: var(--rund); margin: 1rem 0 1.5rem; }
.beitrag-text { font-size: 1.03rem; }
.beitrag-text p:last-child { margin-bottom: 0; }

/* -------------------------------------------------------------------- Fuß */

.fuss { border-top: 1px solid var(--linie); background: var(--grund-2); margin-top: 2rem; }
.fuss-innen {
  display: grid; gap: 1.5rem; padding: 2.5rem 0 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.fuss-innen p { margin: .3rem 0 0; }
.fuss-links, .fuss-sozial { display: flex; flex-direction: column; gap: .3rem; }
.fuss-links a, .fuss-sozial a { text-decoration: none; color: var(--leise); font-size: .92rem; }
.fuss-links a:hover, .fuss-sozial a:hover { color: var(--akzent-2); }
.fuss-unten { padding: 1rem 0 calc(1.5rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--linie); }

/* ------------------------------------------------------------- Mittige Box */

body.mittig { display: grid; place-items: center; min-height: 100vh; padding: 1.5rem; }
.mitte-box {
  max-width: 420px; width: 100%; text-align: center;
  background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: var(--rund); padding: 2.2rem 1.8rem;
}
.mitte-box .formular { text-align: left; margin-top: 1.2rem; }

/* ------------------------------------------- Ankündigungen einer Fraktion */

.fraktion-meldungen { display: grid; gap: .8rem; margin-bottom: 2rem; }
.fraktion-meldungen .karte-inhalt { gap: .25rem; }
.fraktion-meldungen h3 { margin: 0; font-size: 1.05rem; }
.fraktion-meldungen .leise p:last-child { margin-bottom: 0; }
