:root {
  --bg: #f4f7f2;
  --surface: #ffffff;
  --text: #1d1d1d;
  --muted: #6b7068;
  --border: #dde3d8;
  --primary: #89fa9e;
  --primary-deep: #3fd46a;
  --prank: #ff2d95;
  --shadow: 0 6px 24px rgba(20, 40, 20, 0.08);
  --radius: 18px;
  font-family: "Fredoka", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121512;
    --surface: #1b201b;
    --text: #eef3ec;
    --muted: #9aa396;
    --border: #2c342b;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
a { color: inherit; }
button { font: inherit; cursor: pointer; }

.banner {
  background: var(--prank);
  color: #fff;
  text-align: center;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 500;
}

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--primary); background: #fff; }
.logo b { font-size: 1.35rem; }
.logo small { display: block; color: var(--prank); font-weight: 600; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; border-radius: 999px; padding: 9px 18px;
  background: var(--primary); color: #1d1d1d; font-weight: 600;
  text-decoration: none; box-shadow: var(--shadow);
  transition: transform 0.15s;
}
.btn:hover { transform: translateY(-1px) scale(1.03); }
.btn.ghost { background: var(--surface); color: var(--text); border: 2px solid var(--border); box-shadow: none; }
.btn.prank { background: var(--prank); color: #fff; }

/* Launcher */
.hero { text-align: center; padding: 28px 0 18px; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.6rem); margin: 0; line-height: 1.05; }
.hero h1 span { color: var(--prank); }
.hero p { color: var(--muted); max-width: 640px; margin: 12px auto 20px; }
.toolbar { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 24px; }
.toolbar input {
  flex: 1 1 260px; max-width: 420px; border-radius: 999px; border: 2px solid var(--border);
  background: var(--surface); color: var(--text); padding: 10px 18px; font: inherit;
}

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; padding-bottom: 48px; }
.card {
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; display: flex; flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.card:hover { transform: translateY(-3px) rotate(-0.4deg); box-shadow: var(--shadow); border-color: var(--primary-deep); }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--border); display: block; }
.card div { padding: 10px 12px 14px; font-weight: 500; font-size: 0.95rem; }
.card.spin { animation: wobble 0.5s ease-in-out infinite; border-color: var(--prank); }
@keyframes wobble { 50% { transform: rotate(2deg) scale(1.04); } }

/* Spielseite */
.play-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 0 14px; }
.play-head h1 { margin: 0; font-size: clamp(1.2rem, 3vw, 1.8rem); }
.play-head p { margin: 2px 0 0; color: var(--muted); font-size: 0.9rem; }

.stage {
  position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.stage:fullscreen { border-radius: 0; aspect-ratio: auto; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage canvas.rainbow { animation: rainbow 3s linear infinite; }
@keyframes rainbow { to { filter: hue-rotate(360deg) saturate(1.6); } }

.overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 5; }
.overlay[hidden] { display: none; }
.overlay .bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(3px); transform: scale(1.05); }
.overlay .veil { position: absolute; inset: 0; background: rgba(10, 15, 10, 0.55); }
.overlay .content { position: relative; text-align: center; color: #fff; padding: 16px; max-width: 640px; width: 100%; }
.overlay h2 { margin: 0 0 10px; font-size: clamp(1.1rem, 3.4vw, 2rem); }

.progress { height: 10px; width: min(360px, 80%); margin: 14px auto 8px; border-radius: 999px; background: rgba(255,255,255,0.2); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--primary); transition: width 0.2s; }
.quote { font-size: 0.85rem; opacity: 0.85; min-height: 1.2em; }

.big-play {
  width: 96px; height: 96px; border-radius: 50%; border: 0; background: var(--primary);
  font-size: 2.2rem; box-shadow: 0 0 0 10px rgba(137, 250, 158, 0.25); animation: pulse 1.6s infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 18px rgba(137, 250, 158, 0.08); } }

.dialog {
  position: relative; background: var(--surface); color: var(--text); text-align: left;
  border-radius: 16px; padding: 30px 18px 14px; box-shadow: var(--shadow); margin-top: 20px;
}
.dialog .who { position: absolute; top: -20px; left: 14px; display: flex; align-items: center; gap: 8px; }
.dialog .who img { width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--primary); background: #fff; object-fit: cover; }
.dialog .who span { background: var(--primary); color: #1d1d1d; border-radius: 999px; padding: 3px 12px; font-weight: 600; font-size: 0.8rem; }
.dialog p { margin: 0; line-height: 1.5; font-size: clamp(0.85rem, 1.8vw, 1.05rem); }
.dialog .accent { color: var(--prank); font-weight: 600; }
.hint { display: block; margin-top: 8px; font-size: 0.75rem; opacity: 0.7; }

.end-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; position: relative; }
.suggestions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.suggestions a { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 16/9; text-decoration: none; }
.suggestions img { width: 100%; height: 100%; object-fit: cover; }
.suggestions span { position: absolute; inset: auto 6px 6px; font-size: 0.7rem; font-weight: 600; color: #fff; text-shadow: 0 1px 3px #000; text-align: left; }

.hud {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 6; pointer-events: none; text-align: center;
  background: rgba(0,0,0,0.55); color: #fff; border-radius: 10px; padding: 6px 10px;
  font: 600 0.8rem ui-monospace, SFMono-Regular, Menlo, monospace; min-width: 120px;
}
.hud .split { opacity: 0.75; font-weight: 400; }
.hud .best { color: var(--primary); }

.steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin: 14px 0; }
.steps button {
  display: flex; gap: 10px; align-items: center; text-align: left; background: var(--surface); color: var(--text);
  border: 2px solid var(--border); border-radius: 12px; padding: 6px;
}
.steps button[disabled] { opacity: 0.5; cursor: not-allowed; }
.steps button.active { border-color: var(--primary-deep); background: color-mix(in srgb, var(--primary) 15%, var(--surface)); }
.steps img, .steps .intro { width: 84px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; background: var(--border); flex: none; display: grid; place-items: center; }
.steps small { color: var(--muted); display: block; font-size: 0.75rem; }

.companies { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; padding-bottom: 48px; }
.companies a {
  display: flex; align-items: center; gap: 10px; background: var(--surface); border: 2px solid var(--border);
  border-radius: 12px; padding: 8px; text-decoration: none;
}
.companies img { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 8px; flex: none; }
.companies small { color: var(--muted); display: block; }

h2.section { font-size: 1.15rem; margin: 26px 0 10px; }

/* Toasts & Konfetti */
.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 2147483647; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: #1d1d1d; color: #fff; border-left: 5px solid var(--prank); border-radius: 12px;
  padding: 10px 16px; box-shadow: 0 8px 30px rgba(0,0,0,0.35); font-weight: 500; max-width: min(92vw, 460px);
  animation: toast-in 0.35s cubic-bezier(.2,1.4,.4,1);
}
.toast b { display: block; color: var(--primary); }
@keyframes toast-in { from { transform: translateY(30px) scale(0.9); opacity: 0; } }
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 2147483646; }

footer.site { color: var(--muted); font-size: 0.8rem; text-align: center; padding: 24px 0 36px; }

@media (max-width: 600px) {
  .suggestions { grid-template-columns: repeat(2, 1fr); }
  .suggestions a:nth-child(3) { display: none; }
}
