/* ==========================================================================
   CAPITAL VAPE - PANTALLA DE VERIFICACIÓN DE MAYORÍA DE EDAD (+18)
   Paleta Oficial:
   - Negro profundo: #050505
   - Negro secundario: #101010
   - Magenta neón: #FF007F
   - Dorado elegante: #D4AF37
   - Blanco: #FFFFFF
   ========================================================================== */

:root {
  --cv-age-bg: #050505;
  --cv-age-surface: #101010;
  --cv-age-card: rgba(16, 16, 16, 0.92);
  --cv-age-magenta: #FF007F;
  --cv-age-magenta-glow: rgba(255, 0, 127, 0.55);
  --cv-age-magenta-soft: rgba(255, 0, 127, 0.15);
  --cv-age-gold: #D4AF37;
  --cv-age-gold-glow: rgba(212, 175, 55, 0.4);
  --cv-age-white: #FFFFFF;
  --cv-age-text-muted: #9CA3AF;
  --cv-age-border: rgba(255, 0, 127, 0.28);
}

/* Bloqueo total de scroll mientras no se verifique */
html.age-gate-locked,
body.age-gate-locked {
  overflow: hidden !important;
  height: 100% !important;
  max-height: 100vh !important;
  touch-action: none;
  -webkit-overflow-scrolling: auto;
}

/* --------------------------------------------------------------------------
   OVERLAY A PANTALLA COMPLETA
   -------------------------------------------------------------------------- */
.age-gate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--cv-age-bg);
  padding: 24px 16px;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.45s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.age-gate-overlay.age-gate-closing {
  opacity: 0;
  pointer-events: none;
}

.age-gate-overlay.age-gate-closing .age-gate-card {
  transform: scale(0.96) translateY(-12px);
  opacity: 0;
}

.age-gate-overlay.age-gate-hidden {
  display: none !important;
}

/* --------------------------------------------------------------------------
   AMBIENTE DE FONDO CON ILUMINACIÓN NEÓN Y PROFUNDIDAD
   -------------------------------------------------------------------------- */
.age-gate-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

/* Gradiente radial magenta superior */
.age-gate-glow-magenta {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 550px;
  max-width: 120vw;
  background: radial-gradient(circle, rgba(255, 0, 127, 0.22) 0%, rgba(255, 0, 127, 0.06) 45%, transparent 70%);
  filter: blur(55px);
  border-radius: 50%;
  animation: ageAmbientPulse 7s ease-in-out infinite alternate;
}

/* Gradiente radial dorado inferior */
.age-gate-glow-gold {
  position: absolute;
  bottom: -15%;
  right: 10%;
  width: 550px;
  height: 450px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.12) 0%, rgba(212, 175, 55, 0.03) 50%, transparent 70%);
  filter: blur(65px);
  border-radius: 50%;
  animation: ageAmbientPulseGold 9s ease-in-out infinite alternate;
}

/* Canvas para partículas luminosas ultra livianas */
.age-gate-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.6;
}

/* --------------------------------------------------------------------------
   CONTENEDOR Y TARJETA DEL MODAL
   -------------------------------------------------------------------------- */
.age-gate-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 540px;
  margin: auto;
  padding: 10px 0;
}

.age-gate-card {
  background: var(--cv-age-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--cv-age-border);
  border-radius: 26px;
  padding: 38px 32px 34px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.95),
              0 0 50px rgba(255, 0, 127, 0.18),
              inset 0 1px 1px rgba(255, 255, 255, 0.15);
  text-align: center;
  position: relative;
  overflow: hidden;
  transform: scale(1) translateY(0);
  opacity: 1;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s ease;
  animation: ageCardEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Línea de resplandor sutil superior */
.age-gate-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cv-age-magenta), var(--cv-age-gold), transparent);
  box-shadow: 0 0 16px var(--cv-age-magenta);
}

.age-gate-card-inner {
  position: relative;
  z-index: 3;
}

/* --------------------------------------------------------------------------
   BRANDING & LOGO
   -------------------------------------------------------------------------- */
.age-gate-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.age-gate-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px var(--cv-age-magenta-glow)) 
          drop-shadow(0 0 8px var(--cv-age-gold-glow));
  transition: transform 0.3s ease;
}

.age-gate-brand:hover .age-gate-logo {
  transform: scale(1.06) rotate(2deg);
}

.age-gate-brand-name {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: var(--cv-age-white);
}

