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

:root {
  --nf-red: #e50914;
  --nf-bg: #000;
  --nf-dark: #141414;
  --reward-green: #2ad17e;
}

html, body {
  height: 100%;
  background: var(--nf-bg);
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: #fff;
  overflow: hidden;
}

.hidden { display: none !important; }

/* sound-only clip lives off-screen — we only need its audio */
.sound-only {
  position: fixed;
  width: 1px; height: 1px;
  left: -10px; top: -10px;
  opacity: 0;
  pointer-events: none;
}

/* ============ LOADER ============ */
.loader {
  position: fixed;
  inset: 0;
  background: var(--nf-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  z-index: 100;
}
.loader-logo {
  color: var(--nf-red);
  font-size: clamp(34px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: 3px;
  text-shadow: 0 0 24px rgba(229, 9, 20, 0.55);
}
.loader-spinner {
  width: 54px;
  height: 54px;
  border: 5px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--nf-red);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text {
  color: #888;
  font-size: 15px;
  letter-spacing: 0.5px;
}

/* ============ PLAYER ============ */
.player {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
#video {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ambient bias-light glow — pure CSS, like the backlight behind a TV */
.ambient {
  position: absolute;
  inset: -25%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(40% 45% at 50% 42%, rgba(229, 9, 20, 0.40), transparent 70%),
    radial-gradient(45% 50% at 28% 62%, rgba(40, 90, 210, 0.28), transparent 72%),
    radial-gradient(45% 50% at 72% 60%, rgba(170, 30, 60, 0.30), transparent 72%);
  filter: blur(90px);
  animation: ambientPulse 7s ease-in-out infinite alternate;
}
@keyframes ambientPulse {
  0%   { opacity: 0.55; transform: scale(1); }
  100% { opacity: 0.85; transform: scale(1.08); }
}

/* buffering spinner over the player */
.buffering {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  z-index: 4;
}

/* top fade */
.top-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
  z-index: 5;
  pointer-events: none;
  transition: opacity 0.3s;
}
.brand {
  color: var(--nf-red);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: 1.5px;
}
.now-playing { display: flex; flex-direction: column; gap: 6px; }
.np-eyebrow {
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #9a9a9a;
  font-weight: 700;
}
.np-mask {
  align-self: flex-start;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--nf-red);
  padding: 4px 11px;
  border: 1px solid rgba(229, 9, 20, 0.4);
  border-radius: 6px;
  background: rgba(229, 9, 20, 0.1);
  text-shadow: 0 0 10px rgba(229, 9, 20, 0.45);
}

.click-layer { position: absolute; inset: 0; z-index: 2; cursor: pointer; }

/* ============ CONTROLS ============ */
.controls {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0 32px 22px;
  z-index: 6;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 10%, rgba(0,0,0,0.4) 60%, transparent);
  transition: opacity 0.3s;
}

/* earnings bar */
.earn-area { padding: 14px 0 10px; }
.earn-head {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 20px;
  margin-bottom: 30px;
}
.earn-label {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  transform-origin: center bottom;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--reward-green);
  font-weight: 800;
  white-space: nowrap;
  animation: jumpShake 0.9s ease-in-out infinite;
}
@keyframes jumpShake {
  0%   { transform: translateX(-50%) translateY(0) rotate(0); }
  15%  { transform: translateX(calc(-50% - 2px)) translateY(-9px) rotate(-4deg); }
  30%  { transform: translateX(calc(-50% + 2px)) translateY(-13px) rotate(4deg); }
  45%  { transform: translateX(calc(-50% - 2px)) translateY(-8px) rotate(-3deg); }
  60%  { transform: translateX(-50%) translateY(0) rotate(0); }
  70%  { transform: translateX(calc(-50% + 1.5px)) translateY(-2px) rotate(2deg); }
  80%  { transform: translateX(calc(-50% - 1.5px)) translateY(0) rotate(-2deg); }
  90%  { transform: translateX(calc(-50% + 1px)) translateY(-1px) rotate(1deg); }
  100% { transform: translateX(-50%) translateY(0) rotate(0); }
}
.earn-pct { font-size: 13px; color: #bbb; font-weight: 600; }

.earn-track {
  position: relative;
  height: 8px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 6px;
}
.earn-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  border-radius: 6px;
  background: linear-gradient(90deg, #1ea863, var(--reward-green));
  box-shadow: 0 0 12px rgba(42, 209, 126, 0.6);
}
/* floating total badge riding the fill */
.earn-badge {
  position: absolute;
  bottom: 16px;
  left: 0%;
  transform: translateX(-50%);
  background: var(--reward-green);
  color: #00210f;
  font-weight: 800;
  font-size: 13px;
  padding: 3px 9px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
}
.earn-badge::after {
  content: "";
  position: absolute;
  bottom: -5px; left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--reward-green);
}
.earn-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  font-size: 12px;
  color: #999;
}
.earn-foot b { color: var(--reward-green); }

