/* stalincraft.de – Minecraft-Optik: Erde-Hintergrund, graue GUI-Fenster, Chat-Log */

:root {
  --erde: #2a1e15;
  --gui: #c6c6c6;
  --gui-hell: #ffffff;
  --gui-dunkel: #555555;
  --slot: #6a6a6a;
  --slot-dunkel: #2e2e2e;
  --slot-hell: #a8a8a8;
  --text-gui: #2b2b2b;
  --text-gui-leise: #4a4a4a;
  --knopf: #727272;
  --gelb: #ffff55;
  --gruen: #55ff55;
  --rot: #ff5555;
  --gold: #ffaa00;
  --grau: #aaaaaa;
  --schatten: #3f3f3f;
  --text: "Atkinson Hyperlegible", system-ui, sans-serif;
  --pixel: "Pixelify Sans", system-ui, sans-serif;
  --leise-schatten: 1px 1px 0 rgba(0, 0, 0, .55);
  --block: "Silkscreen", "Pixelify Sans", monospace;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.5;
  color: #fff;
  background-color: var(--erde);
  background-image:
    linear-gradient(rgba(0, 0, 0, .45), rgba(0, 0, 0, .45)),
    url("/static/erde.svg");
  background-size: auto, 64px 64px;
  image-rendering: pixelated;
}

img { image-rendering: pixelated; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--gelb);
  outline-offset: 2px;
}

code {
  font-family: var(--pixel);
  font-size: .85em;
  background: rgba(0, 0, 0, .12);
  padding: 0 .3em;
}

/* ---------------------------------------------------------------- Kopf */

.kopf {
  background: url("/static/gras.svg") bottom / 64px 32px repeat-x;
  padding: 28px 16px 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 22px;
}

.logo {
  position: relative;
  display: inline-block;
  text-decoration: none;
  font-family: var(--block);
  font-weight: 700;
  font-size: clamp(22px, 6.4vw, 76px);
  line-height: 1;
  letter-spacing: .02em;
  color: #d6d6d6;
  text-shadow:
    0 3px 0 #9a9a9a,
    0 6px 0 #6a6a6a,
    0 9px 0 #404040,
    0 14px 0 rgba(0, 0, 0, .55);
}

