/* ============================================
   BABZ Landing Page — Design System
   "Você consegue guardar um segredo?"
   ============================================ */

/* ---- Design Tokens ---- */
:root {
  /* Colors */
  --color-bg: #0A0A0A;
  --color-bg-secondary: #111111;
  --color-surface: #1A1A1A;
  --color-surface-light: #222222;
  --color-gold: #F5C518;
  --color-gold-light: #FFD700;
  --color-gold-dark: #D4A017;
  --color-gold-glow: rgba(245, 197, 24, 0.25);
  --color-gold-glow-soft: rgba(245, 197, 24, 0.08);
  --color-text: #FAFAFA;
  --color-text-muted: #888888;
  --color-text-dim: #555555;
  --color-danger: #FF4757;
  --color-success: #2ED573;
  --color-live: #FF3B3B;

  /* Typography */
  --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 30px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index layers */
  --z-particles: 1;
  --z-content: 10;
  --z-phone: 20;
  --z-overlay: 100;
  --z-victory: 200;
}

/* ---- CSS Reset ---- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  background: var(--color-bg);
  color: var(--color-text);
  overflow: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

button {
  font-family: var(--font-primary);
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
  color: inherit;
}

input {
  font-family: var(--font-primary);
  border: none;
  outline: none;
  background: none;
  color: inherit;
}

/* ---- Phases (Sections) ---- */
.phase {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: var(--z-content);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s var(--ease-in-out), visibility 0.8s;
  padding: var(--space-lg);
}

.phase.active {
  opacity: 1;
  visibility: visible;
}

/* ---- Overlays ---- */
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-overlay);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease-in-out), visibility 0.5s;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(10px);
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   GOLDEN PARTICLES
   ============================================ */
#particles-container {
  position: fixed;
  inset: 0;
  z-index: var(--z-particles);
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--color-gold);
  pointer-events: none;
  opacity: 0;
  animation: float-particle linear infinite;
}

@keyframes float-particle {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: var(--particle-opacity, 0.3);
  }
  90% {
    opacity: var(--particle-opacity, 0.3);
  }
  100% {
    transform: translateY(-20px) rotate(360deg);
    opacity: 0;
  }
}

/* ============================================
   FASE 1: MISTÉRIO
   ============================================ */
#mystery {
  gap: var(--space-2xl);
}

.mystery-title {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 300;
  text-align: center;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--color-text);
  opacity: 0;
  transform: translateY(20px);
  animation: fade-in-up 1s var(--ease-out-expo) 0.3s forwards;
}

.mystery-title .highlight {
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light), var(--color-gold-dark));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mystery-title .question-mark {
  font-weight: 700;
  color: var(--color-gold);
  -webkit-text-fill-color: var(--color-gold);
}

/* ---- Keyhole ---- */
.keyhole-wrapper {
  position: relative;
  width: 180px;
  height: 300px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  animation: fade-in-up 1s var(--ease-out-expo) 0.8s forwards;
  transition: transform 0.3s var(--ease-out-back);
}

.keyhole-wrapper:hover {
  transform: scale(1.05);
}

.keyhole-wrapper:active {
  transform: scale(0.97);
}

.keyhole-glow {
  position: absolute;
  inset: -40px;
  background: radial-gradient(ellipse at 50% 35%, var(--color-gold-glow), transparent 65%);
  animation: pulse-glow 3s ease-in-out infinite;
  pointer-events: none;
  border-radius: 50%;
}

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

.keyhole-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 340'%3E%3Cpath d='M100,18 C140,18 172,50 172,90 C172,117 157,140 135,152 L140,310 C140,315 136,318 132,318 L68,318 C64,318 60,315 60,310 L65,152 C43,140 28,117 28,90 C28,50 60,18 100,18 Z' fill='white'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 340'%3E%3Cpath d='M100,18 C140,18 172,50 172,90 C172,117 157,140 135,152 L140,310 C140,315 136,318 132,318 L68,318 C64,318 60,315 60,310 L65,152 C43,140 28,117 28,90 C28,50 60,18 100,18 Z' fill='white'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.keyhole-content {
  width: calc(100% + 60px);
  height: calc(100% + 60px);
  position: relative;
  left: -30px;
  top: -30px;
  will-change: transform;
  transition: transform 0.15s ease-out;
}

.keyhole-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.85) saturate(1.2);
}

.keyhole-border {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: drop-shadow(0 0 8px var(--color-gold-glow));
}

.keyhole-hint {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: var(--space-lg);
  opacity: 0;
  animation: fade-in-up 1s var(--ease-out-expo) 1.5s forwards, hint-pulse 2s ease-in-out 2.5s infinite;
}

