/* =====================================================================
   Startseite (Arcade-Hub)
   ===================================================================== */

/* ------------------------------- Hero ------------------------------- */
.hero {
  position: relative;
  padding: clamp(2rem, 7vw, 5rem) 0 clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}

/* -------------------- Crew-Sternbild (12.08.2026) -------------------- */
/* Die echten Fotos der Crew (dieselben Vektor-Porträts wie bei "Wo ist die
   Crew?") als grosses, spektakuläres Hintergrundelement im Hero – nicht nur
   als kleines UI-Icon. Bewusst an den Rand/die Ecken gesetzt, nie ueber dem
   Text, damit die Lesbarkeit nie leidet. Bewusst gedaempfte Opazitaet und
   ein sehr langsames, leises Schweben statt haerterer Bewegung -- passt
   zur augenschonenden Linie des restlichen Hintergrunds (siehe .orb). */
.crew-sternbild {
  position: absolute;
  inset: -4% 0 -8%;
  z-index: 0;
  pointer-events: none;
}
/* Text/Inhalt bekommt eine eigene Stapelkontext-Ebene ueber dem
   Sternbild -- sonst wuerden die absolut positionierten Fotos (auch ohne
   hoeheren z-index) vor dem normal fliessenden Text gemalt werden. */
.hero-inhalt {
  position: relative;
  z-index: 1;
}
.crew-foto {
  position: absolute;
  border-radius: 50%;
  object-fit: cover;
  background: #0d0a28;
  padding: 4px;
  opacity: 0.62;
  filter: saturate(0.9);
  animation: crew-schweben 22s ease-in-out infinite;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.crew-foto.p1 { top: 2%; left: 3%; width: 84px; height: 84px; border: 2px solid var(--neon-violet); box-shadow: 0 0 26px -6px var(--neon-violet); animation-delay: -1s; }
.crew-foto.p2 { top: 3%; right: 4%; width: 72px; height: 72px; border: 2px solid var(--neon-cyan); box-shadow: 0 0 24px -6px var(--neon-cyan); animation-delay: -9s; }
.crew-foto.p3 { top: 42%; left: 0.5%; width: 58px; height: 58px; border: 2px solid var(--neon-pink); box-shadow: 0 0 20px -6px var(--neon-pink); animation-delay: -15s; }
.crew-foto.p4 { top: 46%; right: 1%; width: 64px; height: 64px; border: 2px solid var(--neon-amber); box-shadow: 0 0 22px -6px var(--neon-amber); animation-delay: -5s; }
.crew-foto.p5 { bottom: 6%; left: 7%; width: 56px; height: 56px; border: 2px solid var(--baby-blau); box-shadow: 0 0 20px -6px var(--baby-blau); animation-delay: -18s; }
.crew-foto.p6 { bottom: 3%; right: 8%; width: 60px; height: 60px; border: 2px solid var(--neon-violet); box-shadow: 0 0 22px -6px var(--neon-violet); animation-delay: -11s; }
.crew-foto.p7 { top: -3%; left: 21%; width: 48px; height: 48px; border: 2px solid var(--neon-cyan); box-shadow: 0 0 18px -6px var(--neon-cyan); animation-delay: -7s; opacity: 0.5; }
.crew-foto.p8 { top: -2%; right: 19%; width: 50px; height: 50px; border: 2px solid var(--neon-pink); box-shadow: 0 0 18px -6px var(--neon-pink); animation-delay: -14s; opacity: 0.5; }

@keyframes crew-schweben {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -14px, 0); }
}

/* Auf schmalen Bildschirmen wuerden die Fotos den Text ueberlagern/die
   Seite unruhig machen -- dort bleibt nur der Text, klar und ruhig. */
@media (max-width: 760px) {
  .crew-sternbild { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .crew-foto { animation: none; }
}

.praesentiert-von {
  margin: 0 0 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--baby-blau);
}
.praesentiert-von b {
  font-weight: 700;
  letter-spacing: 0.14em;
}