.logo-tld { color: #b8b8b8; }

.splash {
  font-family: var(--pixel);
  position: absolute;
  left: 100%;
  bottom: -.1em;
  margin-left: -1.3em;
  font-weight: 600;
  font-size: max(15px, .28em);
  color: var(--gelb);
  text-shadow: 2px 2px 0 #3f3f00;
  white-space: nowrap;
  transform: rotate(-18deg);
  transform-origin: center;
  animation: splash 1s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes splash {
  from { transform: rotate(-18deg) scale(1); }
  to   { transform: rotate(-18deg) scale(1.09); }
}

/* ---------------------------------------------------------------- Knoepfe */

.mc-knopf {
  font-family: var(--pixel);
  font-weight: 500;
  font-size: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 44px;
  padding: 6px 18px;
  color: #fff;
  text-decoration: none;
  text-shadow: 2px 2px 0 var(--schatten);
  background: var(--knopf);
  border: 2px solid #000;
  box-shadow: inset 2px 2px 0 #a8a8a8, inset -2px -4px 0 #4a4a4a;
  cursor: pointer;
}

.mc-knopf:hover {
  border-color: #fff;
  background: #7d86b8;
  box-shadow: inset 2px 2px 0 #a9b2e4, inset -2px -4px 0 #4d5583;
}

.mc-knopf.aktiv {
  color: var(--gelb);
  background: #4a4a4a;
  box-shadow: inset 2px 2px 0 #2c2c2c, inset -2px -2px 0 #666;
}

.adressen {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.adresse {
  flex-direction: column;
  gap: 0;
  min-width: 230px;
  padding: 8px 20px;
}

.adr-art {
  font-family: var(--text);
  font-size: 14px;
  color: #d8d8d8;
  text-shadow: 1px 1px 0 #2a2a2a;
}

.adr-wert {
  font-family: var(--pixel);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: .02em;
}

.adr-wert small { font-family: var(--text); font-weight: 400; font-size: 15px; color: #ececec; }

.adresse.kopiert .adr-art { color: var(--gruen); }

.menue {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.menue .mc-knopf { min-width: 128px; }

/* ---------------------------------------------------------------- Buehne */

.buehne {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 24px;
  align-items: start;
}

/* GUI-Fenster wie Inventar und Menues */
.gui {
  background: var(--gui);
  color: var(--text-gui);
  border: 3px solid #000;
  box-shadow: inset 4px 4px 0 var(--gui-hell), inset -4px -4px 0 var(--gui-dunkel), 0 10px 0 rgba(0, 0, 0, .35);
  padding: 26px 30px 30px;
  min-width: 0;
}

.gui-titel {
  font-family: var(--pixel);
  font-weight: 600;
  font-size: 34px;
  line-height: 1.1;
  margin: 0 0 8px;
  color: #3a3a3a;
}

.gui-unter {
  font-family: var(--pixel);
  font-weight: 600;
  font-size: 22px;
  margin: 30px 0 10px;
  color: #3a3a3a;
}

.gui-info {
  margin: 0 0 22px;
  max-width: 62ch;
  color: var(--text-gui-leise);
}

.gui-fussnote {
  margin: 22px 0 0;
  font-size: 15px;
  color: var(--text-gui-leise);
  max-width: 70ch;
}

.leer {
  background: var(--slot);
  box-shadow: inset 3px 3px 0 var(--slot-dunkel), inset -3px -3px 0 var(--slot-hell);
  padding: 28px 24px;
  color: #fff;
  text-shadow: var(--leise-schatten);
  text-align: center;
}

.leer p { margin: .2em 0; }

.plattform {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  padding: 3px 5px 2px;
  color: #fff;
  background: #2f6f9e;
  border: 1px solid #000;
  text-shadow: none;
  vertical-align: middle;
}

/* ---------------------------------------------------------------- Spieler-Inventar */

.inventar {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px;
}

.slot {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 14px 8px 12px;
  text-decoration: none;
  background: var(--slot);
  box-shadow: inset 3px 3px 0 var(--slot-dunkel), inset -3px -3px 0 var(--slot-hell);
  color: #fff;
  text-shadow: var(--leise-schatten);
  text-align: center;
}

.slot:hover { background: #a5a5a5; }

.slot img { border: 2px solid #000; }

.slot-name {
  font-weight: 700;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot-info { font-size: 15px; color: #f0f0f0; }

.slot.ist-online .slot-info { color: var(--gruen); }

.slot .plattform { position: absolute; top: 8px; right: 8px; }

/* ---------------------------------------------------------------- Profil */

.zurueck { margin: 0 0 14px; font-size: 15px; }
.zurueck a { color: var(--text-gui-leise); }

.profil {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.profil-kopf { border: 3px solid #000; background: var(--slot-dunkel); }

.profil .gui-titel { margin: 0 0 4px; overflow-wrap: anywhere; }

.profil-zeile { margin: 0; color: var(--text-gui-leise); }



.statistik {
  margin: 26px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 6px;
}

.statistik div {
  background: var(--slot);
  box-shadow: inset 3px 3px 0 var(--slot-dunkel), inset -3px -3px 0 var(--slot-hell);
  padding: 10px 14px 12px;
  color: #fff;
  text-shadow: var(--leise-schatten);
}

.statistik dt { font-size: 15px; color: #f0f0f0; }
.statistik dd { margin: 2px 0 0; font-family: var(--block); font-weight: 700; font-size: 20px; letter-spacing: .03em; }

/* ---------------------------------------------------------------- Chat / Live-Log */

.chat {
  list-style: none;
  margin: 0;
  padding: 10px 12px;
  background: rgba(0, 0, 0, .78);
  border: 2px solid #000;
  max-height: 70vh;
  overflow-y: auto;
  font-size: 17px;
}

.chat-hell { max-height: none; }

.ev {
  padding: 3px 0;
  color: #fff;
  text-shadow: var(--leise-schatten);
  overflow-wrap: anywhere;
}

.ev time {
  display: inline-block;
  min-width: 7.2em;
  color: #a5a5a5;
  text-shadow: none;
  font-size: 15px;
}

.ev a { text-decoration: none; font-weight: 600; }
.ev a:hover { text-decoration: underline; }

.ev-join, .ev-left { color: var(--gelb); text-shadow: 2px 2px 0 #3f3f15; }
.ev-adv { color: #fff; }
.ev-adv a { color: var(--gruen); }
.ev-tod a { color: #ff8f8f; }
.ev-server { color: var(--grau); font-style: italic; }
.ev-leer { color: var(--grau); }

.ev.neu { animation: neu 1.6s ease-out; }

@keyframes neu {
  from { background: rgba(255, 255, 85, .25); }
  to   { background: transparent; }
}

/* ---------------------------------------------------------------- Gebannt */

.bann-tabelle {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
  font-size: 17px;
}

.bann-tabelle th {
  text-align: left;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-gui-leise);
  padding: 0 12px;
}

.bann-tabelle td {
  padding: 10px 12px;
  background: var(--slot);
  color: #fff;
  text-shadow: var(--leise-schatten);
  vertical-align: middle;
}

.bann-tabelle td:first-child { box-shadow: inset 3px 3px 0 var(--slot-dunkel), inset 0 -3px 0 var(--slot-hell); }
.bann-tabelle td:last-child { box-shadow: inset 0 3px 0 var(--slot-dunkel), inset -3px -3px 0 var(--slot-hell); }
.bann-tabelle td:not(:first-child):not(:last-child) { box-shadow: inset 0 3px 0 var(--slot-dunkel), inset 0 -3px 0 var(--slot-hell); }

.bann-name { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.bann-name img { border: 2px solid #000; }

/* ---------------------------------------------------------------- Online-Spalte */

.online {
  position: sticky;
  top: 16px;
  background: rgba(0, 0, 0, .72);
  border: 2px solid #000;
  padding: 14px 16px 16px;
}

.online-titel {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-family: var(--pixel);
  font-size: 20px;
  font-weight: 600;
  text-shadow: var(--leise-schatten);
}

.lampe {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: var(--rot);
  border: 2px solid #000;
  flex: none;
}

.lampe.an { background: var(--gruen); }

.online-liste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.online-liste li { display: flex; align-items: center; gap: 8px; }

.online-liste a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  text-shadow: var(--leise-schatten);
  min-width: 0;
}

.online-liste a:hover { color: var(--gelb); }
.online-liste img { border: 1px solid #000; flex: none; }

.online-leer { margin: 0; color: var(--grau); font-size: 16px; }

.online-version { margin: 14px 0 0; font-size: 15px; color: #b5b5b5; }

/* ---------------------------------------------------------------- Fuss */

.fuss {
  text-align: center;
  font-size: 14px;
  color: #c4b9b0;
  padding: 0 16px 28px;
}

/* ---------------------------------------------------------------- Schmal */

@media (max-width: 860px) {
  .buehne { grid-template-columns: minmax(0, 1fr); }
  .online { position: static; order: -1; }
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  .kopf { padding-top: 22px; gap: 18px; }
  .splash { left: auto; right: 0; bottom: -1.9em; margin-left: 0; font-size: 15px; }
  .kopf { padding-bottom: 60px; }
  .logo { margin-bottom: 14px; }
  .adresse { min-width: 0; width: 100%; }
  .adressen { width: 100%; }
  .menue .mc-knopf { min-width: 0; flex: 1 1 40%; padding: 6px 10px; }
  .gui { padding: 18px 14px 20px; }
  .gui-titel { font-size: 24px; }
  .profil-kopf { width: 64px; height: 64px; }
  .bann-tabelle thead { display: none; }
  .bann-tabelle, .bann-tabelle tbody, .bann-tabelle tr, .bann-tabelle td { display: block; }
  .bann-tabelle tr { margin-bottom: 6px; }
  .bann-tabelle td { box-shadow: none !important; padding: 4px 12px; }
  .bann-tabelle td:first-child { padding-top: 10px; }
  .bann-tabelle td:last-child { padding-bottom: 10px; }
  .bann-tabelle td.bann-name { display: flex; }
  .bann-tabelle td:nth-child(3)::before { content: "Seit "; color: #e6e6e6; }
  .bann-tabelle td:nth-child(4)::before { content: "Bis "; color: #e6e6e6; }
  .ev time { min-width: 0; margin-right: .4em; }
}

@media (prefers-reduced-motion: reduce) {
  .splash, .ev.neu { animation: none; }
}
