/* 星座运势 · AI 解读特效 */

.zh-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 6px 14px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(253, 230, 138, 0.95);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(56, 189, 248, 0.2));
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 999px;
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.35);
  animation: zhAiBadgeGlow 3s ease-in-out infinite;
}

.zh-ai-badge.is-ai {
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.65);
}

.zh-ai-badge[hidden] {
  display: none !important;
}

@keyframes zhAiBadgeGlow {
  0%, 100% { box-shadow: 0 0 16px rgba(168, 85, 247, 0.25); }
  50%      { box-shadow: 0 0 32px rgba(251, 191, 36, 0.45); }
}

.zh-detail-scope.zh-ai-pending .zh-reading-body,
.zh-detail-scope.zh-ai-pending .zh-detail-dim-grid {
  position: relative;
  min-height: 120px;
}

.zh-detail-scope.zh-ai-pending .zh-reading-body::after,
.zh-detail-scope.zh-ai-pending .zh-detail-dim-grid::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.06) 50%,
    transparent 60%
  );
  background-size: 200% 100%;
  animation: zhAiShimmer 1.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes zhAiShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.zh-ai-para {
  opacity: 0;
  transform: translateY(12px);
  animation: zhAiParaIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.zh-ai-para:nth-child(1) { animation-delay: 0.05s; }
.zh-ai-para:nth-child(2) { animation-delay: 0.15s; }
.zh-ai-para:nth-child(3) { animation-delay: 0.25s; }

@keyframes zhAiParaIn {
  to { opacity: 1; transform: translateY(0); }
}

.zh-detail-insight.zh-ai-revealed {
  animation: zhInsightPulse 1.2s ease-out;
}

@keyframes zhInsightPulse {
  0%   { text-shadow: 0 0 0 rgba(251, 191, 36, 0); }
  40%  { text-shadow: 0 0 24px rgba(251, 191, 36, 0.55); }
  100% { text-shadow: 0 0 0 rgba(251, 191, 36, 0); }
}

.zh-ai-dim-card {
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--zh-ai-delay, 0ms);
}

.zh-ai-dim-card.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.zh-ai-dim-card.is-highlight {
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: 0 0 40px rgba(168, 85, 247, 0.25);
}

.zh-score-card.zh-ai-score-pulse .zh-score-card-val {
  animation: zhScorePop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes zhScorePop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.18); color: #fde68a; }
  100% { transform: scale(1); }
}

.zh-detail-luck.zh-ai-revealed {
  animation: zhLuckReveal 0.8s ease-out;
}

@keyframes zhLuckReveal {
  from { opacity: 0.4; filter: blur(4px); }
  to   { opacity: 1; filter: blur(0); }
}

.zh-ai-ready .zh-detail-glyph--pulse {
  animation: zhGlyphAiPulse 2.5s ease-in-out infinite;
}

@keyframes zhGlyphAiPulse {
  0%, 100% {
    filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.4));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 28px rgba(168, 85, 247, 0.65));
    transform: scale(1.04);
  }
}

.lj-ai-loader.is-theme-zodiac .lj-ai-loader__backdrop {
  background:
    radial-gradient(ellipse 70% 55% at 50% 35%, rgba(56, 189, 248, 0.28) 0%, transparent 62%),
    radial-gradient(ellipse 55% 48% at 20% 75%, rgba(168, 85, 247, 0.32) 0%, transparent 55%),
    radial-gradient(ellipse 45% 40% at 85% 60%, rgba(251, 191, 36, 0.18) 0%, transparent 50%),
    rgba(4, 3, 14, 0.94);
}

