:root {
  --bg-top: #0a1c66;
  --bg-mid: #123fb0;
  --bg-bot: #1c62d6;
  --cyan: #29b6ec;
  --accent: #00b3ff;
  --accent2: #0066ff;
  --green: #16c784;
  --red: #ff4d5e;
  --text: #ffffff;
  --muted: #bcd0f0;
  --card: rgba(255, 255, 255, 0.08);
  --card-border: rgba(255, 255, 255, 0.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%; height: 100%;
  background: #0a1c66;
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Stage is the 1080x1920 design canvas, scaled to fit any screen */
#stage {
  position: fixed;
  top: 50%; left: 50%;
  width: 1080px; height: 1920px;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  background:
    radial-gradient(90% 55% at 50% 112%, rgba(70, 150, 245, 0.55), transparent 60%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 58%, var(--bg-bot) 100%);
  overflow: hidden;
}

/* confetti overlay */
#confetti { position: absolute; inset: 0; width: 1080px; height: 1920px; z-index: 60; pointer-events: none; }

/* starfield */
#stars { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
#stars .star {
  position: absolute; border-radius: 50%;
  background: #cfe4ff;
  box-shadow: 0 0 6px 1px rgba(180, 210, 255, 0.7);
}

/* top logo (centered, on the gradient) */
#top-bar {
  position: absolute; top: 0; left: 0; right: 0;
  height: 190px;
  display: flex; align-items: center; justify-content: center;
  z-index: 30;
  pointer-events: none;
}
#brand-logo { height: 128px; width: auto; max-width: 660px; object-fit: contain; }

.screen {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 200px 80px 90px;
  text-align: center;
  z-index: 2;
}
.screen.active { display: flex; }

/* DCB title */
.brand {
  font-size: 112px; font-weight: 800; letter-spacing: 2px;
  line-height: 1; color: var(--cyan);
  margin-bottom: 18px;
}

h1 { font-size: 52px; line-height: 1.15; font-weight: 600; margin-bottom: 20px; }
.sub { font-size: 34px; color: var(--muted); margin-bottom: 40px; }

/* ---------- WAITING ---------- */
#screen-waiting { cursor: pointer; justify-content: flex-start; }
.waiting-inner { display: flex; flex-direction: column; align-items: center; width: 100%; }

