/* ─────────────────────────────────────────────
   punchrr.com — Premium Dark UI
   ───────────────────────────────────────────── */

:root {
  --bg: #1A1A1A;
  --bg-card: #242424;
  --bg-input: #2E2E2E;
  --text: #DCDCDC;
  --text-dim: #787878;
  --accent: #00B4FF;
  --green: #00DC00;
  --red: #FF3333;
  --yellow: #FFC800;
  --white: #FFFFFF;
}

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

body {
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: -0.3px;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
}

/* ── Fade-in Animations ── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ── Screen Management ── */
.screen { display: none; }
.screen.active { display: flex; flex-direction: column; }

/* ── Home Screen ── */
#home-screen {
  min-height: 100dvh;
  align-items: center;
  background: var(--bg);
  color: var(--text);
  position: relative;
  overflow: hidden;
}

/* Video hero section — prominent skeleton video */
.home-video-hero {
  position: relative;
  width: 100%;
  height: 45dvh;
  overflow: hidden;
  flex-shrink: 0;
  animation: fadeIn 2s ease 0.75s both;
}

/* Color overlay gradient + subtle noise on video */
.home-video-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, #1B1C1F8F 25%, #1B1C1F00 52%);
}

.home-video-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  mix-blend-mode: overlay;
}

.home-bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.home-video-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(transparent, var(--bg));
  pointer-events: none;
  z-index: 2;
}

.home-video-content {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: left;
  z-index: 3;
  padding: 0 20px;
  animation: fadeInLeft 1s ease 0.55s both;
}

.home-label {
  font-size: 11px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
}

.home-headline {
  font-size: 34px;
  font-weight: 300;
  color: var(--white);
  letter-spacing: -0.8px;
  line-height: 1.1;
}

.home-container {
  width: 100%;
  max-width: 560px;
  text-align: left;
  position: relative;
  z-index: 1;
  padding: 0 20px 40px;
  margin: -40px 0 0 0;
}

/* Desktop-only headline inside content panel (hidden on mobile) */
.home-desktop-headline {
  display: none;
  animation: fadeInLeft 1s ease 0.55s both;
}

.home-social-proof {
  font-size: 14px;
  color: var(--white);
  margin-bottom: 20px;
  padding-top: 12px;
  font-weight: 300;
  animation: fadeInLeft 1s ease 0.55s both;
}

.home-features {
  list-style: none;
  text-align: left;
  max-width: 380px;
  margin: 0 0 28px;
  padding: 0;
  animation: fadeInLeft 1s ease 0.55s both;
}

.home-features li {
  font-size: 14px;
  color: rgba(220, 220, 220, 0.85);
  padding: 5px 0;
  line-height: 1.5;
  font-weight: 300;
}

.home-features li::before {
  content: '\2713  ';
  color: var(--accent);
  font-weight: 500;
}

.home-features li:last-child::before {
  content: '\270F  ';
}

/* Footer note */
.home-footer {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 24px;
  letter-spacing: 0.3px;
}

/* ── Pro Modal (dopamine button) ── */
.pro-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  padding: 20px;
  overflow-y: auto;
}

.pro-modal-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.pro-modal {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 20px 24px 24px;
  width: 100%;
  max-width: 340px;
  max-height: calc(100dvh - 40px);
  display: flex;
  flex-direction: column;
  position: relative;
  text-align: center;
}

.pro-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--bg-input);
  color: var(--white);
  font-size: 20px;
  line-height: 32px;
  text-align: center;
  cursor: pointer;
  z-index: 1;
}

.pro-modal-canvas {
  width: 100%;
  flex: 1;
  min-height: 0;
  border-radius: 12px;
  margin-bottom: 16px;
}

.pro-modal-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 20px;
  flex-shrink: 0;
}

/* Instructions inside pro modal */
.pro-modal-steps {
  text-align: left;
  margin: 0 0 16px;
  padding: 0 0 0 20px;
  list-style: decimal;
  flex-shrink: 0;
}

.pro-modal-steps li {
  font-size: 12px;
  color: var(--green);
  line-height: 1.5;
  padding: 2px 0;
}

.pro-modal-steps li strong {
  color: var(--green);
  font-weight: 600;
}

.pro-modal-cta {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  background: var(--white);
  color: #1A1A1A;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  letter-spacing: -0.2px;
  flex-shrink: 0;
}

.pro-modal-cta:hover {
  opacity: 0.9;
}

.pro-modal-cta:active {
  transform: scale(0.97);
}

/* ── Pro Grid ── */
.video-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 0;
  text-align: left;
  animation: fadeInLeft 1s ease 0.25s both;
}

