/* ========== 页面切换动画 ========== */
.screen {
  animation: none;
}
.screen.active {
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ========== 场景标题进入 ========== */
.scene-title {
  animation: slideDown 0.5s ease forwards;
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== 选项淡入 ========== */
.choice-btn {
  opacity: 0;
  animation: choiceFadeIn 0.4s ease forwards;
}
.choice-btn:nth-child(1) { animation-delay: 0.1s; }
.choice-btn:nth-child(2) { animation-delay: 0.2s; }
.choice-btn:nth-child(3) { animation-delay: 0.3s; }
.choice-btn:nth-child(4) { animation-delay: 0.4s; }

@keyframes choiceFadeIn {
  from {
    opacity: 0;
    transform: translateX(-15px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ========== 结果区域展开 ========== */
.result-area:not(.hidden) {
  animation: expandIn 0.4s ease forwards;
}
@keyframes expandIn {
  from {
    opacity: 0;
    transform: scaleY(0.95);
    transform-origin: top;
  }
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

/* ========== 属性变化动画 ========== */
.effect-tag {
  animation: tagPop 0.3s ease forwards;
}
@keyframes tagPop {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  60% {
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ========== 面板滑入 ========== */
.status-panel:not(.hidden),
.save-panel:not(.hidden) {
  transform: translateX(0);
  animation: slideInRight 0.3s ease forwards;
}
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

/* ========== 叙事段落淡入 ========== */
.narrative-paragraph {
  animation: paragraphFade 0.3s ease forwards;
}
@keyframes paragraphFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ========== 时间线条目 ========== */
.timeline-item {
  opacity: 0;
  animation: timelineIn 0.4s ease forwards;
}
@keyframes timelineIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ========== 结局页面动画 ========== */
.ending-title {
  animation: endingTitleIn 1s ease forwards;
}
@keyframes endingTitleIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ending-quote {
  opacity: 0;
  animation: endingQuoteIn 1s ease 0.5s forwards;
}
@keyframes endingQuoteIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
