/* Scenes - 各场景专属样式 */

/* ========== Password Scene ========== */
.scene-password-content {
  padding-top: 80px;
}

.scene-header {
  margin-bottom: 40px;
}

.scene-tag {
  font-size: 12px;
  color: var(--silver-400);
  margin-bottom: 8px;
}

.scene-hero {
  font-size: 32px;
  font-weight: 900;
  color: var(--silver-100);
  letter-spacing: 0.15em;
  text-shadow: 0 0 20px rgba(125, 211, 252, 0.2);
  margin: 0;
}

.scene-subtag {
  font-size: 12px;
  color: var(--cyan-dim);
  margin-top: 8px;
}

.typewriter-area {
  text-align: center;
  margin-bottom: 30px;
  min-height: 280px;
}

.typewriter-line {
  margin: 6px 0;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--silver-300);
  line-height: 1.6;
}

.typewriter-line.highlight {
  color: var(--cyan-glow);
}

.typewriter-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--cyan-glow);
  margin-left: 2px;
  animation: cursor-blink 0.8s step-end infinite;
  vertical-align: middle;
}

.password-area {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: slide-up 0.5s ease;
}

.password-area.visible {
  display: flex;
}

.prompt-text {
  font-size: 15px;
  color: var(--silver-200);
  margin-bottom: 8px;
}

/* ========== DNA Scene ========== */
.dna-title {
  font-size: 22px;
  color: var(--silver-100);
  letter-spacing: 0.1em;
  text-align: center;
  margin: 8px 0 20px;
}

.dna-desc {
  font-size: 14px;
  color: var(--silver-300);
  margin-bottom: 24px;
  line-height: 1.8;
}

.scan-area {
  width: 70vw;
  max-width: 300px;
  height: 70vw;
  max-height: 300px;
  margin: 0 auto 20px;
  border: 2px solid var(--cyan-dim);
  border-radius: 50%;
  position: relative;
  background: radial-gradient(circle, rgba(125, 211, 252, 0.05) 0%, transparent 70%);
  cursor: pointer;
  transition: border-color 0.3s;
}

.scan-area:active {
  border-color: var(--cyan-glow);
}

.scan-area.complete {
  border-color: var(--success);
}

.scan-ring {
  position: absolute;
  inset: -8px;
  border: 2px solid transparent;
  border-top-color: var(--cyan-glow);
  border-radius: 50%;
  animation: scan-ring-rotate 3s linear infinite;
}

.scan-line {
  position: absolute;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan-glow), transparent);
  top: 50%;
  animation: scan-line 2s linear infinite;
  opacity: 0;
}

.scan-area:active .scan-line,
.scan-area.scanning .scan-line {
  opacity: 1;
}

.scan-data {
  position: absolute;
  inset: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  padding: 20%;
  overflow: hidden;
}

.scan-data-bit {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--cyan-dim);
  opacity: 0.4;
}

.scan-status {
  font-size: 13px;
  color: var(--cyan-glow);
  margin-bottom: 12px;
}

.scan-progress-bar {
  width: 80%;
  max-width: 250px;
  height: 4px;
  background: rgba(125, 211, 252, 0.1);
  border-radius: 2px;
  margin: 0 auto 24px;
  overflow: hidden;
}

.scan-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--cyan-glow);
  border-radius: 2px;
  transition: width 0.1s linear;
}

/* Profile Card - 修改后的布局 */
.profile-card {
  display: none;
  text-align: center;
  animation: slide-up 0.5s ease;
  padding: 24px 20px;
}

.profile-card.visible {
  display: block;
}

.card-header {
  margin-bottom: 20px;
}

.card-subtitle {
  display: block;
  font-size: 11px;
  color: var(--silver-400);
  margin-top: 8px;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin-bottom: 20px;
}

.profile-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  background: rgba(5, 8, 15, 0.4);
  border-radius: 8px;
}

.profile-row .label {
  font-size: 10px;
  color: var(--silver-400);
  letter-spacing: 0.05em;
}

.profile-row .value {
  font-size: 13px;
  color: var(--silver-100);
  text-align: center;
}

.profile-row .note {
  font-size: 11px;
  color: var(--silver-400);
  display: block;
}

.card-footer {
  padding-top: 16px;
  border-top: 1px solid rgba(125, 211, 252, 0.1);
}

.card-footer p {
  margin: 8px 0;
  font-size: 14px;
}

.welcome-text {
  font-size: 24px;
  color: var(--gold);
  margin: 16px 0;
}

