/* =========================================================================
   GLASS LAYER (.online): frosted panels, soft neon light behind them,
   sleeker cards. Loaded after vice.css. Visual only; no layout logic changes
   to the app screens.
   ========================================================================= */

:root {
  --glass-bg: linear-gradient(135deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.035) 45%, rgba(255,255,255,.02) 100%);
  --glass-bg-strong: linear-gradient(135deg, rgba(40,18,64,.72) 0%, rgba(20,10,34,.62) 100%);
  --glass-border: rgba(255,255,255,.13);
  --glass-edge: inset 0 1px 0 rgba(255,255,255,.22), inset 0 0 0 1px rgba(255,255,255,.03);
  --glass-shadow: 0 18px 50px rgba(3, 1, 10, .45);
  --glass-blur: blur(18px) saturate(160%);
  --glass-blur-sm: blur(10px) saturate(150%);
  --radius-glass: 22px;
}

/* ---------- ambient light behind the glass (whole page, fixed) ---------- */
body.vice::before {
  content: ''; position: fixed; inset: -10vmax; z-index: -5; pointer-events: none;
  background:
    radial-gradient(38vmax 30vmax at 12% 18%, rgba(255, 45, 149, .20), transparent 70%),
    radial-gradient(34vmax 28vmax at 88% 30%, rgba(25, 240, 224, .12), transparent 70%),
    radial-gradient(40vmax 34vmax at 50% 95%, rgba(155, 60, 242, .22), transparent 70%),
    var(--night-1);
  animation: glass-drift 28s ease-in-out infinite alternate;
}
@keyframes glass-drift { 0% { transform: translate3d(0,0,0) scale(1); } 100% { transform: translate3d(-2vmax, 1.5vmax, 0) scale(1.06); } }
body.vice { background: transparent; }
html:has(body.vice) { background: var(--night-1); }
/* let the light show through sections that painted solid gradients */
body.vice .vice-districts,
body.vice .vice-pricing { background: transparent; }
body.vice .vice-how { background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(155, 60, 242, .14), transparent 70%); }

/* shared glass recipe */
body.vice .vice-step,
body.vice .price-card,
body.vice .dashboard-card-new,
body.vice .doll-card,
body.vice .vice-form,
body.vice .toast {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-edge), var(--glass-shadow);
  border-radius: var(--radius-glass);
}

/* ---------- nav: floating glass pill ---------- */
body.vice .nav {
  background: rgba(10, 5, 20, .35);
  -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset;
}
body.vice .nav.scrolled { background: rgba(10, 5, 20, .62); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
@media (max-width: 768px) {
  body.vice .nav-links.active, body.vice .nav-links.open {
    background: rgba(12, 6, 24, .82);
    -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  }
}

/* ---------- buttons: glossy ---------- */
body.vice .btn { border-radius: 999px; }
body.vice .btn-primary { position: relative; overflow: hidden; }
body.vice .btn-primary::after { /* glass sheen */
  content: ''; position: absolute; inset: 0 0 50% 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0));
}
body.vice .btn-ghost {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.22);
  -webkit-backdrop-filter: var(--glass-blur-sm); backdrop-filter: var(--glass-blur-sm);
  box-shadow: var(--glass-edge);
}

/* ---------- hero chips ---------- */
body.vice .vice-kicker, body.vice .vice-badge {
  background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.22);
  -webkit-backdrop-filter: var(--glass-blur-sm); backdrop-filter: var(--glass-blur-sm);
  box-shadow: var(--glass-edge);
}

/* ---------- district tabs: glass segmented pills ---------- */
body.vice .vice-district-tabs {
  padding: .45rem; border-radius: 999px; width: fit-content; max-width: 100%;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  -webkit-backdrop-filter: var(--glass-blur-sm); backdrop-filter: var(--glass-blur-sm);
  box-shadow: var(--glass-edge);
}
body.vice .vice-tab { border-color: transparent; background: transparent; }
body.vice .vice-tab:hover { background: color-mix(in srgb, var(--hue) 85%, transparent); }
@media (max-width: 640px) {
  body.vice .vice-district-tabs { border-radius: 18px; width: auto; }
}

/* ---------- district header: thinner, cleaner ---------- */
body.vice .vice-district-head { border-bottom-color: rgba(255,255,255,.06); }

/* ---------- doll cards: full-bleed photo + frosted caption ---------- */
body.vice .vice-card {
  border-radius: var(--radius-glass); background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: var(--glass-edge), 0 14px 40px rgba(3,1,10,.45);
}
body.vice .vice-card-img { aspect-ratio: 3 / 4; }
body.vice .vice-card-img::after { background: linear-gradient(180deg, rgba(11,6,20,0) 50%, rgba(11,6,20,.55) 100%); }
body.vice .vice-card-body {
  position: absolute; left: .6rem; right: .6rem; bottom: .6rem; z-index: 2;
  padding: .8rem .95rem .9rem; gap: .2rem; border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,.14), rgba(255,255,255,.05));
  -webkit-backdrop-filter: blur(16px) saturate(170%); backdrop-filter: blur(16px) saturate(170%);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 8px 24px rgba(3,1,10,.35);
}
body.vice .vice-card-body h3 { font-size: 1.45rem; line-height: 1.05; }
body.vice .vice-card-tag { min-height: 0; font-size: .85rem; color: #fff; opacity: .85; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body.vice .vice-card-cta { margin-top: .35rem; background: color-mix(in srgb, var(--hue) 30%, transparent); }
body.vice .vice-card-voice {
  background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3);
  -webkit-backdrop-filter: var(--glass-blur-sm); backdrop-filter: var(--glass-blur-sm);
}
body.vice .vice-card:hover, body.vice .vice-card:focus-visible {
  border-color: color-mix(in srgb, var(--hue) 70%, white 10%);
  box-shadow: var(--glass-edge), 0 22px 50px rgba(3,1,10,.55), 0 0 30px color-mix(in srgb, var(--hue) 40%, transparent);
}
/* teaser cards keep the caption readable over the silhouette */
body.vice .vice-card-soon .vice-card-body { background: rgba(255,255,255,.06); }
body.vice .vice-card-soon-tag { top: 40%; }

