/* ============================================
   FamTubeX — Age Verification Gate
   Shown on first visit only (localStorage flag)
   ============================================ */

#age-gate {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  background: radial-gradient(ellipse at top, #5a0c14 0%, #2a0509 35%, #0a0205 75%, #000000 100%);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #e8e4ec;
  -webkit-font-smoothing: antialiased;
  animation: ag-fade-in 0.25s ease-out;
}

html.age-verified #age-gate {
  display: none !important;
}

#age-gate.ag-leaving {
  animation: ag-fade-out 0.35s ease-in forwards;
  pointer-events: none;
}

@keyframes ag-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes ag-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

.ag-container {
  width: 100%;
  max-width: 560px;
  padding: 56px 28px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ── Logo ── */
.ag-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
}

.ag-logo-mark {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.ag-logo-text {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: 30px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1;
}

/* ── Tagline ── */
.ag-tagline {
  font-size: 17px;
  line-height: 1.55;
  color: #f0ecf3;
  font-weight: 400;
  margin: 0 0 36px;
  max-width: 460px;
}

/* ── Primary CTA ── */
.ag-btn {
  display: block;
  width: 100%;
  max-width: 440px;
  padding: 22px 24px;
  background: #99B532;
  color: #ffffff;
  font-size: 22px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: background 0.2s ease, transform 0.1s ease;
  margin-bottom: 32px;
  -webkit-tap-highlight-color: transparent;
}

.ag-btn:hover { background: #a6c33d; }
.ag-btn:active { transform: scale(0.985); background: #8aa42c; }
.ag-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ── Disclaimer ── */
.ag-disclaimer {
  font-size: 14px;
  line-height: 1.65;
  color: #c2bcc8;
  margin: 0 0 32px;
  max-width: 500px;
}

.ag-disclaimer a {
  color: #c2bcc8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ag-disclaimer a:hover { color: #ffffff; }

/* ── Exit Here ── */
.ag-divider {
  width: 100%;
  max-width: 500px;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 0 28px;
}

.ag-exit {
  font-size: 16px;
  color: #c2bcc8;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-bottom: 36px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 4px 8px;
}

.ag-exit:hover { color: #ffffff; }

/* ── Legal ── */
.ag-legal {
  font-size: 13px;
  line-height: 1.6;
  color: #9b95a3;
  margin: 0 0 18px;
  max-width: 500px;
}

.ag-legal a {
  color: #9b95a3;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ag-legal a:hover { color: #ffffff; }

/* ── Mobile tweaks ── */
@media (max-width: 480px) {
  .ag-container { padding: 40px 22px 36px; }
  .ag-logo-mark { width: 44px; height: 44px; }
  .ag-logo-text { font-size: 26px; letter-spacing: 1.5px; }
  .ag-tagline { font-size: 16px; margin-bottom: 30px; }
  .ag-btn { padding: 20px 22px; font-size: 20px; margin-bottom: 28px; }
  .ag-disclaimer { font-size: 13.5px; }
  .ag-legal { font-size: 12.5px; }
}

/* Lock body scroll when gate is visible */
html:not(.age-verified) body { overflow: hidden; }