/* ========== Briefing Scene ========== */
.briefing-title {
  font-size: 18px;
  letter-spacing: 0.1em;
  color: var(--cyan-glow);
  text-align: center;
  margin: 8px 0 24px;
}

.avatar-wrapper {
  width: 120px;
  height: 120px;
  margin: 0 auto;
  position: relative;
  cursor: pointer;
}

.avatar-ring {
  position: absolute;
  inset: -6px;
  border: 2px solid transparent;
  border-top-color: var(--cyan-glow);
  border-radius: 50%;
  animation: avatar-ring-rotate 4s linear infinite;
}

.avatar-scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(180deg, transparent, var(--cyan-glow), transparent);
  animation: avatar-scan 3s linear infinite;
  opacity: 0.5;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(125, 211, 252, 0.3);
}

.briefing-text {
  margin: 24px 0;
  text-align: center;
}

.briefing-text p {
  margin: 8px 0;
  font-size: 15px;
  color: var(--silver-200);
  line-height: 1.7;
}

.loading-text {
  color: var(--cyan-glow);
  font-size: 13px;
  margin-top: 24px;
}

/* ========== Level Scenes ========== */
.level-header {
  margin-bottom: 24px;
}

.level-num {
  font-size: 12px;
  color: var(--cyan-dim);
  display: block;
  margin-bottom: 8px;
}

.level-num.boss-level {
  color: var(--purple-glow);
}

.level-num.hidden-level {
  color: var(--gold);
}

.level-title {
  font-size: 26px;
  color: var(--silver-100);
  margin: 0;
}

.level-sub {
  font-size: 11px;
  color: var(--silver-400);
  margin-top: 8px;
}

.level-question {
  font-size: 15px;
  color: var(--silver-200);
  line-height: 1.8;
  margin-bottom: 20px;
}

.level-instruction {
  font-size: 13px;
  color: var(--silver-400);
  margin-bottom: 16px;
}

.small-text {
  font-size: 12px;
  color: var(--silver-400);
  font-style: italic;
}

/* Level 1 Canvas */
.level1-starfield {
  width: 100%;
  height: 200px;
  background: rgba(5, 8, 15, 0.5);
  border-radius: 12px;
  margin-bottom: 20px;
}

/* Level 3 Matching */
.matching-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 20px 0;
  position: relative;
}

@media (min-width: 600px) {
  .matching-area {
    flex-direction: row;
    justify-content: space-between;
  }
}

.match-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.match-item {
  padding: 12px 16px;
  background: rgba(15, 21, 40, 0.5);
  border: 1px solid rgba(125, 211, 252, 0.15);
  border-radius: 10px;
  font-size: 13px;
  color: var(--silver-200);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.match-item:hover {
  border-color: rgba(125, 211, 252, 0.3);
}

.match-item.selected {
  border-color: var(--cyan-glow);
  background: rgba(125, 211, 252, 0.1);
}

.match-item.matched {
  border-color: var(--success);
  background: rgba(74, 222, 128, 0.1);
}

.match-item.wrong {
  border-color: var(--error);
}

.connections-svg {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
}

@media (min-width: 600px) {
  .connections-svg {
    display: block;
  }
}

.connection-line {
  stroke: var(--cyan-glow);
  stroke-width: 2;
  fill: none;
  filter: drop-shadow(0 0 4px var(--cyan-glow));
}

.connection-line.wrong {
  stroke: var(--error);
  filter: drop-shadow(0 0 4px var(--error));
}

/* ========== Minigame Scene ========== */
.alert-card {
  text-align: center;
  padding: 30px 24px;
}

.alert-tag {
  font-size: 12px;
  color: var(--error);
  margin-bottom: 12px;
}

.alert-title {
  font-size: 24px;
  color: var(--silver-100);
  margin-bottom: 12px;
}

.alert-desc {
  font-size: 15px;
  color: var(--silver-300);
  margin-bottom: 16px;
}

.alert-detail {
  font-size: 12px;
  color: var(--cyan-glow);
  margin-bottom: 24px;
}

.game-hud {
  position: fixed;
  top: 100px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 24px;
  font-size: 18px;
  color: var(--silver-100);
  z-index: 30;
}

#minigame-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 25;
}

/* ========== Merge Scene ========== */
.merge-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.merge-stage {
  width: 100%;
  height: 200px;
  position: relative;
  margin-bottom: 24px;
}

