/* 乔迁喜庆页面 - 素材美化版 */

/* 基础样式重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 1vw;
  line-height: 1.5;
  height: 100%;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 16:9 容器 */
.game-container {
  width: 100vw;
  height: 56.25vw;
  max-height: 100vh;
  max-width: 177.78vh;
  position: relative;
  overflow: hidden;
}

/* 背景图片 */
.bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../images/bj.jpg') center/cover no-repeat;
  z-index: 1;
}

/* 大灯笼 - 调整后 */
.lantern-single {
  position: absolute;
  top: 0;
  width: 14%;
  height: auto;
  z-index: 15;
  transform-origin: top center;
  animation: lantern-sway 5s ease-in-out infinite;
}

.lantern-left {
  left: 2%;
  animation-delay: 0s;
}

.lantern-right {
  right: 2%;
  animation-delay: 2.5s;
}

@keyframes lantern-sway {
  0%, 100% { transform: rotate(-1.5deg); }
  50% { transform: rotate(1.5deg); }
}

.lantern-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0.3vw 0.8vw rgba(0,0,0,0.3));
}

/* 两侧装饰 - 乔迁之喜窗格 */
.side-decoration {
  position: absolute;
  top: 15%;
  width: 12%;
  height: 70%;
  z-index: 10;
  opacity: 0.9;
}

.side-decoration img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.side-left {
  left: 14%;
}

.side-right {
  right: 14%;
  transform: scaleX(-1);
}

/* 角落装饰 - 菱形乔迁之喜 */
.corner-deco {
  position: absolute;
  width: 10%;
  height: 18%;
  z-index: 8;
  opacity: 0.9;
}

.corner-deco img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.corner-bl {
  bottom: 8%;
  left: 5%;
}

.corner-br {
  bottom: 8%;
  right: 5%;
}

/* 右下角圆形装饰特殊样式 - 与左下角保持一致 */
.circle-deco {
  width: 10%;
  height: 18%;
  opacity: 0.85;
}

/* 中心圆形装饰 */
.center-circle-bg {
  position: absolute;
  width: 45%;
  height: 80%;
  z-index: 2;
  opacity: 0.4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.center-circle-bg img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 主要内容区域 */
.main-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 30;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* 祝福卡片 */
.blessing-card {
  text-align: center;
  position: relative;
  animation: card-appear 1.2s ease-out;
  z-index: 3;
}

@keyframes card-appear {
  from {
    opacity: 0;
    transform: translateY(3vw) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 主标题 - 闪亮金色 */
.main-title {
  font-size: 13vw;
  font-weight: 900;
  margin-bottom: 1.5vw;
  letter-spacing: 1.5vw;
  font-family: "Ma Shan Zheng", "ZCOOL XiaoWei", serif;
  line-height: 1.1;
  background: linear-gradient(
    180deg,
    #fff8dc 0%,
    #ffd700 20%,
    #ffec8b 40%,
    #ffd700 60%,
    #ffa500 80%,
    #ffd700 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0.3vw 0.5vw rgba(0,0,0,0.4))
          drop-shadow(0 0 1vw rgba(255,215,0,0.6));
  animation: title-shine 3s ease-in-out infinite;
}

@keyframes title-shine {
  0%, 100% {
    filter: drop-shadow(0 0.3vw 0.5vw rgba(0,0,0,0.4))
            drop-shadow(0 0 1vw rgba(255,215,0,0.6));
  }
  50% {
    filter: drop-shadow(0 0.3vw 0.5vw rgba(0,0,0,0.4))
            drop-shadow(0 0 2vw rgba(255,215,0,0.9))
            drop-shadow(0 0 4vw rgba(255,200,0,0.5));
  }
}

/* 中间装饰线 */
.divider-line {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2vw 0;
  gap: 2vw;
}

.divider-line .line {
  width: 10vw;
  height: 0.15vw;
  background: linear-gradient(90deg, transparent, #ffd700, transparent);
}

.divider-line .dot {
  font-size: 1.5vw;
  color: #ffd700;
  text-shadow: 0 0 1vw rgba(255,215,0,0.8);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
}

/* 祝福语区域 */
.blessing-text {
  color: #fff8dc;
  margin-top: 1.5vw;
}

.blessing-text p {
  font-size: 2vw;
  margin: 0.8vw 0;
  letter-spacing: 0.5vw;
  font-family: "Ma Shan Zheng", "Microsoft YaHei", serif;
  text-shadow: 0 0.1vw 0.3vw rgba(0,0,0,0.4);
  background: linear-gradient(90deg, #fff8dc, #ffd700, #fff8dc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 底部标签 */
.bottom-tags {
  margin-top: 2vw;
  display: flex;
  justify-content: center;
  gap: 3vw;
}

.tag {
  font-size: 1.8vw;
  color: #ffd700;
  font-family: "Ma Shan Zheng", serif;
  padding: 0.3vw 1.5vw;
  border: 0.1vw solid rgba(255,215,0,0.5);
  border-radius: 2vw;
  background: rgba(196,18,48,0.3);
  text-shadow: 0 0.1vw 0.2vw rgba(0,0,0,0.3);
}

/* 烟花发射层 */
.fireworks-launch {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
}

.firework-rocket {
  position: absolute;
  width: 0.4vw;
  height: 0.4vw;
  background: #ffd700;
  border-radius: 50%;
  box-shadow: 0 0 0.5vw #ffd700, 0 0 1vw #ff6b6b;
}

.explosion-particle {
  position: absolute;
  width: 0.6vw;
  height: 0.6vw;
  border-radius: 50%;
  pointer-events: none;
}

/* 闪烁的金粉效果 */
.sparkles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.sparkle {
  position: absolute;
  width: 0.3vw;
  height: 0.3vw;
  background: #ffd700;
  border-radius: 50%;
  box-shadow: 0 0 0.8vw #ffd700, 0 0 1.5vw rgba(255,215,0,0.5);
  animation: sparkle-twinkle 2s ease-in-out infinite;
}

@keyframes sparkle-twinkle {
  0%, 100% { opacity: 0; transform: scale(0); }
  50% { opacity: 1; transform: scale(1); }
}

/* 飘落的花瓣 */
.falling-petals {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 25;
  overflow: hidden;
}

.petal {
  position: absolute;
  width: 1vw;
  height: 1vw;
  background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
  border-radius: 50% 0 50% 50%;
  animation: fall linear infinite;
  opacity: 0.8;
}

@keyframes fall {
  0% {
    transform: translateY(-5vw) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(65vw) rotate(720deg);
    opacity: 0.2;
  }
}

/* 响应式调整 */
@media (max-aspect-ratio: 4/3) {
  .game-container {
    width: 100vw;
    height: 75vw;
  }

  .main-title {
    font-size: 11vw;
  }

  .lantern-single {
    width: 18%;
  }

  .side-decoration {
    width: 10%;
  }

  .corner-deco {
    width: 8%;
  }
}

@media (max-aspect-ratio: 3/4) {
  .game-container {
    width: 100vw;
    height: 133.33vw;
  }

  .main-title {
    font-size: 12vw;
    letter-spacing: 1vw;
  }

  .lantern-single {
    width: 25%;
  }

  .side-decoration {
    display: none;
  }

  .corner-deco {
    width: 12%;
  }

  .center-circle-bg {
    width: 60%;
  }

  .bottom-tags {
    flex-direction: column;
    gap: 1vw;
  }
}

@media (min-aspect-ratio: 21/9) {
  html {
    font-size: 0.8vh;
  }

  .game-container {
    width: 177.78vh;
    height: 100vh;
  }
}
