*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Hintergrund & Grundlayout */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at 20% 20%, #691d95, #1e1b4b, #0f0a24);
  color: #e5e7eb;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* App-Card */
.app {
  max-width: 520px;
  margin: 1.5rem auto 2rem;
  padding: 1.75rem 1.5rem 1.75rem;
  background: radial-gradient(circle at top, #111827 0, #020617 60%, #020617 100%);
  border-radius: 24px;
  box-shadow: 0 32px 80px rgba(15, 23, 42, 0.9);
}

/* Logo oben */
.logo img,
.logo {
  max-width: 56px;
  display: block;
  margin: 0 auto;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 2rem;
}

.header h1 {
  margin-top: 1rem;
  margin-bottom: 0.35rem;
  font-size: 2rem;
  letter-spacing: 0.05em;
}

.header p {
  font-size: 0.9rem;
  color: #9ca3af;
  margin-bottom: 0.75rem;
}

.header .button {
  margin-top: 0.5rem;
}

/* Buttons (How to Play + Speichern + Neu starten + Zurück) */
.button,
.primary-button {
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #c5228f, #a31664);
  color: #f9fafb;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.18s ease;
  box-shadow: 0 6px 18px rgba(88, 22, 163, 0.55);
}

.button:hover,
.primary-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 9px 26px rgba(163, 22, 22, 0.75);
}

/* Scoreboard */
.scoreboard {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.2rem;
  margin-bottom: 2.1rem;
}

.score {
  flex: 1;
  padding: 0.6rem 0.9rem;
  border-radius: 0.9rem;
  background: linear-gradient(145deg, rgba(15,23,42,0.9), rgba(30,64,175,0.65));
  border: 1px solid rgba(148, 163, 184, 0.4);
  text-align: center;
}

.score-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  display: block;
  margin-bottom: 0.3rem;
}

.score-value {
  font-size: 1.4rem;
  font-weight: 700;
}

/* Motivationsspruch */
.quote-box {
  margin-top: 0;
  margin-bottom: 2rem;
}

.quote-box h2 {
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}

.quote-box p {
  font-size: 0.9rem;
  color: #e5e7eb;
}

/* Spieler-Setup */
.player-setup {
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  padding: 0.9rem 0.85rem 1rem;
  border-radius: 0.9rem;
  background: radial-gradient(circle at top left, rgba(30,64,175,0.5), rgba(15,23,42,0.95));
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.8);
}

.player-setup h2 {
  font-size: 1.05rem;
  margin-bottom: 0.8rem;
}

.player-setup-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.6rem;
}

.player-setup label {
  width: 80px;
  font-size: 0.85rem;
}

.player-setup input {
  flex: 1;
  padding: 0.35rem 0.55rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
}

/* Spielbrett */
.board {
  display: grid;
  grid-template-columns: repeat(3, 110px);
  gap: 12px;
  justify-content: center;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.cell {
  width: 110px;
  height: 110px;
  font-size: 2.6rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: radial-gradient(circle at top, #111827, #020617);
  cursor: pointer;
  color: #f9fafb;
  box-shadow: inset 0 0 12px rgba(15,23,42,0.9);
}

.cell:disabled {
  cursor: default;
  background-color: #1f2937;
}

/* Controls */
.controls {
  margin-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status {
  font-size: 0.9rem;
}

/* Footer */
.footer {
  text-align: center;
  font-size: 0.75rem;
  margin-top: 1.5rem;
  color: #9ca3af;
}

/* How-to-Play Seite */
.howto {
  margin-top: 0.5rem;
}

.howto-section {
  margin-bottom: 1.6rem;
}

.howto-section h2 {
  margin-bottom: 0.5rem;
}

.howto-list {
  margin-left: 1.25rem;
}

.howto-section.center {
  text-align: center;
  margin-top: 1.5rem;
}

/* Mobile */
@media (max-width: 600px) {
  .app {
    margin: 0.75rem 0.5rem 1.5rem;
    padding: 1.25rem 1rem 1.5rem;
  }

  .board {
    grid-template-columns: repeat(3, 90px);
    gap: 10px;
  }

  .cell {
    width: 90px;
    height: 90px;
    font-size: 2.2rem;
  }

  .controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .scoreboard {
    flex-direction: column;
  }
}
