/* =========================================================
   FunArts – Stylesheet
   Pixel-Look, keine Scrollseite, Farben aus dem Logo.
   ========================================================= */
@font-face {
  font-family: 'Upheaval';
  src: url('../fonts/upheaval.ttf') format('truetype');
  font-display: swap;
}

:root {
  --bg: #07030f;
  --ink: #f3ecff;
  --muted: #b8a8d8;
  --violet: #7c00ff;
  --violet2: #a700ff;
  --lilac: #c84bff;
  --orange: #ff6010;
  --orange2: #dd310a;
  --gold: #ffd23a;
  --panel: rgba(10, 4, 24, .88);
  --line: #2e0a72;
  --pix: 'Upheaval', 'Courier New', monospace;
  --body: 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
  --top: 76px;
  --bottom: 44px;
  --u: 4px; /* Pixel-Einheit */
  --cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' shape-rendering='crispEdges'%3E%3Cpath fill='%23ffd23a' d='M3 0h2v3h3v2H5v3H3V5H0V3h3z'/%3E%3Cpath fill='%2312051f' d='M8 8h3v3H8zM11 11h3v3h-3zM14 14h3v3h-3zM17 17h3v3h-3z'/%3E%3Cpath fill='%23c84bff' d='M9 9h2v2H9zM12 12h2v2h-2zM15 15h2v2h-2zM18 18h2v2h-2z'/%3E%3C/svg%3E") 4 4, auto;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  cursor: var(--cursor);
  -webkit-font-smoothing: antialiased;
}
a, button { cursor: var(--cursor); }
a { color: var(--gold); }
strong { color: var(--gold); font-weight: 700; }
em { color: var(--lilac); font-style: normal; }
.small { font-size: 14px; }
.muted { color: var(--muted); }

#scene {
  position: fixed; inset: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  z-index: 0;
}

/* ---------- Pixel-Rahmen ---------- */
.pixel-frame, .panel, .modal-box, .game, .member {
  --c: var(--violet);
  clip-path: polygon(0 var(--u), var(--u) var(--u), var(--u) 0, calc(100% - var(--u)) 0, calc(100% - var(--u)) var(--u), 100% var(--u), 100% calc(100% - var(--u)), calc(100% - var(--u)) calc(100% - var(--u)), calc(100% - var(--u)) 100%, var(--u) 100%, var(--u) calc(100% - var(--u)), 0 calc(100% - var(--u)));
  box-shadow: inset 0 0 0 var(--u) var(--c), inset 0 0 0 calc(var(--u) * 2) #12051f;
}

