.game-hero {
  padding: 96px 0 48px;
}

.game-hero-inner {
  display: grid;
  gap: 32px;
  align-items: start;
}

@media (min-width: 960px) {
  .game-hero-inner {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  }
}

.game-hero-text .section-title {
  margin-bottom: 16px;
  text-align: left;
  line-height: 1.15;
  text-wrap: balance;
}

.game-hero-text .section-subtitle {
  margin: 0;
  max-width: 540px;
  color: var(--ink-600);
  text-align: left;
  line-height: 1.65;
  text-wrap: pretty;
}

.game-hero-highlights {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.game-highlight {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.08);
  font-weight: 600;
  color: var(--ink-700);
}

.game-scoreboard {
  display: grid;
  gap: 16px;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow-soft);
  min-width: 240px;
  align-self: start;
}

.score-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(244, 114, 182, 0.25);
}

.score-card.best-score {
  background: rgba(250, 232, 255, 0.9);
  border-color: rgba(168, 85, 247, 0.25);
}

.score-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.score-value {
  font-size: clamp(2.4rem, 2.2rem + 1vw, 3rem);
  font-weight: 800;
  color: var(--brand-700);
  line-height: 1;
}

.score-status {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px dashed rgba(15, 23, 42, 0.12);
}

.status-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-500);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-700);
}

.score-history {
  border-top: 1px dashed rgba(15, 23, 42, 0.12);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.score-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.score-history-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-600);
}

.link-btn {
  background: none;
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-600);
  text-decoration: underline;
  cursor: pointer;
  padding: 4px 0;
}

.link-btn:hover,
.link-btn:focus-visible {
  color: var(--brand-700);
}

.score-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.score-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  color: var(--ink-700);
}

.score-history-item time {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-400);
}

.score-history-empty {
  color: var(--ink-400);
  font-style: italic;
}

.game-settings-panel {
  border-top: 1px dashed rgba(15, 23, 42, 0.12);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-700);
}

.settings-hint {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-500);
}

.settings-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.setting-toggle {
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(255, 255, 255, 0.92);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.setting-toggle:hover,
.setting-toggle:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

.setting-toggle[data-state="on"] {
  border-color: rgba(236, 72, 153, 0.4);
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.12), rgba(14, 165, 233, 0.12));
}

.setting-label {
  font-weight: 700;
  color: var(--ink-700);
}

.setting-state {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-500);
}

.game-play {
  padding: 32px 0 80px;
}

.section-heading {
  text-align: center;
  margin-bottom: 32px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.section-heading .section-title {
  margin-bottom: 8px;
  line-height: 1.2;
  text-wrap: balance;
}

.section-heading .section-subtitle {
  margin: 0;
  color: var(--ink-600);
  line-height: 1.6;
  text-wrap: pretty;
}

.game-stage {
  display: grid;
  gap: 24px;
}

.game-canvas-wrapper {
  position: relative;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(248, 250, 255, 0.9), rgba(244, 232, 255, 0.92));
  border: 1px solid rgba(225, 220, 255, 0.7);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.13);
  overflow: hidden;
}

.game-canvas {
  width: 100%;
  height: clamp(280px, 55vh, 440px);
  display: block;
  background: transparent;
}

.game-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.6rem);
  font-weight: 700;
  color: var(--ink-700);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 32px;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.game-overlay[hidden] {
  display: flex;
  opacity: 0;
  visibility: hidden;
}

.game-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.game-controls .btn {
  min-width: 140px;
}

.btn-light {
  color: var(--ink-700);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.btn-light:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(148, 163, 184, 0.25);
}

.game-instructions {
  padding: 40px 0 96px;
}

.info-grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 960px) {
  .info-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.info-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  padding: 24px 28px;
  border: 1px solid rgba(244, 114, 182, 0.18);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

.info-card h3 {
  margin: 0 0 16px;
  font-size: 1.25rem;
  color: var(--brand-700);
}

.info-card ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
  color: var(--ink-600);
}

.info-card li {
  line-height: 1.5;
}

@media (max-width: 768px) {
  .game-hero {
    padding: 72px 0 40px;
  }

  .game-hero-text .section-title,
  .game-hero-text .section-subtitle {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .game-scoreboard {
    justify-self: center;
    text-align: center;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .game-controls .btn {
    flex: 1 1 100%;
    min-width: auto;
  }

  .info-card {
    padding: 20px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-overlay {
    transition: none;
  }

  .btn,
  .btn:hover,
  .btn:focus-visible {
    transition: none;
  }
}
