/* Call Me Human Kommunikation: gemeinsames Layout im Stil der Landingpage (call-me-human.com).
   Keine Animationen, keine Transitions, keine Hover-Bewegung: beim Hover wechselt nur die Farbe. */

:root {
  --color-bg: #140906;
  --color-bg-deep: #0c0504;
  --color-bg-bottom: #6e3214;
  --color-surface: #33191a;
  --color-text: #f3ead7;
  --color-text-muted: #e0cdb5;
  --color-text-dim: #edd6b8;
  --color-primary: #f2b84b;
  --color-primary-light: #ffd27a;
  --color-glow: #5fe0c8;
  --frame-dark: #3a2614;
  --frame-mid: #8a5a2b;
  --frame-light: #e0a24a;
  --font-heading: "Fredoka", system-ui, sans-serif;
  --font-title: "Pixelify Sans", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
  --text-sm: 0.9rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: clamp(3rem, 8vw, 6rem);
}

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

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

/* Pixel-Sterne wie auf der Landingpage, statisch */
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  background:
    url("../img/sterne-1.svg"),
    url("../img/sterne-2.svg"),
    linear-gradient(180deg, var(--color-bg) 0, var(--color-bg) 30vh, #3a190b 65%, var(--color-bg-bottom) 100%);
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  min-height: 100vh;
}

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

a {
  color: var(--color-primary-light);
}

:focus-visible {
  outline: 3px solid var(--color-glow);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: var(--color-bg-deep);
  padding: 0.5rem 1rem;
  z-index: 20;
}

.skip-link:focus {
  left: 1rem;
}

/* ===== Kopfzeile mit Menü (Entwurf 3b: Symbole mittig, Flagge rechts) ===== */

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  padding: 12px clamp(1rem, 3vw, 2.25rem) 16px;
  background: transparent; /* kein schwarzer Balken, Menü steht direkt im Sternenhimmel (Marko 2026-10-23) */
}

.site-menu {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.25rem);
}

.site-menu a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 2px 10px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--color-text);
  text-shadow: 2px 2px 0 var(--color-bg-deep);
}

.nav-icon {
  width: 36px;
  height: auto;
  flex: none;
  filter: drop-shadow(2px 2px 0 rgba(12, 5, 4, 0.8));
}

/* goldener Pixel-Unterstrich, erscheint nur farblich (keine Bewegung) */
.site-menu a::after {
  content: "";
  position: absolute;
  left: 46px;
  right: 0;
  bottom: 0;
  height: 4px;
  background: transparent;
  box-shadow: 2px 2px 0 transparent;
}

.site-menu a:hover,
.site-menu a[aria-current="page"] {
  color: var(--color-primary-light);
}

.site-menu a:hover::after,
.site-menu a[aria-current="page"]::after {
  background: var(--color-primary);
  box-shadow: 2px 2px 0 var(--color-bg-deep);
}

.lang-switch {
  position: absolute;
  right: clamp(1rem, 3vw, 2.25rem);
  /* Kopfzeilen-Polster 12/16 px und Link-Polster 8/10 px: Symbolmitte liegt 3 px über der Kopfzeilenmitte */
  top: calc(50% - 3px);
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
}

.lang-switch svg {
  /* Runde Pixel-Flagge 11x11, je Spielpixel 3px wie die Menü-Symbole, Rand ist im Bild */
  width: 33px;
  height: 33px;
  margin-right: 1px; /* ungerade Breite in 44er-Box: hält die Flagge auf ganzen Pixeln */
  display: block;
  filter: drop-shadow(2px 2px 0 rgba(12, 5, 4, 0.8));
}

/* Pixel-Menüknopf (nur auf schmalen Bildschirmen) */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: var(--color-surface);
  clip-path: polygon(
    0 4px, 4px 4px, 4px 0,
    calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px,
    100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%,
    4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px)
  );
  box-shadow:
    inset 0 0 0 2px var(--frame-dark),
    inset 0 0 0 4px var(--frame-light),
    inset 0 0 0 6px var(--frame-dark);
}

.menu-toggle:hover {
  background: var(--frame-dark);
}

.menu-toggle svg {
  display: block;
}

@media (max-width: 1023px) {
  .site-header {
    justify-content: flex-end;
    gap: 8px;
    padding: 12px;
  }

  .lang-switch {
    position: static;
    transform: none;
  }

  .lang-switch svg {
    margin-bottom: 1px; /* ganze Pixel auch senkrecht */
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-menu {
    display: none;
  }

  .site-header.is-open .site-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 6px 20px 10px;
    background: rgba(20, 9, 6, 0.96);
    border-top: 4px solid var(--frame-light);
    border-bottom: 4px solid var(--frame-light);
    box-shadow: 0 4px 0 var(--frame-dark), 0 -4px 0 var(--frame-dark);
  }

  .site-header.is-open .site-menu a {
    padding: 14px 4px;
    font-size: 1.3rem;
    gap: 14px;
  }

  .site-header.is-open .site-menu a + a {
    border-top: 2px solid rgba(224, 162, 74, 0.2);
  }

  .site-header.is-open .site-menu a::after {
    display: none;
  }

  .site-header.is-open .site-menu a[aria-current="page"] {
    color: var(--color-primary-light);
  }
}

