/* ─────────────────────────────────────────────────────────────────────────────
   styles.css — Jumping Jack
   Full cyberpunk dark-mode UI.
   All HUD elements use backdrop-filter glass + neon accent colors so they read
   clearly over both the 3D canvas and the PiP webcam.
───────────────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;800&display=swap');

/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: #000;
  color: #fff;
  font-family: 'Outfit', -apple-system, system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* ── Brand Header & Social Bar ────────────────────────────────────────── */
#brand-header {
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px;
  z-index: 100;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;
}

#brand-header * {
  pointer-events: auto;
}

.brand-logo-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

h1 {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin: 0;
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 50%, #ff2e9a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(0, 242, 254, 0.45));
  white-space: nowrap;
}

.brand-badge {
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.4);
  color: #00f2fe;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 4px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

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

.social-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(18, 16, 28, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  color: #e2e8f0;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.social-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.25s ease;
}

.social-link:hover {
  transform: translateY(-2px);
  color: #ffffff;
  border-color: rgba(0, 242, 254, 0.5);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.25);
}

.social-link:hover .social-icon {
  transform: scale(1.15);
}

.social-link.tiktok:hover { border-color: #ff0050; box-shadow: 0 0 16px rgba(255, 0, 80, 0.4); }
.social-link.youtube:hover { border-color: #ff0000; box-shadow: 0 0 16px rgba(255, 0, 0, 0.4); }
.social-link.instagram:hover { border-color: #e1306c; box-shadow: 0 0 16px rgba(225, 48, 108, 0.4); }
.social-link.x-twitter:hover { border-color: #1da1f2; box-shadow: 0 0 16px rgba(29, 161, 242, 0.4); }

/* ── Stage / canvas ──────────────────────────────────────────────────────── */
#stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: #000;
}

#game-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #08060f;
  display: block;
}

/* ── Webcam (full-screen during calibration, PiP during play) ─────────────── */
#webcam {
  position: absolute;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  object-fit: cover;
  transform: scaleX(-1); /* Mirror so it feels like looking in a mirror */
  z-index: 10;
  transition: all 0.55s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#webcam.pip {
  top: auto; left: auto;
  bottom: 70px; right: 24px;
  width: 220px; height: auto;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(36, 245, 236, 0.2);
  z-index: 80;
}

#webcam.good { border-color: rgba(46, 204, 113, 0.6); box-shadow: 0 0 20px rgba(46, 204, 113, 0.25); }
#webcam.bad  { border-color: rgba(231, 76,  60, 0.6); box-shadow: 0 0 20px rgba(231, 76, 60, 0.3); }

/* ── Calibration silhouette ──────────────────────────────────────────────── */
#silhouette-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 15;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0.7;
}

#silhouette-overlay svg {
  height: 85vh;
  max-width: 100vw;
  fill: none;
  stroke: #00f2fe;
  stroke-width: 2;
  stroke-dasharray: 8 5;
  filter: drop-shadow(0 0 14px #00f2fe);
  transform: translateY(24px);
}

/* ── Tracking status overlay (calibration screen) ────────────────────────── */
#status {
  position: absolute;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 90;
  pointer-events: none;
  text-align: center;
  padding: 40px;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

#status-text {
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  text-transform: uppercase;
  text-shadow: 0 4px 20px rgba(0,0,0,0.7);
  margin-top: 28px;
}

/* Tracking quality dot */
.tracking-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #333;
  display: inline-block;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
  transition: background 0.3s, box-shadow 0.3s;
}
.tracking-dot.good { background: #2ecc71; box-shadow: 0 0 14px #2ecc71; }
.tracking-dot.bad  { background: #e74c3c; box-shadow: 0 0 14px #e74c3c; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
button {
  font-family: 'Outfit', sans-serif;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
}

/* Start button */
#start-btn {
  font-size: clamp(18px, 2.2vw, 30px);
  padding: 16px 52px;
  border-radius: 99px;
  border: none;
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  color: #050315;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: absolute;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.15),
    0 10px 30px rgba(0, 242, 254, 0.4),
    inset 0 2px 0 rgba(255,255,255,0.3);
}

#start-btn:hover {
  transform: translateX(-50%) translateY(-5px) scale(1.03);
  box-shadow: 0 18px 40px rgba(0, 242, 254, 0.55), inset 0 2px 0 rgba(255,255,255,0.3);
}