/* ---------- Kopfzeile ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--top);
  display: flex; align-items: center; gap: 32px;
  padding: 0 28px;
  z-index: 10;
  background: linear-gradient(rgba(7, 3, 15, .92), rgba(7, 3, 15, 0));
}
.logo { display: block; line-height: 0; }
.logo svg { height: 52px; width: auto; filter: drop-shadow(4px 4px 0 #000); overflow: visible; }
.logo .logo-f { transform-origin: 30px 30px; transition: transform .2s steps(3); }
.logo:hover .logo-f { transform: rotate(-8deg) scale(1.08); }
.logo:hover .logo-text { fill: var(--gold); }

.verbs { display: flex; gap: 8px; }
.verbs a {
  font-family: var(--pix);
  font-size: 20px;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 12px;
  position: relative;
  text-shadow: 2px 2px 0 #000;
  transition: color .1s steps(2);
}
.verbs a::before {
  content: '';
  position: absolute; left: -2px; top: 50%;
  width: 8px; height: 8px; margin-top: -5px;
  background: var(--gold);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  opacity: 0;
}
.verbs a:hover, .verbs a:focus-visible { color: var(--gold); outline: none; }
.verbs a:hover::before, .verbs a:focus-visible::before { opacity: 1; animation: nudge .6s steps(2) infinite; }
.verbs a.current { color: #fff; }
.verbs a.current::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 4px;
  background: repeating-linear-gradient(90deg, var(--orange) 0 8px, var(--violet2) 8px 16px);
}
@keyframes nudge { 50% { transform: translateX(3px); } }

.actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }

/* ---------- Buttons ---------- */
.btn {
  --bc: var(--violet);
  font-family: var(--pix);
  font-size: 20px;
  line-height: 1;
  color: #fff;
  background: var(--bc);
  border: 0;
  padding: 12px 18px 10px;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 10px;
  box-shadow: inset -4px -4px 0 rgba(0,0,0,.35), inset 4px 4px 0 rgba(255,255,255,.25), 4px 4px 0 #000;
  text-shadow: 2px 2px 0 rgba(0,0,0,.5);
  transition: transform .08s steps(1), box-shadow .08s steps(1), filter .1s;
}
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: translate(4px, 4px); box-shadow: inset -4px -4px 0 rgba(0,0,0,.35), inset 4px 4px 0 rgba(255,255,255,.25), 0 0 0 #000; }
.btn:focus-visible { outline: 3px dashed var(--gold); outline-offset: 4px; }
.btn-primary { --bc: var(--orange); }
.btn-ghost { background: rgba(124, 0, 255, .25); box-shadow: inset 0 0 0 4px var(--violet), 4px 4px 0 #000; }
.btn-support { --bc: var(--orange2); font-size: 16px; padding: 10px 14px 8px; animation: wobble 4s steps(2) infinite; }
@keyframes wobble { 0%, 90%, 100% { transform: none; } 93% { transform: rotate(-3deg); } 96% { transform: rotate(3deg); } }

.coin {
  width: 14px; height: 14px; display: inline-block;
  background: var(--gold);
  clip-path: polygon(30% 0, 70% 0, 70% 15%, 85% 15%, 85% 30%, 100% 30%, 100% 70%, 85% 70%, 85% 85%, 70% 85%, 70% 100%, 30% 100%, 30% 85%, 15% 85%, 15% 70%, 0 70%, 0 30%, 15% 30%, 15% 15%, 30% 15%);
  animation: spin 1.2s steps(4) infinite;
}
@keyframes spin { 50% { transform: scaleX(.25); } }

.btn-lang {
  font-family: var(--pix); font-size: 16px; color: var(--muted);
  background: transparent; border: 0; padding: 10px 8px;
  box-shadow: inset 0 0 0 3px var(--line);
}
.btn-lang:hover { color: var(--gold); box-shadow: inset 0 0 0 3px var(--violet); }

/* ---------- Ansichten ---------- */
main {
  position: fixed; top: var(--top); bottom: var(--bottom); left: 0; right: 0;
  z-index: 5;
  pointer-events: none;
}
.view { display: none; pointer-events: auto; }
.view.active { display: flex; animation: pop .32s steps(4) both; }
@keyframes pop { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.view-home {
  position: absolute; left: max(28px, 5vw); top: 50%;
  transform: translateY(-50%);
  max-width: min(560px, 46vw);
  flex-direction: column;
}
.view-home.active { animation: popHome .4s steps(5) both; }
@keyframes popHome { from { opacity: 0; transform: translateY(-46%); } to { opacity: 1; transform: translateY(-50%); } }

.kicker {
  font-family: var(--pix); font-size: 16px; color: var(--orange);
  margin: 0 0 12px; letter-spacing: 1px; text-shadow: 2px 2px 0 #000;
}
h1, h2, h3 { font-family: var(--pix); font-weight: normal; margin: 0; letter-spacing: .5px; }
h1 {
  font-size: clamp(32px, 4.2vw, 60px);
  line-height: 1.05;
  color: #fff;
  text-shadow: 4px 4px 0 #000, 0 0 24px rgba(167, 0, 255, .45);
}
.lead { font-size: 18px; color: var(--ink); margin: 18px 0 26px; text-shadow: 0 2px 8px #000; max-width: 46ch; }
.cta { display: flex; gap: 16px; flex-wrap: wrap; }
.hint {
  font-family: var(--pix); font-size: 16px; color: var(--lilac);
  margin: 28px 0 0; opacity: .8;
  animation: blink 2.4s steps(2) infinite;
}
@keyframes blink { 60% { opacity: .8; } 80% { opacity: .25; } }

/* ---------- Panels ---------- */
.panel {
  position: absolute; left: 28px; top: 8px;
  max-height: calc(100% - 20px);
  width: min(660px, 54vw);
  flex-direction: column;
  background: var(--panel);
  backdrop-filter: blur(2px);
  padding: 28px 30px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--violet) transparent;
}
.panel-head { margin-bottom: 18px; }
.panel-head h2 { font-size: 40px; color: #fff; text-shadow: 4px 4px 0 #000; }
.panel-head p { margin: 6px 0 0; color: var(--muted); }

/* ---------- Spiele ---------- */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; }
.game {
  --c: var(--line);
  background: rgba(30, 11, 71, .55);
  padding: 16px 16px 18px;
  display: flex; flex-direction: column; gap: 8px;
  transition: transform .12s steps(2);
}
.game:hover { --c: var(--accent); transform: translateY(-4px); }
.game-art {
  position: relative;
  background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 70%), #0b0420;
  display: grid; place-items: center;
  aspect-ratio: 16 / 10;
  margin-bottom: 4px;
  box-shadow: inset 0 0 0 4px #12051f;
}
.game-art canvas { width: 80px; height: 80px; image-rendering: pixelated; }
.game:hover .game-art canvas { animation: hop .5s steps(2) infinite; }
@keyframes hop { 50% { transform: translateY(-4px); } }
.badge {
  position: absolute; top: 8px; left: 8px;
  font-family: var(--pix); font-size: 12px; color: #12051f;
  background: var(--gold); padding: 4px 6px 2px;
}
.game h3 { font-size: 24px; color: #fff; text-shadow: 3px 3px 0 #000; }
.game p { margin: 0; color: var(--muted); flex: 1; }
.tags { list-style: none; padding: 0; margin: 4px 0 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-family: var(--pix); font-size: 12px; padding: 4px 6px 2px; background: #1e0b47; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.tag-crossplay { background: var(--orange2); box-shadow: none; }
.btn-play { --bc: var(--accent); font-size: 14px; justify-content: center; color: #fff; white-space: nowrap; padding: 12px 10px 10px; }

/* ---------- Über uns ---------- */
.crew { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.member { --c: var(--line); display: flex; gap: 14px; align-items: center; background: rgba(30, 11, 71, .55); padding: 14px; }
.member:hover { --c: var(--orange); }
.avatar { width: 64px; height: 64px; flex: none; image-rendering: pixelated; background: #0b0420; box-shadow: inset 0 0 0 3px #12051f; }
.member:hover .avatar { animation: hop .5s steps(2) infinite; }
.member h3 { font-size: 24px; color: #fff; }
.member .role { margin: 0; font-family: var(--pix); font-size: 14px; color: var(--orange); }
.member .small { margin: 4px 0 0; color: var(--muted); line-height: 1.4; }
.about-text p { margin: 0 0 12px; }
.sub { font-size: 20px; color: var(--gold); margin: 10px 0 12px; }
.journey { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; counter-reset: j; }
.journey li {
  font-family: var(--pix); font-size: 14px;
  padding: 6px 10px 4px; background: #1e0b47; box-shadow: inset 0 0 0 2px var(--violet);
  position: relative;
}
.journey li:not(:last-child)::after { content: '›'; position: absolute; right: -8px; color: var(--orange); }
.journey li:last-child { background: var(--orange2); box-shadow: none; }

/* ---------- Fußzeile / Satzzeile ---------- */
.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--bottom);
  z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 28px;
  background: linear-gradient(rgba(7, 3, 15, 0), rgba(7, 3, 15, .95));
  font-size: 13px; color: var(--muted);
}
.sentence {
  font-family: var(--pix); font-size: 20px; color: var(--lilac);
  text-shadow: 2px 2px 0 #000;
  position: absolute; left: 50%; transform: translateX(-50%);
  white-space: nowrap; pointer-events: none;
}
.sentence b { font-weight: normal; color: #fff; }
.sentence.active b { color: var(--gold); }
.legal { display: flex; gap: 14px; }
.legal button { background: none; border: 0; color: var(--muted); font: inherit; padding: 4px 0; }
.legal button:hover { color: var(--gold); }

/* ---------- Sprechtext (SCUMM-Stil) ---------- */
.say {
  position: fixed; z-index: 20;
  font-family: var(--pix); font-size: 20px; line-height: 1.2;
  text-align: center;
  color: var(--gold);
  text-shadow: 2px 0 0 #000, -2px 0 0 #000, 0 2px 0 #000, 0 -2px 0 #000, 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000;
  transform: translateY(-100%);
  pointer-events: none;
  opacity: 0;
}
.say.show { opacity: 1; animation: talk .25s steps(3); }
.say-planet { color: var(--lilac); }
.say-ufo { color: #7fe0ff; }
.say-moon { color: #c8bcdc; }
@keyframes talk { from { opacity: 0; transform: translateY(-80%); } }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 30;
  display: grid; place-items: center;
  background: rgba(4, 1, 10, .7);
  opacity: 0; pointer-events: none;
  transition: opacity .2s steps(3);
  padding: 16px;
}
.modal.open { opacity: 1; pointer-events: auto; }
.modal-box {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  background: #0d0520;
  padding: 32px;
}
.modal.wide .modal-box { width: min(1100px, 100%); }
.modal-box h2 { font-size: 32px; color: #fff; text-shadow: 3px 3px 0 #000; margin-bottom: 12px; }
.modal-box p { margin: 0 0 16px; }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  font-family: var(--pix); font-size: 18px;
  width: 36px; height: 36px; border: 0; color: #fff; background: var(--orange2);
  box-shadow: inset -3px -3px 0 rgba(0,0,0,.35);
}
.modal-close:hover { background: var(--orange); }
.demo-frame { position: relative; aspect-ratio: 16 / 9; background: #000; box-shadow: inset 0 0 0 4px var(--violet); }
.demo-frame iframe { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); border: 0; }
.oven { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 10px 0 20px; }
.oven canvas { width: 96px; height: 96px; image-rendering: pixelated; animation: hop .6s steps(2) infinite; }
.oven-bar { width: 220px; height: 16px; box-shadow: inset 0 0 0 3px var(--violet); padding: 4px; }
.oven-bar span { display: block; height: 100%; width: 40%; background: repeating-linear-gradient(90deg, var(--orange) 0 8px, var(--gold) 8px 16px); animation: bake 2.4s steps(10) infinite; }
@keyframes bake { from { width: 0; } to { width: 100%; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .topbar { gap: 16px; padding: 0 16px; }
  .verbs a { font-size: 16px; padding: 8px 6px; }
  .panel { width: auto; right: 16px; left: 16px; }
}

@media (max-width: 760px), (max-aspect-ratio: 4/5) {
  :root { --top: 58px; --bottom: 88px; --u: 3px; }
  .topbar { padding: 0 12px; gap: 10px; }
  .logo svg { height: 36px; }
  .btn-support span:last-child { display: none; }
  .btn-support { padding: 10px; }
  /* Navigation wandert als Verb-Leiste nach unten */
  .verbs {
    position: fixed; left: 0; right: 0; bottom: 30px; height: 56px;
    justify-content: space-around; align-items: center;
    background: #0d0520;
    box-shadow: inset 0 4px 0 var(--violet);
    z-index: 11;
  }
  .verbs a { font-size: 18px; padding: 10px 12px; }
  .verbs a.current::after { left: 12px; right: 12px; bottom: 4px; }
  .bottombar { height: 30px; background: #07030f; padding: 0 12px; font-size: 12px; }
  .sentence { display: none; }

  .view-home {
    left: 18px; right: 18px; top: auto; bottom: 12px;
    max-width: none; transform: none;
  }
  .view-home.active { animation: pop .4s steps(5) both; }
  h1 { font-size: 30px; }
  .lead { font-size: 15px; margin: 12px 0 18px; }
  .hint { margin-top: 16px; font-size: 14px; }
  .btn { font-size: 16px; }
  .panel { left: 10px; right: 10px; top: 34vh; bottom: 8px; max-height: none; padding: 22px 18px; }
  .panel-head h2 { font-size: 30px; }
  .crew { grid-template-columns: 1fr; }
  .games { grid-template-columns: 1fr 1fr; gap: 12px; }
  .game-art canvas { width: 48px; height: 48px; }
  .game h3 { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