.lj-ai-loader.is-theme-zodiac .lj-ai-loader__orb {
  background: conic-gradient(from 180deg, #38bdf8, #a855f7, #fbbf24, #38bdf8);
}

.lj-ai-loader.is-theme-zodiac .lj-ai-loader__title {
  background: linear-gradient(90deg, #7dd3fc, #e9d5ff, #fde68a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Hub 预览卡 AI 态 */
.zh-hub-ai-badge {
  margin-top: 8px;
  font-size: 0.68rem;
}

.zh-masthead-preview.zh-ai-pending {
  position: relative;
}

.zh-masthead-preview.zh-ai-pending::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 38%,
    rgba(255, 255, 255, 0.07) 50%,
    transparent 62%
  );
  background-size: 220% 100%;
  animation: zhAiShimmer 1.6s ease-in-out infinite;
}

.zh-masthead-preview.zh-ai-ready {
  animation: zhHubCardGlow 1.4s ease-out;
}

@keyframes zhHubCardGlow {
  0%   { box-shadow: 0 0 0 rgba(168, 85, 247, 0); }
  45%  { box-shadow: 0 0 48px rgba(168, 85, 247, 0.35), inset 0 0 24px rgba(251, 191, 36, 0.08); }
  100% { box-shadow: none; }
}

.zh-index-preview-text.zh-ai-content-ready {
  animation: zhAiParaIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.zh-preview-insight.zh-ai-revealed {
  animation: zhInsightPulse 1.2s ease-out;
}

.zh-hub-score-row.zh-ai-score-pulse .zh-hub-score-val {
  animation: zhScorePop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.zh-luck-panel.zh-ai-revealed {
  animation: zhLuckReveal 0.75s ease-out;
}

/* 详情页 AI 就绪 · 星芒爆发 */
.zh-detail-scope.zh-ai-ready .zh-detail-glyph--pulse::after {
  content: '';
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.35) 0%, transparent 70%);
  animation: zhGlyphBurst 1.2s ease-out forwards;
  pointer-events: none;
}

@keyframes zhGlyphBurst {
  0%   { opacity: 0; transform: scale(0.6); }
  30%  { opacity: 1; transform: scale(1.15); }
  100% { opacity: 0; transform: scale(1.6); }
}

.zh-detail-glyph--pulse {
  position: relative;
}

.zh-reading-body.zh-ai-content-ready {
  position: relative;
}

.zh-detail-scope.zh-ai-ready .zh-section-title i {
  animation: zhAiIconTwinkle 2s ease-in-out infinite;
}

@keyframes zhAiIconTwinkle {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(251, 191, 36, 0)); }
  50%      { filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.65)); }
}

/* ── AI 预测门 ── */
.zh-detail-scope.is-awaiting-ai .zh-detail-ai-body {
  position: relative;
}

.zh-detail-scope.is-awaiting-ai .zh-detail-ai-body::before {
  content: '';
  position: absolute;
  inset: -8px 0 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(10, 6, 18, 0.15) 0%,
    rgba(10, 6, 18, 0.55) 35%,
    rgba(10, 6, 18, 0.72) 100%
  );
  border-radius: 20px;
}

.zh-detail-scope.is-awaiting-ai .zh-detail-ai-body > * {
  filter: blur(2px) saturate(0.85);
  opacity: 0.72;
  pointer-events: none;
  user-select: none;
  transition: filter 0.5s ease, opacity 0.5s ease;
}

.zh-detail-scope.is-awaiting-ai.zh-ai-revealing .zh-detail-ai-body > * {
  filter: none;
  opacity: 1;
  pointer-events: auto;
  user-select: auto;
}

.zh-detail-scope.is-awaiting-ai.zh-ai-revealing .zh-detail-ai-body::before {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.zh-ai-gate-anchor {
  position: relative;
  z-index: 5;
  margin: 0 0 8px;
}

.zh-ai-gate {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background:
    linear-gradient(145deg, rgba(30, 18, 52, 0.92) 0%, rgba(12, 8, 22, 0.96) 100%);
  box-shadow:
    0 0 0 1px rgba(168, 85, 247, 0.15) inset,
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 0 48px rgba(124, 58, 237, 0.22);
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.zh-ai-gate.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.zh-ai-gate[hidden] {
  display: none !important;
}

.zh-ai-gate--hub {
  margin: 16px 0 4px;
  border-radius: 18px;
}

.zh-ai-gate-aurora {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(56, 189, 248, 0.2) 0%, transparent 55%),
    radial-gradient(ellipse 70% 55% at 90% 100%, rgba(168, 85, 247, 0.25) 0%, transparent 50%);
  animation: zhGateAurora 8s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes zhGateAurora {
  from { opacity: 0.65; transform: scale(1); }
  to   { opacity: 1; transform: scale(1.06); }
}

.zh-ai-gate-inner {
  position: relative;
  z-index: 1;
  padding: 28px 24px 22px;
  text-align: center;
}

.zh-ai-gate-inner--compact {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px 16px;
  padding: 16px 18px;
  text-align: left;
}

.zh-ai-gate-orb-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 14px;
}

.zh-ai-gate-orb-wrap--sm {
  width: 52px;
  height: 52px;
  margin: 0;
}

.zh-ai-gate-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(251, 191, 36, 0.35);
  animation: zhGateRingSpin 12s linear infinite;
}

