@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap');

:root {
  --bg-deep: #06080F;
  --bg-card: rgba(14, 18, 29, 0.72);
  --bg-card-elevated: rgba(22, 28, 45, 0.82);
  --bg-pill: rgba(255, 255, 255, 0.05);
  
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-highlight: rgba(56, 189, 248, 0.45);
  
  --accent-cyan: #00F0FF;
  --accent-sky: #38BDF8;
  --accent-violet: #8B5CF6;
  --accent-magenta: #EC4899;
  --accent-emerald: #10B981;
  --accent-amber: #F59E0B;
  --accent-rose: #FB7185;
  
  --text-primary: #FFFFFF;
  --text-secondary: #94A3B8;
  --text-tertiary: #64748B;
  
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;
  
  --blur-px: 24px;
  --shadow-glow: 0 0 32px rgba(0, 240, 255, 0.18);
  --shadow-magenta: 0 0 32px rgba(236, 72, 153, 0.18);
  --shadow-card: 0 24px 64px -12px rgba(0, 0, 0, 0.7);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px 80px;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 50% -10%, rgba(0, 240, 255, 0.14) 0%, transparent 60%),
    radial-gradient(circle at 100% 30%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 0% 70%, rgba(236, 72, 153, 0.10) 0%, transparent 55%);
  background-attachment: fixed;
}

/* Luxury Grain & Ambient Glow */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

.container {
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  z-index: 1;
}

/* Floating Luxury Header */
header {
  width: 100%;
  max-width: 580px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0 18px;
  position: relative;
  z-index: 1;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  color: #FFF;
  box-shadow: 0 4px 16px rgba(0, 240, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-name {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(180deg, #FFFFFF 30%, #94A3B8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.live-engine-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  color: #34D399;
  letter-spacing: 0.5px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: pulse-ring 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes pulse-ring {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

/* Sleek Segmented Control Nav */
.segmented-nav {
  display: flex;
  background: rgba(12, 16, 26, 0.85);
  border: 1px solid var(--border-subtle);
  padding: 4px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.nav-item {
  flex: 1;
  padding: 10px 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.nav-item:hover {
  color: #FFF;
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  color: #FFF;
  border: 1px solid var(--border-glass);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Glassmorphic Surfaces */
.glass-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.glass-panel:hover {
  border-color: var(--border-glass);
}

/* Holographic Biometric Viewfinder */
.viewfinder-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.viewfinder-container {
  width: 100%;
  height: 420px;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.9);
}

video#webcam {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

/* Animated Biometric Reticles & Laser Sweep */
.reticle {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--accent-cyan);
  border-style: solid;
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 0 6px var(--accent-cyan));
}
.reticle.tl { top: 20px; left: 20px; border-width: 3px 0 0 3px; border-top-left-radius: 8px; }
.reticle.tr { top: 20px; right: 20px; border-width: 3px 3px 0 0; border-top-right-radius: 8px; }
.reticle.bl { bottom: 20px; left: 20px; border-width: 0 0 3px 3px; border-bottom-left-radius: 8px; }
.reticle.br { bottom: 20px; right: 20px; border-width: 0 3px 3px 0; border-bottom-right-radius: 8px; }

/* Laser Scan Line */
.laser-sweep {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-cyan) 50%, transparent 100%);
  box-shadow: 0 0 16px 2px var(--accent-cyan);
  pointer-events: none;
  z-index: 3;
  animation: laserSweep 3.2s infinite ease-in-out;
}

@keyframes laserSweep {
  0% { top: 5%; opacity: 0.2; }
  50% { top: 92%; opacity: 0.9; }
  100% { top: 5%; opacity: 0.2; }
}

/* Face Alignment Guide Oval */
.face-oval-hud {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 220px;
  height: 290px;
  border-radius: 50%;
  border: 1.5px dashed rgba(255, 255, 255, 0.35);
  pointer-events: none;
  z-index: 2;
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.12);
  transition: all 0.3s ease;
}

/* Telemetry HUD Badges */
.hud-luma-gauge {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(9, 12, 21, 0.85);
  border: 1px solid var(--border-glass);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 4;
  backdrop-filter: blur(12px);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.hud-luma-val {
  color: var(--accent-cyan);
  font-weight: 800;
}

/* Camera Action Bar */
.camera-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.btn-shutter {
  flex: 1;
  padding: 16px 24px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #00F0FF 0%, #38BDF8 50%, #2563EB 100%);
  color: #000;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 240, 255, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.3px;
}

.btn-shutter:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 240, 255, 0.5);
  filter: brightness(1.08);
}

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

.btn-upload-label {
  padding: 15px 18px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: #FFF;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  backdrop-filter: blur(12px);
}

.btn-upload-label:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-highlight);
}

/* Secondary Buttons */
.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: #FFF;
  font-weight: 700;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  cursor: pointer;
  font-size: 13.5px;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-highlight);
}

