:root {
  --blue: #1B4DC1;
  --blue-deep: #0E2A66;
  --navy: #10286b;
  --yellow: #FFC93C;
  --yellow-deep: #F2B718;
  --ink: #0E2A66;
  --paper: #ffffff;
  --radius: 22px;
  --shadow: 0 18px 40px rgba(8, 22, 60, 0.35);
}
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Archivo', system-ui, sans-serif;
  color: var(--ink);
  min-height: 100vh;
  background: radial-gradient(130% 90% at 50% -10%, #2a63e0 0%, var(--blue) 45%, var(--blue-deep) 100%);
  background-attachment: fixed;
  display: flex; justify-content: center;
  padding: 24px 16px 48px;
  position: relative;
}
body::before {
  content: ''; position: fixed; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 18px 18px; pointer-events: none;
}

.stage { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 20px; }

.brand { text-align: center; }
.brand-badge {
  display: inline-block; background: var(--yellow); color: var(--navy);
  font-weight: 900; letter-spacing: 2px; font-size: 13px;
  padding: 8px 18px; border-radius: 999px; margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.brand-title {
  font-family: 'Archivo', sans-serif; font-weight: 900; color: #fff;
  font-size: clamp(25px, 6.6vw, 32px); line-height: 1.05;
  letter-spacing: 0.3px; text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.brand-title span { font-size: 0.8em; color: var(--yellow); }

.card {
  background: var(--paper); border: 3px solid var(--navy); border-radius: var(--radius);
  padding: 26px 22px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}

.wheel-wrap { position: relative; width: min(86vw, 340px); aspect-ratio: 1; }
#wheel { width: 100%; height: 100%; display: block; filter: drop-shadow(0 8px 16px rgba(8,22,60,.3)); transition: transform 5.2s cubic-bezier(.17,.67,.18,1); }
.hub {
  position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%;
  background: var(--navy); color: var(--yellow); display: grid; place-items: center;
  font-family: 'Archivo', sans-serif; font-weight: 900; font-size: 14px; letter-spacing: 1px;
  border: 4px solid var(--paper); box-shadow: 0 4px 10px rgba(0,0,0,.4);
}
.pointer {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; z-index: 3;
  border-left: 16px solid transparent; border-right: 16px solid transparent;
  border-top: 28px solid var(--yellow);
  filter: drop-shadow(0 3px 3px rgba(0,0,0,.35));
}

#play-form { width: 100%; display: flex; flex-direction: column; gap: 12px; }
#email {
  width: 100%; padding: 15px 16px; font-size: 16px; font-family: inherit;
  border: 2px solid var(--navy); border-radius: 14px; background: #fff;
}
#email:focus { outline: 3px solid var(--yellow); outline-offset: 1px; }
#hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

#spin-btn {
  width: 100%; padding: 17px; cursor: pointer;
  font-family: 'Archivo', sans-serif; font-weight: 900; font-size: 19px; letter-spacing: 1px;
  color: var(--yellow); background: var(--navy); border: none; border-radius: 14px;
  transition: transform .12s ease, filter .12s ease; text-transform: uppercase;
}
#spin-btn:hover { filter: brightness(1.18); }
#spin-btn:active { transform: scale(.97); }
#spin-btn:disabled { opacity: .55; cursor: not-allowed; }

.form-error { color: #c0392b; font-size: 14px; font-weight: 700; min-height: 1em; text-align: center; }
.rules-link { background: none; border: none; cursor: pointer; font-family: inherit; font-size: 13px; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }

.result-emoji { font-size: 56px; line-height: 1; }
#result-title { font-family: 'Archivo', sans-serif; font-weight: 900; font-size: 30px; text-transform: uppercase; color: var(--navy); }
.result-detail { text-align: center; font-size: 16px; color: #33415c; }

.code-box { width: 100%; text-align: center; background: var(--navy); color: #fff; border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.code-label { font-size: 12px; letter-spacing: 2px; color: var(--yellow); text-transform: uppercase; }
#code-value { font-family: 'Archivo', sans-serif; font-weight: 900; font-size: 30px; letter-spacing: 3px; color: var(--yellow); }
.code-validity { font-size: 12px; opacity: .85; }

.review-invite { width: 100%; text-align: center; border-top: 2px dashed #d6def0; padding-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.review-invite p { font-size: 14px; color: #33415c; max-width: 30ch; }
.stars { color: var(--yellow-deep); font-size: 26px; letter-spacing: 3px; }
.review-btn {
  display: inline-block; text-decoration: none; background: #fff; color: var(--navy);
  border: 2px solid var(--navy); border-radius: 999px; font-weight: 900; font-size: 15px;
  padding: 12px 26px; transition: transform .12s ease, background .12s ease;
}
.review-btn::before { content: 'G'; font-family: 'Archivo', sans-serif; font-weight: 900; color: #4285F4; margin-right: 8px; }
.review-btn:hover { background: var(--yellow); transform: translateY(-2px); }

.modal { position: fixed; inset: 0; background: rgba(8,22,60,.6); display: grid; place-items: center; padding: 20px; z-index: 50; }
.modal-box { background: var(--paper); border-radius: 18px; padding: 28px 24px; max-width: 420px; position: relative; max-height: 85vh; overflow: auto; }
.modal-box h3 { font-family: 'Archivo', sans-serif; font-weight: 900; margin-bottom: 14px; font-size: 22px; color: var(--navy); }
.modal-box p { font-size: 14px; line-height: 1.55; margin-bottom: 12px; color: #33415c; }
.modal-close { position: absolute; top: 10px; right: 14px; background: none; border: none; font-size: 30px; cursor: pointer; line-height: 1; color: var(--navy); }

.hidden { display: none !important; }
@media (prefers-reduced-motion: reduce) { #wheel { transition: none !important; } }
