:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.85);
  --border-color: #1f293d;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --accent-blue: #2563eb;
  --accent-blue-hover: #1d4ed8;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-emerald-hover: #059669;
  --accent-amber: #f59e0b;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html, body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Ambient glows */
.glow-orb-1 {
  position: absolute;
  top: -120px;
  left: 20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

.glow-orb-2 {
  position: absolute;
  top: 300px;
  right: 15%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.10) 0%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* Main Container */
.vsl-container {
  width: 100%;
  max-width: 920px;
  padding: 32px 16px 60px 16px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.3);
  color: #60a5fa;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 9999px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-pulse {
  width: 8px;
  height: 8px;
  background-color: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 10px #ef4444;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Headline */
.headline {
  font-size: clamp(20px, 4vw, 36px);
  font-weight: 800;
  text-align: center;
  line-height: 1.25;
  margin-bottom: 12px;
  max-width: 820px;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subheadline {
  font-size: clamp(14px, 2.5vw, 17px);
  color: var(--text-muted);
  text-align: center;
  max-width: 680px;
  line-height: 1.5;
  margin-bottom: 24px;
}

/* Video Wrapper */
.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.8), 0 0 0 1px var(--border-color);
}

.video-element {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* YouTube Container: Slightly scaled & offset to crop YouTube title bar & watermark */
#yt-player-container {
  position: absolute;
  top: -12%;
  left: -6%;
  width: 112%;
  height: 124%;
  pointer-events: none !important;
}

#yt-player-container iframe,
iframe#yt-player-container,
.video-wrapper iframe {
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  display: block;
  pointer-events: none !important;
}

/* Play Shield: Catches all user clicks/taps to toggle video without YouTube redirection */
.video-shield {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 10;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

/* Big Play Button Overlay */
.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 26px;
  box-shadow: 0 0 30px rgba(37, 99, 235, 0.6);
  pointer-events: none;
  transition: transform 0.2s ease, background 0.2s ease;
  z-index: 15;
}

.video-wrapper:hover .video-play-btn {
  transform: translate(-50%, -50%) scale(1.08);
  background: #2563eb;
}

/* Captions Overlay & Subtitles */
.vsl-captions-overlay {
  display: none !important;
}

.vsl-captions-overlay.active {
  display: none !important;
}

.vsl-captions-text {
  display: inline-block;
  background: rgba(4, 5, 8, 0.88);
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(14px, 2.4vw, 20px);
  font-weight: 700;
  line-height: 1.4;
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
  letter-spacing: 0.01em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* Captions Toggle Button */
.vsl-cc-toggle {
  display: none !important;
}

.vsl-cc-toggle:hover {
  background: rgba(30, 41, 59, 0.95);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

.vsl-cc-toggle.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.55);
}

/* Native WebVTT Styling fallback */
video::cue {
  background: rgba(4, 5, 8, 0.88);
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.4;
  border-radius: 6px;
}

.video-play-btn.hidden {
  display: none;
}

/* ==========================================================================
   VIDEO CONTROLS BAR (-10s / +10s, Scrubber, Play/Pause, Mute, Fullscreen)
   ========================================================================== */
.vsl-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 16px 16px 12px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.45) 55%, transparent 100%);
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  user-select: none;
  -webkit-user-select: none;
}

.video-wrapper:hover .vsl-controls,
.video-wrapper.controls-visible .vsl-controls,
.video-wrapper.is-paused .vsl-controls {
  opacity: 1;
  pointer-events: auto;
}

/* Scrubber / Progress Bar */
.vsl-progress-container {
  position: relative;
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 9999px;
  cursor: pointer;
  touch-action: none;
  transition: height 0.15s ease;
}

.vsl-progress-container:hover {
  height: 8px;
}

.vsl-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  border-radius: 9999px;
  pointer-events: none;
}

.vsl-progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.9);
  transition: transform 0.15s ease;
  pointer-events: none;
}

.vsl-progress-container:hover .vsl-progress-thumb {
  transform: translate(-50%, -50%) scale(1);
}

/* Controls Row */
.vsl-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.vsl-controls-left,
.vsl-controls-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vsl-ctrl-btn {
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 6px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.vsl-ctrl-btn:hover {
  color: #38bdf8;
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.08);
}

