/* Mine Attack 4 — eigenes Erscheinungsbild, bewusst nicht das von Season 3.
   Dunkel, kantig, ein Akzent. Keine externen Schriften oder CDNs. */

/* Palette aus dem Logo gemessen, nicht geschaetzt: Hintergrund #080818,
   kraeftige Toene durchweg bei Farbton 252-264 Grad (Violett). Die gemessenen
   Akzenttoene sind fuer Text zu dunkel, deshalb derselbe Farbton in hoeherer
   Helligkeit - #a78bfa auf #08071a ergibt Kontrast 7,4:1. */
:root {
  --bg: #08071a;
  --surface: #12102a;
  --surface-2: #1a1738;
  --line: #2a2550;
  --text: #e9e7f5;
  --muted: #9c95bd;
  --accent: #8b5cf6;
  --accent-bright: #a78bfa;
  --accent-soft: rgba(139, 92, 246, 0.16);
  --yes: #34d399;
  --radius: 10px;
  --wrap: 940px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- Kopfbereich --- */

/* Nebel wie auf dem Logo: zwei violette Schleier ueber fast schwarzem Grund,
   darueber das feine Raster als Minecraft-Anklang. */
.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem);
  background:
    radial-gradient(70rem 34rem at 22% -10rem, rgba(139, 92, 246, 0.22), transparent 60%),
    radial-gradient(52rem 30rem at 82% -4rem, rgba(192, 38, 211, 0.16), transparent 62%),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(255,255,255,.02) 31px 32px),
    repeating-linear-gradient(90deg, transparent 0 31px, rgba(255,255,255,.02) 31px 32px);
  border-bottom: 1px solid var(--line);
}

/* Das Logo ist ein 185-Pixel-Screenshot. Fest begrenzt statt gross skaliert -
   hochgezogen wuerde es matschig. Beim Austausch gegen das Original kann die
   Groesse hoch. */
.logo {
  display: block;
  width: 104px; height: 104px;
  border-radius: 18px;
  margin: 0 0 1.4rem;
  border: 1px solid var(--line);
  box-shadow: 0 0 42px rgba(139, 92, 246, .3);
}

.kicker {
  margin: 0 0 .9rem;
  font-size: .8rem;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--accent-bright);
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(2.9rem, 9vw, 5.4rem);
  line-height: .95;
  letter-spacing: -.035em;
  font-weight: 800;
}
h1 span { color: var(--accent-bright); text-shadow: 0 0 28px rgba(139,92,246,.55); }

