/* 来世测试 · 三关卡闯关 */
body {
  margin: 0;
  background: radial-gradient(circle at 30% 10%, #1a0f1a, #0a050a, #030103);
  min-height: 100vh;
  font-family: 'Poppins', 'Noto Serif SC', cursive;
  color: #f0e6ff;
}

.afterlife-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* 关卡进度 */
.stage-progress {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}
.stage-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  opacity: 0.4;
}
.stage-item.active {
  opacity: 1;
}
.stage-item.completed {
  opacity: 0.8;
}
.stage-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #2a1a3a;
  border: 2px solid #5f3f5f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.stage-item.active .stage-icon {
  border-color: #c08aff;
  box-shadow: 0 0 15px #a55cff;
}
.stage-item.completed .stage-icon {
  background: #5f2f4f;
  border-color: #ffeaaf;
}
.stage-name {
  font-size: 12px;
  color: #b0a0c0;
}

/* 游戏卡片 */
.game-card {
  background: rgba(10, 5, 15, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 40px;
  padding: 32px 24px;
  box-shadow: 0 0 40px rgba(80, 0, 40, 0.5), inset 0 0 20px rgba(100, 0, 80, 0.3);
  border: 1px solid #6f4f6f;
  text-align: center;
}
.card-title {
  font-size: 28px;
  font-weight: 700;
  color: #d9c4ff;
  margin-bottom: 8px;
}
.card-subtitle {
  color: #a08090;
  font-size: 14px;
  margin-bottom: 24px;
  font-style: italic;
}

/* 关卡内容 */
.stage-content {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* 第一关：冥河摆渡 */
.river-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.river-boat {
  font-size: 60px;
  margin: 20px 0;
  filter: drop-shadow(0 0 15px #a55cff);
}
.tap-area {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, #3a2a5a, #1a0f2a);
  border: 3px dashed #8f7faf;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px auto;
  cursor: pointer;
  transition: all 0.1s;
}
.tap-area:active {
  transform: scale(0.95);
  background: radial-gradient(circle, #5a3a7a, #2a1a3a);
}
.tap-count {
  font-size: 48px;
  font-weight: 900;
  color: #ffeaaf;
}
.timer-bar {
  width: 100%;
  height: 8px;
  background: #1a0f1a;
  border-radius: 4px;
  margin: 20px 0;
  overflow: hidden;
}
.timer-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #7f3faf, #ffaa00);
  transition: width 0.1s linear;
}

/* 第二关：记忆碎片 */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.memory-card {
  aspect-ratio: 1;
  background: #2a1a3a;
  border-radius: 20px;
  border: 2px solid #5f3f5f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  cursor: pointer;
  transition: all 0.2s;
}
.memory-card.flipped {
  background: #5f3f7f;
  border-color: #c08aff;
}
.memory-card.matched {
  background: #3f6f4f;
  border-color: #6fbf6f;
  pointer-events: none;
}
.message-box {
  margin: 20px 0;
  color: #ffeaaf;
}

/* 第三关：轮回之择 */
.choice-scene {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.choice-btn {
  background: rgba(20, 8, 25, 0.8);
  border: 2px solid #6f4f6f;
  border-radius: 60px;
  padding: 20px 16px;
  color: #e0d0ff;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.choice-btn:hover {
  background: #5f2f4f;
  border-color: #c08aff;
  transform: scale(1.02);
}

/* 最终结果 */
.final-panel {
  text-align: center;
}
.result-tag {
  font-size: 42px;
  font-weight: 900;
  color: #ffeaaf;
  text-shadow: 0 0 20px #aa55ff;
  margin-bottom: 16px;
}
.result-desc {
  font-size: 16px;
  line-height: 1.8;
  color: #d0c0e0;
  margin-bottom: 24px;
}
.btn {
  background: #5f2f4f;
  border: 1px solid #9f6f8f;
  border-radius: 60px;
  padding: 14px 28px;
  color: #ffeaaf;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 16px;
  border: none;
}
.btn:hover {
  background: #7f3f5f;
  box-shadow: 0 0 15px #7f3f5f;
}
.btn-secondary {
  background: transparent;
  border: 1px solid #8f7faf;
  color: #c0b0d0;
}
.btn-block {
  width: 100%;
  margin-top: 16px;
}

.hidden {
  display: none !important;
}

/* 海报弹窗 */
.poster-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  padding: 16px;
}
.poster-modal.hidden { display: none; }
.poster-container {
  background: #0a050a;
  border-radius: 40px;
  padding: 20px;
  border: 1px solid #af6f9f;
  max-width: 500px;
  width: 100%;
}
.poster-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}