/* did_well.css */

/* --- Hero Section --- */
.chapter-hero.law4-hero {
  background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 99%, #fad0c4 100%) !important;
  color: #78350f !important;
  text-align: center;
  padding: 4rem 2rem;
  border-radius: 20px;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.law4-hero h1 {
  background: linear-gradient(to right, #78350f, #92400e);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.law4-hero .hero-subtitle {
  color: #b45309 !important;
  font-size: 1.1rem;
  line-height: 1.6;
}

.hero-line {
  width: 60px;
  height: 4px;
  background: #fb7185;
  margin: 1.5rem auto;
  border-radius: 2px;
}

.heart-beat-icon {
  font-size: 3.5rem;
  color: #da1b60;
  animation: heartPulse 1.5s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(218, 27, 96, 0.4));
  margin-bottom: 1rem;
}

@keyframes heartPulse {
  0% { transform: scale(1); }
  15% { transform: scale(1.15); }
  30% { transform: scale(1); }
  45% { transform: scale(1.1); }
  60% { transform: scale(1); }
}

/* --- Content Styling --- */
.content-section {
  background: white;
  padding: 2.5rem;
  border-radius: 20px;
  margin-bottom: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
  border: 1px solid #fce7f3;
}

.content-section h2 {
  font-size: 1.5rem;
  color: #db2777;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px dashed #fbcfe8;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.message-box {
  padding: 1.5rem;
  border-radius: 15px;
  margin: 2rem 0;
}

.message-box.healing {
  background: linear-gradient(135deg, #fff1f2 0%, #fff7ed 100%);
  border-left: 6px solid #fb7185;
  color: #881337;
  box-shadow: 0 10px 30px rgba(251, 113, 133, 0.1);
  position: relative;
  overflow: hidden;
}

.message-box.healing::after {
  content: "\f004";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  right: -20px;
  bottom: -20px;
  font-size: 8rem;
  color: rgba(251, 113, 133, 0.05);
  transform: rotate(-15deg);
}

.message-box.healing p {
  font-size: 1.1rem;
  line-height: 2;
  margin-bottom: 1.5rem;
}

.message-box.healing p:last-child {
  margin-bottom: 0;
}

.highlight-orange {
  background: #fff7ed;
  border-left: 5px solid #f97316;
  color: #c2410c;
}

/* --- Hurdle Metaphor --- */
.hurdle-visual-container {
  background: #fff;
  padding: 1.5rem; /* Reduced padding to help images fit */
  border-radius: 30px;
  border: 1px solid #fbcfe8;
  box-shadow: 0 15px 40px rgba(251, 207, 232, 0.15);
  margin: 3.5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hurdle-metaphor-img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 15px;
  margin: 1rem 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.hurdle-lanes {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.lane {
  flex: 1;
  max-width: 280px;
  height: 160px;
  position: relative;
  background: #fff1f2;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(251, 113, 133, 0.1);
}

.lane-label {
  position: absolute;
  top: 15px;
  width: 100%;
  font-size: 0.8rem;
  font-weight: bold;
  color: #db2777;
  z-index: 10;
}

.hurdle-bar-visual {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 4px;
  height: 90px;
  background: #f472b6;
  transform: translateX(-50%);
  z-index: 5;
}

.hurdle-bar-visual::after {
  content: "";
  position: absolute;
  top: 0;
  left: -25px;
  width: 50px;
  height: 5px;
  background: #db2777;
  border-radius: 5px;
}

.lane-char {
  position: absolute;
  bottom: 0;
  font-size: 2.2rem;
  color: #db2777;
  z-index: 6;
}

@keyframes struggleJump {
  0% { left: 5%; transform: translateY(0); }
  35% { left: 40%; transform: translateY(-75px) rotate(-10deg); }
  45% { left: 45%; transform: translateY(-70px) rotate(15deg); }
  65% { left: 20%; transform: translateY(0); }
  100% { left: 5%; transform: translateY(0); }
}

@keyframes wisdomSlide {
  0% { left: 5%; transform: scale(1); opacity: 1; }
  35% { left: 40%; transform: scale(0.6, 0.5); }
  55% { left: 65%; transform: scale(0.6, 0.5); }
  75% { left: 85%; transform: scale(1); opacity: 1; }
  100% { left: 5%; opacity: 0; }
}

.lane-hard .lane-char { animation: struggleJump 4s infinite cubic-bezier(0.4, 0, 0.2, 1); }
.lane-easy .lane-char { animation: wisdomSlide 4s infinite cubic-bezier(0.4, 0, 0.2, 1); }

/* --- Burden Release --- */
.burden-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
}

.burden-tag {
  background: rgba(100, 116, 139, 0.05);
  color: #64748b;
  padding: 0.8rem 1.2rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.5s ease;
  border: 1px dashed rgba(100, 116, 139, 0.2);
}

.burden-tag.released {
  animation: dissolveAndFloat 8s forwards ease-out;
  pointer-events: none;
}

@keyframes dissolveAndFloat {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-300px) scale(1.5); opacity: 0; filter: blur(10px); }
}

/* Sublimation Bubble */
.sublimation-bubble {
  position: absolute;
  width: 40px; height: 40px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.8), rgba(251, 113, 133, 0.2));
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 100;
  animation: bubbleFloat 3s ease-out forwards;
}