/* ===== Seiteninhalt ===== */

.page {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md) 0;
}

.page__title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(2.25rem, 7vw, 4.25rem);
  line-height: 1.05;
  text-align: center;
  margin: 0 0 var(--space-xl);
  color: var(--color-primary-light);
  text-shadow: 4px 4px 0 var(--frame-dark);
  letter-spacing: 0.06em;
}

/* ===== Spielrahmen (Holz + Gold, Pixel-Ecken) ===== */

.game-frame {
  position: relative;
  padding: 10px;
  background: var(--frame-mid);
  clip-path: polygon(
    0 8px, 8px 8px, 8px 0,
    calc(100% - 8px) 0, calc(100% - 8px) 8px, 100% 8px,
    100% calc(100% - 8px), calc(100% - 8px) calc(100% - 8px), calc(100% - 8px) 100%,
    8px 100%, 8px calc(100% - 8px), 0 calc(100% - 8px)
  );
  box-shadow:
    inset 0 0 0 2px var(--frame-dark),
    inset 0 0 0 4px var(--frame-light),
    inset 0 0 0 7px var(--frame-dark);
}

.game-frame__inner {
  padding: clamp(1.5rem, 5vw, 3rem) clamp(1rem, 4vw, 3rem);
  border: 3px solid var(--frame-dark);
  background: var(--color-surface);
  text-align: center;
}

.page > .game-frame,
.admin-page > .game-frame {
  max-width: 52rem;
  margin: 0 auto;
}

.placeholder__label {
  display: inline-block;
  margin: 0 0 var(--space-md);
  padding: 0.2rem 0.8rem;
  border: 2px solid var(--frame-light);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--frame-light);
}

.placeholder__title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(1.5rem, 4.5vw, 2.2rem);
  line-height: 1.2;
  margin: 0 0 var(--space-md);
  color: var(--color-text);
}

.placeholder__text {
  margin: 0;
  font-size: clamp(1.0625rem, 2vw, 1.175rem);
  color: var(--color-text-muted);
}

/* ===== Luneo Entertainment Footer (wie Landingpage) ===== */

.bw3d-footer {
  position: relative;
  margin-top: clamp(5rem, 10vw, 9rem);
  padding: var(--space-lg) 0;
  background: var(--color-bg);
}

/* Übergang wie auf der Landingpage: die Seite wird zum Footer hin dunkel */
.bw3d-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: clamp(8rem, 18vw, 14rem);
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(20, 9, 6, 0) 0%,
    rgba(20, 9, 6, 0.03) 10%,
    rgba(20, 9, 6, 0.1) 20%,
    rgba(20, 9, 6, 0.2) 30%,
    rgba(20, 9, 6, 0.32) 40%,
    rgba(20, 9, 6, 0.45) 50%,
    rgba(20, 9, 6, 0.58) 60%,
    rgba(20, 9, 6, 0.71) 70%,
    rgba(20, 9, 6, 0.83) 80%,
    rgba(20, 9, 6, 0.93) 90%,
    rgba(20, 9, 6, 1) 100%
  );
}

.bw3d-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.bw3d-footer__brand img {
  display: block;
  width: 180px;
  height: auto;
}

.bw3d-footer__links {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}

.bw3d-footer__links a {
  font-size: var(--text-sm);
  color: var(--color-text-dim);
  text-decoration: none;
}

.bw3d-footer__links a:hover {
  color: var(--color-primary-light);
}

.bw3d-footer__copy {
  font-size: var(--text-sm);
  color: var(--color-text-dim);
}

/* ===== Verwaltung: schlichte Leiste ohne öffentliches Menü ===== */

/* Menü mittig: Titel links, Menü in der Mitte, Anmeldung rechts. Schmaler: Menü in eigener, mittiger Zeile. */
.admin-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-sm) var(--space-lg);
  padding: 14px clamp(1rem, 3vw, 2.25rem);
  background: var(--color-bg-deep);
  border-bottom: 4px solid var(--frame-light);
  box-shadow: 0 4px 0 var(--frame-dark);
}

.admin-header__title {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  color: var(--color-primary-light);
  text-shadow: 2px 2px 0 var(--frame-dark);
}

.admin-page {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
}

/* Kopfleiste der Verwaltung: Menü und Abmelden (nur angemeldet) */
.admin-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
}