.lead {
  max-width: 46ch;
  margin: 1.4rem 0 2rem;
  font-size: clamp(1rem, 2.1vw, 1.15rem);
  color: var(--muted);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.joined-note {
  margin: 1.4rem 0 0; color: var(--yes); font-size: .93rem; font-weight: 600;
}

/* --- Knöpfe --- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .45rem; padding: .72rem 1.3rem; border-radius: var(--radius);
  border: 1px solid transparent; font: inherit; font-weight: 650;
  cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #0d0620; }
.btn-primary:hover { background: var(--accent-bright); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: #3d3670; background: var(--surface); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* --- Abschnitte --- */

.section { padding: clamp(3rem, 7vw, 4.5rem) 0; }
.section h2 {
  margin: 0 0 .6rem; font-size: clamp(1.5rem, 3.6vw, 2.1rem);
  letter-spacing: -.02em;
}
.section-lead { margin: 0 0 2rem; color: var(--muted); max-width: 60ch; }

/* --- Eingabe --- */

.composer { display: flex; flex-wrap: wrap; gap: .7rem; align-items: flex-start; }
.composer .field { position: relative; flex: 1 1 15rem; }
.composer input {
  width: 100%; padding: .78rem 1rem; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font: inherit;
}
.composer input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.results {
  position: absolute; z-index: 30; inset-inline: 0; top: calc(100% + .4rem);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 18px 40px rgba(0,0,0,.5); max-height: 21rem; overflow-y: auto;
}
.result {
  display: flex; gap: .7rem; align-items: center; width: 100%;
  padding: .6rem .8rem; background: none; border: 0; border-bottom: 1px solid var(--line);
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.result:last-child { border-bottom: 0; }
.result:hover, .result:focus-visible { background: var(--accent-soft); outline: none; }
.result img { width: 34px; height: 34px; border-radius: 7px; object-fit: cover; background: var(--line); flex: none; }
.result-name { font-weight: 650; }
.result-meta { color: var(--muted); font-size: .82rem; }

.picked {
  margin: .9rem 0 0; padding: .6rem .85rem; border-radius: var(--radius);
  background: var(--accent-soft); border: 1px solid rgba(139,92,246,.34); font-size: .9rem;
}
.notice {
  margin: .9rem 0 0; padding: .7rem .9rem; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--line); font-size: .92rem;
}
.notice button { margin-left: .5rem; }

/* --- Liste --- */

.list-head {
  display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between;
  align-items: center; margin: 2.4rem 0 1rem;
}
.tabs { display: flex; gap: .3rem; background: var(--surface); padding: .25rem; border-radius: var(--radius); }
.tab {
  padding: .4rem .9rem; border: 0; border-radius: 7px; background: none;
  color: var(--muted); font: inherit; font-weight: 600; cursor: pointer;
}
.tab.is-active { background: var(--surface-2); color: var(--text); }
.filter {
  padding: .5rem .8rem; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit; min-width: 12rem;
}

.mods { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.mod {
  display: flex; gap: .9rem; align-items: center;
  padding: .8rem .95rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.mod img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--surface-2); flex: none; }
.mod-body { flex: 1; min-width: 0; }
.mod-name { font-weight: 700; }
.mod-name a { color: inherit; text-decoration: none; }
.mod-name a:hover { text-decoration: underline; }
.mod-meta { color: var(--muted); font-size: .85rem; }
.mod-reason { color: var(--muted); font-size: .88rem; font-style: italic; margin-top: .15rem; }

.badge {
  display: inline-block; margin-left: .5rem; padding: .1rem .5rem; border-radius: 999px;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  vertical-align: middle;
}
.badge-accepted { background: rgba(52,211,153,.16); color: var(--yes); }
.badge-rejected { background: rgba(139,92,246,.2); color: var(--accent-bright); }

.vote {
  display: flex; flex-direction: column; align-items: center; gap: .1rem;
  min-width: 3.6rem; padding: .45rem .5rem; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text); font: inherit; cursor: pointer; flex: none;
}
.vote:hover:not(:disabled) { border-color: var(--accent); }
.vote.is-on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-bright); }
.vote-count { font-weight: 800; font-size: 1.05rem; line-height: 1; }
.vote-label { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.vote.is-on .vote-label { color: var(--accent-bright); }

.empty { color: var(--muted); padding: 1.5rem 0; }

/* --- Umfragen --- */

.polls { display: grid; gap: 1rem; }
.poll { padding: 1.1rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.poll h3 { margin: 0 0 .9rem; font-size: 1.12rem; }
.poll-options { display: grid; gap: .45rem; }
.option {
  position: relative; display: flex; justify-content: space-between; gap: 1rem;
  width: 100%; padding: .62rem .85rem; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  font: inherit; text-align: left; cursor: pointer;
}
.option:hover:not(:disabled) { border-color: var(--accent); }
.option:disabled { cursor: default; }
.option.is-mine { border-color: var(--accent); }
.option .bar {
  position: absolute; inset: 0 auto 0 0; background: var(--accent-soft); z-index: 0;
}
.option span { position: relative; z-index: 1; }
.option .pct { color: var(--muted); font-variant-numeric: tabular-nums; }
.poll-foot { margin: .75rem 0 0; color: var(--muted); font-size: .85rem; }

/* --- Fuß --- */

.footer {
  padding: 2.5rem 0 3rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: .6rem; justify-content: space-between;
  color: var(--muted); font-size: .9rem;
}
.footer a { color: var(--muted); }

/* --- Dialog --- */

dialog {
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  color: var(--text); padding: 1.6rem; width: min(100% - 2rem, 25rem);
}
dialog::backdrop { background: rgba(0,0,0,.65); }
dialog h3 { margin: 0 0 .5rem; }
dialog p { margin: 0 0 1rem; color: var(--muted); font-size: .93rem; }
dialog input {
  width: 100%; padding: .7rem .9rem; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  font: inherit; letter-spacing: .1em; text-transform: uppercase;
}
.dialog-error { color: #f0a5c0; margin: .7rem 0 0; font-size: .9rem; }
.dialog-actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.2rem; }

/* --- Startseite vor dem Serverstart --- */

.countdown {
  margin: 1.6rem 0 0; font-size: .95rem; color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.card {
  padding: 1.2rem 1.3rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.card h3 { margin: 0 0 .5rem; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }

/* --- Voranmeldung --- */

.apply { display: grid; gap: 1.1rem; max-width: 40rem; }
.apply .row { display: grid; gap: 1.1rem; grid-template-columns: 1fr 1fr; }
.apply label { display: grid; gap: .35rem; }
.apply label > span { font-size: .9rem; font-weight: 600; }
.apply label em { color: var(--accent-bright); font-style: normal; }
.apply label small { color: var(--muted); font-weight: 400; }
.apply input, .apply select, .apply textarea {
  width: 100%; padding: .7rem .9rem; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font: inherit;
}
.apply textarea { resize: vertical; }
.apply input:focus-visible, .apply select:focus-visible, .apply textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
.apply .btn { justify-self: start; }
.hint { margin: 0; color: var(--muted); font-size: .85rem; }
.hint a { color: var(--muted); }

/* Honigtopf: aus dem Bild geschoben statt display:none - manche Bots
   ueberspringen unsichtbare Felder, verschobene fuellen sie aus. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.done {
  padding: 1.5rem 1.6rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--yes);
}
.done h3 { margin: 0 0 .5rem; color: var(--yes); }
.done p { margin: 0; color: var(--muted); }

@media (max-width: 560px) {
  .composer { flex-direction: column; }
  .composer .btn { width: 100%; }
  .list-head { flex-direction: column; align-items: stretch; }
  .apply .row { grid-template-columns: 1fr; }
  .apply .btn { width: 100%; justify-self: stretch; }
}

/* --- Rechtstexte --- */

.legal { max-width: 46rem; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0 0 1.5rem; letter-spacing: -.02em; }
.legal h2 {
  margin: 2rem 0 .5rem; font-size: 1.05rem; color: var(--accent-bright);
  letter-spacing: .01em;
}
.legal p, .legal li { color: var(--muted); }
.legal p { margin: 0 0 .8rem; }
.legal ul { margin: 0 0 .8rem; padding-left: 1.2rem; }
.legal li { margin-bottom: .25rem; }
.legal strong { color: var(--text); }
.legal a { color: var(--accent-bright); }