.age-gate-brand-name span {
  background: linear-gradient(135deg, var(--cv-age-gold), var(--cv-age-magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --------------------------------------------------------------------------
   SÍMBOLO VISUAL 18+ CON RESPLANDOR NEÓN
   -------------------------------------------------------------------------- */
.age-gate-badge-wrapper {
  margin: 10px 0 20px;
  display: flex;
  justify-content: center;
}

.age-gate-badge-18 {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #240a1c 0%, #0d0309 80%);
  border: 2px solid var(--cv-age-magenta);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 35px var(--cv-age-magenta-glow),
              0 0 15px rgba(212, 175, 55, 0.3),
              inset 0 0 25px rgba(255, 0, 127, 0.35);
  animation: ageBadgePulse 2.8s ease-in-out infinite alternate;
}

.age-badge-text {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #FFFFFF 15%, var(--cv-age-magenta) 75%, var(--cv-age-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px var(--cv-age-magenta-glow));
}

/* Anillo exterior animado de halo */
.age-badge-glow {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 0, 127, 0.45);
  animation: ageHaloRotate 20s linear infinite;
}

/* --------------------------------------------------------------------------
   TÍTULOS Y TEXTO INTRODUCTORIO
   -------------------------------------------------------------------------- */
.age-gate-title {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--cv-age-white);
  letter-spacing: 0.01em;
  line-height: 1.2;
  margin: 0 0 12px;
  text-transform: uppercase;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.9),
               0 0 30px rgba(255, 0, 127, 0.3);
}

.age-gate-intro {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  color: #E2E8F0;
  line-height: 1.55;
  margin: 0 auto 22px;
  max-width: 440px;
}

/* --------------------------------------------------------------------------
   CUADRO DE AVISO LEGAL (COLOMBIA)
   -------------------------------------------------------------------------- */
.age-gate-legal-box {
  background: rgba(255, 0, 127, 0.04);
  border: 1px solid rgba(255, 0, 127, 0.22);
  border-left: 3px solid var(--cv-age-gold);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 26px;
  text-align: left;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.4);
}

.age-gate-legal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.age-legal-icon {
  width: 17px;
  height: 17px;
  color: var(--cv-age-gold);
  flex-shrink: 0;
}

.age-legal-badge {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--cv-age-gold);
  text-transform: uppercase;
}

.age-gate-legal-text {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.83rem;
  color: #CBD5E1;
  line-height: 1.52;
  margin: 0 0 10px;
}

.age-gate-legal-note {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.75rem;
  color: var(--cv-age-text-muted);
  line-height: 1.45;
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-style: italic;
}

/* --------------------------------------------------------------------------
   BOTONES DE DECISIÓN
   -------------------------------------------------------------------------- */
.age-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.age-btn {
  width: 100%;
  padding: 15px 24px;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  box-sizing: border-box;
  outline: none;
  border: 1px solid transparent;
}

/* BOTÓN 1: SÍ, SOY MAYOR DE EDAD */
.age-btn-confirm {
  background: linear-gradient(135deg, #FF007F 0%, #D4006A 50%, #99004C 100%);
  color: var(--cv-age-white);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 24px var(--cv-age-magenta-glow),
              0 0 15px var(--cv-age-gold-glow);
  position: relative;
  overflow: hidden;
}

.age-btn-confirm::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: skewX(-20deg);
  transition: left 0.75s ease;
}