.vsl-ctrl-btn:active {
  transform: scale(0.95);
}

.vsl-skip-btn {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.vsl-time-display {
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.02em;
  padding-left: 4px;
  display: inline-flex;
  align-items: center;
}

.vsl-time-sep {
  color: #64748b;
  margin: 0 4px;
}

/* Seek Toast / Quick Feedback Indicator */
.vsl-seek-toast {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 9999px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.3);
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vsl-seek-toast.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Fullscreen Mode Adjustments */
.video-wrapper.is-fullscreen {
  border-radius: 0 !important;
}

.video-wrapper.is-fullscreen .vsl-controls {
  padding: 20px 28px 16px 28px;
}

@media (max-width: 640px) {
  .vsl-controls {
    padding: 8px 10px;
    gap: 6px;
  }
  .vsl-ctrl-btn {
    padding: 6px;
    min-width: 36px;
    min-height: 36px;
  }
  .vsl-time-display {
    font-size: 11px;
  }
}


/* FULL-SCREEN LEAD GATE MODAL (100% Mobile Optimized) */
.lead-gate-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: rgba(6, 10, 18, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 24px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lead-gate-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.gate-card {
  margin: auto 0;
  width: 100%;
  max-width: 420px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  padding: 28px 22px;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.9);
  text-align: center;
  transform: translateY(14px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.lead-gate-overlay.active .gate-card {
  transform: translateY(0) scale(1);
}

.gate-icon {
  font-size: 30px;
  margin-bottom: 8px;
}

.gate-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #fff;
  line-height: 1.3;
}

.gate-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.opt-label {
  font-size: 11px;
  font-weight: 400;
  color: #64748b;
  text-transform: none;
  letter-spacing: normal;
}

.form-input {
  width: 100%;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 12px 14px;
  color: #fff;
  font-size: 16px; /* 16px strictly prevents iOS Safari auto-zoom on tap */
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.form-input.invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25) !important;
}

.field-hint {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.field-error {
  display: none;
  font-size: 11px;
  color: #ef4444;
  margin-top: 2px;
  font-weight: 500;
}

.form-alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  text-align: center;
}

.btn-unlock {
  width: 100%;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
  transition: transform 0.15s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.btn-unlock:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-1px);
}

.btn-unlock:active {
  transform: translateY(1px);
}

.privacy-notice {
  font-size: 11px;
  color: #64748b;
  margin-top: 14px;
  line-height: 1.4;
  text-align: center;
}

/* Timed CTA Section (Strictly hidden until 80% video completed) */
.cta-section {
  width: 100%;
  margin-top: 28px;
  display: none;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
  flex-direction: column;
  align-items: center;
}

.cta-section.revealed {
  display: flex !important;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.btn-primary-cta {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-size: clamp(15px, 3.5vw, 19px);
  font-weight: 800;
  text-decoration: none;
  padding: 16px 28px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 100%;
  transition: transform 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(16, 185, 129, 0.6);
}

.cta-subtext {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
  text-align: center;
}

/* Footer */
footer {
  margin-top: auto;
  padding: 24px 16px;
  font-size: 12px;
  color: #4b5563;
  text-align: center;
  width: 100%;
  border-top: 1px solid #1f2937;
}

footer a {
  color: #6b7280;
  text-decoration: none;
}

footer a:hover {
  color: #9ca3af;
}

/* Mobile Media Queries */
@media (max-width: 600px) {
  .vsl-container {
    padding: 20px 12px 40px 12px;
  }
  .badge {
    font-size: 11px;
    padding: 4px 10px;
    margin-bottom: 12px;
  }
  .headline {
    font-size: 21px;
    margin-bottom: 18px;
  }
  .video-play-btn {
    width: 54px;
    height: 54px;
    font-size: 20px;
  }
  .gate-card {
    padding: 20px 16px;
    border-radius: 14px;
  }
  .gate-title {
    font-size: 18px;
  }
  .gate-subtitle {
    font-size: 13px;
    margin-bottom: 16px;
  }
  .btn-unlock {
    padding: 13px;
    font-size: 14px;
  }
  .btn-primary-cta {
    width: 100%;
    padding: 15px 16px;
    font-size: 15px;
  }
}