/* ---------- how it works ---------- */
body.vice .vice-step { padding: 2.2rem 1.8rem; }
body.vice .vice-step::before { top: -1px; left: 1.8rem; right: 1.8rem; border-radius: 2px; }

/* ---------- pricing ---------- */
body.vice .price-card { padding: 2.2rem 1.8rem; }
body.vice .price-card.popular, body.vice .price-card.featured {
  background: linear-gradient(135deg, rgba(255,45,149,.18), rgba(155,60,242,.10) 55%, rgba(255,255,255,.03));
  border-color: rgba(255,45,149,.55);
  box-shadow: var(--glass-edge), 0 0 0 1px rgba(255,45,149,.2), 0 24px 60px rgba(255,45,149,.18);
}

/* ---------- final CTA + contact ---------- */
body.vice .vice-final { background: linear-gradient(180deg, transparent, rgba(42,15,69,.75) 55%, rgba(74,19,82,.85) 100%); }
body.vice .vice-form { padding: 1.6rem; }
body.vice .vice-form input, body.vice .vice-form textarea {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: 14px;
}

/* ---------- footer ---------- */
body.vice .footer.vice-footer {
  background: rgba(5, 2, 10, .55);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
}

/* ---------- modals (sign in, register, build, viewer) ---------- */
body.vice .modal-overlay { background: rgba(5, 2, 12, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
body.vice .modal {
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(26px) saturate(170%); backdrop-filter: blur(26px) saturate(170%);
  border: 1px solid rgba(255,255,255,.14); border-radius: 26px;
  box-shadow: var(--glass-edge), 0 40px 90px rgba(0,0,0,.6), 0 0 50px rgba(255,45,149,.12);
}
body.vice .form-input, body.vice .form-select, body.vice .form-textarea {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: 14px;
}
body.vice .form-input:focus, body.vice .form-select:focus, body.vice .form-textarea:focus {
  background: rgba(255,255,255,.08); border-color: var(--neon-teal); box-shadow: 0 0 0 3px rgba(25,240,224,.15);
}
body.vice .vibe-option, body.vice .level-option span, body.vice .gallery-chip {
  background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12);
}

/* ---------- dashboard ---------- */
body.vice .dashboard-view { background: transparent; }
body.vice .doll-card { overflow: hidden; }
body.vice .doll-card:hover { border-color: rgba(255,45,149,.5); box-shadow: var(--glass-edge), 0 22px 50px rgba(3,1,10,.55), 0 0 26px rgba(255,45,149,.2); }
body.vice .dashboard-card-new { border-style: dashed; border-color: rgba(255,255,255,.22); }
body.vice .dashboard-card-new:hover { background: linear-gradient(135deg, rgba(255,45,149,.16), rgba(255,255,255,.04)); border-color: var(--neon-pink); }

/* ---------- chat ---------- */
body.vice .chat-view {
  background:
    radial-gradient(ellipse 70% 40% at 15% 0%, rgba(255,45,149,.16), transparent 70%),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(25,240,224,.10), transparent 70%),
    var(--night-1);
}
body.vice .chat-header {
  background: rgba(12, 6, 24, .55);
  -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
body.vice .chat-bubble { border-radius: 20px; }
body.vice .chat-bubble.user {
  background: linear-gradient(135deg, var(--neon-pink), #c3207a);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 8px 22px rgba(255,45,149,.25);
  border-bottom-right-radius: 6px;
}
body.vice .chat-bubble.assistant {
  background: linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
  -webkit-backdrop-filter: var(--glass-blur-sm); backdrop-filter: var(--glass-blur-sm);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 8px 22px rgba(3,1,10,.3);
  border-bottom-left-radius: 6px;
}
body.vice .chat-input-area {
  background: rgba(12, 6, 24, .55);
  -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
  border-top: 1px solid rgba(255,255,255,.08);
}
body.vice .chat-input { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; }
body.vice .chat-input:focus { border-color: var(--neon-teal); box-shadow: 0 0 0 3px rgba(25,240,224,.12); }
body.vice .chat-limit-banner {
  background: linear-gradient(135deg, rgba(255,45,149,.18), rgba(255,255,255,.04));
  -webkit-backdrop-filter: var(--glass-blur-sm); backdrop-filter: var(--glass-blur-sm);
  border: 1px solid rgba(255,45,149,.35); border-radius: 16px;
}

/* ---------- scroll reveal (js/reveal.js adds .reveal / .in) ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* phones: lighter blur keeps scrolling smooth */
@media (max-width: 640px) {
  :root { --glass-blur: blur(12px) saturate(150%); }
  body.vice .vice-card-body { left: .45rem; right: .45rem; bottom: .45rem; padding: .65rem .75rem .75rem; }
  body.vice .vice-card-body h3 { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  body.vice::before { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