.muenzeinwurf {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--neon-amber);
  /* Ruhiger Rhythmus statt nervoesem Takt (frueher 1.6s). */
  animation: blinken 3.2s ease-in-out infinite;
  /* Optische Zentrierung: rechts eine Sperrweite weniger Polster, sonst
     sitzt "INSERT COIN" sichtbar links in der Pille. */
  padding-inline-end: calc(1.1rem - 0.3em);
}
.muenzeinwurf::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-amber);
  box-shadow: 0 0 12px var(--neon-amber);
}
/* Augenschonend gedaempft: sanfterer Kontrastwechsel statt hartem
   Voll-an/Voll-aus-Blinken. */
/* Sanftes Atmen statt Blinken: laeuft in beide Richtungen weich durch,
   es gibt keinen harten Wechsel und keinen Sprung am Zyklusende. */
@keyframes blinken {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.68; }
}

.hero-titel {
  margin: 1.2rem 0 0;
  /* Der Name ist mit "DOGI'S ZOCKERANSTALT" deutlich laenger als frueher.
     Die Werte sind daran ausgerichtet: 8.6vw haelt das laengste Wort
     ("ZOCKERANSTALT") auch auf 360px-Geraeten innerhalb der Seitenraender,
     5rem laesst den ganzen Namen auf dem Desktop in eine Zeile passen.
     text-wrap: balance sorgt dafuer, dass ein noetiger Umbruch zwei
     gleich lange, mittig wirkende Zeilen ergibt statt einer langen und
     einer kurzen. */
  font-size: clamp(1.9rem, 8.6vw, 5rem);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}

/* Glitch: zwei versetzte Kopien in Cyan/Magenta hinter dem Text */
.glitch {
  position: relative;
  display: inline-block;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  pointer-events: none;
  opacity: 0.45;
}
/* Augenschonend entschaerft: der Effekt zuckt nur noch selten (alle
   9-11 Sekunden statt alle 4) und deutlich blasser. Er bleibt als
   Arcade-Zitat erkennbar, wirkt aber nicht mehr wie ein Stroboskop. */
.glitch::before { color: var(--neon-cyan); animation: glitch-a 9s infinite steps(1); }
.glitch::after { color: var(--neon-pink); animation: glitch-b 11s infinite steps(1); }

@keyframes glitch-a {
  0%, 92%, 100% { transform: none; clip-path: inset(0 0 100% 0); }
  93% { transform: translate(-4px, 2px); clip-path: inset(12% 0 58% 0); }
  95% { transform: translate(3px, -2px); clip-path: inset(64% 0 18% 0); }
  97% { transform: translate(-2px, 1px); clip-path: inset(38% 0 44% 0); }
}
@keyframes glitch-b {
  0%, 90%, 100% { transform: none; clip-path: inset(0 0 100% 0); }
  91% { transform: translate(4px, -2px); clip-path: inset(52% 0 26% 0); }
  94% { transform: translate(-3px, 2px); clip-path: inset(20% 0 66% 0); }
  96% { transform: translate(2px, 1px); clip-path: inset(74% 0 8% 0); }
}

.hero-unter {
  max-width: 46ch;
  margin: 1.4rem auto 0;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--text-dim);
}

/* ----------------------------- Laufband ----------------------------- */
.laufband {
  --tempo: 34s;
  position: relative;
  margin: 2.2rem 0 0;
  padding: 0.55rem 0;
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.laufband-spur {
  display: flex;
  width: max-content;
  gap: 2.5rem;
  animation: laufen var(--tempo) linear infinite;
}
.laufband-spur span {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
}
.laufband-spur b { color: var(--neon-cyan); font-weight: 700; }
@keyframes laufen {
  to { transform: translateX(-50%); }
}

/* --------------------------- Spiele-Kacheln ------------------------- */
.spiele {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.2rem, 3vw, 2rem);
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  perspective: 1400px;
}
@media (min-width: 860px) {
  .spiele { grid-template-columns: 1fr 1fr; }
}