/* scrubber */
.scrub {
  position: relative;
  height: 5px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  margin: 16px 0 12px;
  cursor: pointer;
}
.scrub-buffer {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0%;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 4px;
}
.scrub-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0%;
  background: var(--nf-red);
  border-radius: 4px;
}
.scrub-knob {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 14px; height: 14px;
  background: var(--nf-red);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px rgba(229,9,20,0.8);
}

/* button row */
.btn-row { display: flex; align-items: center; gap: 16px; }
.ctrl-btn {
  background: none; border: none; cursor: pointer;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.ctrl-btn svg { width: 28px; height: 28px; fill: #fff; transition: transform 0.15s; }
.ctrl-btn:hover svg { transform: scale(1.12); }
.time { font-size: 13px; color: #e5e5e5; font-variant-numeric: tabular-nums; }
.time-sep { color: #777; font-size: 13px; }
.spacer { flex: 1; }

/* ============ MODAL ============ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fade 0.4s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  width: min(440px, 90vw);
  background: var(--nf-dark);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 40px 34px;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
  animation: pop 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
@keyframes pop { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-brand {
  color: var(--nf-red);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 1.5px;
  margin-bottom: 18px;
}
.modal-lock { font-size: 44px; margin-bottom: 14px; }
.modal-title { font-size: 22px; font-weight: 700; line-height: 1.3; margin-bottom: 16px; }
.title-eyebrow, .title-ready { display: block; }
.title-eyebrow {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #8a8a8a;
  font-weight: 700;
  margin-bottom: 12px;
}
.title-mask {
  display: inline-block;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 auto 12px;
  padding: 7px clamp(10px, 3vw, 16px);
  font-size: clamp(17px, 5.2vw, 26px);
  font-weight: 800;
  letter-spacing: clamp(2px, 1vw, 5px);
  color: var(--nf-red);
  border: 1px solid rgba(229, 9, 20, 0.45);
  border-radius: 9px;
  background: rgba(229, 9, 20, 0.08);
  white-space: nowrap;
  text-shadow: 0 0 14px rgba(229, 9, 20, 0.4);
}
.title-ready { font-size: 18px; font-weight: 600; color: #fff; }
.modal-sub { font-size: 15px; color: #b3b3b3; line-height: 1.5; margin-bottom: 26px; }
.modal-sub b { color: var(--reward-green); }
.verify-stats {
  margin: 0 0 26px;
  padding: 6px 16px;
  border: 1px solid rgba(42, 209, 126, 0.25);
  border-radius: 10px;
  background: rgba(42, 209, 126, 0.06);
  text-align: left;
}
.vrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.vrow:last-child { border-bottom: none; }
.vlabel { font-size: 13px; color: #b3b3b3; }
.vval {
  font-size: 18px;
  font-weight: 800;
  color: var(--reward-green);
  white-space: nowrap;
}

/* questionnaire */
.quiz-q { text-align: left; margin-bottom: 20px; }
.quiz-question {
  font-size: 14px;
  color: #e5e5e5;
  line-height: 1.45;
  margin-bottom: 11px;
}
.quiz-opts { display: flex; gap: 10px; }
.quiz-opt {
  flex: 1;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: #fff;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.quiz-opt:hover { border-color: #fff; }
.quiz-opt.selected {
  background: var(--reward-green);
  border-color: var(--reward-green);
  color: #00210f;
}
.modal-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* loading step inside the questionnaire */
.quiz-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 30px 0 26px;
}
.quiz-loading .loader-spinner { width: 46px; height: 46px; }
.check-text {
  font-size: 15px;
  color: #cfcfcf;
  letter-spacing: 0.3px;
  min-height: 20px;
  transition: opacity 0.2s;
}

.modal-btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: var(--nf-red);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 15px;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.modal-btn:hover { background: #f6121d; }
.modal-btn:active { transform: scale(0.98); }
.modal-fine { margin-top: 18px; font-size: 11px; color: #666; }

@media (max-width: 600px) {
  .controls { padding: 0 16px 16px; }
  .top-bar { padding: 16px; }
}