#start-btn:active  { transform: translateX(-50%) scale(0.97); }
#start-btn:disabled {
  background: #333;
  color: #666;
  cursor: not-allowed;
  box-shadow: none;
  transform: translateX(-50%);
}

/* Primary action buttons (inside overlays) */
.primary-btn {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  padding: 14px 36px;
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  color: #050315;
  border: none;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 8px 28px rgba(79, 172, 254, 0.45);
  transition: all 0.2s;
}

.primary-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 14px 36px rgba(79, 172, 254, 0.65);
}

.primary-btn:active { transform: scale(0.97); }

/* Secondary glass buttons */
.secondary-btn {
  font-size: 14px;
  font-weight: 600;
  padding: 10px 22px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 99px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  letter-spacing: 0.5px;
}
.secondary-btn:hover { background: rgba(255, 255, 255, 0.18); }

/* Controls bar (top-left) */
#controls {
  position: absolute;
  top: 24px; left: 24px;
  z-index: 40;
  display: flex;
  gap: 10px;
}

/* ── Score HUD (top-right) ────────────────────────────────────────────────── */
#score-hud {
  position: absolute;
  top: 24px; right: 24px;
  font-size: clamp(16px, 1.8vw, 22px);
  font-weight: 800;
  color: #fff;
  z-index: 40;
  background: rgba(10, 8, 20, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 26px;
  border-radius: 99px;
  box-shadow: 0 6px 28px rgba(0,0,0,0.4), 0 0 0 1px rgba(0, 242, 254, 0.1);
  letter-spacing: 1px;
  white-space: nowrap;
}

/* ── Combo display (below score HUD) ──────────────────────────────────────── */
#combo-display {
  position: absolute;
  top: 82px; right: 24px;
  font-size: 22px;
  font-weight: 800;
  z-index: 40;
  background: rgba(10, 8, 20, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid currentColor;
  padding: 8px 22px;
  border-radius: 99px;
  box-shadow: 0 0 20px currentColor;
  letter-spacing: 3px;
  text-transform: uppercase;
  pointer-events: none;
  color: #00f2fe;
  opacity: 0;
  transform: scale(0.8) translateX(10px);
  transition:
    opacity 0.25s,
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#combo-display.show {
  opacity: 1;
  transform: scale(1) translateX(0);
}

/* ── Gesture badge (JUMP! / DUCK!) ────────────────────────────────────────── */
#gesture-badge {
  position: absolute;
  top: 100px; left: 50%;
  transform: translateX(-50%) scale(0);
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 3px solid #fff;
  border-radius: 99px;
  padding: 12px 36px;
  font-size: 26px;
  font-weight: 800;
  text-transform: uppercase;
  color: white;
  z-index: 40;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 28px rgba(0,0,0,0.4);
  pointer-events: none;
}
#gesture-badge.show        { transform: translateX(-50%) scale(1); }
#gesture-badge.jump        { border-color: #00f2fe; color: #00f2fe; box-shadow: 0 8px 28px rgba(0, 242, 254, 0.35); }
#gesture-badge.duck        { border-color: #2ecc71; color: #2ecc71; box-shadow: 0 8px 28px rgba(46, 204, 113, 0.35); }
#gesture-badge.left,
#gesture-badge.right       { border-color: #9b59b6; color: #9b59b6; box-shadow: 0 8px 28px rgba(155, 89, 182, 0.35); }

/* ── Milestone distance flash (centre screen) ─────────────────────────────── */
#milestone-flash {
  position: absolute;
  top: 38%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 800;
  background: linear-gradient(135deg, #00f2fe 0%, #ffffff 50%, #ff2e9a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(0, 242, 254, 0.8));
  letter-spacing: 8px;
  text-transform: uppercase;
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transition: opacity 0.5s ease;
  animation: none;
}
#milestone-flash.show {
  opacity: 1;
  animation: milestone-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes milestone-pop {
  0%   { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  60%  { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1);   opacity: 1; }
}

/* ── Lane warning bars (bottom centre) ───────────────────────────────────── */
#lane-warnings {
  position: absolute;
  bottom: 18px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 38;
}

.lane-warn {
  width: 88px; height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.07);
  transition: background 0.15s, box-shadow 0.15s;
}

