/* ===== Liquid Glass Effect — Taroweb ===== */

/* ── Keyframes ── */
@keyframes lq-shimmer {
  0%   { transform: translateX(-120%) skewX(-15deg); }
  100% { transform: translateX(220%)  skewX(-15deg); }
}

@keyframes lq-shimmer-slow {
  0%   { transform: translateX(-120%) skewX(-15deg); }
  100% { transform: translateX(220%)  skewX(-15deg); }
}

@keyframes lq-breathe {
  0%, 100% { opacity: .55; }
  50%       { opacity: .85; }
}

@keyframes lq-blob-morph {
  0%   { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  25%  { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
  50%  { border-radius: 50% 60% 30% 70% / 30% 70% 60% 40%; }
  75%  { border-radius: 40% 30% 60% 50% / 70% 40% 50% 60%; }
  100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

/* ── SVG liquid filter ── */
.lq-filter-target {
  filter: url(#liquid-distort);
}

/* ── Base liquid glass panel ── */
.lq {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg,
      rgba(255,255,255,0.11) 0%,
      rgba(255,255,255,0.04) 60%,
      rgba(255,255,255,0.07) 100%);
  backdrop-filter: blur(44px) saturate(220%) brightness(1.06);
  -webkit-backdrop-filter: blur(44px) saturate(220%) brightness(1.06);
  border: 1px solid rgba(255,255,255,0.20);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.45),
    inset 0 1.5px 0   rgba(255,255,255,0.42),
    inset 0 -1px  0   rgba(0,0,0,0.18),
    inset 1px  0  0   rgba(255,255,255,0.10),
    inset -1px 0  0   rgba(255,255,255,0.06),
    0 0 0 0.5px rgba(255,255,255,0.08);
}

/* Specular highlight — gradient sweep from top */
.lq::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.22) 0%,
    rgba(255,255,255,0.09) 18%,
    rgba(255,255,255,0.02) 50%,
    transparent 100%
  );
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
}

/* Shimmer — diagonal sweep */
.lq::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 45%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.11) 50%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
  animation: lq-shimmer 5s ease-in-out infinite;
}

/* Children must be above pseudo-elements */
.lq > * { position: relative; z-index: 2; }

/* Hover — intensify specular */
.lq:hover::before {
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.30) 0%,
    rgba(255,255,255,0.12) 18%,
    rgba(255,255,255,0.03) 50%,
    transparent 100%
  );
}

/* ── Liquid blobs — morphing + distortion ── */
.bg-blob {
  animation: lq-blob-morph 10s ease-in-out infinite, lq-breathe 6s ease-in-out infinite;
  filter: blur(70px);
}
.blob-1 { animation-delay: 0s,  0s;   animation-duration: 12s, 7s; }
.blob-2 { animation-delay: -4s, -2s;  animation-duration: 14s, 8s; }
.blob-3 { animation-delay: -8s, -4s;  animation-duration: 10s, 6s; }
.blob-4 { animation-delay: -2s, -5s;  animation-duration: 16s, 9s; }

/* ── Apply to existing panels ── */
.feature-card,
.auth-card,
.reading-card,
.stat-card,
.cta-box,
.card-preview,
.referral-box,
.history-card,
.shop-card,
.reading-type-card,
.result-card,
.result-interpretation,
.result-card-row,
.dashboard-grid > * {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg,
      rgba(255,255,255,0.10) 0%,
      rgba(255,255,255,0.04) 60%,
      rgba(255,255,255,0.07) 100%) !important;
  backdrop-filter: blur(44px) saturate(220%) brightness(1.06) !important;
  -webkit-backdrop-filter: blur(44px) saturate(220%) brightness(1.06) !important;
  border-color: rgba(255,255,255,0.20) !important;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.45),
    inset 0 1.5px 0   rgba(255,255,255,0.38),
    inset 0 -1px  0   rgba(0,0,0,0.15),
    inset 1px  0  0   rgba(255,255,255,0.08),
    inset -1px 0  0   rgba(255,255,255,0.05) !important;
}

/* Specular on each panel */
.feature-card::before,
.auth-card::before,
.reading-card::before,
.stat-card::before,
.cta-box::before,
.card-preview::before,
.referral-box::before,
.history-card::before,
.shop-card::before,
.reading-type-card::before,
.result-card::before,
.result-interpretation::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.20) 0%,
    rgba(255,255,255,0.07) 20%,
    transparent 60%
  );
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
}

/* Shimmer on each panel */
.feature-card::after,
.auth-card::after,
.stat-card::after,
.shop-card::after,
.reading-type-card::after,
.result-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.09) 50%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
  animation: lq-shimmer-slow 7s ease-in-out infinite;
}
.feature-card::after  { animation-delay: 0s;   }
.stat-card::after     { animation-delay: -2.3s; }
.shop-card::after     { animation-delay: -1.1s; }
.result-card::after   { animation-delay: -3.5s; }
.reading-type-card::after { animation-delay: -0.8s; }
.auth-card::after     { animation-delay: -4s;   }

/* Ensure card children are above pseudo-elements */
.feature-card > *,
.auth-card > *,
.reading-card > *,
.stat-card > *,
.cta-box > *,
.referral-box > *,
.history-card > *,
.shop-card > *,
.reading-type-card > *,
.result-card > *,
.result-interpretation > * {
  position: relative;
  z-index: 1;
}

/* ── Navbar — enhance specular ── */
.navbar {
  background: rgba(13,5,32,0.55) !important;
  backdrop-filter: blur(48px) saturate(200%) brightness(1.04) !important;
  -webkit-backdrop-filter: blur(48px) saturate(200%) brightness(1.04) !important;
  border-bottom: 1px solid rgba(255,255,255,0.16) !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.10),
    0 4px 24px rgba(0,0,0,0.3) !important;
}

/* ── Buttons — glass shimmer on hover ── */
.btn-outline {
  position: relative;
  overflow: hidden;
}
.btn-outline::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.18),
    transparent
  );
  transform: translateX(-120%) skewX(-15deg);
  transition: none;
  pointer-events: none;
}
.btn-outline:hover::after {
  animation: lq-shimmer .55s ease forwards;
}

.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.24),
    transparent
  );
  transform: translateX(-120%) skewX(-15deg);
  pointer-events: none;
}
.btn-primary:hover::after {
  animation: lq-shimmer .55s ease forwards;
}

/* ── Flash messages ── */
.flash {
  backdrop-filter: blur(44px) saturate(200%) !important;
  -webkit-backdrop-filter: blur(44px) saturate(200%) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15) !important;
}

/* ── Form inputs ── */
input[type="text"],
input[type="email"],
textarea,
select {
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07) !important;
}
input:focus,
textarea:focus {
  box-shadow:
    0 0 0 2px rgba(168,85,247,0.35),
    inset 0 1px 0 rgba(255,255,255,0.12) !important;
}

/* ── Hover transitions ── */
.feature-card:hover,
.shop-card:hover,
.reading-type-card:hover,
.history-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.55),
    inset 0 2px 0   rgba(255,255,255,0.48),
    inset 0 -1px 0  rgba(0,0,0,0.18),
    0 0 0 1px rgba(255,255,255,0.14) !important;
  border-color: rgba(255,255,255,0.30) !important;
}