/* Blurred Teaser Paywall */
.teaser-dossier {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.frosted-curiosity-box {
  width: 100%;
  height: 240px;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0A0D15;
  border: 1px solid var(--border-glass);
}

.blurred-underlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  filter: blur(var(--blur-px));
  transform: scale(1.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0.85;
}

.curiosity-lock-badge {
  position: relative;
  z-index: 2;
  background: rgba(9, 12, 21, 0.9);
  border: 1px solid var(--accent-cyan);
  padding: 12px 22px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 24px rgba(0, 240, 255, 0.2);
  backdrop-filter: blur(16px);
}

.curiosity-lock-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #FFF;
  letter-spacing: 1px;
}

/* Metric Stats Ticker */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  text-align: center;
}

.stat-card {
  background: rgba(14, 18, 29, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-cyan);
}

.stat-label {
  font-size: 10.5px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* High-Converting Shimmering Paywall Box */
.paywall-container {
  background: linear-gradient(145deg, rgba(20, 25, 42, 0.9), rgba(10, 13, 22, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
}

.pricing-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.pricing-amount {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 900;
  color: #FFF;
  letter-spacing: -0.5px;
}

.pricing-subtitle {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.vip-perks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vip-perk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #E2E8F0;
  font-weight: 600;
}

.vip-perk-icon {
  color: var(--accent-cyan);
  font-size: 14px;
}

.btn-checkout-cta {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #EC4899 0%, #8B5CF6 50%, #38BDF8 100%);
  color: #FFF;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(236, 72, 153, 0.35);
  transition: all 0.25s ease;
  letter-spacing: 0.5px;
}

.btn-checkout-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(236, 72, 153, 0.5);
  filter: brightness(1.1);
}

.cancel-guarantee-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--accent-sky);
  font-weight: 700;
  cursor: pointer;
}

.cancel-guarantee-row:hover {
  text-decoration: underline;
}

/* Result Reveal Dossier */
.season-verdict-banner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.season-title-display {
  font-family: 'Outfit', sans-serif;
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -1px;
  margin-top: 2px;
  background: linear-gradient(180deg, #FFFFFF 0%, #CBD5E1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.season-badge-tag {
  display: inline-block;
  padding: 6px 20px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* Interactive Color Drape Studio */
.drape-studio-box {
  background: rgba(14, 18, 29, 0.9);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drape-preview-frame {
  width: 100%;
  height: 240px;
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0A0D14;
  border: 12px solid #0020C2; /* Dynamic seasonal drape color */
  transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.drape-face-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drape-selector-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.btn-drape-toggle {
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.btn-drape-toggle.active {
  background: rgba(255, 255, 255, 0.15);
  color: #FFF;
  border-color: var(--accent-cyan);
}

/* Swatches Grid */
.swatches-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.swatch-pill-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(20, 26, 42, 0.7);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.swatch-pill-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-highlight);
}

.swatch-circle {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.swatch-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.swatch-title {
  font-size: 13.5px;
  font-weight: 700;
}

.swatch-hexcode {
  font-size: 11px;
  color: var(--text-tertiary);
  font-family: 'Space Grotesk', monospace;
}

/* Avoid List */
.avoid-colors-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.avoid-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  padding: 12px 16px;
  border-radius: var(--radius-md);
}

.avoid-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #EF4444;
  flex-shrink: 0;
}

/* Metal Affinity Meter */
.metals-gauge-card {
  background: rgba(14, 18, 29, 0.8);
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.metals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  text-align: center;
}

.metal-cell {
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metal-cell.gold { border-color: rgba(245, 158, 11, 0.45); }
.metal-cell.silver { border-color: rgba(226, 232, 240, 0.45); }
.metal-cell.rose { border-color: rgba(251, 113, 133, 0.45); }

/* Live GTM Dashboard & Stream Ticker */
.gtm-metrics-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  text-align: center;
}

.gtm-metric-card {
  background: rgba(16, 22, 36, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gtm-metric-val {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #FFF;
}

.gtm-metric-val.green { color: #10B981; }
.gtm-metric-val.cyan { color: #00F0FF; }
.gtm-metric-val.amber { color: #F59E0B; }

.gtm-metric-lbl {
  font-size: 10.5px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Real-Time Live Activity Stream */
.live-stream-box {
  background: rgba(10, 13, 22, 0.9);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 220px;
  overflow-y: auto;
}

.live-event-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.event-type-badge {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
}

.event-type-badge.click { background: rgba(56, 189, 248, 0.2); color: #38BDF8; }
.event-type-badge.conversion { background: rgba(16, 185, 129, 0.2); color: #10B981; }
.event-type-badge.surge { background: rgba(139, 92, 246, 0.2); color: #C084FC; }
.event-type-badge.bounty { background: rgba(245, 158, 11, 0.2); color: #F59E0B; }

.event-text {
  flex: 1;
  color: #CBD5E1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-time {
  font-size: 10px;
  color: var(--text-tertiary);
  font-family: 'Space Grotesk', monospace;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 7, 13, 0.88);
  backdrop-filter: blur(16px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  padding: 20px;
}

.modal-content {
  background: #111624;
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  max-width: 440px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.8);
}

.hidden {
  display: none !important;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .swatches-grid {
    grid-template-columns: 1fr;
  }
  .viewfinder-container {
    height: 360px;
  }
}