.lane-warn.warn {
  background: rgba(36, 245, 236, 0.55);
  box-shadow: 0 0 10px rgba(36, 245, 236, 0.5);
}

.lane-warn.danger {
  background: #ff2e9a;
  box-shadow: 0 0 18px #ff2e9a;
  animation: danger-pulse 0.22s ease-in-out infinite alternate;
}

@keyframes danger-pulse {
  from { opacity: 0.55; }
  to   { opacity: 1; }
}

/* ── Speed vignette (edge glow scales with velocity) ─────────────────────── */
#speed-vignette {
  position: absolute;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 5;
  background: radial-gradient(
    ellipse at center,
    transparent 38%,
    rgba(36, 245, 236, 0.06) 65%,
    rgba(36, 245, 236, 0.22) 100%
  );
  opacity: 0;
  /* No transition — updated every frame for responsiveness */
}

/* ── Glass overlay base (shared by #status, crash, pause) ────────────────── */
#status,
#crash-overlay,
#pause-overlay {
  background: rgba(6, 4, 18, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.5);
}

/* ── Crash & pause overlays ─────────────────────────────────────────────── */
#crash-overlay,
#pause-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  color: white;
}

#crash-overlay.show,
#pause-overlay.show { display: flex; }

#crash-overlay h2,
#pause-overlay h2 {
  font-size: clamp(56px, 8vw, 96px);
  font-weight: 800;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 5px;
}

#crash-overlay h2 {
  background: linear-gradient(135deg, #ff0844 0%, #ffb199 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 24px rgba(255, 8, 68, 0.5));
}

#pause-overlay h2 {
  background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#pause-overlay p {
  font-size: 18px;
  font-weight: 400;
  color: rgba(255,255,255,0.5);
  margin: 16px 0 0;
}

/* Crash stats row */
#crash-stats {
  display: flex;
  gap: 48px;
  margin: 28px 0 8px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.stat-value {
  font-size: 38px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
}

/* New personal-best badge */
#new-best-badge {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 18px rgba(255, 215, 0, 0.65));
  margin-bottom: 12px;
  animation: bounce-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes bounce-in {
  from { transform: scale(0.3); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.crash-buttons {
  display: flex;
  gap: 14px;
  margin-top: 24px;
}

.gesture-hint {
  margin-top: 18px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.65);
  text-align: center;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.gesture-hint strong {
  color: #24f5ec;
  font-weight: 700;
}

.gesture-hint-sub {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.4);
  display: block;
  margin-top: 2px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Crash Overlay Social Box */
.social-crash-callout {
  margin-top: 24px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.social-callout-title {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

.social-callout-title strong {
  color: #00f2fe;
}

.crash-social-links {
  display: flex;
  gap: 12px;
}

.crash-social-links a {
  color: #a0aec0;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  transition: all 0.2s ease;
}

.crash-social-links a:hover {
  color: #fff;
  background: rgba(0, 242, 254, 0.2);
  border-color: rgba(0, 242, 254, 0.4);
}

/* ── Countdown overlay ───────────────────────────────────────────────────── */
#countdown-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 110;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#countdown-overlay.show { display: flex; }

#countdown-text {
  font-size: clamp(100px, 20vw, 180px);
  font-weight: 800;
  margin: 0;
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 40px rgba(0, 242, 254, 0.7));
  animation: countdown-pulse 1s ease-in-out infinite;
}

@keyframes countdown-pulse {
  0%, 100% { transform: scale(0.82); opacity: 0.6; }
  50%       { transform: scale(1.1);  opacity: 1; }
}

/* ── Hidden file input ───────────────────────────────────────────────────── */
#replay-input { display: none; }

/* ── Side Ad Skyscraper Banners (Direct Ad Sales) ────────────────────────── */
.side-ad-banner {
  position: fixed;
  top: 100px;
  width: 160px;
  height: calc(100vh - 180px);
  z-index: 95;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;
}

body.calibration-active .side-ad-banner,
body.game-active .side-ad-banner,
body.calibration-active #brand-header,
body.game-active #brand-header {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-15px) scale(0.95);
  visibility: hidden;
}

.side-ad-banner.ad-left {
  left: 20px;
}

.side-ad-banner.ad-right {
  right: 20px;
}

.ad-container {
  width: 100%;
  height: 100%;
  background: rgba(12, 10, 24, 0.85);
  border: 1px dashed rgba(0, 242, 254, 0.35);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(0, 242, 254, 0.05);
  transition: all 0.3s ease;
}

.ad-container:hover {
  border-color: rgba(0, 242, 254, 0.8);
  box-shadow: 0 8px 32px rgba(0, 242, 254, 0.25), inset 0 0 20px rgba(0, 242, 254, 0.1);
}

.ad-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #00f2fe;
  background: rgba(0, 242, 254, 0.15);
  padding: 3px 8px;
  border-radius: 4px;
}