.video-list-loading {
  text-align: center;
  color: var(--text-dim);
  padding: 32px 0;
  font-size: 14px;
}

.video-list-empty {
  text-align: center;
  color: var(--text-dim);
  padding: 32px 0;
  font-size: 14px;
}

.video-list-no-results {
  text-align: center;
  color: var(--text-dim);
  padding: 32px 0;
  font-size: 14px;
  grid-column: 1 / -1;
}

/* ── Pro Cards ── */

.pro-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #2A2A2A;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.pro-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 30px rgba(0, 180, 255, 0.2);
  border-color: rgba(0, 180, 255, 0.5);
}

.pro-card:active {
  transform: scale(0.97);
}

.pro-card-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  animation: skeletonPulse 3s ease-in-out infinite;
}

.pro-card-active .pro-card-canvas {
  animation: none;
}

@keyframes skeletonPulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

.pro-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 12px;
  background: linear-gradient(transparent 30%, rgba(42, 42, 42, 0.95) 65%);
  pointer-events: none;
}

.pro-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.3;
}

.pro-card-side {
  font-size: 9px;
  color: var(--text-dim);
  margin-top: 1px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 400;
}

.pro-card-tap {
  font-size: 9px;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
  opacity: 0.85;
}

/* Sport Tabs — minimal underline style (root domain only) */
.sport-tabs {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  animation: fadeInLeft 1s ease 0.25s both;
}

.sport-tab {
  padding: 8px 0;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}

.sport-tab:hover {
  color: var(--text);
}

.sport-tab.active {
  color: var(--white);
  border-bottom-color: var(--accent);
  font-weight: 500;
}

/* Section heading above pro grid — CTA */
.pro-section-heading {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #1A1A1A;
  margin-bottom: 20px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: #FFFFFF;
  text-align: center;
  line-height: 1.5;
  animation: fadeInLeft 1s ease 0.25s both;
}

/* ── Capture Screen ── */
#capture-screen {
  position: fixed;
  inset: 0;
  background: #000;
  align-items: center;
  justify-content: center;
}

.camera-container {
  position: relative;
  width: 100%;
  height: 100%;
}

#camera-feed {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);  /* mirror for selfie */
  opacity: 0.5;
}

/* Dark scanner overlay — makes it feel clinical, not a mirror */
.camera-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 0;
}

#ghost-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform: scaleX(-1);  /* mirror to match camera */
  z-index: 1;
}

/* Countdown Overlay */
.countdown-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
  font-size: min(50vw, 50vh, 300px);
  font-weight: 900;
  color: var(--white);
  text-shadow:
    0 0 60px rgba(0, 0, 0, 0.8),
    0 0 120px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.15s;
  -webkit-text-stroke: 2px rgba(0, 0, 0, 0.3);
}

.countdown-overlay.visible {
  opacity: 1;
  animation: countdownPop 0.7s ease-out infinite;
}

@keyframes countdownPop {
  0% { transform: scale(1.15); opacity: 1; }
  50% { transform: scale(1); opacity: 0.85; }
  100% { transform: scale(1.15); opacity: 1; }
}

/* Recording Indicator — pulsing red dot */
.rec-indicator {
  position: absolute;
  top: 14px;
  left: 60px;
  z-index: 20;
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 1.5px;
  pointer-events: none;
}

.rec-indicator::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 8px var(--red), 0 0 20px rgba(255, 51, 51, 0.4);
  animation: recPulse 1s ease-in-out infinite;
}

.rec-indicator.visible {
  display: flex;
}

@keyframes recPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Lock-in Flash — white vignette when alignment confirmed */
.lock-in-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  transition: opacity 0.3s ease-out;
  background: radial-gradient(ellipse at center,
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0.08) 40%,
    transparent 70%);
}

.lock-in-flash.visible {
  opacity: 1;
  transition: opacity 0.05s ease-in;
}

/* Back Button (capture screen) */
.back-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 20;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: var(--white);
  font-size: 24px;
  line-height: 40px;
  text-align: center;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background 0.2s;
}

.back-btn:hover {
  background: rgba(0, 0, 0, 0.65);
}

.back-btn:active {
  opacity: 0.7;
}

.capture-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  text-align: center;
  z-index: 10;
}

#alignment-status {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  min-height: 28px;
}

.alignment-bar {
  width: 80%;
  max-width: 300px;
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  margin: 0 auto 16px;
  overflow: hidden;
}

#alignment-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.1s linear;
}

/* ── Pro Swing Preview (capture screen corner) ── */
.pro-preview {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 20;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  overflow: hidden;
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s;
}

.pro-preview.collapsed {
  width: 80px;
  height: 110px;
}