.kachel {
  --k-farbe: var(--neon-cyan);
  --k-farbe-2: var(--neon-violet);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 480px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: linear-gradient(165deg, rgba(28, 22, 74, 0.82), rgba(9, 7, 26, 0.94));
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transform-style: preserve-3d;
  box-shadow: var(--shadow-deep);
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out),
    border-color 0.45s;
  will-change: transform;
}

/* Leuchtender Rahmen, der beim Hover herumwandert */
.kachel::before {
  content: '';
  position: absolute;
  inset: -2px;
  z-index: -2;
  border-radius: inherit;
  background: conic-gradient(from var(--winkel, 0deg), transparent 0%, var(--k-farbe) 12%, var(--k-farbe-2) 24%, transparent 38%, transparent 100%);
  opacity: 0;
  transition: opacity 0.45s;
  animation: rahmen-drehen 4.5s linear infinite;
}
.kachel::after {
  /* Innenflaeche, damit nur der Rand leuchtet */
  content: '';
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(165deg, rgba(28, 22, 74, 0.94), rgba(9, 7, 26, 0.97));
}
@property --winkel {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes rahmen-drehen {
  to { --winkel: 360deg; }
}

.kachel:hover,
.kachel:focus-visible {
  transform: translateY(-10px) scale(1.015);
  border-color: transparent;
  box-shadow: 0 40px 80px -30px #000, 0 0 70px -22px var(--k-farbe);
  outline: none;
}
.kachel:hover::before,
.kachel:focus-visible::before { opacity: 1; }
.kachel:active { transform: translateY(-4px) scale(0.995); }

.kachel-nummer {
  position: absolute;
  top: 0.6rem;
  right: 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(4rem, 9vw, 7rem);
  font-weight: 900;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px color-mix(in srgb, var(--k-farbe) 35%, transparent);
  pointer-events: none;
  transition: -webkit-text-stroke-color 0.4s, transform 0.5s var(--ease-out);
}
.kachel:hover .kachel-nummer {
  -webkit-text-stroke-color: color-mix(in srgb, var(--k-farbe) 75%, transparent);
  transform: translateY(-4px);
}

/* Vorschau-Buehne oben in der Kachel */
.kachel-buehne {
  position: relative;
  height: 236px;
  /* Gleicher seitlicher Einzug wie beim Text darunter (1.25rem), damit
     Vorschaubild und Beschriftung buendig untereinander stehen. Vorher
     standen sie 1rem bzw. 1.6rem ein und wirkten dadurch verschoben. */
  margin: 1.25rem 1.25rem 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #07061a;
  overflow: hidden;
  flex-shrink: 0;
}
.kachel-buehne::after {
  /* Glanzstreifen ueber der Vorschau */
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), transparent 46%);
  pointer-events: none;
}

/* Vorschau 1: zwei Bilder blenden ineinander -> der Unterschied blinkt */
.vorschau-diff img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 45%;
}
/* Weiche Ueberblendung statt hartem Umschalten: der Unterschied bleibt
   deutlich erkennbar, das Bild flackert aber nicht mehr. */
.vorschau-diff img:last-child { animation: bild-wechsel 4.4s ease-in-out infinite; }
@keyframes bild-wechsel {
  0%, 40% { opacity: 0; }
  50%, 90% { opacity: 1; }
  100% { opacity: 0; }
}
.lupe {
  position: absolute;
  left: 58%;
  top: 26%;
  width: 74px;
  height: 74px;
  border: 3px solid var(--neon-amber);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.4), 0 0 26px var(--neon-amber);
  animation: lupe-pulsen 2.6s var(--ease-out) infinite;
}
@keyframes lupe-pulsen {
  0%, 44% { transform: scale(0.7); opacity: 0; }
  52% { transform: scale(1.12); opacity: 1; }
  70% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1); opacity: 0.25; }
}

