/* Einfaches, buntes Farbschema */
:root {
  --bg: #fef6ff;
  --text: #1a1a2e;
  --header-from: #ff6b9d;
  --header-to: #c44569;
  --coral: #ff8a65;
  --coral-dark: #e64a19;
  --mint: #4ecdc4;
  --mint-dark: #26a69a;
  --lavender: #a29bfe;
  --lavender-dark: #6c5ce7;
  --sun: #ffe066;
  --sun-dark: #f4b400;
  --footer-bg: #2d3436;
  --btn-primary: #00b894;
  --btn-secondary: #fdcb6e;
  --btn-game-from: #a29bfe;
  --btn-game-to: #6c5ce7;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

.header {
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, var(--header-from), var(--header-to));
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
}

.tagline {
  margin: 0;
  opacity: 0.95;
  font-size: 1.05rem;
}

.main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.card {
  padding: 1.5rem;
  border-radius: 16px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.card p {
  margin: 0;
  opacity: 0.95;
}

.card--coral {
  background: linear-gradient(145deg, var(--coral), var(--coral-dark));
}

.card--mint {
  background: linear-gradient(145deg, var(--mint), var(--mint-dark));
}

.card--lavender {
  background: linear-gradient(145deg, var(--lavender), var(--lavender-dark));
}

.card--sun {
  background: linear-gradient(145deg, var(--sun), var(--sun-dark));
  color: var(--text);
}

.card--sun p {
  opacity: 0.85;
}

.footer {
  margin-top: auto;
  padding: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  background: var(--footer-bg);
}

button.btn {
  border: none;
  cursor: pointer;
  font: inherit;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: var(--btn-primary);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 184, 148, 0.45);
}

.btn--secondary {
  color: var(--text);
  background: var(--btn-secondary);
}

.btn--secondary:hover {
  box-shadow: 0 6px 20px rgba(253, 203, 110, 0.5);
}

.btn--game {
  background: linear-gradient(135deg, var(--btn-game-from), var(--btn-game-to));
  color: #fff;
}

.btn--game:hover {
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.45);
}

.btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.game-dialog {
  position: relative;
  border: none;
  border-radius: 20px;
  padding: 1.5rem 1.5rem 1.75rem;
  max-width: min(480px, calc(100vw - 2rem));
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.game-dialog::backdrop {
  background: rgba(26, 26, 46, 0.6);
}

.game-dialog__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-dialog__close:hover {
  background: rgba(0, 0, 0, 0.14);
}

.game-dialog__title {
  margin: 0 2rem 0.5rem 0;
  font-size: 1.35rem;
}

.game-dialog__hint {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  opacity: 0.85;
}

.game-timer {
  margin: 0 0 0.65rem;
  padding: 0.4rem 0.75rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  color: var(--text);
  background: rgba(108, 92, 231, 0.12);
  border-radius: 10px;
}

.game-arena-wrap {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.game-arena {
  position: relative;
  width: 100%;
  height: min(320px, 55vh);
  min-height: 220px;
  background: linear-gradient(160deg, #e8f4f8 0%, #dfe6f0 100%);
  cursor: none;
}

.game-dot {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  top: 0;
  left: 0;
  will-change: transform;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.game-dot--player {
  background: radial-gradient(circle at 30% 30%, #74b9ff, #0984e3);
  z-index: 2;
}

.game-dot--enemy {
  background: radial-gradient(circle at 30% 30%, #ff7675, #d63031);
  z-index: 1;
}

.game-boom {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: clamp(2.5rem, 10vw, 4rem);
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #d63031;
  text-shadow: 0 0 20px #fff, 0 4px 0 #fab1a0;
  background: rgba(255, 255, 255, 0.35);
  z-index: 3;
  pointer-events: none;
}

.game-boom:not([hidden]) {
  display: flex;
}

/* Wordgame (zweite Seite) */
:root {
  --bg: #fef6ff;
  --text: #1a1a2e;
  --header-from: #ff6b9d;
  --header-to: #c44569;
  --coral: #ff8a65;
  --coral-dark: #e64a19;
  --mint: #4ecdc4;
  --mint-dark: #26a69a;
  --lavender: #a29bfe;
  --lavender-dark: #6c5ce7;
  --sun: #ffe066;
  --sun-dark: #f4b400;
  --footer-bg: #2d3436;
  --btn-primary: #00b894;
  --btn-secondary: #fdcb6e;
  --btn-game-from: #a29bfe;
  --btn-game-to: #6c5ce7;
}

.second-page-main {
  padding-top: 1.25rem;
  max-width: min(1400px, 95vw);
}

.wordgame-shell {
  width: 100%;
  position: relative;
  padding: 0.25rem 0;
  grid-column: 1 / -1;
}

.wordgame-instructions {
  margin: 0 0 0.75rem;
  text-align: center;
  font-size: 0.98rem;
  opacity: 0.9;
}

.wordgame-area {
  position: relative;
  width: 100%;
  /*height: min(680px, 78vh);*/
  height: 1000px;
  background: linear-gradient(160deg, #e8f4f8 0%, #f6f0ff 100%);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.06);
  touch-action: none;
}

.merge-box {
  position: absolute;
  width: 128px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  border: 2px solid rgba(26, 26, 46, 0.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
  cursor: grab;
  user-select: none;
  touch-action: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 5;
}

.merge-box.is-dragging {
  cursor: grabbing;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
}

.merge-box__term {
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--text);
  text-align: center;
  line-height: 1.05;
}

.wordgame-win {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 900;
  color: #00b894;
  background: rgba(255, 255, 255, 0.55);
  z-index: 50;
  pointer-events: none;
}

.wordgame-win:not([hidden]) {
  display: flex;
}