.pro-preview.expanded {
  width: 180px;
  height: 260px;
  border-color: var(--accent);
}

.pro-preview-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.pro-preview-label {
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.6);
  pointer-events: none;
}

.pro-preview.expanded .pro-preview-label {
  font-size: 11px;
  bottom: 6px;
}

/* "Only perform one motion" note next to pro preview */
.pro-preview-note {
  position: absolute;
  top: 130px;
  right: 12px;
  z-index: 20;
  font-size: 10px;
  font-weight: 500;
  color: var(--red);
  letter-spacing: 0.3px;
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-radius: 6px;
  pointer-events: none;
  max-width: 90px;
  text-align: center;
  line-height: 1.3;
}

.upload-video-btn {
  display: block;
  margin: 12px auto 0;
  padding: 10px 24px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.upload-video-btn:hover {
  background: rgba(0, 180, 255, 0.1);
}

.upload-video-btn:active {
  opacity: 0.7;
}

/* ── Loading Screen ── */
#loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  align-items: center;
  justify-content: center;
  text-align: center;
}

.loading-content { padding: 40px 20px; }

.loading-score {
  font-size: 72px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.loading-label {
  font-size: 18px;
  color: var(--text-dim);
  margin-bottom: 32px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--bg-input);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

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

/* Loading Skeleton Canvas (replaces spinner when skeleton data available) */
.loading-skeleton-canvas {
  display: none;
  margin: 16px auto 0;
  border-radius: 12px;
}

/* ── Results Screen — Minimal Clinical ── */
#results-screen {
  min-height: 100dvh;
  align-items: center;
  padding: 16px 16px 32px;
}

.results-container {
  width: 100%;
  max-width: 500px;
}

/* Score Section — compact */
.score-section {
  text-align: center;
  padding: 20px 0 16px;
}

.score-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--text-dim);
  margin-bottom: 6px;
  font-weight: 500;
}

.score-value {
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -2px;
}

.score-max {
  font-size: 18px;
  color: var(--text-dim);
  font-weight: 400;
  margin-left: 2px;
}

/* Confidence Badge */
.confidence-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--text-dim);
}

.confidence-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
}

.confidence-badge.high .confidence-dot { background: #34d399; }
.confidence-badge.high { color: #34d399; }

.confidence-badge.medium .confidence-dot { background: #fbbf24; }
.confidence-badge.medium { color: #fbbf24; }

.confidence-badge.low .confidence-dot { background: #f87171; }
.confidence-badge.low { color: #f87171; }

/* Summary line */
.summary-line {
  text-align: center;
  font-size: 0.9rem;
  color: var(--white);
  padding: 0 16px 12px;
  line-height: 1.4;
}

/* Performance Metrics — clinical bar style */
.metrics-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.metric-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.metric-bar-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  width: 76px;
  flex-shrink: 0;
}

.metric-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.metric-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: var(--accent);
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.metric-bar-value {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  width: 40px;
  text-align: right;
  flex-shrink: 0;
}

.metric-bar-speed {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  margin-left: auto;
}

/* Collapsible breakdown details */
.results-details {
  margin-top: 20px;
}

.results-details-toggle {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  cursor: pointer;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  list-style: none;
}

.results-details-toggle::-webkit-details-marker {
  display: none;
}

.results-details-toggle::after {
  content: ' +';
  font-weight: 400;
}

.results-details[open] .results-details-toggle::after {
  content: ' \2212';
}

/* Joint Breakdown */
.breakdown-card {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 16px;
  margin-top: 12px;
  margin-bottom: 12px;
}

.breakdown-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  margin-bottom: 12px;
  font-weight: 500;
}

.breakdown-header,
.breakdown-row {
  display: grid;
  grid-template-columns: 1fr 50px 50px 44px 50px;
  align-items: center;
  padding: 6px 0;
  gap: 4px;
}

.breakdown-header {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
  margin-bottom: 2px;
}

.breakdown-row {
  font-size: 13px;
}

.joint-name {
  font-weight: 600;
  font-size: 12px;
}

.joint-you, .joint-pro, .joint-diff {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

.joint-you { color: var(--accent); }
.joint-pro { color: var(--green); }

.verdict {
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  padding: 2px 6px;
  border-radius: 3px;
}

.verdict.pass {
  color: var(--green);
  background: rgba(0, 220, 0, 0.08);
}

.verdict.fail {
  color: var(--red);
  background: rgba(255, 51, 51, 0.08);
}

/* Coaching Tips */
.tips-card {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 0;
}

.tips-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  margin-bottom: 10px;
  font-weight: 500;
}

.tip {
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  line-height: 1.4;
}

.tip:last-child { border-bottom: none; }

.tip::before {
  content: '\2192';
  margin-right: 8px;
  color: var(--accent);
}

/* Video Options Toggle */
.video-options {
  margin-bottom: 12px;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: 10px;
}

.toggle-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ── Generate Gate ── */
.email-gate {
  text-align: center;
  margin: 12px 0;
}

.email-gate.hidden { display: none; }

.generate-btn {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: var(--white);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.generate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.generate-btn:hover:not(:disabled) {
  opacity: 0.85;
}

/* ── Waitlist ── */
.waitlist-section {
  margin-top: 24px;
  padding: 16px;
  border-top: 1px solid #333;
  text-align: center;
}

.waitlist-copy {
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 12px;
}

.waitlist-row {
  display: flex;
  gap: 8px;
}

#waitlist-email {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #444;
  border-radius: 10px;
  background: var(--bg-input);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

#waitlist-email:focus {
  border-color: var(--accent);
}

#waitlist-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}

#waitlist-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

#waitlist-btn:not(:disabled):hover {
  opacity: 0.85;
}

/* ── Video Player ── */
.video-card {
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
  background: #000;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Placeholder shown before email unlock triggers render */
.video-placeholder {
  aspect-ratio: 9 / 16;
  max-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('/placeholder-preview.jpg') center / cover no-repeat, #111;
}

.video-placeholder-text {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.video-card video {
  transition: filter 0.5s ease;
}

.video-rendering-status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.9rem;
  pointer-events: none;
}

.video-rendering-status.hidden { display: none; }

#result-video {
  width: 100%;
  display: block;
}

/* Results action row (Share + Download) */
.results-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.results-actions .share-btn {
  flex: 1;
  margin-bottom: 0;
}

/* Try Again Button */
.try-again-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.try-again-btn:hover { opacity: 0.85; }
.try-again-btn:active { opacity: 0.7; }

/* ── Share Button ── */
.share-btn {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: transparent;
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 12px;
}

.share-btn:hover { background: rgba(0, 180, 255, 0.2); }
.share-btn:active { opacity: 0.7; }
.share-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Share Modal ── */
.share-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  padding: 20px;
}

.share-modal-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.share-modal {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 400px;
  position: relative;
}

.share-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--bg-input);
  color: var(--white);
  font-size: 20px;
  line-height: 32px;
  text-align: center;
  cursor: pointer;
}

