/* =========================================================
   AGE GATE (18+) - Global Popup
   - Shows once per device using localStorage + cookie fallback
   ========================================================= */

   :root {
    --cc-agegate-z: 999999;
    --cc-agegate-bg: rgba(8, 9, 12, 0.72);
    --cc-agegate-card: rgba(16, 18, 24, 0.92);
    --cc-agegate-border: rgba(255, 255, 255, 0.10);
    --cc-agegate-text: rgba(255, 255, 255, 0.92);
    --cc-agegate-muted: rgba(255, 255, 255, 0.72);
    --cc-agegate-accent: #ff2f92;
    --cc-agegate-accent2: #7c3aed;
  }
  
  html.cc-agegate-lock,
  body.cc-agegate-lock {
    overflow: hidden !important;
    height: 100%;
  }
  
  .cc-ageGate {
    position: fixed;
    inset: 0;
    z-index: var(--cc-agegate-z);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: var(--cc-agegate-bg);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 220ms ease,
      visibility 0ms linear 220ms,
      backdrop-filter 260ms ease,
      -webkit-backdrop-filter 260ms ease;
  }
  
  .cc-ageGate::before,
  .cc-ageGate::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
  }
  
  /* Neon / cosmic backdrop */
  .cc-ageGate::before {
    opacity: 0;
    background:
      radial-gradient(600px 380px at 15% 25%, rgba(255, 47, 146, 0.35), transparent 60%),
      radial-gradient(520px 360px at 85% 20%, rgba(124, 58, 237, 0.30), transparent 60%),
      radial-gradient(520px 420px at 70% 85%, rgba(56, 189, 248, 0.22), transparent 60%),
      radial-gradient(720px 520px at 20% 90%, rgba(34, 197, 94, 0.14), transparent 65%);
    filter: blur(18px) saturate(1.15);
    transform: scale(1.03);
    transition: opacity 260ms ease;
  }
  
  /* Subtle smoke layer */
  .cc-ageGate::after {
    opacity: 0;
    background:
      radial-gradient(520px 280px at 20% 70%, rgba(255, 255, 255, 0.06), transparent 62%),
      radial-gradient(460px 260px at 65% 75%, rgba(255, 255, 255, 0.05), transparent 60%),
      radial-gradient(560px 300px at 80% 50%, rgba(255, 255, 255, 0.04), transparent 65%);
    filter: blur(26px);
    mix-blend-mode: screen;
    transform: translate3d(0, 0, 0);
    animation: ccSmoke 8.5s ease-in-out infinite;
    transition: opacity 260ms ease;
  }
  
  .cc-ageGate.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition:
      opacity 220ms ease,
      visibility 0ms linear 0ms,
      backdrop-filter 260ms ease,
      -webkit-backdrop-filter 260ms ease;
  }
  
  /* Explicit closing state so blur/overlay fade out smoothly (no "hard" disappear) */
  .cc-ageGate.is-closing {
    opacity: 0;
    visibility: visible;
    pointer-events: none;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition:
      opacity 520ms ease,
      backdrop-filter 700ms ease,
      -webkit-backdrop-filter 700ms ease;
  }
  
  .cc-ageGate.is-closing::before,
  .cc-ageGate.is-closing::after {
    opacity: 0;
    transition: opacity 520ms ease;
  }
  
  .cc-ageGate.is-open::before,
  .cc-ageGate.is-open::after {
    opacity: 1;
  }
  
  .cc-ageGate__card {
    width: min(560px, 100%);
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03)), var(--cc-agegate-card);
    border: 1px solid var(--cc-agegate-border);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    color: var(--cc-agegate-text);
    position: relative;
    transform: translateY(10px) scale(0.985);
    opacity: 0;
    animation: ccAgeGateIn 260ms cubic-bezier(.2,.9,.2,1) forwards;
  }
  
  .cc-ageGate__card::before {
    content: "";
    position: absolute;
    inset: -2px;
    pointer-events: none;
    background:
      radial-gradient(220px 160px at 20% 15%, rgba(255, 47, 146, 0.26), transparent 60%),
      radial-gradient(240px 160px at 80% 20%, rgba(124, 58, 237, 0.24), transparent 60%),
      radial-gradient(280px 220px at 40% 110%, rgba(56, 189, 248, 0.14), transparent 60%);
    filter: blur(14px);
    opacity: 0.9;
    animation: ccFloatGlow 6.8s ease-in-out infinite;
  }
  
  .cc-ageGate__top,
  .cc-ageGate__remember,
  .cc-ageGate__actions,
  .cc-ageGate__fineprint {
    position: relative;
    z-index: 1;
  }
  
  .cc-ageGate__top {
    padding: 20px 22px 10px;
  }
  
  .cc-ageGate__badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.86);
  }
  
  .cc-ageGate__dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cc-agegate-accent), var(--cc-agegate-accent2));
    box-shadow: 0 0 0 4px rgba(255, 47, 146, 0.18);
  }
  
  .cc-ageGate__title {
    margin: 10px 0 6px;
    font-size: 26px;
    line-height: 1.15;
  }
  
  .cc-ageGate__text {
    margin: 0;
    color: var(--cc-agegate-muted);
    line-height: 1.6;
    font-size: 14.5px;
  }
  
  .cc-ageGate__divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
  }
  
  .cc-ageGate__remember {
    padding: 14px 22px 4px;
  }
  
  .cc-ageGate__check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13.5px;
  }
  
  .cc-ageGate__checkbox {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  
  .cc-ageGate__checkUI {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
  }
  
  .cc-ageGate__checkbox:focus-visible + .cc-ageGate__checkUI {
    outline: 2px solid rgba(255, 47, 146, 0.55);
    outline-offset: 2px;
  }
  
  .cc-ageGate__checkbox:checked + .cc-ageGate__checkUI {
    border-color: rgba(255, 47, 146, 0.65);
    background: linear-gradient(135deg, rgba(255, 47, 146, 0.35), rgba(124, 58, 237, 0.30));
    transform: translateY(-0.5px);
  }
  
  .cc-ageGate__checkbox:checked + .cc-ageGate__checkUI::after {
    content: "";
    width: 9px;
    height: 5px;
    border-left: 2px solid rgba(255, 255, 255, 0.92);
    border-bottom: 2px solid rgba(255, 255, 255, 0.92);
    transform: rotate(-45deg);
    margin-top: -1px;
  }
  
  .cc-ageGate__checkText {
    line-height: 1.3;
  }
  
  .cc-ageGate__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px 22px 18px;
  }
  
  .cc-ageGate__btn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.92);
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
    position: relative;
    overflow: hidden;
  }
  
  .cc-ageGate__btn:focus-visible {
    outline: 2px solid rgba(255, 47, 146, 0.55);
    outline-offset: 2px;
  }
  
  .cc-ageGate__btn:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.22);
  }
  
  .cc-ageGate__btn--yes {
    border: none;
    background: linear-gradient(135deg, var(--cc-agegate-accent), var(--cc-agegate-accent2));
  }
  
  .cc-ageGate__btn--yes:hover {
    filter: brightness(1.02);
  }
  
  .cc-ageGate__ripple {
    position: absolute;
    border-radius: 999px;
    transform: scale(0);
    animation: ccRipple 520ms ease-out;
    background: rgba(255, 255, 255, 0.35);
    pointer-events: none;
    mix-blend-mode: screen;
  }
  
  @keyframes ccRipple {
    to {
      transform: scale(4);
      opacity: 0;
    }
  }
  
  .cc-ageGate__card.is-success {
    animation: ccSuccessGlow 520ms ease-out;
    box-shadow:
      0 24px 70px rgba(0, 0, 0, 0.55),
      0 0 0 1px rgba(255, 47, 146, 0.18) inset,
      0 0 34px rgba(255, 47, 146, 0.22);
  }
  
  @keyframes ccSuccessGlow {
    0% { transform: translateY(0) scale(1); }
    35% { transform: translateY(-2px) scale(1.01); }
    100% { transform: translateY(0) scale(1); }
  }
  
  /* Confetti overlay (full-screen, above the card) */
  .cc-ageGate__confettiGlobal {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1000001;
  }
  
  .cc-ageGate__confettiPiece {
    position: absolute;
    display: block;
    width: 10px;
    height: 14px;
    border-radius: 2px;
    opacity: 0.95;
    transform: translate3d(0, 0, 0) rotate(0deg);
    animation: ccConfettiPop 950ms cubic-bezier(.2,.9,.2,1) forwards;
    filter: drop-shadow(0 8px 10px rgba(0,0,0,0.28));
    will-change: transform, opacity;
  }
  
  @keyframes ccConfettiPop {
    0% {
      opacity: 0;
      transform: translate3d(0, -8px, 0) rotate(0deg) scale(0.9);
    }
    10% {
      opacity: 1;
    }
    100% {
      transform: translate3d(var(--cc-dx, 0px), 220px, 0) rotate(var(--cc-dr, 240deg)) scale(1);
      opacity: 0;
    }
  }
  
  @keyframes ccSmoke {
    0%   { transform: translate3d(-1.2%, 0.8%, 0) scale(1.02); }
    50%  { transform: translate3d(1.0%, -0.6%, 0) scale(1.03); }
    100% { transform: translate3d(-1.2%, 0.8%, 0) scale(1.02); }
  }
  
  @keyframes ccFloatGlow {
    0%   { transform: translate3d(-1.2%, 1.0%, 0) scale(1.01); }
    50%  { transform: translate3d(1.0%, -0.8%, 0) scale(1.02); }
    100% { transform: translate3d(-1.2%, 1.0%, 0) scale(1.01); }
  }
  
  .cc-ageGate__fineprint {
    padding: 0 22px 18px;
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.62);
  }
  
  .cc-ageGate__fineprint a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  
  @keyframes ccAgeGateIn {
    from {
      opacity: 0;
      transform: translateY(14px) scale(0.975);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
  
  @media (max-width: 520px) {
    .cc-ageGate__actions {
      grid-template-columns: 1fr;
    }
    .cc-ageGate__title {
      font-size: 22px;
    }
  }
  
  /* Force-enabled animations: intentionally ignoring prefers-reduced-motion (per request). */
  
  
  