/* Lunaria — Cosmic & Spiritual Design System (Aligned to Original Lunaria Visual Presentation) */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Cinzel:wght@500;600;700;800;900&display=swap');

:root {
  --bg-deep: #07080d;
  --bg-elevated: #0f111c;
  --bg-card: rgba(16, 18, 29, 0.78);
  --bg-card-hover: rgba(24, 27, 44, 0.94);
  --bg-header: rgba(7, 8, 13, 0.92);
  --bg-dropdown: rgba(13, 15, 25, 0.98);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(186, 148, 255, 0.38);
  --purple-glow: #7c4dff;
  --amber-gold: #f6c453;
  --gold-gradient: linear-gradient(135deg, #fce085 0%, #e0a93b 50%, #c47c1f 100%);
  --cosmic-gradient: linear-gradient(135deg, #a78bfa 0%, #e879f9 50%, #f6a152 100%);
}

/* Lunar Light Mode */
body[data-theme="light"] {
  --bg-deep: #f6f4fc;
  --bg-elevated: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: rgba(255, 255, 255, 0.99);
  --bg-header: rgba(246, 244, 252, 0.92);
  --bg-dropdown: rgba(255, 255, 255, 0.98);
  --text-main: #18132c;
  --text-muted: #554d74;
  --border-subtle: rgba(109, 72, 219, 0.14);
  --border-glow: rgba(121, 82, 235, 0.45);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Light Mode utility overrides */
body[data-theme="light"] .text-white {
  color: #18132c !important;
}
body[data-theme="light"] .btn-primary-glow,
body[data-theme="light"] .btn-header-pill,
body[data-theme="light"] .keep-white,
body[data-theme="light"] .keep-white .text-white {
  color: #ffffff !important;
}
body[data-theme="light"] .text-gray-200,
body[data-theme="light"] .text-gray-300 {
  color: #3d355c !important;
}
body[data-theme="light"] .text-gray-400 {
  color: #645b84 !important;
}
body[data-theme="light"] .text-purple-200,
body[data-theme="light"] .text-purple-300 {
  color: #6d28d9 !important;
}
body[data-theme="light"] .text-amber-300,
body[data-theme="light"] .text-amber-400 {
  color: #b45309 !important;
}
body[data-theme="light"] .bg-white\/5 {
  background-color: rgba(121, 82, 235, 0.06) !important;
}
body[data-theme="light"] .border-white\/10,
body[data-theme="light"] .border-white\/5 {
  border-color: rgba(121, 82, 235, 0.14) !important;
}

.font-serif-title {
  font-family: 'Cinzel', serif;
}

/* Top Announcement Bar — Exact Gradient from Lunaria Reference Screenshot */
.promo-top-bar {
  background: linear-gradient(90deg, #39165f 0%, #6f461a 50%, #39165f 100%);
  border-bottom: 1px solid rgba(186, 148, 255, 0.18);
}

/* Lunaria App-Icon Logo Badge from Reference Screenshot */
.lunaria-logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #8b46e5 0%, #ca68b8 52%, #f5a623 100%);
  box-shadow: 0 4px 20px rgba(139, 70, 229, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.group:hover .lunaria-logo-mark {
  transform: scale(1.05);
  box-shadow: 0 6px 26px rgba(245, 166, 35, 0.45);
}

/* Header Violet-Orchid Pill CTA from Reference Screenshot */
.btn-header-pill {
  background: linear-gradient(90deg, #7c4dff 0%, #b968d8 100%);
  color: #ffffff;
  box-shadow: 0 0 24px rgba(155, 93, 229, 0.48);
  transition: all 0.25s ease;
}

.btn-header-pill:hover {
  filter: brightness(1.08);
  box-shadow: 0 0 32px rgba(185, 104, 216, 0.68);
  transform: translateY(-1px);
}

/* Background Cosmic Nebula Ambient */
.cosmic-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 18%, rgba(106, 77, 188, 0.19) 0%, transparent 44%),
    radial-gradient(circle at 85% 28%, rgba(220, 110, 170, 0.13) 0%, transparent 40%),
    radial-gradient(circle at 50% 82%, rgba(242, 153, 74, 0.1) 0%, transparent 50%),
    var(--bg-deep);
}

body[data-theme="light"] .cosmic-bg {
  background:
    radial-gradient(circle at 15% 20%, rgba(139, 92, 246, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(245, 158, 11, 0.09) 0%, transparent 50%),
    #f6f4fc;
}

/* Starfield Overlay */
.starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 20px 30px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 100px 150px, rgba(255,255,255,0.8), rgba(0,0,0,0)),
    radial-gradient(1px 1px at 240px 80px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 320px 280px, rgba(255,230,170,0.9), rgba(0,0,0,0)),
    radial-gradient(1px 1px at 450px 120px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 600px 350px, rgba(200,210,255,0.7), rgba(0,0,0,0)),
    radial-gradient(1px 1px at 750px 200px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 890px 480px, rgba(255,200,240,0.8), rgba(0,0,0,0)),
    radial-gradient(1px 1px at 1050px 90px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 1200px 310px, #ffffff, rgba(0,0,0,0));
  background-size: 1300px 600px;
  opacity: 0.6;
}

body[data-theme="light"] .starfield {
  opacity: 0.12;
}

/* Header & Clean Navigation */
.site-header {
  background: var(--bg-header);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-top-link {
  font-size: 13.5px;
  font-weight: 500;
  color: #cbd5e1;
  padding: 8px 11px;
  border-radius: 10px;
  transition: color 0.2s ease, background-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
}

body[data-theme="light"] .nav-top-link {
  color: #2e254d;
}

.nav-top-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

body[data-theme="light"] .nav-top-link:hover {
  color: #6d28d9;
  background: rgba(121, 82, 235, 0.08);
}

.nav-item-group {
  position: relative;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 255px;
  background: var(--bg-dropdown);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.65), 0 0 24px rgba(121, 82, 235, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 60;
}

.nav-dropdown::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}

.nav-item-group:hover > .nav-dropdown,
.nav-item-group:focus-within > .nav-dropdown,
.nav-item-group.open > .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-wide {
  min-width: 560px;
  left: -140px;
}

.nav-dropdown-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-main);
  transition: all 0.15s ease;
  text-decoration: none;
  cursor: pointer;
}

.nav-dropdown-link:hover {
  background: rgba(124, 77, 255, 0.2);
  color: #fbbf24;
}

/* Glassmorphism Cards & Editorial Photography Containers */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
  border-color: var(--border-glow);
  background: var(--bg-card-hover);
  box-shadow: 0 14px 40px -8px rgba(124, 77, 255, 0.24);
}

.card-photo-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0c0d16;
}

