html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: #000;
  color: #fff;
  font-family: "Microsoft YaHei", "Source Han Sans SC", sans-serif;
}

button {
  font: inherit;
}

.opening-player {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  min-width: 100vw;
  min-height: 100vh;
  overflow: hidden;
  background: #000;
}

/* 轻微的电影遮幅，保持克制。 */
.opening-player::before,
.opening-player::after {
  content: "";
  position: absolute;
  left: 0;
  z-index: 20;
  width: 100%;
  height: 3vh;
  background: rgba(0, 0, 0, 0.72);
  pointer-events: none;
}

.opening-player::before {
  top: 0;
}

.opening-player::after {
  bottom: 0;
}

.scene-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scene-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  overflow: hidden;
  background: #000;
}

.scene-layer.is-active {
  opacity: 1;
}

.scene-layer img {
  display: block;
  width: 100vw;
  height: 100vh;
  min-width: 100vw;
  min-height: 100vh;
  object-fit: cover;
  object-position: center center;
  transform-origin: center center;
  will-change: transform, opacity, filter;
  user-select: none;
}

.scene-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.30), transparent 22%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.18), transparent 25%);
  pointer-events: none;
  z-index: 6;
}

.loading-screen {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: #000;
  transition: opacity 700ms ease;
}

.loading-screen.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.start-screen {
  position: absolute;
  inset: 0;
  z-index: 28;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.03), transparent 46%),
    rgba(0, 0, 0, 0.52);
  opacity: 0;
  pointer-events: none;
  transition: opacity 700ms ease;
}

.start-screen.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.start-screen.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.start-trigger {
  display: grid;
  gap: 10px;
  padding: 18px 28px;
  border: 1px solid rgba(214, 177, 108, 0.58);
  background: rgba(14, 16, 20, 0.42);
  color: rgba(255, 248, 234, 0.96);
  cursor: pointer;
  letter-spacing: 0.1em;
  backdrop-filter: blur(8px);
  transition: transform 240ms ease, background-color 240ms ease, border-color 240ms ease;
}

.start-trigger:hover {
  transform: scale(1.02);
  background: rgba(20, 23, 29, 0.58);
  border-color: rgba(222, 188, 118, 0.84);
}

.start-trigger-cn,
.start-trigger-en {
  display: block;
  text-align: center;
}

.start-trigger-cn {
  font-size: 24px;
}

.start-trigger-en {
  font: 13px/1 Arial, sans-serif;
  letter-spacing: 0.24em;
  color: rgba(255, 241, 213, 0.86);
}

.loading-mark {
  display: grid;
  justify-items: center;
  gap: 18px;
  letter-spacing: 0.35em;
}

.loading-ring {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(224, 192, 123, 0.18);
  border-top-color: rgba(224, 192, 123, 0.72);
  border-radius: 50%;
  animation: loading-spin 1.1s linear infinite;
}

.loading-text {
  margin: 0;
  font: 500 15px/1 Arial, sans-serif;
  color: rgba(255, 255, 255, 0.82);
}

.top-controls {
  position: absolute;
  top: 4vh;
  right: 3vw;
  z-index: 12;
  display: flex;
  align-items: flex-start;
  gap: 22px;
}

.music-button,
.sfx-button,
.skip-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(10, 12, 16, 0.3);
  color: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(6px);
  cursor: pointer;
  transition: opacity 220ms ease, transform 220ms ease, background-color 220ms ease, border-color 220ms ease, color 220ms ease;
}