.merge-medal {
  position: absolute;
  font-size: 32px;
  transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.merge-stats {
  text-align: center;
  animation: slide-up 0.5s ease;
}

.merge-congrats {
  font-size: 22px;
  color: var(--gold);
  margin-bottom: 16px;
}

.cert-loading {
  text-align: center;
  animation: fade-in 0.5s ease;
}

.fake-progress-bar {
  width: 200px;
  height: 6px;
  background: rgba(125, 211, 252, 0.1);
  border-radius: 3px;
  margin: 16px auto;
  overflow: hidden;
}

.fake-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--cyan-glow);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.hidden-prompt {
  text-align: center;
  padding: 24px;
  animation: card-pop 0.4s ease;
}

.hidden-prompt p {
  margin: 8px 0;
  font-size: 15px;
}

/* ========== Certificate Scene ========== */
.certificate {
  background: linear-gradient(180deg, rgba(15, 21, 40, 0.8), rgba(10, 14, 26, 0.9));
  padding: 30px 24px;
  position: relative;
  text-align: center;
}

.cert-corner {
  position: absolute;
  font-size: 14px;
  color: var(--gold);
  opacity: 0.6;
}

.cert-corner-tl { top: 12px; left: 12px; }
.cert-corner-tr { top: 12px; right: 12px; }
.cert-corner-bl { bottom: 12px; left: 12px; }
.cert-corner-br { bottom: 12px; right: 12px; }

.cert-tag {
  font-size: 11px;
  color: var(--gold);
  margin-bottom: 12px;
}

.cert-title-en {
  font-size: 28px;
  font-weight: 900;
  color: var(--silver-100);
  letter-spacing: 0.12em;
  margin: 0;
  text-shadow: 0 0 30px rgba(251, 191, 36, 0.3);
}

.cert-title-cn {
  font-size: 20px;
  color: var(--gold);
  margin: 8px 0 24px;
}

.cert-body {
  font-size: 14px;
  color: var(--silver-200);
}

.cert-body p {
  margin: 6px 0;
}

.cert-name {
  font-size: 24px;
  color: var(--silver-100);
  margin: 12px 0;
}

.cert-section {
  font-size: 10px;
  color: var(--silver-400);
  margin-top: 20px;
  margin-bottom: 8px;
}

.cert-award {
  font-size: 16px;
  color: var(--gold);
}

.cert-medals {
  list-style: none;
  text-align: left;
  padding-left: 20px;
}

.cert-medals li {
  margin: 6px 0;
  font-size: 13px;
}

.cert-data {
  list-style: none;
  font-size: 12px;
  color: var(--cyan-glow);
}

.cert-data li {
  margin: 4px 0;
}

.cert-comment {
  font-size: 14px;
  color: var(--silver-300);
  margin: 20px 0;
  font-style: italic;
}

.cert-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(251, 191, 36, 0.2);
}

.cert-issuer {
  cursor: pointer;
}

.retry-text {
  font-size: 13px;
  color: var(--silver-400);
  margin: 20px 0;
}

.retry-link {
  color: var(--cyan-glow);
  cursor: pointer;
}

/* ========== Cake Scene ========== */
.cake-scene-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 60px;
}

.cake-intro {
  font-size: 15px;
  color: var(--silver-200);
  line-height: 1.8;
  margin-bottom: 30px;
  animation: fade-in 1s ease;
}

.cake-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.candles-row {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
  position: relative;
  z-index: 5;
}

.candle {
  width: 8px;
  height: 50px;
  background: linear-gradient(180deg, #fef3c7 0%, #fbbf24 100%);
  border-radius: 3px 3px 0 0;
  position: relative;
}

.candle-flame {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 20px;
  background: radial-gradient(ellipse at bottom, #fbbf24 0%, #f97316 40%, transparent 70%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: flame-flicker 0.3s ease-in-out infinite;
  box-shadow: 0 0 20px 8px rgba(251, 191, 36, 0.4);
}

.candle-flame.out {
  display: none;
}

.candle-smoke {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: rgba(200, 204, 216, 0.6);
  border-radius: 50%;
  animation: smoke-rise 1.5s ease-out forwards;
}

/* 蛋糕 - 暖黄渐变色调 */
.cake {
  position: relative;
}

.cake-layer {
  border-radius: 8px 8px 12px 12px;
  position: relative;
}

.cake-layer::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 50%);
}