@keyframes bubbleFloat {
  0% { transform: translateY(0) scale(0.5); opacity: 0; }
  20% { opacity: 0.8; }
  100% { transform: translateY(-200px) scale(2); opacity: 0; }
}

/* --- Heart Light --- */
.heart-light-stage {
  background: #1e293b;
  border-radius: 20px;
  padding: 3rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin: 2.5rem 0;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
  transition: all 0.8s;
}

.heart-light-stage.stage-ignited {
  background: linear-gradient(135deg, #fff1f2 0%, #fff 100%);
  box-shadow: 
    inset 0 0 60px rgba(251, 113, 133, 0.2),
    0 0 30px rgba(251, 113, 133, 0.1);
  z-index: 10003;
}

/* Focus Healing Mode */
body.focus-healing-mode .bg-decoration {
  filter: brightness(0.4) saturate(0.5);
  transition: all 1.5s ease;
}

body.focus-healing-mode main::before {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 10002;
  pointer-events: none;
  animation: fadeIn 1s forwards;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Glowing Footprints */
.footprint-glow {
  position: absolute;
  width: 15px; height: 15px;
  background: radial-gradient(circle, rgba(251, 113, 133, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  animation: footprintFade 3s ease-out forwards;
}

@keyframes footprintFade {
  0% { transform: scale(0.5); opacity: 0; }
  20% { transform: scale(1.2); opacity: 0.6; }
  100% { transform: scale(1); opacity: 0; }
}

.heart-lamp-container {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}

.heart-main {
  font-size: 5rem;
  color: #475569;
  transition: all 0.5s;
}

.heart-lamp-container.ignited .heart-main {
  color: #da1b60;
  text-shadow: 0 0 30px #da1b60;
}

.lamp-shine {
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: radial-gradient(circle, rgba(234, 113, 154, 0.4) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: all 0.5s;
  border-radius: 50%;
}

.heart-lamp-container.ignited .lamp-shine {
  width: 300px; height: 300px;
}

.healing-shout-btn {
  background: linear-gradient(135deg, #fb7185 0%, #e11d48 100%);
  color: white !important;
  border: none;
  padding: 1.2rem 2.5rem;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(225, 29, 72, 0.3);
  transition: all 0.3s;
  position: relative;
  z-index: 5;
  display: inline-block;
  text-decoration: none;
}

.healing-shout-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 35px rgba(225, 29, 72, 0.5);
}

.healing-shout-btn.clicked {
  animation: btnPush 0.2s ease-out;
}

@keyframes btnPush {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(0.9); }
}

.btn-hint {
  color: #94a3b8;
  font-size: 0.85rem;
  margin-top: 1rem;
}

/* --- Sidebar Styles --- */
.sticky-sidebar-wrapper {
  position: sticky !important;
  top: 2rem !important;
  height: fit-content;
}

.sidebar-widget {
  background: white;
  padding: 1rem; /* Reduced from 1.5rem to give more horizontal space */
  border-radius: 20px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #fce7f3;
}

.sidebar-advice {
  border: 2px solid #fcd34d; /* Golden border from image */
  border-radius: 15px;
  padding: 1.2rem;
  background: #fff;
}

.sidebar-advice .header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #d97706;
  font-weight: bold;
  margin-bottom: 1rem;
  border-bottom: 1px dashed #fcd34d;
  padding-bottom: 0.5rem;
  font-size: 0.95rem;
}

.sidebar-advice-text {
  font-size: 0.85rem; /* Slightly smaller as requested */
  line-height: 1.7;
  color: #475569;
  margin: 0;
}

.sidebar .reveal {
  transform: translateY(20px); /* Reduce jump space */
}

/* --- Reward Message --- */
.reward-message {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: #db2777;
  margin: 4rem auto;
  opacity: 0;
  filter: blur(20px);
  transition: all 5s ease-out;
}

.reward-message.fade-in-up {
  opacity: 1;
  filter: blur(0);
  transform: translateY(-10px);
}

/* --- Navigation Buttons --- */
.page-nav-3btn {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 4rem;
  flex-wrap: wrap;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  background: white;
  color: #64748b;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  transition: all 0.3s;
  font-size: 0.95rem;
}

.nav-btn:hover {
  background: #f8fafc;
  color: #1e293b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.nav-btn.next {
  background: #fff1f2;
  border-color: #fbcfe8;
  color: #db2777;
}

.nav-btn.next:hover {
  background: #ffe4e6;
  border-color: #f472b6;
}

.summary-box {
  background: #fff1f2;
  padding: 2rem;
  border-radius: 15px;
  border: 2px solid #fbcfe8;
}

.summary-title {
  text-align: center;
  font-weight: bold;
  color: #db2777;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.summary-list {
  list-style: none;
  padding: 0;
}

.summary-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.8rem;
}

.summary-list li::before {
  content: "♥";
  position: absolute;
  left: 0;
  color: #fb7185;
}

.golden-point-box {
  background: white;
  border-radius: 15px;
  margin: 2.5rem 0;
  position: relative;
  box-shadow: 0 10px 25px rgba(251, 191, 36, 0.08);
  padding: 2rem 2.5rem;
  border: 1px solid rgba(251, 191, 36, 0.1);
  overflow: hidden;
}

.golden-point-box::before {
  content: "";
  position: absolute;
  top: 10%;
  left: 0;
  width: 6px;
  height: 80%;
  background: linear-gradient(to bottom, #fcd34d, #fbbf24);
  border-radius: 0 10px 10px 0;
}

.box-title {
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.2rem;
}

.box-title i {
  color: #fbbf24;
  font-size: 1.4rem;
}

.golden-point-box ul {
  list-style: none;
  padding: 0;
}

.golden-point-box li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 1.2rem;
  color: #475569;
  font-weight: 500;
  line-height: 1.6;
}

.golden-point-box li::before {
  content: "\f004"; /* Heart icon - more reliable in FA */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  color: #fbbf24;
  font-size: 0.9rem;
  top: 0.2rem;
  filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.4));
}

