/* =========================================
   Light and Dark Page Styles
   ========================================= */

.light-dark-page {
  background-color: #f8fafc;
}

.light-dark-hero {
  background: linear-gradient(135deg, #e0e7ff 0%, #f3f4f6 100%);
  border: 3px double #a5b4fc;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 4rem; /* Adjusted spacing */
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.1);
  text-align: center;
  position: relative;
  overflow: hidden;
  /* Premium Glow Animation */
  animation: hero-glow 4s ease-in-out infinite alternate;
}

@keyframes hero-glow {
  from {
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.1);
    border-color: #a5b4fc;
  }
  to {
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.5); /* Stronger glow */
    border-color: #818cf8; /* Slightly brighter border */
  }
}

/* Premium Light Particles */
.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.light-orb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  opacity: 0;
  animation: float-orb 10s infinite linear;
  filter: blur(2px);
}

@keyframes float-orb {
  0% {
    transform: translateY(120%) scale(0.5);
    opacity: 0;
  }
  20% {
    opacity: 0.7;
  }
  80% {
    opacity: 0.7;
  }
  100% {
    transform: translateY(-20%) scale(1.2);
    opacity: 0;
  }
}

/* Ensure text stays on top */
.win-hero-quote {
  position: relative;
  z-index: 1;
}

.light-dark-hero .win-hero-quote p {
  margin: 0.5rem 0;
  font-size: 1.2rem; /* Slightly larger */
  line-height: 2; /* More breathing room */
  color: #1e293b;
  font-weight: 500; /* Lighter weight for Mincho */
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "YuMincho", serif;
  letter-spacing: 0.05em;
}

.light-dark-hero .win-hero-author {
  color: #4f46e5;
  font-weight: bold;
  margin-top: 1.5rem;
  text-align: right;
  font-size: 1rem;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "YuMincho", serif;
}

.light-dark-header {
  text-align: left;
  margin-bottom: 2rem;
}

.light-dark-title {
  color: #6366f1;
  font-size: 2.5rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.light-path-line {
  margin: 0.5rem 0;
  width: 100px;
  height: 3px;
  background: #a5b4fc;
}

.light-dark-subtitle {
  margin-top: 0.5rem;
  color: #64748b;
  font-weight: bold;
}

/* Light Path Line Animation */
.light-path {
  background: #4338ca; /* Darker Indigo for contrast */
  position: relative;
  overflow: hidden;
  height: 5px !important; /* Slightly thicker */
  border-radius: 4px;
}

.light-path::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100px;
  width: 60px; /* Shorter, more focused beam */
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #ffffff 50%,
    transparent 100%
  );
  animation: lightPathMove 2.5s ease-in-out infinite; /* Slightly faster */
  box-shadow: 0 0 10px #ffffff; /* Stronger glow inside (clipped) */
  opacity: 1;
  z-index: 2;
}

@keyframes lightPathMove {
  0% {
    left: -100px;
  }
  20% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}

/* Win Section Title (Adapted for Light/Dark Page) */
.win-section-title {
  color: #312e81;
  border-bottom: 2px solid #a5b4fc;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: bold;
}

.win-section-title i {
  color: #6366f1;
}

/* Layout & Spacing */
.light-dark-section {
    margin-bottom: 4rem;
}
.content-block p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* Highlight Messages */
.highlight-message.indigo-theme {
  background-color: #e0e7ff;
  border-left: 5px solid #6366f1;
  color: #312e81;
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 0 8px 8px 0;
  font-weight: bold;
  line-height: 1.8;
}

.highlight-strong {
  color: #4f46e5;
  border-bottom: 2px solid #fbbf24;
}

/* Balancing Scales Animation */
.balance-sway {
  display: inline-block;
  animation: swayScales 4s ease-in-out infinite;
  transform-origin: top center;
}

@keyframes swayScales {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-5deg);
  }
  75% {
    transform: rotate(5deg);
  }
}

/* Yin-Yang Spin */
.yin-yang-spin {
  display: inline-block;
  animation: rotateYinYang 10s linear infinite;
  color: #4f46e5;
}

@keyframes rotateYinYang {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spin-slow {
  --fa-animation-duration: 3s;
}

/* Interactive Heart Lamp */
.soul-lamp-container {
  text-align: center;
  margin: 3rem 0;
  position: relative;
}

.soul-lamp {
  font-size: 4rem;
  color: #475569; /* Unlit color */
  cursor: pointer;
  transition: all 0.5s ease;
  display: inline-block;
  position: relative;
  z-index: 10;
  animation: ambientPulse 3s infinite ease-in-out; /* Heartbeat pulse */
}

@keyframes ambientPulse {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.05);
    filter: brightness(1.1);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

.soul-lamp::after {
  content: "Click Me";
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.9rem;
  color: #94a3b8;
  opacity: 1;
  transition: opacity 0.3s;
  white-space: nowrap;
}

.soul-lamp.lit::after {
  opacity: 0;
}

.soul-lamp:hover {
  transform: scale(1.1);
  color: #64748b;
}

.soul-lamp.lit {
  color: #fbbf24; /* Gold/Light color */
  text-shadow:
    0 0 20px rgba(251, 191, 36, 0.6),
    0 0 40px rgba(251, 191, 36, 0.4),
    0 0 60px rgba(251, 191, 36, 0.2);
  animation: lampPulse 2s infinite alternate;
}

@keyframes lampPulse {
  from {
    transform: scale(1.1);
    filter: brightness(1);
  }
  to {
    transform: scale(1.15);
    filter: brightness(1.2);
  }
}

/* Light beam effect when lit */
.lamp-beam {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle,
    rgba(251, 191, 36, 0.2) 0%,
    rgba(251, 191, 36, 0) 70%
  );
  border-radius: 50%;
  pointer-events: none;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1;
}