.share-preview {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 16px;
}

.share-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.share-download-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.share-download-btn:hover { opacity: 0.85; }
.share-download-btn:active { opacity: 0.7; }

.share-link-row {
  display: flex;
  gap: 8px;
}

.share-link-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--bg-input);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  outline: none;
}

.copy-link-btn {
  padding: 10px 16px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.copy-link-btn:hover { background: rgba(0, 180, 255, 0.1); }
.copy-link-btn:active { opacity: 0.7; }

/* ── Score Color Utilities ── */
.score-green { color: var(--green); }
.score-yellow { color: var(--yellow); }
.score-red { color: var(--red); }

/* ── Responsive Breakpoints ── */

/* Tablet (768px+) */
@media (min-width: 768px) {
  .home-video-hero {
    height: 50dvh;
  }
  .home-container {
    max-width: 720px;
  }
  .home-headline {
    font-size: 36px;
  }
  .home-social-proof {
    font-size: 15px;
  }
  .home-features li {
    font-size: 14px;
  }
  .video-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
  .results-container {
    max-width: 600px;
  }
}

/* Desktop (1024px+) — side-by-side layout: content LEFT, video RIGHT */
@media (min-width: 1024px) {
  #home-screen {
    flex-direction: row;
  }
  .home-video-hero {
    width: 50%;
    height: 100dvh;
    flex-shrink: 0;
    order: 2;
  }
  .home-video-content {
    display: none;
  }
  .home-container {
    width: 50%;
    max-width: none;
    margin: 0;
    padding: 48px 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    max-height: 100dvh;
    order: 1;
  }
  .home-desktop-headline {
    display: block;
    margin-bottom: 8px;
  }
  .home-desktop-headline .home-headline {
    font-size: 42px;
  }
  .video-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

/* Small phones (360px and below) */
@media (max-width: 360px) {
  .home-video-hero {
    height: 38dvh;
  }
  .home-headline {
    font-size: 28px;
  }
  .home-features li {
    font-size: 12.5px;
  }
  .home-container {
    padding: 0 14px 32px;
  }
  .pro-section-heading {
    font-size: 13px;
    padding: 10px 16px;
  }
}

/* ── Error Toast ── */
.error-toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--red);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.error-toast.visible {
  opacity: 1;
  pointer-events: auto;
}