.ad-content h3 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  margin: 12px 0 6px 0;
  color: #fff;
}

.ad-content p {
  font-size: 12px;
  color: #a0aec0;
  line-height: 1.4;
  margin: 0 0 14px 0;
}

.ad-contact-btn {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #000;
  background: #00f2fe;
  padding: 8px 12px;
  border-radius: 20px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.ad-contact-btn:hover {
  transform: scale(1.05);
  background: #4facfe;
}

@media (max-width: 1250px) {
  .side-ad-banner {
    display: none; /* Hide skyscrapers on screens under 1250px so canvas remains focused */
  }
}

/* ── Save Progress Callout & Auth Modal ────────────────────────────────────── */
.save-progress-box {
  margin: 12px 0;
  width: 100%;
}

.sync-btn {
  width: 100%;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  color: #00f2fe;
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.4);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.sync-btn:hover {
  background: rgba(0, 242, 254, 0.25);
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.35);
  transform: translateY(-1px);
}

.auth-modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-modal-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #0f0c1b;
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 242, 254, 0.15);
  text-align: center;
}

.auth-close-btn {
  position: absolute;
  top: 14px; right: 18px;
  background: transparent;
  border: none;
  color: #a0aec0;
  font-size: 24px;
  cursor: pointer;
}

.auth-close-btn:hover { color: #fff; }

.auth-header h3 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #00f2fe;
  margin: 0 0 10px 0;
}

.auth-header p {
  font-size: 13px;
  color: #cbd5e0;
  line-height: 1.5;
  margin-bottom: 24px;
}

#magic-link-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#auth-email-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease;
}

#auth-email-input:focus {
  border-color: #00f2fe;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.3);
}

.auth-primary-btn {
  padding: 14px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  color: #000;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.4);
}

.auth-msg {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

.auth-msg.success {
  background: rgba(46, 204, 113, 0.15);
  border: 1px solid rgba(46, 204, 113, 0.4);
  color: #2ecc71;
}

.auth-msg.error {
  background: rgba(231, 76, 60, 0.15);
  border: 1px solid rgba(231, 76, 60, 0.4);
  color: #e74c3c;
}

.auth-footer-note {
  margin-top: 20px;
  font-size: 11px;
  color: #718096;
}

/* ── Camera Off Top Pill ─────────────────────────────────────────────────── */
.camera-off-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(20, 18, 30, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.camera-off-pill .pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e74c3c;
  box-shadow: 0 0 8px rgba(231, 76, 60, 0.8);
  animation: camera-off-pulse 2s infinite ease-in-out;
}

@keyframes camera-off-pulse {
  0%, 100% { opacity: 0.6; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

.camera-off-pill.hidden {
  display: none !important;
}

/* ── Camera Permission Heads-Up Modal ────────────────────────────────────── */
.camera-modal-card {
  max-width: 480px;
}

.camera-modal-icon {
  font-size: 44px;
  margin-bottom: 6px;
  filter: drop-shadow(0 0 16px rgba(0, 242, 254, 0.4));
}

.camera-info-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0 24px 0;
  text-align: left;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 16px;
  border-radius: 14px;
  transition: border-color 0.2s ease;
}

.info-item:hover {
  border-color: rgba(0, 242, 254, 0.3);
}

.info-icon {
  font-size: 22px;
  line-height: 1;
}

.info-text strong {
  display: block;
  font-size: 14px;
  color: #fff;
  margin-bottom: 3px;
}

.info-text span {
  font-size: 12px;
  color: #a0aec0;
  line-height: 1.45;
}

.camera-confirm-btn {
  width: 100%;
  font-size: 16px;
  padding: 15px 20px;
  letter-spacing: 1px;
}