.age-btn-confirm:hover {
  background: linear-gradient(135deg, #FF1A8C 0%, #E60073 50%, #B30059 100%);
  box-shadow: 0 8px 32px rgba(255, 0, 127, 0.8),
              0 0 25px rgba(212, 175, 55, 0.5);
  transform: translateY(-2px);
  color: #FFFFFF;
}

.age-btn-confirm:hover::after {
  left: 140%;
}

.age-btn-confirm:active {
  transform: translateY(0);
  box-shadow: 0 4px 16px var(--cv-age-magenta-glow);
}

.age-btn-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* BOTÓN 2: NO SOY MAYOR DE EDAD */
.age-btn-reject {
  background: rgba(16, 16, 16, 0.7);
  color: #F3F4F6;
  border: 1px solid rgba(255, 0, 127, 0.35);
  font-weight: 700;
}

.age-btn-reject:hover {
  background: rgba(255, 0, 127, 0.14);
  border-color: var(--cv-age-magenta);
  color: #FFFFFF;
  box-shadow: 0 0 20px rgba(255, 0, 127, 0.3);
  transform: translateY(-1px);
}

.age-btn-reject:active {
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   VISTA ALTERNATIVA: ACCESO RESTRINGIDO
   -------------------------------------------------------------------------- */
.age-gate-card-denied {
  border-color: rgba(239, 68, 68, 0.35);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.95),
              0 0 45px rgba(239, 68, 68, 0.2);
}

.age-gate-card-denied::before {
  background: linear-gradient(90deg, transparent, #EF4444, #F59E0B, transparent);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.6);
}

.age-gate-denied-icon-box {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin: 0 auto 20px;
  background: radial-gradient(circle at 35% 35%, #2B0808 0%, #120303 80%);
  border: 2px solid #EF4444;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.5),
              inset 0 0 20px rgba(239, 68, 68, 0.3);
}

.age-gate-denied-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed rgba(239, 68, 68, 0.5);
  animation: ageHaloRotate 15s linear infinite;
}

.age-gate-denied-icon {
  width: 44px;
  height: 44px;
  color: #EF4444;
}

.age-gate-denied-title {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.85rem;
  font-weight: 900;
  color: #FFFFFF;
  margin: 0 0 10px;
  letter-spacing: 0.01em;
}

.age-gate-denied-subtitle {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  color: #F87171;
  margin: 0 0 16px;
  line-height: 1.45;
}

.age-gate-denied-desc {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.88rem;
  color: #CBD5E1;
  line-height: 1.55;
  margin: 0 auto 28px;
  max-width: 440px;
}

.age-gate-denied-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.age-btn-exit {
  background: linear-gradient(135deg, #DC2626 0%, #991B1B 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.4);
}

.age-btn-exit:hover {
  background: linear-gradient(135deg, #EF4444 0%, #B91C1C 100%);
  box-shadow: 0 6px 26px rgba(220, 38, 38, 0.6);
  transform: translateY(-2px);
  color: #FFFFFF;
}

.age-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #E2E8F0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-weight: 600;
}

.age-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.3);
}

/* --------------------------------------------------------------------------
   KEYFRAMES & ANIMACIONES
   -------------------------------------------------------------------------- */
@keyframes ageCardEntrance {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(24px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes ageBadgePulse {
  0% {
    box-shadow: 0 0 25px var(--cv-age-magenta-glow),
                0 0 10px rgba(212, 175, 55, 0.2),
                inset 0 0 18px rgba(255, 0, 127, 0.25);
    border-color: #FF007F;
  }
  100% {
    box-shadow: 0 0 45px rgba(255, 0, 127, 0.85),
                0 0 22px rgba(212, 175, 55, 0.45),
                inset 0 0 28px rgba(255, 0, 127, 0.5);
    border-color: #FF3399;
  }
}

@keyframes ageHaloRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes ageAmbientPulse {
  0% {
    opacity: 0.7;
    transform: translateX(-50%) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) scale(1.08);
  }
}

@keyframes ageAmbientPulseGold {
  0% {
    opacity: 0.6;
    transform: scale(0.92);
  }
  100% {
    opacity: 0.9;
    transform: scale(1.05);
  }
}

/* --------------------------------------------------------------------------
   RESPONSIVIDAD Y DISPOSITIVOS MÓVILES
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  .age-gate-overlay {
    padding: 16px 12px;
    align-items: flex-start;
  }

  .age-gate-card {
    padding: 28px 20px 24px;
    border-radius: 20px;
  }

  .age-gate-brand {
    margin-bottom: 16px;
    gap: 10px;
  }

  .age-gate-logo {
    width: 42px;
    height: 42px;
  }

  .age-gate-brand-name {
    font-size: 1.25rem;
  }

  .age-gate-badge-18 {
    width: 82px;
    height: 82px;
  }

  .age-badge-text {
    font-size: 2.1rem;
  }

  .age-gate-title {
    font-size: 1.55rem;
    margin-bottom: 10px;
  }

  .age-gate-intro {
    font-size: 0.92rem;
    margin-bottom: 18px;
  }

  .age-gate-legal-box {
    padding: 14px;
    margin-bottom: 20px;
  }

  .age-gate-legal-text {
    font-size: 0.79rem;
    line-height: 1.48;
  }

  .age-gate-legal-note {
    font-size: 0.72rem;
  }

  .age-btn {
    padding: 14px 20px;
    font-size: 0.95rem;
  }
}

@media (max-width: 380px) {
  .age-gate-card {
    padding: 22px 16px 20px;
  }

  .age-gate-badge-18 {
    width: 74px;
    height: 74px;
  }

  .age-badge-text {
    font-size: 1.85rem;
  }

  .age-gate-title {
    font-size: 1.35rem;
  }

  .age-btn {
    font-size: 0.88rem;
    padding: 13px 16px;
  }
}

/* Soporte para preferencias de reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
  .age-gate-overlay,
  .age-gate-card,
  .age-gate-badge-18,
  .age-badge-glow,
  .age-gate-glow-magenta,
  .age-gate-glow-gold,
  .age-gate-denied-pulse {
    animation: none !important;
    transition: none !important;
  }
}