/* Floating Infinite Power Text */
.floating-power-text {
  position: absolute;
  color: #fbbf24; /* Gold */
  font-size: 1.5rem;
  font-weight: bold;
  pointer-events: none;
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.8);
  z-index: 20;
  animation: floatPowerText 2s ease-out forwards;
}

@keyframes floatPowerText {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.5);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -20px) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -100px) scale(1.5);
  }
}

/* Shooting Star Footer Animation */
.shooting-star-container {
  position: fixed;
  bottom: 10%; /* Lowered further to 10% */
  left: 0;
  width: 100%;
  height: 100px;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.shooting-star {
  position: absolute;
  top: 50%;
  left: -300px; /* Start further left */
  width: 6px;
  height: 6px;
  background: #ffd700; /* Gold */
  border-radius: 50%;
  box-shadow:
    0 0 0 4px rgba(255, 215, 0, 0.1),
    0 0 0 8px rgba(255, 215, 0, 0.1),
    0 0 20px rgba(255, 215, 0, 1);
  opacity: 0;
}

.shooting-star::before {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 400px; /* Longer tail */
  height: 2px;
  background: linear-gradient(90deg, #ffd700, transparent);
}

@keyframes shootStar {
  0% {
    transform: rotate(-5deg) translateX(0);
    opacity: 1;
  }
  100% {
    /* Longer distance */
    transform: rotate(-5deg) translateX(calc(100vw + 800px));
    opacity: 0;
  }
}

.shooting-star.animate {
  /* Slower speed (increased duration) */
  animation: shootStar 6s linear forwards;
}

/* Visual Metaphor Scene (Atmospheric) */
.visual-metaphor-scene {
  position: relative;
  padding: 4rem 0;
  margin: 2rem 0;
  text-align: center;
  border-radius: 20px;
  background: linear-gradient(
    to bottom,
    #1e293b,
    #334155
  ); /* Deep dark initially */
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
  transition:
    background 3s ease,
    box-shadow 3s ease;
  overflow: hidden;
}

/* Active State: Scene Brightens */
.visual-metaphor-scene.active {
  background: linear-gradient(
    to bottom,
    #e0e7ff,
    #ffffff
  ); /* Bright, heavenly light */
  box-shadow: 0 0 50px rgba(99, 102, 241, 0.2);
}

.silhouette-wrapper {
  position: relative;
  height: 200px; /* Increased height to make room */
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-bottom: 4rem; /* Push icon up away from text */
}

/* Shadow Figure (Sitting) */
.silhouette-shadow {
  font-size: 6rem;
  color: #0f172a; /* Pitch black shadow */
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.8));
  opacity: 1;
  transition: all 2s ease 0.5s; /* Slow fade out */
  transform: scale(1);
  margin-bottom: 1rem; /* Added margin */
}

.visual-metaphor-scene.active .silhouette-shadow {
  opacity: 0;
  transform: scale(0.9);
  filter: blur(20px); /* Dissolves into shadow */
}

/* Light Figure (Standing) */
.silhouette-light {
  position: absolute;
  bottom: 4rem; /* Match padding-bottom of wrapper */
  font-size: 7rem;
  color: #6366f1;
  opacity: 0;
  transform: scale(0.8) translateY(20px);
  filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.8)); /* Radiant glow */
  transition: all 4s ease 1s; /* Very slow rise */
}

.visual-metaphor-scene.active .silhouette-light {
  opacity: 1;
  transform: scale(1) translateY(0);
  color: #4f46e5;
  filter: drop-shadow(0 0 40px rgba(99, 102, 241, 0.6));
}

/* Scene Growth Text */
.scene-growth-text {
  position: absolute;
  bottom: 1rem; /* Lower position */
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  font-size: 1.2rem; /* Slightly smaller to fit nicely */
  font-weight: 800;
  text-align: center;
  color: #f59e0b; /* Gold */
  opacity: 0;
  transition: all 3s ease 1.5s; /* Fade in after standing starts */
  background: linear-gradient(to right, #f59e0b, #d97706);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(245, 158, 11, 0.2));
  z-index: 10;
}

.visual-metaphor-scene.active .scene-growth-text {
  opacity: 1;
  bottom: 1.5rem; /* Float up slightly */
}

.mist-words {
    position: absolute;
    top: 10%;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.mist-word {
    position: absolute;
    font-size: 1.5rem;
    color: rgba(255,255,255,0.3);
    font-weight: bold;
    filter: blur(2px);
    transition: opacity 1s;
}

.visual-metaphor-scene.active .mist-word {
    opacity: 0;
}

/* Mist Positioning */
.mist-word.w1 { top: 20%; left: 20%; }
.mist-word.w2 { top: 40%; right: 25%; }
.mist-word.w3 { top: 60%; left: 30%; }

/* Sidebar Advice */
.sidebar-advice-text {
  color: #0f172a;
  font-size: 0.9rem;
  line-height: 1.6;
}

.sidebar-advice-highlight {
  color: #6366f1;
  font-weight: bold;
}

.sidebar-advice {
    margin-bottom: 2rem;
}
