/* Hedgehog Rush — fan homage, not affiliated with SEGA */

:root {
  --hr-sky: #38bdf8;
  --hr-text: #f8fafc;
  --hr-muted: #94a3b8;
  --hr-accent: #22c55e;
}

body.hr-page {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #0c4a6e 0%, #0369a1 40%, var(--hr-sky) 100%);
  color: var(--hr-text);
  font-family: "Segoe UI", system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 12px 24px;
}

.hr-page h1 {
  margin: 0 0 4px;
  font-size: clamp(1.2rem, 4vw, 1.65rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #fef08a;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hr-disclaimer {
  font-size: 0.75rem;
  color: rgba(248, 250, 252, 0.88);
  max-width: 520px;
  text-align: center;
  margin: 0 0 12px;
  line-height: 1.4;
}

.hr-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 10px;
}

.hr-bar button {
  background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 0 #14532d, 0 6px 16px rgba(0, 0, 0, 0.25);
}

.hr-bar button:hover {
  filter: brightness(1.08);
}

.hr-bar button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #14532d;
}

.hr-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 16px 48px rgba(0, 0, 0, 0.45);
  background: #0f172a;
  touch-action: none;
  max-width: min(100%, 720px);
  margin: 0 auto;
}

#hrCanvas {
  display: block;
  width: min(100vw - 24px, 720px);
  height: auto;
  vertical-align: middle;
}

.hr-touch {
  display: none;
  width: min(100vw - 24px, 720px);
  margin-top: 8px;
  gap: 8px;
  justify-content: space-between;
  user-select: none;
}

.hr-touch.show {
  display: flex;
}

.hr-touch button {
  flex: 1;
  min-height: 48px;
  font-size: 18px;
  font-weight: 800;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
}

.hr-touch button:active {
  background: rgba(34, 197, 94, 0.85);
}

.hr-help {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--hr-muted);
  text-align: center;
  max-width: 520px;
}

.hr-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  z-index: 15;
}

.hr-overlay .cmg-btn-yellow {
  display: inline-block;
  background: #fbbf24;
  color: #1a1505;
  font-weight: 800;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
}

.hr-overlay .cmg-btn-yellow:hover {
  filter: brightness(1.08);
}

.hr-overlay h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.hr-overlay p {
  margin: 0 0 16px;
  font-size: 0.95rem;
  color: var(--hr-muted);
  max-width: 340px;
}

.hr-hidden {
  display: none !important;
}