.cake-layer-1 {
  width: 180px;
  height: 50px;
  background: linear-gradient(180deg, #fcd34d 0%, #f59e0b 50%, #d97706 100%);
  box-shadow: 
    0 8px 30px rgba(251, 191, 36, 0.3),
    0 0 60px rgba(251, 191, 36, 0.15),
    inset 0 -5px 15px rgba(180, 83, 9, 0.3);
}

.cake-layer-2 {
  width: 150px;
  height: 45px;
  margin: 0 auto -5px;
  background: linear-gradient(180deg, #fde68a 0%, #fbbf24 50%, #f59e0b 100%);
  box-shadow: 
    0 4px 20px rgba(251, 191, 36, 0.25),
    inset 0 -4px 12px rgba(217, 119, 6, 0.25);
}

.cake-layer-3 {
  width: 120px;
  height: 40px;
  margin: 0 auto -5px;
  background: linear-gradient(180deg, #fef3c7 0%, #fde68a 50%, #fcd34d 100%);
  box-shadow: 
    0 4px 15px rgba(251, 191, 36, 0.2),
    inset 0 -3px 10px rgba(245, 158, 11, 0.2);
}

.cake-text {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 16px;
  color: rgba(120, 53, 15, 0.9);
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* Blessing Image */
.blessing-image-wrapper {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.8s ease, transform 0.8s ease;
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.2);
  display: none;
}

.blessing-image-wrapper.visible {
  display: block;
  opacity: 1;
  transform: scale(1);
}

.blessing-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ========== Fireworks Scene ========== */
.fireworks-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 100vh;
  padding-bottom: 60px;
}

/* ========== Final Scene ========== */
.final-header-en {
  font-size: 36px;
  font-weight: 900;
  color: var(--silver-100);
  letter-spacing: 0.15em;
  text-align: center;
  margin: 16px 0 8px;
  text-shadow: 0 0 30px rgba(125, 211, 252, 0.3);
}

.final-header-cn {
  font-size: 20px;
  color: var(--cyan-glow);
  text-align: center;
  margin-bottom: 30px;
}

.final-text-area {
  text-align: center;
  margin-bottom: 30px;
}

.final-text-group {
  margin: 24px 0;
  animation: fade-in 0.5s ease;
}

.final-text-group p {
  margin: 6px 0;
  font-size: 15px;
  color: var(--silver-200);
  line-height: 1.7;
}

.final-text-group.climax p {
  font-size: 24px;
  color: var(--gold);
}

.climax-text {
  font-family: var(--font-cn-title);
  font-size: 30px;
  color: var(--gold);
  text-shadow: 0 0 30px rgba(251, 191, 36, 0.4);
  animation: climax-bounce 2s ease-in-out infinite;
  cursor: pointer;
}

.final-text-group.signature {
  font-size: 14px;
  color: var(--silver-400);
}

.china-map {
  width: 100%;
  max-width: 350px;
  margin: 20px auto;
  animation: fade-in 1s ease;
}

.city-label {
  font-size: 10px;
  fill: var(--silver-300);
  text-anchor: middle;
}

.pulse-dot {
  animation: city-pulse 2s ease-in-out infinite;
}

.delivery-status {
  text-align: center;
  margin-top: 20px;
  animation: fade-in 1s ease;
}

.delivery-status p {
  margin: 6px 0;
  font-size: 14px;
}

/* ========== Wish Scene ========== */
.easter-egg-trigger {
  font-size: 10px;
  color: rgba(139, 146, 168, 0.3);
  text-align: center;
  cursor: pointer;
  margin-top: 60px;
  opacity: 0;
  animation: subtle-fadein 2s ease 5s forwards;
}

.wish-card {
  text-align: center;
  padding: 24px;
  animation: card-pop 0.4s ease;
}

.wish-header {
  margin-bottom: 20px;
}

.wish-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}

.wish-info {
  background: rgba(5, 8, 15, 0.5);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 20px;
}

.wish-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 12px;
  border-bottom: 1px solid rgba(125, 211, 252, 0.1);
}

.wish-row:last-child {
  border-bottom: none;
}

.wish-desc {
  font-size: 14px;
  color: var(--silver-300);
  margin-bottom: 20px;
  line-height: 1.7;
}

.wish-success {
  text-align: center;
  animation: card-pop 0.4s ease;
}

.wish-success p {
  margin: 10px 0;
}

.voucher-code {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--gold);
  background: rgba(251, 191, 36, 0.1);
  padding: 8px 16px;
  border-radius: 8px;
  display: inline-block;
  margin: 12px 0;
}

.ending-text {
  text-align: center;
  font-size: 16px;
  color: var(--silver-200);
  line-height: 2;
  margin-top: 40px;
}

.ending-icon {
  font-size: 48px;
  display: block;
  margin-top: 30px;
  opacity: 0.6;
}
