:root {
  --primary: #e8537a;
  --secondary: #fff0f4;
  --accent: #7b3f00;
}

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

html,
body {
  height: 100%;
  overflow: hidden;
  font-family: "Baloo 2", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 50% 20%, var(--secondary), #e9e9ef 90%);
  color: var(--accent);
  user-select: none;
  -webkit-user-select: none;
}

#game-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

.hidden {
  display: none !important;
}

/* --- Overlay screens ----------------------------------------------------- */

.screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 10, 20, 0.35);
  backdrop-filter: blur(3px);
  z-index: 10;
}

.card {
  width: min(440px, 92vw);
  max-height: 92vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 24px;
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  border: 3px solid var(--primary);
}

.logo {
  font-size: 64px;
  line-height: 1;
}

h1 {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  margin-top: 8px;
}

.tagline {
  font-size: 17px;
  margin-top: 6px;
  opacity: 0.85;
}

.how-to {
  background: var(--secondary);
  border-radius: 16px;
  padding: 14px 16px;
  margin: 20px 0;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}

.how-to strong {
  color: var(--primary);
}

.email-promise {
  background: color-mix(in srgb, var(--primary) 12%, #fff);
  border: 1.5px solid color-mix(in srgb, var(--primary) 35%, transparent);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}

.email-promise strong {
  color: var(--primary);
}

.prize-heading {
  font-weight: 700;
  margin-bottom: 8px;
}

.prize-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
}

.prize-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--secondary);
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 15px;
}

.prize-score {
  font-weight: 800;
  color: var(--primary);
  min-width: 64px;
  text-align: left;
}

/* --- Buttons ------------------------------------------------------------- */

.btn {
  font-family: inherit;
  font-weight: 700;
  font-size: 18px;
  border: none;
  border-radius: 999px;
  padding: 14px 32px;
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.15s ease;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-ghost {
  background: var(--secondary);
  color: var(--accent);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.btn:disabled:active {
  transform: none;
}

/* --- Claim form (results screen) ----------------------------------------- */

.claim-form {
  margin: 18px 0;
  text-align: left;
}

.claim-form label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
}

.claim-form input {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  padding: 12px 14px;
  border: 2px solid var(--primary);
  border-radius: 12px;
  outline: none;
  color: var(--accent);
  margin-bottom: 12px;
}

.claim-form input:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 30%, transparent);
}

.claim-form .btn {
  width: 100%;
}

.email-error {
  color: #d62828;
  font-size: 13px;
  margin-bottom: 8px;
}

.email-note {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 8px;
}

.coupon-expiry {
  font-size: 13px;
  font-weight: 700;
  opacity: 0.85;
  margin-top: 8px;
}

.email-status {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 4px;
}

.already-claimed {
  background: var(--secondary);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 18px;
}

/* --- In-game HUD --------------------------------------------------------- */

.hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  z-index: 5;
  pointer-events: none;
}

.hud-item {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 700;
  font-size: 18px;
  color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.hud-item span {
  color: var(--primary);
  font-weight: 800;
}

.mute-btn {
  margin-left: auto;
  pointer-events: auto;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* --- Results ------------------------------------------------------------- */

.reason {
  font-size: 18px;
  font-weight: 700;
  opacity: 0.8;
}

.final-score-label {
  margin-top: 14px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
}

.final-score {
  font-size: 72px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.prize-label {
  font-size: 24px;
  margin: 18px 0 12px;
  color: var(--accent);
}

.coupon-box {
  background: var(--secondary);
  border: 2px dashed var(--primary);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 18px;
}

.coupon-hint {
  font-size: 14px;
  opacity: 0.8;
  margin-bottom: 8px;
}

.coupon-code {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--primary);
  margin-bottom: 12px;
}

.near-miss {
  font-size: 15px;
  opacity: 0.85;
  margin-bottom: 18px;
}

.results-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