@media (max-width: 1320px) {
  .admin-header {
    display: flex;
    flex-wrap: wrap;
  }

  .admin-nav {
    order: 3;
    width: 100%;
  }

  .admin-user {
    flex-wrap: wrap;
    margin-left: auto;
    white-space: normal;
  }
}

.admin-nav a {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-text-dim);
  text-decoration: none;
}

.admin-nav a:hover {
  color: var(--color-primary-light);
}

/* Zähler ungelesener Nachrichten neben "Nachrichten" (statisch, kein Blinken) */
.admin-nav__zaehler {
  display: inline-block;
  min-width: 1.5em;
  margin-left: 0.25rem;
  padding: 0 0.35rem;
  font-size: var(--text-sm);
  line-height: 1.5;
  text-align: center;
  color: var(--color-bg-deep);
  background: var(--color-primary);
  border: 2px solid var(--frame-dark);
}

.admin-user {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: var(--space-sm);
  justify-self: end;
  white-space: nowrap;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.admin-user__logout {
  margin: 0;
}

.admin-button {
  padding: 0.55rem 1.2rem;
  border: 3px solid var(--frame-dark);
  background: var(--color-primary);
  color: var(--color-bg-deep);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}

.admin-button:hover {
  background: var(--color-primary-light);
}

.admin-button:disabled {
  background: var(--frame-mid);
  cursor: default;
}

.admin-button--klein {
  padding: 0.3rem 0.8rem;
  font-size: var(--text-sm);
}

/* Seiten der Verwaltung */
.admin-title {
  margin: 0 0 var(--space-md);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  color: var(--color-primary-light);
  text-shadow: 3px 3px 0 var(--frame-dark);
  letter-spacing: 0.05em;
}

.admin-subtitle {
  margin: var(--space-xl) 0 var(--space-md);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.4rem;
}

.admin-intro {
  margin: 0 0 var(--space-lg);
  color: var(--color-text-muted);
}

.admin-fehler__link {
  margin: var(--space-lg) 0 0;
}

.admin-kacheln {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: var(--space-md);
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-kachel {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  height: 100%;
  padding: var(--space-lg);
  border: 3px solid var(--frame-light);
  background: var(--color-surface);
  box-shadow: 4px 4px 0 var(--frame-dark);
  color: var(--color-text);
  text-decoration: none;
}

a.admin-kachel:hover {
  border-color: var(--color-primary-light);
  background: #43211f;
}

.admin-kachel__name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.3rem;
}

.admin-kachel__text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.admin-meldung {
  margin: 0 0 var(--space-lg);
  padding: var(--space-sm) var(--space-md);
  border: 3px solid var(--color-glow);
  background: var(--color-surface);
}

.admin-meldung--fehler {
  border-color: #e0664a;
}

.admin-feld {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.admin-feld input {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 2px solid var(--frame-mid);
  background: var(--color-bg-deep);
  color: var(--color-text);
  font: inherit;
  font-size: 1rem;
}

/* Bilder: Upload und Liste */
.upload {
  display: grid;
  gap: var(--space-md);
  padding: var(--space-lg);
  border: 3px solid var(--frame-light);
  background: var(--color-surface);
  box-shadow: 4px 4px 0 var(--frame-dark);
}

.upload__zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg) var(--space-md);
  border: 3px dashed var(--frame-mid);
  background: var(--color-bg-deep);
  text-align: center;
  cursor: pointer;
}

.upload__zone--aktiv {
  border-color: var(--color-glow);
  background: #10201c;
}

.upload__hinweis {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.15rem;
  overflow-wrap: anywhere;
}

.upload__regeln {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.upload__datei {
  max-width: 100%;
  font-size: var(--text-sm);
}

.upload__felder {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--space-md);
}

.upload .admin-button {
  justify-self: start;
}

.upload__status {
  margin: 0;
  font-size: var(--text-sm);
}

.upload__status:empty {
  display: none;
}

.upload__status--fehler {
  color: #ff9a80;
}

.bilder {
  display: grid;
  gap: var(--space-md);
  margin: 0;
  padding: 0;
  list-style: none;
}

.bild {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: var(--space-md);
  align-items: start;
  padding: var(--space-md);
  border: 3px solid var(--frame-mid);
  background: var(--color-surface);
}

.bild__vorschau {
  width: 9rem;
  height: 9rem;
  object-fit: contain;
  background: var(--color-bg-deep);
}

.bild__daten {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.bild__daten p {
  margin: 0;
}

.bild__masse {
  font-weight: 600;
}

.bild__alt {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}

@media (max-width: 560px) {
  .bild {
    grid-template-columns: 1fr;
  }

  .bild__vorschau {
    width: 100%;
    height: auto;
    max-height: 14rem;
  }
}