.hint-icon {
  display: inline-block;
  animation: bounce-subtle 1.5s ease-in-out infinite;
  margin-right: var(--space-xs);
}

@keyframes bounce-subtle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes hint-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ---- Keyhole Zoom Transition ---- */
.keyhole-wrapper.zooming {
  animation: zoom-through 3s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
  pointer-events: none;
}

@keyframes zoom-through {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  40% {
    transform: scale(3);
    opacity: 1;
  }
  75% {
    transform: scale(15);
    opacity: 1;
  }
  100% {
    transform: scale(30);
    opacity: 0;
  }
}

#mystery.fading .mystery-title,
#mystery.fading .keyhole-hint {
  animation: fade-out 0.5s var(--ease-in-out) forwards;
}

@keyframes fade-out {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* ============================================
   FASE 2-3: REVELAÇÃO + SUSPENSE
   ============================================ */
#reveal {
  background: var(--color-bg);
}

.suspense-container {
  text-align: center;
  max-width: 600px;
}

.phrase {
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--color-text);
  opacity: 0;
  transform: translateY(30px);
}

.phrase.visible {
  animation: fade-in-up 0.8s var(--ease-out-expo) forwards;
}

.phrase.fading {
  animation: fade-out-up 0.6s var(--ease-in-out) forwards;
}

.phrase .emphasis {
  font-weight: 700;
  color: var(--color-gold);
}

@keyframes fade-in-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-out-up {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* ============================================
   FASE 4: MINI-GAME LIVE COMMERCE
   ============================================ */
#live-game {
  background: rgba(10, 10, 10, 0.95);
}

.phone-frame {
  width: 340px;
  max-width: 92vw;
  height: 640px;
  max-height: 85vh;
  background: var(--color-surface);
  border-radius: 36px;
  border: 2.5px solid #333;
  padding: 45px 14px 14px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 60px var(--color-gold-glow-soft);
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

#live-game.active .phone-frame {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.phone-notch {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 22px;
  background: var(--color-bg);
  border-radius: 0 0 14px 14px;
}

/* Live Header */
.live-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-sm) var(--space-md);
}

.live-badge-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  background: rgba(255, 59, 59, 0.15);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 59, 59, 0.3);
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--color-live);
  border-radius: 50%;
  animation: live-pulse 1.5s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 59, 59, 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(255, 59, 59, 0); }
}

.live-text {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-live);
  letter-spacing: 0.05em;
}

.viewers-count {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.viewers-count svg {
  opacity: 0.6;
}

/* Seller Info */
.seller-info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0 var(--space-sm) var(--space-md);
}

.seller-avatar {
  width: 32px;
  height: 32px;
  background: var(--color-surface-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.seller-details {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.seller-name {
  font-size: 0.8rem;
  font-weight: 600;
}

.seller-badge {
  font-size: 0.65rem;
  color: var(--color-gold);
}

/* Product Display */
.product-display {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-sm);
  position: relative;
  min-height: 0;
}

.product-image {
  max-height: 160px;
  width: auto;
  object-fit: contain;
  margin-bottom: var(--space-md);
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.3));
  animation: product-float 3s ease-in-out infinite;
}

@keyframes product-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.product-info {
  text-align: center;
  width: 100%;
}

.product-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
}

.original-price {
  font-size: 0.85rem;
  color: var(--color-text-dim);
  text-decoration: line-through;
}

.discount-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-bg);
  background: var(--color-gold);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.sale-price {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-gold);
  text-shadow: 0 0 20px var(--color-gold-glow);
  animation: price-glow 2s ease-in-out infinite;
}

@keyframes price-glow {
  0%, 100% { text-shadow: 0 0 20px var(--color-gold-glow); }
  50% { text-shadow: 0 0 40px var(--color-gold-glow), 0 0 60px rgba(245, 197, 24, 0.15); }
}

/* Chat Container */
.chat-container {
  height: 100px;
  overflow: hidden;
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  justify-content: flex-end;
  position: relative;
}

.chat-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(to bottom, var(--color-surface), transparent);
  pointer-events: none;
  z-index: 1;
}

.chat-message {
  display: flex;
  gap: var(--space-xs);
  font-size: 0.75rem;
  opacity: 0;
  transform: translateX(-10px);
  animation: chat-slide-in 0.3s var(--ease-out-expo) forwards;
  flex-shrink: 0;
}