.golden-point-box li:last-child {
  margin-bottom: 0;
}

/* --- Future Letter Widget --- */
.future-letter-main-wrap {
  max-width: 600px;
  margin: 3rem auto;
}

.future-letter-widget {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  border-left: 5px solid #fb7185;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.future-letter-widget:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(251, 113, 133, 0.1);
}

.letter-title {
  color: #db2777;
  font-weight: bold;
  margin-bottom: 1rem;
}

.letter-text {
  color: #475569;
  line-height: 1.8;
  min-height: 4em;
  transition: opacity 0.3s;
  font-family: "Zen Maru Gothic", sans-serif;
  letter-spacing: 0.05em;
}

.letter-text.typing::after {
  content: "|";
  animation: blink 0.7s infinite;
  color: #fb7185;
}

@keyframes blink { 50% { opacity: 0; } }

.letter-stamp {
  text-align: right;
  color: #94a3b8;
  font-size: 0.85rem;
  margin-top: 1rem;
}

.key-essence-box {
  background: white;
  border-radius: 20px;
  padding: 2.5rem;
  margin: 3rem 0;
  border: 1px solid #fce7f3;
  box-shadow: 0 10px 30px rgba(251, 113, 133, 0.05);
}

.key-essence-box .recipe-label {
  font-size: 0.9rem;
  font-weight: 800;
  color: #db2777;
  letter-spacing: 0.2rem;
  margin-bottom: 1rem;
}

.key-essence-box h3 {
  font-size: 1.8rem;
  color: #831843;
  margin-bottom: 1.5rem;
  font-family: "Zen Maru Gothic", sans-serif;
}

.key-essence-box p {
  color: #4b5563;
  line-height: 1.8;
  margin-bottom: 0;
  font-size: 1.05rem;
}
/* --- Utilities --- */
.spacer-s { height: 1rem; }
.spacer-m { height: 2rem; }
.spacer-l { height: 4rem; }
