:root {
  --bg-top: #ffd6e7;
  --bg-bottom: #ffc38f;
  --card: #fff8fb;
  --text: #3d2b45;
  --accent: #ff5d8f;
  --accent-dark: #d93f70;
  --secondary: #ff9f1c;
  --secondary-dark: #db7f00;
  --shadow: rgba(61, 43, 69, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.5), transparent 30%),
    radial-gradient(circle at bottom right, rgba(255, 241, 195, 0.7), transparent 25%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.page-intro .page {
  gap: 20px;
}

.hero-card,
.mini-card,
.game-card {
  width: min(100%, 720px);
  background: var(--card);
  text-align: center;
  box-shadow: 0 20px 45px var(--shadow);
}

.hero-card,
.game-card {
  padding: 32px;
  border-radius: 28px;
}

.mini-card {
  padding: 22px 24px;
  border-radius: 22px;
}

.mini-card h2 {
  margin: 0 0 10px;
  font-size: 1.5rem;
}

.mini-card p {
  margin: 0;
  line-height: 1.5;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-dark);
}

.name-tag {
  display: inline-block;
  margin: 0 0 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #ffe7f0;
  color: #a33461;
  font-size: 0.98rem;
  font-weight: 800;
  box-shadow: 0 8px 16px rgba(163, 52, 97, 0.12);
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.1;
}

.intro {
  margin: 16px auto 0;
  max-width: 52ch;
  font-size: 1.1rem;
  line-height: 1.5;
}

.feature-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 26px 0 0;
}

.feature-pill {
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff1f6;
  color: #a33461;
  font-weight: 800;
}

.start-link,
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 800;
}

.start-link {
  margin-top: 28px;
  padding: 16px 28px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 18px rgba(255, 93, 143, 0.28);
  transition: transform 120ms ease, background 120ms ease;
}

.start-link:hover {
  transform: translateY(-2px);
  background: var(--accent-dark);
}

.word-box {
  margin: 28px 0 20px;
  padding: 28px 20px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #ffe8f2);
  border: 4px dashed #ff9fc0;
}

.word-box-game {
  margin-top: 18px;
}

#word {
  display: block;
  min-height: 1.2em;
  font-size: clamp(2rem, 7vw, 4.4rem);
  font-weight: 800;
  color: var(--accent-dark);
}

.timer {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #fff1f6;
  color: #8a355c;
  font-weight: 800;
}

.timer-label {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

#timer-value {
  min-width: 2ch;
  font-size: 1.6rem;
}

.timer-large {
  margin-bottom: 12px;
}

.game-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.game-topbar .eyebrow {
  margin: 0;
}

.back-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: #a33461;
  background: #fff1f6;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 10px 18px rgba(255, 107, 53, 0.25);
  transition: transform 120ms ease, background 120ms ease;
}

button:hover {
  transform: translateY(-2px);
  background: var(--accent-dark);
}

button.secondary {
  background: var(--secondary);
  box-shadow: 0 10px 18px rgba(47, 125, 50, 0.22);
}

button.secondary:hover {
  background: var(--secondary-dark);
}

.status {
  margin: 18px 0 0;
  font-size: 1rem;
  font-weight: 700;
  color: #a33461;
}

.hint {
  margin: 10px 0 0;
  font-size: 0.98rem;
  color: #7d5a76;
}

@media (max-width: 540px) {
  .hero-card,
  .game-card {
    padding: 24px 18px;
    border-radius: 22px;
  }

  .mini-card {
    padding: 20px 18px;
  }

  .intro {
    font-size: 1rem;
  }

  .game-topbar {
    flex-direction: column;
  }

  .actions {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}