/* Vorschau 2: Raster aus Avataren, die nacheinander umklappen */
.vorschau-figuren {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px;
  height: 100%;
  place-items: stretch;
}
.vorschau-figuren div {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  overflow: hidden;
  animation: figur-klappen 5.4s var(--ease-out) infinite;
  transform-style: preserve-3d;
}
.vorschau-figuren img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes figur-klappen {
  0%, 34% { transform: rotateY(0deg); opacity: 1; filter: none; }
  46%, 78% { transform: rotateY(180deg); opacity: 0.35; filter: grayscale(1); }
  90%, 100% { transform: rotateY(0deg); opacity: 1; filter: none; }
}

/* Kachel-Text */
.kachel-text {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.4rem 1.25rem 1.5rem;
  flex: 1;
}
.kachel-titel {
  font-size: clamp(1.6rem, 3.4vw, 2.15rem);
  text-transform: uppercase;
  /* Kein reines Weiss und weicherer Schein – der Titel ist gross und
     flaechig, hier faellt Blendung am staerksten auf. */
  color: var(--text);
  text-shadow: 0 0 22px color-mix(in srgb, var(--k-farbe) 34%, transparent);
}
.kachel-text p { margin: 0; color: var(--text-dim); font-size: 1rem; line-height: 1.65; }

.merkmale {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.2rem 0 0;
  padding: 0;
  list-style: none;
}
.merkmale li {
  /* Rechts eine Sperrweite weniger Polster: sonst sitzt die Schrift in
     der Pille sichtbar links (siehe "Optische Zentrierung"). */
  padding: 0.3rem calc(0.75rem - 0.08em) 0.3rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.kachel-fuss {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1.1rem;
}
.spielen-marke {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--k-farbe);
}
.pfeil {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--k-farbe) 45%, transparent);
  background: color-mix(in srgb, var(--k-farbe) 12%, transparent);
  color: var(--k-farbe);
  font-size: 1.15rem;
  transition: transform 0.4s var(--ease-bounce), background 0.4s, box-shadow 0.4s;
}
.kachel:hover .pfeil {
  transform: translateX(6px);
  background: var(--k-farbe);
  color: #07061a;
  box-shadow: 0 0 24px -2px var(--k-farbe);
}

/* Phase-2-Kachel (deaktiviert) */
.kachel-bald {
  --k-farbe: var(--text-faint);
  grid-column: 1 / -1;
  min-height: 0;
  cursor: not-allowed;
  filter: saturate(0.4);
  opacity: 0.72;
  border-style: dashed;
}
.kachel-bald:hover { transform: none; box-shadow: var(--shadow-deep); }
.kachel-bald::before { display: none; }
.kachel-bald .kachel-text { flex-direction: row; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.bald-marke {
  padding: 0.28rem calc(0.8rem - 0.2em) 0.28rem 0.8rem;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--neon-amber);
}

/* ---------------------------- Info-Leiste --------------------------- */
.zahlen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: clamp(2rem, 5vw, 3.5rem);
}
.zahl-feld {
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
  transition: transform 0.35s var(--ease-out), border-color 0.35s;
}
.zahl-feld:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.zahl-feld strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 900;
  background: linear-gradient(120deg, var(--neon-cyan), var(--neon-pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.zahl-feld span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  /* Zentrierte Sperrschrift: Ausgleich fuer die Luecke am Zeilenende. */
  text-indent: 0.2em;
}

@media (max-width: 640px) {
  .kachel { min-height: 430px; }
  .kachel-buehne { height: 190px; }
  .kachel-nummer { font-size: 3.6rem; right: 1rem; }
}

/* ============================ Rangliste ================================ */
.rangliste-sektion {
  margin: clamp(3rem, 7vw, 5rem) 0 2rem;
  padding: clamp(1.5rem, 4vw, 2.2rem);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-deep);
}
.rangliste-liste-gross {
  max-width: 640px;
  margin: 1.2rem auto 0;
  max-height: none;
}
.rangliste-liste-gross .rangliste-eintrag { padding: 0.6rem 0.9rem; font-size: 0.94rem; }
.rangliste-liste-gross .konto-avatar { width: 30px; height: 30px; border-radius: 9px; }