.control-icon {
  width: 18px;
  height: 18px;
  overflow: visible;
  stroke: currentColor;
  stroke-width: 1.55;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.control-icon-music .music-icon-body {
  fill: currentColor;
  stroke: none;
}

.control-icon-sfx .sfx-icon-core {
  fill: currentColor;
  stroke: none;
}

.music-button:hover,
.sfx-button:hover,
.skip-button:hover {
  color: rgba(255, 255, 255, 1);
  transform: translateY(-1px);
  background: rgba(28, 31, 38, 0.48);
  border-color: rgba(214, 177, 108, 0.42);
}

.music-button.is-off {
  color: rgba(255, 255, 255, 0.46);
}

.sfx-button.is-off {
  color: rgba(255, 255, 255, 0.46);
}

.music-button.is-off .music-icon-wave-1,
.music-button.is-off .music-icon-wave-2 {
  opacity: 0.16;
}

.sfx-button.is-off .sfx-icon-rays {
  opacity: 0.16;
}

.music-button.is-off .music-icon-off {
  opacity: 1;
}

.sfx-button.is-off .sfx-icon-off {
  opacity: 1;
}

.music-icon-off {
  opacity: 0;
}

.sfx-icon-off {
  opacity: 0;
}

.music-button.is-hidden,
.sfx-button.is-hidden,
.skip-button.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.caption-block {
  position: absolute;
  left: 50%;
  z-index: 10;
  width: min(92vw, 1600px);
  opacity: 0;
  transform: translate3d(-50%, 10px, 0);
  pointer-events: none;
  transition: opacity 520ms ease, transform 520ms ease;
}

.caption-block.is-visible {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}

.caption-block-location {
  left: 3.8vw;
  bottom: 13vh;
  width: min(92vw, 1320px);
  transform: translate3d(0, 10px, 0);
  text-align: left;
}

.caption-block-location.is-visible {
  transform: translate3d(0, 0, 0);
}

.caption-block-subtitle {
  bottom: 15vh;
  text-align: center;
}

.caption-block-theme {
  top: 50%;
  bottom: auto;
  text-align: center;
  transform: translate3d(-50%, calc(-50% + 10px), 0);
}

.caption-block-theme.is-visible {
  transform: translate3d(-50%, -50%, 0);
}

.caption-cn,
.caption-en {
  margin: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55), 0 0 18px rgba(0, 0, 0, 0.22);
  white-space: nowrap;
}

.caption-cn {
  font-size: clamp(18px, 1.35vw, 24px);
  line-height: 1.3;
  letter-spacing: 0.03em;
}

.caption-en {
  margin-top: 8px;
  font: 13px/1.35 Arial, sans-serif;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.88);
}

.caption-block-location .caption-cn {
  font-size: clamp(17px, 1.2vw, 22px);
}

.caption-block-location .caption-en {
  margin-top: 6px;
  font-size: 12px;
}

.caption-block-theme .caption-cn {
  font-size: clamp(42px, 4.4vw, 68px);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.65), 0 0 14px rgba(236, 221, 186, 0.18);
}

.caption-block-theme .caption-en {
  margin-top: 14px;
  font-size: clamp(16px, 1.2vw, 20px);
  letter-spacing: 0.28em;
  color: rgba(244, 238, 223, 0.92);
}

.final-panel {
  position: absolute;
  left: 50%;
  bottom: 12vh;
  z-index: 11;
  display: grid;
  justify-items: center;
  gap: 28px;
  opacity: 0;
  transform: translate3d(-50%, 16px, 0);
  pointer-events: none;
  transition: opacity 700ms ease, transform 700ms ease;
}

.final-panel.is-visible {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
  pointer-events: auto;
}

.final-line {
  margin: 0;
  font-size: clamp(18px, 1.4vw, 24px);
  line-height: 1.25;
  white-space: nowrap;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55), 0 0 18px rgba(0, 0, 0, 0.22);
}

.enter-button {
  display: grid;
  gap: 6px;
  min-width: 220px;
  padding: 16px 32px;
  border: 1px solid rgba(214, 177, 108, 0.88);
  background: rgba(35, 35, 35, 0.48);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background-color 240ms ease, transform 240ms ease, box-shadow 240ms ease;
}

.enter-button span:first-child {
  font-size: clamp(22px, 1.7vw, 28px);
  letter-spacing: 0.18em;
}

.enter-button span:last-child {
  font: 14px/1 Arial, sans-serif;
  letter-spacing: 0.25em;
  color: rgba(255, 245, 225, 0.88);
}

.enter-button:hover {
  background: rgba(55, 55, 55, 0.6);
  transform: scale(1.03);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
}

.progress-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 14;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-fill {
  width: 0;
  height: 100%;
  background: rgba(208, 168, 99, 0.8);
  transform-origin: left center;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1100px) {
  .caption-block-subtitle,
  .caption-block-location,
  .final-panel {
    width: 94vw;
  }

  .caption-block-location {
    left: 5vw;
  }
}