@keyframes chat-slide-in {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.chat-user {
  font-weight: 700;
  color: var(--color-gold);
  white-space: nowrap;
}

.chat-text {
  color: var(--color-text-muted);
}

/* Timer */
.timer-section {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
}

.timer-bar {
  flex: 1;
  height: 6px;
  background: var(--color-surface-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.timer-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--color-gold-dark), var(--color-gold), var(--color-gold-light));
  border-radius: var(--radius-full);
  transition: width 1s linear;
  box-shadow: 0 0 10px var(--color-gold-glow);
}

.timer-text {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-gold);
  min-width: 20px;
  text-align: center;
}

.timer-text.urgent {
  color: var(--color-danger);
  animation: timer-shake 0.3s ease-in-out infinite;
}

@keyframes timer-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}

/* Buy Button */
.buy-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: calc(100% - var(--space-md) * 2);
  margin: var(--space-sm) var(--space-md) var(--space-md);
  padding: 14px var(--space-lg);
  background: linear-gradient(135deg, var(--color-gold-dark), var(--color-gold), var(--color-gold-light));
  color: var(--color-bg);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  border-radius: var(--radius-md);
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  animation: buy-pulse 1.5s ease-in-out infinite;
  box-shadow:
    0 4px 20px rgba(245, 197, 24, 0.4),
    0 0 40px rgba(245, 197, 24, 0.15);
  transition: transform 0.15s var(--ease-out-back);
}

.buy-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: translateX(-100%);
  animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  50%, 100% { transform: translateX(100%); }
}

@keyframes buy-pulse {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(245, 197, 24, 0.4), 0 0 40px rgba(245, 197, 24, 0.15);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 6px 30px rgba(245, 197, 24, 0.6), 0 0 60px rgba(245, 197, 24, 0.25);
    transform: scale(1.03);
  }
}

.buy-button:hover {
  transform: scale(1.05) !important;
}

.buy-button:active {
  transform: scale(0.97) !important;
}

.buy-icon {
  font-size: 1.2rem;
}

/* ============================================
   VICTORY OVERLAY
   ============================================ */
#victory-overlay {
  z-index: var(--z-victory);
  background: rgba(10, 10, 10, 0.85);
}

.victory-content {
  text-align: center;
  position: relative;
}

.victory-flash {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle, var(--color-gold-glow), transparent 70%);
  opacity: 0;
  pointer-events: none;
}

.victory-flash.active {
  animation: flash-gold 1s var(--ease-out-expo) forwards;
}

@keyframes flash-gold {
  0% { opacity: 0; }
  20% { opacity: 0.5; }
  100% { opacity: 0; }
}

.victory-title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light), #fff, var(--color-gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  transform: scale(0.3);
}

.victory-title.pop {
  animation: pop-in 0.6s var(--ease-out-back) forwards;
}

@keyframes pop-in {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.victory-subtitle {
  font-size: clamp(1rem, 3vw, 1.4rem);
  font-weight: 400;
  color: var(--color-text-muted);
  margin-top: var(--space-md);
  opacity: 0;
  transform: translateY(10px);
}

.victory-subtitle.visible {
  animation: fade-in-up 0.6s var(--ease-out-expo) forwards;
}

/* Confetti */
#confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -10px;
  width: var(--confetti-size, 10px);
  height: var(--confetti-size, 10px);
  opacity: 0;
  animation: confetti-fall var(--confetti-duration, 3s) var(--confetti-delay, 0s) linear forwards;
}

.confetti-piece.rect {
  border-radius: 2px;
}

.confetti-piece.circle {
  border-radius: 50%;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(var(--confetti-rotation, 720deg)) scale(0.5);
    opacity: 0;
  }
}

/* ============================================
   LOSS OVERLAY
   ============================================ */
#loss-overlay {
  z-index: var(--z-overlay);
}

.loss-content {
  text-align: center;
}

.loss-text {
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  font-weight: 500;
  opacity: 0;
  transform: translateY(20px);
}

.loss-text.visible {
  animation: fade-in-up 0.6s var(--ease-out-expo) forwards;
}

.loss-buyer {
  font-weight: 700;
  color: var(--color-gold);
}

.loss-subtext {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-top: var(--space-md);
  opacity: 0;
}

.loss-subtext.visible {
  animation: fade-in-up 0.6s var(--ease-out-expo) 0.8s forwards;
}

/* ============================================
   FASE 5: CTA FINAL
   ============================================ */
#cta {
  background: var(--color-bg);
}

.cta-container {
  text-align: center;
  max-width: 500px;
  width: 100%;
}

.cta-title {
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
  opacity: 0;
  transform: translateY(20px);
}

#cta.active .cta-title {
  animation: fade-in-up 0.8s var(--ease-out-expo) forwards;
}

