/* =========================================
   NOXIASOUNDS — Paywall / Subscribe Overlay
   ========================================= */

/* ── Overlay wrapper ── */
.paywall-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;           /* above everything */
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

/* ── Backdrop ── */
.paywall-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 1, 14, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 0;
  animation: paywallFadeIn 0.35s ease both;
}

@keyframes paywallFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Card ── */
.paywall-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  border-radius: 36px 36px 0 0;
  padding: 36px 28px calc(env(safe-area-inset-bottom, 0px) + 40px);
  box-sizing: border-box;
  overflow: hidden;
  text-align: center;

  /* Deep glass */
  background: rgba(10, 4, 28, 0.94);
  backdrop-filter: blur(40px) saturate(1.4);
  -webkit-backdrop-filter: blur(40px) saturate(1.4);
  border: 1px solid rgba(157, 92, 255, 0.22);
  border-bottom: none;
  box-shadow:
    0 -16px 60px rgba(0, 0, 0, 0.70),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;

  animation: paywallSlideUp 0.44s cubic-bezier(0.32, 0.72, 0, 1) both;
}

@keyframes paywallSlideUp {
  from { transform: translateY(100%); opacity: 0.6; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Shimmer line at top edge */
.paywall-card::before {
  content: '';
  position: absolute;
  top: 0; left: 6%; right: 6%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(157, 92, 255, 0.60),
    rgba(192, 132, 252, 0.40),
    transparent
  );
}

/* Drag handle */
.paywall-card::after {
  content: '';
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 40px; height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.13);
}

/* ── Ambient orbs ── */
.paywall-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(48px);
}

.paywall-orb-1 {
  width: 220px; height: 220px;
  top: -80px; left: -60px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.22) 0%, transparent 70%);
  animation: orbDrift 10s ease-in-out infinite alternate;
}

.paywall-orb-2 {
  width: 180px; height: 180px;
  bottom: -40px; right: -50px;
  background: radial-gradient(circle, rgba(192, 132, 252, 0.16) 0%, transparent 70%);
  animation: orbDrift 13s ease-in-out infinite alternate-reverse;
}

@keyframes orbDrift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(16px, -20px) scale(1.08); }
}

/* ── Icon + waveform ── */
.paywall-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.paywall-icon-ring {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.28), rgba(192, 132, 252, 0.14));
  border: 1px solid rgba(157, 92, 255, 0.35);
  display: flex; align-items: center; justify-content: center;
  color: var(--rose-warm);
  box-shadow:
    0 0 32px rgba(124, 58, 237, 0.30),
    0 0 80px rgba(124, 58, 237, 0.12);
  animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% { box-shadow: 0 0 32px rgba(124,58,237,0.30), 0 0 80px rgba(124,58,237,0.12); }
  50%       { box-shadow: 0 0 48px rgba(124,58,237,0.50), 0 0 100px rgba(124,58,237,0.20); }
}

/* Waveform bars */
.paywall-wave {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 28px;
}

.paywall-wave span {
  display: block;
  width: 3px;
  border-radius: 4px;
  background: linear-gradient(to top, var(--purple-warm), var(--rose-warm));
  animation: paywallWaveBar 1.4s ease-in-out infinite;
}

.paywall-wave span:nth-child(1) { height: 8px;  animation-delay: 0s;    }
.paywall-wave span:nth-child(2) { height: 18px; animation-delay: 0.12s; }
.paywall-wave span:nth-child(3) { height: 24px; animation-delay: 0.24s; }
.paywall-wave span:nth-child(4) { height: 28px; animation-delay: 0.06s; }
.paywall-wave span:nth-child(5) { height: 20px; animation-delay: 0.18s; }
.paywall-wave span:nth-child(6) { height: 14px; animation-delay: 0.30s; }
.paywall-wave span:nth-child(7) { height: 10px; animation-delay: 0.10s; }

@keyframes paywallWaveBar {
  0%, 100% { transform: scaleY(0.4); opacity: 0.5; }
  50%       { transform: scaleY(1.0); opacity: 1.0; }
}

/* ── Headline ── */
.paywall-headline {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 7vw, 2.4rem);
  font-weight: 300;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}

/* ── Body text ── */
.paywall-body {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 22px;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Highlight price box ── */
.paywall-highlight {
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.14) 0%,
    rgba(192, 132, 252, 0.08) 100%
  );
  border: 1px solid rgba(157, 92, 255, 0.25);
  border-radius: 20px;
  padding: 18px 22px 14px;
  margin-bottom: 26px;
  position: relative;
  overflow: hidden;
}

/* Inner shimmer */
.paywall-highlight::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(157, 92, 255, 0.45), transparent);
}

.paywall-highlight-text {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 8px;
}

.paywall-highlight-text strong {
  font-weight: 600;
  color: var(--rose-warm);
  font-size: 1.05rem;
}

.paywall-cancel-note {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--text-muted);
  margin: 0;
  letter-spacing: 0.02em;
}

/* ── CTA Button ── */
.paywall-cta {
  width: 100%;
  padding: 17px 28px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.97rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #fff;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;

  background: linear-gradient(135deg, var(--purple-warm) 0%, #5b21b6 100%);
  box-shadow:
    0 0 28px rgba(124, 58, 237, 0.55),
    0 6px 20px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);

  transition: all 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

/* Shine sweep on hover */
.paywall-cta::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.45s ease;
}

.paywall-cta:hover::before { left: 160%; }

.paywall-cta:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 0 44px rgba(124, 58, 237, 0.75),
    0 10px 28px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.paywall-cta:active {
  transform: scale(0.97);
}

/* ── Sign in link ── */
.paywall-signin-link {
  font-family: var(--font-body);
  font-size: 0.80rem;
  font-weight: 300;
  color: var(--text-muted);
  margin: 0;
}

.paywall-signin-link a {
  color: var(--rose-warm);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.2s;
}

.paywall-signin-link a:hover { color: var(--text-primary); }