* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  background: linear-gradient(120deg, #dfe9f5, #f0f2f5 35%, #e8f0e4 70%, #f5eee0);
  background-size: 400% 400%;
  animation: bg-drift 18s ease infinite;
}

@keyframes bg-drift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

#page {
  position: relative;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}

#stage-hero,
#stage-wheel,
#captcha-wrap {
  position: relative;
  z-index: 1;
}

/* Decorative fake testimonials scattered in the background */

#testimonials {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.testimonial-card {
  position: absolute;
  width: 190px;
  background: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  font-size: 12px;
  line-height: 1.35;
  color: #333;
}

.tc-stars {
  color: #f5b301;
  font-size: 13px;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.tc-quote {
  margin: 0 0 6px;
  font-style: italic;
}

.tc-name {
  margin: 0;
  font-size: 11px;
  color: #888;
  font-weight: bold;
}

.tc-1 { top: 6%;  left: 4%;   transform: rotate(-7deg); }
.tc-2 { top: 10%; right: 4%;  transform: rotate(6deg); }
.tc-3 { bottom: 10%; left: 6%; transform: rotate(5deg); }
.tc-4 { bottom: 8%;  right: 5%; transform: rotate(-5deg); }
.tc-5 { top: 44%; left: 1.5%; transform: rotate(-4deg); }
.tc-6 { top: 42%; right: 1.5%; transform: rotate(4deg); }

@media (max-width: 1100px) {
  .tc-5, .tc-6 { display: none; }
}

@media (max-width: 760px) {
  .testimonial-card { display: none; }
}

.captcha-box {
  background: #fff;
  border: 1px solid #d3d3d3;
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  width: 302px;
}

/* Stage 1: checkbox */

#stage-checkbox {
  padding: 0;
}

.rc-anchor {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  cursor: pointer;
  user-select: none;
}

.checkbox {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border: 2px solid #c1c1c1;
  border-radius: 2px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease;
}

.rc-anchor:hover .checkbox {
  border-color: #999;
}

.checkbox .spinner {
  width: 18px;
  height: 18px;
  border: 3px solid #cfe2fb;
  border-top-color: #4285f4;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.checkbox .check-mark {
  color: #4285f4;
  font-size: 20px;
  font-weight: bold;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.rc-label {
  font-size: 15px;
  color: #222;
}

.rc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f9f9f9;
  padding: 6px 12px;
  border-top: 1px solid #eee;
  font-size: 10px;
  color: #999;
}

.rc-logo {
  font-weight: bold;
  font-style: italic;
  color: #b3b3b3;
}

/* Stage 2: challenge */

.challenge {
  width: 310px;
  position: relative;
}

.challenge-header {
  background: #4285f4;
  color: #fff;
  padding: 14px 16px;
}

.instructions {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
}

.sub-instructions {
  margin: 4px 0 0;
  font-size: 12px;
  opacity: 0.85;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #fff;
}

.tile {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: none;
  cursor: pointer;
  overflow: hidden;
  outline-offset: -2px;
}

.tile .tile-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #1c2436;
}

.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(66, 133, 244, 0.55);
  opacity: 0;
  transition: opacity 0.1s ease;
}

.tile .tile-check {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 22px;
  height: 22px;
  background: #4285f4;
  clip-path: polygon(0 0, 100% 0, 0 100%);
  opacity: 0;
  z-index: 2;
}

.tile .tile-check::after {
  content: "\2713";
  position: absolute;
  top: -1px;
  left: -1px;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
}

.tile.selected::after { opacity: 1; }
.tile.selected .tile-check { opacity: 1; }

.challenge-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #f9f9f9;
}

.text-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: #757575;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.text-btn:hover {
  background: #eee;
}

.verify-btn {
  background: #4285f4;
  color: #fff;
  border: none;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  border-radius: 2px;
  cursor: pointer;
  min-width: 96px; /* SKIP and VERIFY labels swap; don't let the button jump */
  text-align: center;
}

.verify-btn:hover {
  background: #3367d6;
}

.verify-btn:disabled {
  background: #a9c6f9;
  cursor: default;
}

.shake {
  animation: shake 0.4s;
}

@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}

/* Rickroll payload */

#rickroll-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
}

/* The YouTube IFrame API replaces this element with an <iframe> that
   keeps the same id, so this rule must target #player directly - it
   won't ever match a nested "#player iframe" descendant. */
#player {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 100vh;
  min-width: 177.78vh; /* keep 16:9 cover fill */
  min-height: 56.25vw;
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
}

#unmute-catcher {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
}

#sound-hint {
  position: absolute;
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 30px;
  white-space: nowrap;
  animation: hint-pulse 1.4s ease-in-out infinite;
}

@keyframes hint-pulse {
  0%, 100% { opacity: 0.75; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.05); }
}