.card-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover .card-photo-wrap img,
.group:hover .card-photo-wrap img {
  transform: scale(1.06);
}

.card-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 9, 15, 0.88) 0%, rgba(8, 9, 15, 0.2) 55%, rgba(8, 9, 15, 0.05) 100%);
  pointer-events: none;
}

.modal-panel {
  background: var(--bg-dropdown);
  border: 1px solid var(--border-glow);
  border-radius: 22px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75);
}

/* Glowing text gradients */
.text-cosmic-glow {
  background: var(--cosmic-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gold-glow {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Primary & Secondary Action Buttons */
.btn-primary-glow {
  background: linear-gradient(135deg, #7952eb 0%, #ba68c8 55%, #f39c12 100%);
  background-size: 200% auto;
  color: #ffffff;
  box-shadow: 0 4px 22px -2px rgba(124, 77, 255, 0.5);
  transition: all 0.3s ease;
}

.btn-primary-glow:hover {
  background-position: right center;
  box-shadow: 0 6px 28px 0 rgba(243, 156, 18, 0.55);
  transform: translateY(-1px);
}

.btn-secondary-glass {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.btn-secondary-glass:hover {
  background: rgba(124, 77, 255, 0.16);
  border-color: var(--border-glow);
  transform: translateY(-1px);
}

/* REAL TAROT CARD 3D FLIP SYSTEM */
.tarot-card-scene {
  perspective: 1200px;
}

.tarot-card {
  width: 100%;
  height: 388px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  border-radius: 18px;
}

.tarot-card.flipped {
  transform: rotateY(180deg);
}

.tarot-card-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.tarot-card-back {
  background: linear-gradient(160deg, #131422 0%, #0a0b12 100%);
  border: 2px solid #583bb3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.tarot-card-back::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(245, 176, 65, 0.35);
  border-radius: 12px;
  pointer-events: none;
}

.tarot-card-back::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px dashed rgba(186, 148, 255, 0.25);
  border-radius: 10px;
  pointer-events: none;
}

.tarot-card-front {
  background: linear-gradient(165deg, #121320 0%, #0b0c14 100%);
  border: 2px solid #583bb3;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 14px 14px;
  text-align: center;
}

.tarot-card-image-wrap {
  width: 122px;
  height: 196px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  border: 1.5px solid rgba(245, 176, 65, 0.55);
  background: #000;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.75);
  margin-top: 10px;
  flex-shrink: 0;
}

.tarot-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@keyframes deckShuffle {
  0% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(0.96) rotate(-3deg); }
  50% { transform: scale(1.02) rotate(2deg); }
  75% { transform: scale(0.98) rotate(-1deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.shuffle-anim {
  animation: deckShuffle 0.6s ease-in-out;
}

/* Status Dots */
.status-dot-online {
  width: 9px;
  height: 9px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  display: inline-block;
  animation: pulse-dot 2s infinite;
}

.status-dot-busy {
  width: 9px;
  height: 9px;
  background-color: #f59e0b;
  border-radius: 50%;
  box-shadow: 0 0 8px #f59e0b;
  display: inline-block;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Video Play Pulse */
.play-pulse {
  position: relative;
}
.play-pulse::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 9999px;
  border: 2px solid rgba(245, 176, 65, 0.6);
  animation: ringPulse 2.2s infinite;
}
@keyframes ringPulse {
  0% { transform: scale(0.92); opacity: 0.9; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* Typing wave */
.typing-dot {
  animation: typingBounce 1.4s infinite ease-in-out both;
}
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

details > summary {
  list-style: none;
}
details > summary::-webkit-details-marker {
  display: none;
}
details[open] .faq-chevron {
  transform: rotate(180deg);
}

.floating-help-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 45;
  box-shadow: 0 10px 30px rgba(124, 77, 255, 0.55);
}

/* Mobile-First Refinements (Smartphones 320px–639px) */
@media (max-width: 639px) {
  .lunaria-logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .lunaria-logo-mark svg {
    width: 18px;
    height: 18px;
  }

  .tarot-card {
    height: 344px;
  }

  .tarot-card-image-wrap {
    width: 108px;
    height: 174px;
    margin-top: 8px;
  }

  .mobile-chip-scroll {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    margin-left: -4px;
    margin-right: -4px;
    padding-left: 4px;
    padding-right: 4px;
  }

  .mobile-chip-scroll::-webkit-scrollbar {
    display: none;
  }

  .mobile-chip-scroll > button {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .floating-help-btn {
    right: 14px;
    bottom: 14px;
    padding: 10px 14px;
  }
}

@media (max-width: 374px) {
  #header-free-btn {
    padding: 7px 10px;
    font-size: 10px;
  }

  #theme-toggle-btn {
    display: none;
  }
}

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: rgba(10, 12, 20, 0.4);
}
::-webkit-scrollbar-thumb {
  background: rgba(124, 77, 255, 0.45);
  border-radius: 9999px;
}

/* ==========================================================================
   MARKETPLACE ENGINE: BLURRED_MESSAGE, NOT_ENOUGH_CREDITS, ON_HOLD, PROMOTION
   ========================================================================== */
.blurred-message-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(246, 196, 83, 0.45);
  background: linear-gradient(145deg, rgba(42, 22, 78, 0.85) 0%, rgba(18, 15, 34, 0.95) 100%);
}

.blurred-secret-text {
  filter: blur(5.5px);
  -webkit-filter: blur(5.5px);
  user-select: none;
  pointer-events: none;
  opacity: 0.78;
  line-height: 1.55;
}

.blurred-cta-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 12, 26, 0.08) 0%, rgba(14, 12, 26, 0.78) 55%, rgba(14, 12, 26, 0.94) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 12px;
  text-align: center;
}

.not-enough-credits-bar {
  background: linear-gradient(90deg, rgba(58, 22, 94, 0.96) 0%, rgba(92, 46, 18, 0.96) 100%);
  border-top: 1px solid rgba(246, 196, 83, 0.45);
}

.promo-chat-card {
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.24) 0%, rgba(246, 196, 83, 0.18) 100%);
  border: 1px solid rgba(246, 196, 83, 0.5);
  border-radius: 16px;
}

.inbox-blurred-pill {
  background: rgba(246, 196, 83, 0.16);
  border: 1px solid rgba(246, 196, 83, 0.42);
  color: #fde68a;
}

@keyframes wavePulse {
  0%, 100% { transform: scaleY(0.45); }
  50% { transform: scaleY(1); }
}

.audio-bar {
  width: 3px;
  border-radius: 999px;
  background: #f6c453;
  display: inline-block;
}

.audio-playing .audio-bar {
  animation: wavePulse 0.75s infinite ease-in-out;
}
.audio-playing .audio-bar:nth-child(2n) {
  animation-delay: 0.2s;
}
.audio-playing .audio-bar:nth-child(3n) {
  animation-delay: 0.35s;
}
