/* Designsystem «Spiel dein Leben»: helles Lavendel, weisse Karten, Lila für Titel,
   Orange für die eine Aktion, Gold für Belohnungen. Schriften: Lilita One (Spiel) und Quicksand.
   Hell, damit es auch am Beamer in einem hellen Raum gut lesbar ist. */

@font-face {
  font-family: 'Lilita One';
  src: url('/fonts/lilita-one.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Quicksand';
  src: url('/fonts/quicksand.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --grund: #f2edf9;
  --flaeche: #ffffff;
  --flaeche-2: #f8f5fc;
  --flaeche-3: #ece4f6;
  --linie: #e1d6ee;
  --text: #2b2236;
  --text-leise: #6b5c80;
  --lila: #3f0170;
  --lila-2: #6b2fb0;
  --lila-hell: #e7dcf5;
  --orange: #ff7503;
  --orange-schatten: #c45500;
  --orange-text: #c45500;
  --gold: #fe9e00;
  --gold-text: #9a5c00;
  --gruen: #1f9d58;
  --gruen-hell: #dff5e8;
  --rot: #d6334a;
  --rot-hell: #fde4e8;
  --blau: #2f6fe0;
  --cyan: #0f9ab3;
  --schatten: 0 8px 28px rgba(63, 1, 112, .10);
  --schatten-klein: 0 2px 8px rgba(63, 1, 112, .08);
  --rund: 18px;
  --schrift: 'Quicksand', system-ui, sans-serif;
  --display: 'Lilita One', 'Quicksand', system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: var(--schrift);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.45;
  color: var(--text);
  background-color: var(--grund);
  /* Spieltisch: feines Punktraster und warmes Licht von oben */
  background-image:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(255, 117, 3, .10), transparent 70%),
    radial-gradient(rgba(63, 1, 112, .07) 1.2px, transparent 1.4px);
  background-size: 100% 100%, 26px 26px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: .01em;
  line-height: 1.1;
  margin: 0;
  color: var(--lila);
}

a { color: var(--lila-2); }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 8px; }

/* Knöpfe: kräftig wie Spieltasten, mit Tiefe */
.knopf {
  font: inherit;
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: .02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .7em 1.5em;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #ff8d2e, var(--orange));
  box-shadow: 0 5px 0 var(--orange-schatten), 0 10px 22px rgba(255, 117, 3, .22);
  cursor: pointer;
  text-decoration: none;
  transition: transform .08s ease, box-shadow .08s ease, filter .15s;
  user-select: none;
}
.knopf:hover { filter: brightness(1.05); }
.knopf:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--orange-schatten); }
.knopf:disabled { opacity: .45; cursor: default; transform: none; }
.knopf.ruhig {
  color: var(--lila);
  background: var(--flaeche);
  box-shadow: 0 4px 0 var(--linie), var(--schatten-klein);
  border: 2px solid var(--linie);
}
.knopf.ruhig:active { box-shadow: 0 1px 0 var(--linie); }
.knopf.gruen { background: linear-gradient(180deg, #34b56c, var(--gruen)); box-shadow: 0 5px 0 #146b3b; }
.knopf.gross { font-size: 1.5rem; padding: .7em 1.7em; }
.knopf.klein { font-size: .95rem; padding: .5em 1em; min-height: 40px; box-shadow: 0 3px 0 var(--orange-schatten); }
.knopf.ruhig.klein { box-shadow: 0 3px 0 var(--linie); }

.textknopf {
  font: inherit;
  background: none;
  border: 0;
  padding: .3em .5em;
  color: var(--text-leise);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.karte {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--rund);
  box-shadow: var(--schatten);
}

.leise { color: var(--text-leise); }

input[type=text] {
  font: inherit;
  font-size: 1.2rem;
  width: 100%;
  padding: .65em .9em;
  color: var(--text);
  background: var(--flaeche);
  border: 2px solid var(--linie);
  border-radius: 14px;
}
input[type=text]:focus { border-color: var(--orange); outline: none; }

kbd {
  display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 8px;
  font: 1rem var(--display); color: var(--lila); background: var(--flaeche); border: 2px solid var(--linie); box-shadow: 0 3px 0 var(--linie);
}

/* Spielfigur-Grafik */
.figur { display: inline-block; line-height: 0; }
.figur svg { width: 100%; height: auto; overflow: visible; }

/* Ruhige Vollbild-Szenen (Pause, nach vorne schauen, Ende) */
.szene-pause, .szene-vorne, .szene-ende { display: grid; place-items: center; padding: 80px 20px 40px; text-align: center; }
.ruhig-karte { display: grid; gap: 18px; justify-items: center; }
.ruhig-karte h1 { font-size: clamp(3rem, 12vw, 7rem); }

/* Szenenwechsel */
.szene { animation: szene-rein .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes szene-rein { from { opacity: 0; transform: translateY(14px) scale(.985); } }

@keyframes hopsen { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-18%); } }
@keyframes pop { from { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