.cta-lead {
  font-size: clamp(1rem, 3vw, 1.3rem);
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  opacity: 0;
  transform: translateY(20px);
}

#cta.active .cta-lead {
  animation: fade-in-up 0.8s var(--ease-out-expo) forwards;
}

#cta.active .cta-title {
  animation: fade-in-up 0.8s var(--ease-out-expo) 0.2s forwards;
}

.email-form {
  opacity: 0;
  transform: translateY(20px);
}

#cta.active .email-form {
  animation: fade-in-up 0.8s var(--ease-out-expo) 0.5s forwards;
}

.input-wrapper {
  display: flex;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-surface-light);
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.input-wrapper:focus-within {
  border-color: var(--color-gold);
  box-shadow: 0 0 20px var(--color-gold-glow-soft), 0 0 40px rgba(245, 197, 24, 0.05);
}

.email-input {
  flex: 1;
  padding: 14px var(--space-lg);
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text);
  background: transparent;
  min-width: 0;
}

.email-input::placeholder {
  color: var(--color-text-dim);
}

.submit-button {
  padding: 14px var(--space-xl);
  background: linear-gradient(135deg, var(--color-gold-dark), var(--color-gold));
  color: var(--color-bg);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: all 0.3s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.submit-button:hover {
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
  box-shadow: 0 0 20px var(--color-gold-glow);
}

.submit-button:active {
  transform: scale(0.97);
}

.submit-button.success {
  background: var(--color-success);
}

.form-error {
  font-size: 0.8rem;
  color: var(--color-danger);
  margin-top: var(--space-sm);
  min-height: 1.2em;
}

/* ============================================
   SUCCESS SCREEN
   ============================================ */
#success {
  background: var(--color-bg);
}

.success-container {
  text-align: center;
}

.success-icon {
  font-size: 3rem;
  margin-bottom: var(--space-lg);
  opacity: 0;
  transform: scale(0.5);
}

#success.active .success-icon {
  animation: pop-in 0.6s var(--ease-out-back) forwards;
}

.success-title {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: var(--space-md);
  opacity: 0;
  transform: translateY(20px);
}

#success.active .success-title {
  animation: fade-in-up 0.8s var(--ease-out-expo) 0.3s forwards;
}

.success-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-3xl);
  opacity: 0;
  transform: translateY(20px);
}

#success.active .success-subtitle {
  animation: fade-in-up 0.8s var(--ease-out-expo) 0.5s forwards;
}

.babz-reveal {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  opacity: 0;
  transform: translateY(20px);
}

#success.active .babz-reveal {
  animation: fade-in-up 1s var(--ease-out-expo) 1s forwards;
}

.babz-logo {
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 900;
  letter-spacing: 0.15em;
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light), #fff, var(--color-gold-dark));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 3s ease-in-out infinite;
  text-shadow: none;
  filter: drop-shadow(0 0 30px var(--color-gold-glow));
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.babz-tagline {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
}

/* Success Actions */
.success-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-3xl);
  width: 100%;
  max-width: 340px;
  opacity: 0;
  transform: translateY(20px);
}

#success.active .success-actions {
  animation: fade-in-up 0.8s var(--ease-out-expo) 1.4s forwards;
}

.share-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px var(--space-lg);
  background: #25D366;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all 0.3s var(--ease-out-expo);
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
}

.share-button:hover {
  background: #20bd5a;
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.4);
}

.share-button:active {
  transform: translateY(0) scale(0.97);
}

.back-button {
  padding: 12px var(--space-lg);
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 400;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-surface-light);
  transition: all 0.3s var(--ease-out-expo);
}

.back-button:hover {
  color: var(--color-text);
  border-color: var(--color-text-dim);
  background: var(--color-surface);
}

/* ============================================
   RESPONSIVE — Mobile First
   ============================================ */

/* Small phones */
@media (max-height: 600px) {
  .mystery-title {
    font-size: 1.4rem;
  }

  .keyhole-wrapper {
    width: 130px;
    height: 220px;
  }

  #mystery {
    gap: var(--space-lg);
  }

  .phone-frame {
    height: 500px;
    border-radius: 28px;
    padding-top: 35px;
  }

  .product-image {
    max-height: 100px;
  }
}

/* Tablets and up */
@media (min-width: 768px) {
  .keyhole-wrapper {
    width: 220px;
    height: 360px;
  }

  .phone-frame {
    width: 380px;
    height: 700px;
  }

  .product-image {
    max-height: 200px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .keyhole-wrapper {
    width: 240px;
    height: 400px;
  }

  .phone-frame {
    width: 400px;
    height: 740px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
