/* ========== FLOATING CLOUDS ========== */
.clouds-container {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.cloud {
  position: absolute;
  background: radial-gradient(ellipse, rgba(184, 197, 214, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(40px);
}

.cloud-1 {
  width: 500px; height: 200px;
  top: 10%; left: -200px;
  animation: cloudDrift 80s linear infinite;
}

.cloud-2 {
  width: 400px; height: 160px;
  top: 30%; left: -150px;
  animation: cloudDrift 100s linear infinite;
  animation-delay: -30s;
  opacity: 0.7;
}

.cloud-3 {
  width: 600px; height: 220px;
  top: 60%; left: -250px;
  animation: cloudDrift 120s linear infinite;
  animation-delay: -60s;
  opacity: 0.5;
}

@keyframes cloudDrift {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(calc(100vw + 100%)); }
}

/* ========== PARTICLE SYSTEM ========== */
.particles-container {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% {
    opacity: 0;
    transform: translateY(100vh) scale(0);
  }
  10% {
    opacity: 0.8;
    transform: translateY(90vh) scale(1);
  }
  90% {
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: translateY(-10vh) scale(0.5);
  }
}

/* ========== MAGIC SPARKLE EFFECT ========== */
.sparkle-container {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--gold), 0 0 12px var(--gold-dim);
  animation: sparkle 1s ease-out forwards;
}

@keyframes sparkle {
  0% { opacity: 1; transform: scale(1) translate(0, 0); }
  100% { opacity: 0; transform: scale(0) translate(var(--dx, 20px), var(--dy, -20px)); }
}

/* ========== SOFT GLOW ========== */
.glow {
  position: relative;
}
.glow::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 120%; height: 120%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, var(--gold-glow), transparent 60%);
  pointer-events: none;
  animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

/* ========== LOADING SPINNER ========== */
.loading-orb {
  width: 280px;
  height: 280px;
  margin: 40px auto;
  background: url('/assets/loading-orb-transparent.png') center/contain no-repeat;
  animation: orbPulse 3s ease-in-out infinite;
}
@keyframes orbPulse {
  0%, 100% { opacity: 0.85; transform: scale(1) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.05) rotate(5deg); }
}

.loading-text {
  text-align: center;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-style: italic;
  margin-top: 16px;
  animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ========== BLUR OVERLAY (for locked interpretations) ========== */
.interpretation-locked {
  position: relative;
  overflow: hidden;
}

.interpretation-locked .content {
  filter: blur(8px);
  user-select: none;
  pointer-events: none;
}

.interpretation-locked .lock-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 26, 0.6);
  backdrop-filter: blur(2px);
  z-index: 10;
  padding: 24px;
  text-align: center;
}

.lock-overlay h3 {
  margin-bottom: 12px;
}

.lock-overlay p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  max-width: 300px;
}

/* ========== CASTLE SILHOUETTE ========== */
.castle-bg {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background:
    linear-gradient(transparent, rgba(10, 10, 26, 0.8)),
    linear-gradient(to right,
      transparent 5%,
      rgba(45, 27, 78, 0.1) 10%,
      rgba(45, 27, 78, 0.15) 15%,
      rgba(45, 27, 78, 0.1) 20%,
      transparent 25%,
      transparent 75%,
      rgba(45, 27, 78, 0.1) 80%,
      rgba(45, 27, 78, 0.15) 85%,
      rgba(45, 27, 78, 0.1) 90%,
      transparent 95%
    );
  pointer-events: none;
  z-index: 0;
}