/* ring = product circle + orbiting bubbles */
.ring {
  position: relative;
  width: 820px; height: 820px;
  margin: 100px 0 40px;
}
.product-wrap {
  position: absolute; top: 50%; left: 50%;
  width: 560px; height: 560px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #ffffff;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  z-index: 2;
}
.product-ph { position: absolute; color: #16305e; font-size: 40px; font-weight: 500; }
#w-product { position: relative; max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: cover; }
#w-product:not([src]), #w-product[src=""] { display: none; }

/* bubbles orbit slowly around the circle */
.bubbles {
  position: absolute; inset: 0;
  animation: orbit 40s linear infinite;
  z-index: 3;
}
@keyframes orbit { to { transform: rotate(360deg); } }

.bubble {
  position: absolute; top: 50%; left: 50%;
  width: 128px; height: 128px; margin: -64px 0 0 -64px;
  transform: rotate(var(--a)) translateY(-410px) rotate(calc(-1 * var(--a)));
}
.bubble i {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  border-radius: 50%;
  font-style: normal; font-weight: 800; font-size: 66px; color: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  animation: orbit-rev 40s linear infinite; /* keep the "?" upright while orbiting */
}
@keyframes orbit-rev { to { transform: rotate(-360deg); } }

/* bubble colours */
.bubble:nth-child(1) i { background: #c21c8e; }
.bubble:nth-child(2) i { background: #f7941e; }
.bubble:nth-child(3) i { background: #27aae1; }
.bubble:nth-child(4) i { background: #39b54a; }
.bubble:nth-child(5) i { background: #16bfa5; }
.bubble:nth-child(6) i { background: #ec1e79; }
.bubble:nth-child(7) i { background: #8cc63f; }
.bubble:nth-child(8) i { background: #27aae1; }
.bubble:nth-child(9) i { background: #f7941e; }
.bubble:nth-child(10) i { background: #6d4bd8; }

/* Press anywhere — pulsing */
.tap-hint {
  font-size: 46px; font-weight: 800; color: #ffffff;
  margin-top: 90px;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.95; }
  50% { transform: scale(1.12); opacity: 1; }
}

/* ---------- HOME ---------- */
#screen-home { justify-content: flex-start; padding-top: 300px; overflow: hidden; }
.home-inner { display: flex; flex-direction: column; align-items: center; width: 100%; position: relative; z-index: 2; }

/* rotating wheel at the bottom — only the top half (mezzaluna) is visible */
.home-wheel {
  position: absolute;
  left: 50%;
  top: calc(100% - 420px);
  transform: translateX(-50%);
  margin: 0;
  z-index: 1;
}
#player-name {
  width: 760px; font-size: 44px; padding: 30px 36px;
  border-radius: 24px; border: 3px solid var(--card-border);
  background: var(--card); color: var(--text); text-align: center;
  margin-bottom: 50px; outline: none;
}
#player-name::placeholder { color: rgba(255,255,255,0.55); }
#player-name:focus { border-color: var(--cyan); }
#player-name.input-error { border-color: var(--red); animation: shake 0.4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-14px); }
  40% { transform: translateX(14px); }
  60% { transform: translateX(-10px); }
  80% { transform: translateX(10px); }
}

.btn-primary {
  font-size: 48px; font-weight: 800; color: #fff;
  padding: 34px 90px; border: none; border-radius: 100px;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--accent2) 100%);
  box-shadow: 0 16px 40px rgba(0, 102, 255, 0.4);
  cursor: pointer; transition: transform 0.08s ease;
}
.btn-primary:active { transform: scale(0.96); }

/* ---------- QUESTION ---------- */
#screen-question { justify-content: flex-start; padding-top: 240px; }
.q-top { width: 100%; margin-bottom: 60px; }
.progress { font-size: 34px; color: var(--muted); font-weight: 700; margin-bottom: 20px; }
.progress-bar { width: 100%; height: 16px; border-radius: 10px; background: var(--card); overflow: hidden; }
#q-progress-fill { height: 100%; width: 33%; background: var(--cyan); transition: width 0.4s ease; }

.q-text { font-size: 58px; line-height: 1.2; font-weight: 700; margin-bottom: 64px; min-height: 180px; }
.options { display: flex; flex-direction: column; gap: 32px; width: 100%; }
.option {
  font-size: 44px; font-weight: 600;
  padding: 44px 50px; border-radius: 28px;
  background: var(--card); border: 3px solid var(--card-border);
  color: var(--text); text-align: left; cursor: pointer;
  transition: transform 0.08s ease, border-color 0.15s ease, background 0.15s ease;
  transform-origin: center;
  animation: optionIn 0.42s ease both;
}
/* staggered entrance: first option, then second, then third */
.option:nth-child(1) { animation-delay: 0.05s; }
.option:nth-child(2) { animation-delay: 0.24s; }
.option:nth-child(3) { animation-delay: 0.43s; }
.option:nth-child(4) { animation-delay: 0.62s; }
@keyframes optionIn {
  0%   { transform: scale(0.35); opacity: 0; }
  70%  { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1);    opacity: 1; }
}
.option:active { transform: scale(0.98); }
.option.correct { border-color: var(--green); background: rgba(22,199,132,0.22); }
.option.wrong   { border-color: var(--red);   background: rgba(255,77,94,0.22); }
.option.disabled { pointer-events: none; opacity: 0.95; }

/* ---------- FEEDBACK ---------- */
.feedback {
  position: absolute; inset: 0;
  background: rgba(6, 16, 45, 0.95);
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 100px 90px; text-align: center; gap: 30px;
  z-index: 5;
}
.feedback.show { display: flex; }
.fb-icon {
  width: 240px; height: 240px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 150px; margin-bottom: 10px;
}
.fb-icon.big { font-size: 180px; }
.fb-icon.ok  { background: rgba(22,199,132,0.2); color: var(--green); border: 6px solid var(--green); }
.fb-icon.no  { background: rgba(255,77,94,0.2); color: var(--red); border: 6px solid var(--red); }
.fb-title { font-size: 68px; font-weight: 800; }
.fb-title.ok { color: var(--green); }
.fb-title.no { color: var(--red); }
.fb-detail { font-size: 40px; line-height: 1.35; color: var(--muted); max-width: 820px; margin-bottom: 20px; }

/* ---------- THANKS ---------- */
.thanks-inner { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.score { font-size: 90px; font-weight: 800; color: var(--cyan); }