.zh-ai-gate-ring--2 {
  inset: 8px;
  border-color: rgba(168, 85, 247, 0.4);
  animation-direction: reverse;
  animation-duration: 9s;
}

@keyframes zhGateRingSpin {
  to { transform: rotate(360deg); }
}

.zh-ai-gate-glyph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  color: #fde68a;
  text-shadow: 0 0 24px rgba(251, 191, 36, 0.65);
  animation: zhGateGlyphFloat 3.2s ease-in-out infinite;
}

.zh-ai-gate-orb-wrap--sm .zh-ai-gate-glyph {
  font-size: 1.6rem;
}

@keyframes zhGateGlyphFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

.zh-ai-gate-eyebrow {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(226, 198, 255, 0.75);
}

.zh-ai-gate-title {
  margin: 0 0 10px;
  font-size: 1.35rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.3;
}

.zh-ai-gate-inner--compact .zh-ai-gate-title {
  margin: 0 0 4px;
  font-size: 1rem;
}

.zh-ai-gate-desc {
  margin: 0 0 18px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(226, 198, 255, 0.72);
}

.zh-ai-gate-inner--compact .zh-ai-gate-desc {
  margin: 0;
  font-size: 0.78rem;
}

.zh-ai-gate-foot {
  margin: 14px 0 0;
  font-size: 0.75rem;
  color: rgba(196, 181, 220, 0.5);
}

.zh-ai-gate-sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.zh-ai-gate-spark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fde68a;
  box-shadow: 0 0 8px #fbbf24;
  opacity: 0;
  transform: translate(-50%, -50%);
}

.zh-ai-gate-sparks.is-burst .zh-ai-gate-spark {
  animation: zhGateSparkFly 0.75s ease-out forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes zhGateSparkFly {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0); }
}

.zh-ai-gate-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 220px;
  padding: 14px 28px;
  border: none;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #1a1030;
  background: linear-gradient(135deg, #fde68a 0%, #fbbf24 45%, #f59e0b 100%);
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(251, 191, 36, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.zh-ai-gate-btn--sm {
  min-width: 0;
  padding: 10px 18px;
  font-size: 0.82rem;
  white-space: nowrap;
}

.zh-ai-gate-btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 40px rgba(251, 191, 36, 0.5);
}

.zh-ai-gate-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.zh-ai-gate-btn:disabled {
  opacity: 0.85;
  cursor: wait;
}

.zh-ai-gate-btn-glow {
  position: absolute;
  inset: -40%;
  background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: zhGateBtnGlow 3s linear infinite;
  opacity: 0.5;
}

@keyframes zhGateBtnGlow {
  to { transform: rotate(360deg); }
}

.zh-ai-gate.is-loading .zh-ai-gate-btn-glow {
  opacity: 0.9;
  animation-duration: 1.2s;
}

.zh-masthead-preview.is-gate-active .zh-score-visual,
.zh-masthead-preview.is-gate-active .zh-preview-body,
.zh-masthead-preview.is-gate-active .zh-luck-panel,
.zh-masthead-preview.is-gate-active .zh-preview-cta {
  filter: blur(1.5px) saturate(0.88);
  opacity: 0.75;
  pointer-events: none;
  transition: filter 0.45s ease, opacity 0.45s ease;
}

.zh-masthead-preview.is-gate-active.is-gate-revealed .zh-score-visual,
.zh-masthead-preview.is-gate-active.is-gate-revealed .zh-preview-body,
.zh-masthead-preview.is-gate-active.is-gate-revealed .zh-luck-panel,
.zh-masthead-preview.is-gate-active.is-gate-revealed .zh-preview-cta {
  filter: none;
  opacity: 1;
  pointer-events: auto;
}

.zh-preview-cta.is-under-mist {
  position: relative;
}

.zh-preview-cta.is-under-mist::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 14px;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(10, 6, 18, 0.2) 0%,
    rgba(10, 6, 18, 0.55) 45%,
    rgba(10, 6, 18, 0.78) 100%
  );
}

.zh-preview-more.is-cta-locked {
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.zh-preview-more.is-cta-locked:hover .zh-btn-cta-icon {
  transform: none;
}

@media (max-width: 640px) {
  .zh-ai-gate-inner--compact {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }
  .zh-ai-gate-inner--compact .zh-ai-gate-btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}
