/* Spielehafen – gleiche Bildsprache wie die Spiele: Meer, Holz, Pergament, Gold. */

:root {
  --ui: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --titel: Georgia, 'Palatino Linotype', 'Book Antiqua', serif;
  --holz: #7a4a22;
  --holz-dunkel: #4a2a10;
  --gold: #ffd34d;
}

* {
  box-sizing: border-box;
}

html {
  background: #0b3a52;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--ui);
  color: var(--holz-dunkel);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='140'%3E%3Cg fill='none' stroke='%23d6f6ff' stroke-opacity='.28' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M14 34q14-6 28 0t28 0'/%3E%3Cpath d='M128 96q14-6 28 0t28 0'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(#46b9d3 0, #1b8db0 480px, #0e6a90 100%);
}

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

.kopf {
  display: flex;
  justify-content: center;
  padding: 40px 16px 14px;
}

.schild {
  max-width: 760px;
  padding: 16px 34px 18px;
  border-radius: 22px;
  background: linear-gradient(#fcefcf, #ecd29a);
  border: 6px solid var(--holz);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.35),
    inset 0 0 0 3px rgba(255, 255, 255, 0.4);
  text-align: center;
}

.schild h1 {
  margin: 0;
  font: 900 clamp(42px, 8vw, 72px) / 1.08 var(--titel);
  color: var(--gold);
  -webkit-text-stroke: 2.5px #6b3a12;
  text-shadow:
    0 5px 0 #6b3a12,
    0 10px 24px rgba(0, 0, 0, 0.3);
}

.schild p {
  margin: 8px 0 0;
  font: italic 600 clamp(16px, 2.4vw, 20px) / 1.35 var(--titel);
  color: var(--holz);
}

/* ---------- Spiele ---------- */

main {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 18px 30px;
}

.anzahl {
  margin: 8px 0 22px;
  text-align: center;
  color: #fff;
  font: 700 17px var(--ui);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.45);
}

.raster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 26px;
}

.karte {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(#fcefcf, #ecd29a);
  border: 5px solid var(--holz);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}

.karte:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.42);
}

.bild {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1100 / 760;
  background: #145574;
  border-bottom: 4px solid var(--holz);
}

.bild img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.platzhalter {
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 96px;
}

.neu {
  position: absolute;
  top: 16px;
  right: -40px;
  transform: rotate(35deg);
  padding: 5px 48px;
  background: linear-gradient(#ffdb70, #f2a92a);
  border-top: 2px solid #fff6c8;
  border-bottom: 2px solid #b97a12;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
  color: #4a2410;
  font: 900 15px var(--ui);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.inhalt {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 16px 20px 20px;
}

.inhalt h2 {
  margin: 0;
  font: 900 28px / 1.15 var(--titel);
}

.inhalt h2 a {
  color: #7a3d10;
  text-decoration: none;
}

.untertitel {
  margin: 0;
  font: italic 600 16px var(--titel);
  color: var(--holz);
}

.beschreibung {
  margin: 2px 0 0;
  font-size: 15px;
  line-height: 1.45;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 3px 10px;
  border-radius: 999px;
  border: 2px solid rgba(122, 74, 34, 0.45);
  background: rgba(255, 255, 255, 0.5);
  font: 700 13px var(--ui);
}

.live {
  min-height: 1.4em;
  margin: 4px 0 6px;
  color: #6b4a2a;
  font: 700 14px var(--ui);
}

.live::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 50%;
  background: #b9a58a;
}

.live[data-zustand='an']::before,
.live[data-zustand='wartet']::before {
  background: #2fbf55;
  box-shadow: 0 0 0 3px rgba(47, 191, 85, 0.25);
}

.live[data-zustand='wartet'] {
  color: #1f7a38;
}

.live[data-zustand='wartet']::before {
  animation: puls 0.9s ease-in-out infinite alternate;
}

.live[data-zustand='aus']::before {
  background: #d1170f;
}

.live[data-zustand='unbekannt'] {
  visibility: hidden;
}

@keyframes puls {
  to {
    box-shadow: 0 0 0 7px rgba(47, 191, 85, 0.12);
  }
}

.knopf {
  margin-top: auto;
  padding: 12px 18px;
  border-radius: 14px;
  border: 3px solid var(--holz);
  background: linear-gradient(#ffdb70, #f2a92a);
  box-shadow: 0 4px 0 var(--holz);
  color: #4a2410;
  font: 800 18px var(--ui);
  text-align: center;
  text-decoration: none;
}

.knopf:hover {
  filter: brightness(1.05);
}

.knopf:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--holz);
}

a:focus-visible {
  outline: 3px solid #2f6fd6;
  outline-offset: 3px;
}

.leer {
  grid-column: 1 / -1;
  padding: 30px;
  border-radius: 20px;
  background: rgba(252, 239, 207, 0.9);
  border: 5px solid var(--holz);
  text-align: center;
  font: 700 18px var(--ui);
}

.zurueck {
  color: #fff;
}

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

.fuss {
  padding: 10px 16px 40px;
  color: #e6f7ff;
  font-size: 14px;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.fuss p {
  margin: 4px 0;
}

@media (prefers-reduced-motion: reduce) {
  .karte,
  .live::before {
    transition: none;
    animation: none;
  }
}