/* Stage 0: clickbait hero */

#stage-hero {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.marquee {
  background: #000;
  color: #ffde00;
  overflow: hidden;
  white-space: nowrap;
  padding: 6px 0;
  font-weight: bold;
  font-size: 13px;
  border: 2px solid #ffde00;
  margin-bottom: 14px;
}

.marquee-track {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 14s linear infinite;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* Mobile-only testimonial ticker: the scattered background cards have no
   room on narrow/portrait screens, so swap in a scrolling reel instead. */
.testimonial-ticker {
  display: none;
}

@media (max-width: 760px) {
  .testimonial-ticker {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 0;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  }

  .testimonial-ticker-track {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 26s linear infinite;
    font-size: 12px;
    color: #333;
  }

  .testimonial-ticker-track .tc-stars-inline {
    color: #f5b301;
  }
}

.hero-card {
  background: linear-gradient(160deg, #ff5f6d, #ffc371 45%, #47cf73 100%);
  background-size: 300% 300%;
  animation: gradient-shift 6s ease infinite;
  border: 4px dashed #fff200;
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-emoji {
  font-size: 42px;
  margin: 0 0 4px;
}

.hero-title {
  margin: 0 0 6px;
  font-size: 30px;
  color: #fff;
  text-shadow: 2px 2px 0 #c0392b, 4px 4px 6px rgba(0,0,0,0.4);
  animation: blink 1s step-start infinite;
  letter-spacing: 1px;
}

@keyframes blink {
  50% { opacity: 0.45; }
}

.hero-sub {
  margin: 0;
  font-size: 16px;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.35);
}

.hero-prize {
  margin: 4px 0 10px;
  font-size: 34px;
  font-weight: 900;
  color: #ffee00;
  text-shadow: 2px 2px 0 #333;
  transform: rotate(-2deg);
}

.hero-sub2 {
  margin: 0 0 18px;
  font-size: 10px;
  color: rgba(255,255,255,0.85);
  line-height: 1.4;
}

.hero-cta {
  background: #ff2f2f;
  color: #fff;
  border: 3px solid #fff;
  border-radius: 40px;
  padding: 16px 26px;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 0 #9c0000, 0 6px 14px rgba(0,0,0,0.4);
  animation: pulse 1.1s ease-in-out infinite;
}

.hero-cta:hover {
  background: #ff4949;
}

.hero-cta:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #9c0000, 0 2px 8px rgba(0,0,0,0.4);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.hero-fineprint {
  margin: 14px 0 0;
  font-size: 12px;
  color: #fff;
  font-weight: bold;
}

#fake-timer {
  color: #ffee00;
}

/* Taunt overlay for failed captcha attempts */

.taunt-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 22, 30, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  z-index: 5;
}

.taunt-face {
  width: auto;
  height: 130px;
  max-width: 80%;
  object-fit: contain;
  margin-bottom: 12px;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}

.taunt-title {
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.taunt-sub {
  color: #cfd3dc;
  font-size: 13px;
  margin: 0 0 18px;
}

.taunt-count {
  color: #8a92a3;
  font-size: 11px;
  font-weight: bold;
  margin: -8px 0 16px;
}

.taunt-retry {
  padding: 10px 18px;
}

/* Stage 0.5: the rigged prize wheel */

.wheel-card {
  background: linear-gradient(160deg, #2b1055, #7597de);
  border-radius: 16px;
  padding: 26px 24px;
  text-align: center;
  color: #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
  width: min(92vw, 420px);
}

.wheel-title {
  margin: 0 0 4px;
  font-size: 24px;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}

.wheel-sub {
  margin: 0 0 18px;
  font-size: 12px;
  opacity: 0.85;
}

.wheel-box {
  position: relative;
  width: min(76vw, 320px);
  height: min(76vw, 320px);
  margin: 0 auto 20px;
}

.wheel-pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 24px solid #fff200;
  z-index: 2;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.4));
}

#wheel-rotor {
  width: 100%;
  height: 100%;
}

#wheel-rotor svg {
  display: block;
  width: 100%;
  height: 100%;
}

.wheel-result-text {
  font-size: 24px;
  font-weight: 900;
  margin: 0 0 14px;
  animation: pulse 1.1s ease-in-out infinite;
}

/* Fake live winners feed */

#live-feed {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.feed-toast {
  background: #fff;
  border-radius: 8px;
  border-left: 4px solid #47cf73;
  padding: 8px 12px;
  font-size: 12px;
  color: #333;
  max-width: 250px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  animation: toast-in 0.4s ease, toast-out 0.4s ease 4.1s forwards;
}

@keyframes toast-in {
  from { transform: translateX(-120%); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@keyframes toast-out {
  to { transform: translateX(-120%); opacity: 0; }
}
