/* effects.css — 动画与转场效果 */

/* === 场景视频 === */

.scene-video-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.scene-video-overlay.fade-out {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.scene-video {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.scene-video-hint {
  position: absolute;
  bottom: 40px;
  font-size: 12px;
  color: rgba(224, 220, 212, 0.4);
  font-family: var(--font-serif);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

/* === 打字机光标 === */

.typewriter-cursor::after {
  content: '▌';
  animation: blink 1s step-end infinite;
  opacity: 0.7;
}

/* === Boot 乱码滚动 === */

.boot-line {
  opacity: 0.4;
  color: var(--color-terminal-text);
  font-family: var(--font-mono);
  transition: opacity 0.3s;
}

.boot-line.fading {
  opacity: 0.15;
}

/* === Help Me 转场 === */

.transition-helpme-out {
  animation: fadeOutLines 1.5s ease forwards;
}

@keyframes fadeOutLines {
  to { opacity: 0; transform: translateY(-10px); }
}

/* === Lumos 转场 === */

.lumos-overlay {
  position: fixed;
  inset: 0;
  z-index: 51;
  pointer-events: none;
  background: #fff;
  opacity: 0;
  will-change: opacity;
}

.lumos-overlay.to-white {
  transition: opacity 2s ease;
  opacity: 1;
}

.lumos-overlay.fade-out {
  transition: opacity 2.5s ease;
  opacity: 0;
}

/* === 答案 → 诗句变换 === */

.poem-transform-container {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 60;
  pointer-events: none;
}

.answer-display {
  font-size: var(--font-size-xl);
  color: var(--color-accent-gold-bright);
  font-family: var(--font-serif);
  opacity: 0;
}

.answer-display.show {
  animation: answerReveal 1s ease forwards;
}

@keyframes answerReveal {
  0% { opacity: 0; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

.answer-display.dissolve {
  animation: answerDissolve 1s ease forwards;
}

@keyframes answerDissolve {
  0% { opacity: 1; filter: blur(0); }
  100% { opacity: 0; filter: blur(8px); }
}

.poem-reveal {
  font-size: var(--font-size-xl);
  color: var(--color-accent-gold);
  font-family: var(--font-serif);
  font-style: italic;
  opacity: 0;
}

.poem-reveal.show {
  animation: poemFadeIn 2s ease forwards;
}

@keyframes poemFadeIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

.poem-reveal.fade-out {
  animation: poemFadeOut 1.5s ease forwards;
}

@keyframes poemFadeOut {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* === Puzzle 12 假系统错误 === */

.fake-error-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  background: rgba(0, 0, 0, 0.8);
}

.fake-error-box {
  background: #1a1a1a;
  border: 1px solid #333;
  padding: var(--spacing-lg);
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  max-width: 400px;
}

.fake-error-box .error-text {
  color: var(--color-error);
}

.fake-error-box .error-comment {
  color: var(--color-text-secondary);
  opacity: 0.5;
  margin-top: var(--spacing-sm);
}

.memory-confirm-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  background: rgba(0, 0, 0, 0.8);
}

.memory-confirm-box {
  background: var(--color-bg-secondary);
  border: 1px solid rgba(224, 220, 212, 0.2);
  padding: var(--spacing-lg);
  border-radius: 4px;
  text-align: center;
  max-width: 320px;
}

.memory-confirm-text {
  color: var(--color-text-primary);
  font-family: var(--font-serif);
  font-size: var(--font-size-base);
  margin-bottom: var(--spacing-md);
}

.memory-confirm-buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
}

.memory-confirm-yes {
  background: none;
  border: 1px solid var(--color-error);
  color: var(--color-error);
  font-family: var(--font-serif);
  font-size: var(--font-size-sm);
  padding: var(--spacing-xs) var(--spacing-md);
  cursor: pointer;
  border-radius: 2px;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.memory-confirm-yes:hover {
  background: var(--color-error);
  color: #fff;
}

.memory-confirm-no {
  background: none;
  border: 1px solid var(--color-text-secondary);
  color: var(--color-text-secondary);
  font-family: var(--font-serif);
  font-size: var(--font-size-sm);
  padding: var(--spacing-xs) var(--spacing-md);
  cursor: pointer;
  border-radius: 2px;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.memory-confirm-no:hover {
  border-color: var(--color-text-primary);
  color: var(--color-text-primary);
}

/* === 提示弹窗 === */

.hint-popup-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  background: rgba(0, 0, 0, 0.7);
}

.hint-popup-box {
  background: var(--color-bg-secondary);
  border: 1px solid rgba(224, 220, 212, 0.2);
  padding: var(--spacing-lg);
  border-radius: 4px;
  text-align: center;
  max-width: 400px;
}

.hint-popup-text {
  color: var(--color-text-dialogue);
  font-family: var(--font-serif);
  font-size: var(--font-size-base);
  line-height: 1.8;
  margin-bottom: var(--spacing-md);
}

.hint-popup-close {
  background: none;
  border: 1px solid var(--color-text-secondary);
  color: var(--color-text-secondary);
  font-family: var(--font-serif);
  font-size: var(--font-size-sm);
  padding: var(--spacing-xs) var(--spacing-md);
  cursor: pointer;
  border-radius: 2px;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.hint-popup-close:hover {
  border-color: var(--color-text-primary);
  color: var(--color-text-primary);
}

/* === 屏幕渐暗/渐亮 === */

.screen-fade {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 80;
  pointer-events: none;
  opacity: 0;
  transition: opacity 2s ease;
}

.screen-fade.dark {
  opacity: 1;
}

/* === 点击继续提示 === */

.click-to-continue {
  font-size: 12px;
  color: rgba(224, 220, 212, 0.35);
  text-align: center;
  pointer-events: none;
  padding: var(--spacing-sm) 0;
  animation: clickHint 3s ease infinite;
}

@keyframes clickHint {
  0%, 100% { opacity: 0; }
  40%, 60% { opacity: 1; }
}
