:root {
  --festive-red: #d9434e;
  --festive-gold: #f6e05e;
  --festive-bg: #fff5f5;
  --festive-card-bg: #ffffff;
  --festive-text: #2d3748;
}

.dark-theme:root {
  --festive-red: #ff4d4d;
  --festive-gold: #ffd700;
  --festive-bg: #1a0a0a;
  --festive-card-bg: #2d0a0a;
  --festive-text: #f7fafc;
}

body.seasonal-page {
  background-color: var(--festive-bg);
  background-image: radial-gradient(circle at 50% 50%, rgba(217, 67, 78, 0.05) 0%, transparent 100%);
  color: var(--festive-text);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  margin: 0;
  padding: 0;
}

.seasonal-main {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  max-width: 1000px;
  margin: 40px auto 0; /* 增加顶部边距，为横批腾出空间 */
  text-align: center;
  box-sizing: border-box;
}

.festive-hero {
  position: relative;
  padding: 40px 20px;
  border-radius: 40px;
  background: linear-gradient(135deg, var(--festive-red) 0%, #b91c1c 100%);
  color: white;
  box-shadow: 0 20px 40px rgba(217, 67, 78, 0.3);
  margin-bottom: 30px;
  overflow: hidden;
  width: 100%;
}

.festive-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 20L0 0m40 0L20 20m0 0l20 20m-20-20L0 40' stroke='%23ffffff' stroke-opacity='0.05' fill='none'/%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-title {
  font-size: clamp(48px, 10vw, 84px);
  font-weight: 900;
  margin-bottom: 20px;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  animation: float 3s ease-in-out infinite;
}

.hero-subtitle {
  font-size: clamp(18px, 4vw, 28px);
  opacity: 0.9;
  letter-spacing: 4px;
}

.wish-card {
  background: var(--festive-card-bg);
  padding: 30px;
  border-radius: 32px;
  border: 2px solid var(--festive-red);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.wish-title {
  color: var(--festive-red);
  font-size: 28px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.wish-content {
  font-size: 16px;
  line-height: 1.6;
  color: var(--festive-text);
}


.horse-icon {
  font-size: 64px;
  margin: 20px 0;
  display: inline-block;
  animation: bounce 2s ease-in-out infinite;
  cursor: pointer;
  position: relative;
}

/* 固定显示的对联样式 */
.fixed-couplet {
  position: fixed;
  background: var(--festive-red);
  color: var(--festive-gold);
  border: 3px solid var(--festive-gold);
  font-family: "Microsoft YaHei", serif;
  font-weight: bold;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fixed-couplet.show {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%) scale(1) !important;
}

.top-fixed.show {
  transform: translate(-50%, 0) scale(1) !important;
}

/* 上下联：超大尺寸，垂直排列 */
.left-fixed, .right-fixed {
  top: 50%;
  width: 90px;
  font-size: 64px;
  line-height: 1.1;
  border-radius: 12px;
  writing-mode: vertical-rl;
  text-orientation: upright;
  padding: 40px 20px;
}

.left-fixed {
  left: 50px;
  transform: translate(-100px, -50%) scale(0.5);
}

.right-fixed {
  right: 50px;
  transform: translate(100px, -50%) scale(0.5);
}

/* 横批：置顶，水平排列 */
.top-fixed {
  top: 30px;
  left: 50%;
  transform: translate(-50%, -50px) scale(0.5);
  padding: 15px 60px;
  font-size: 56px;
  border-radius: 10px;
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .left-fixed { left: 20px; font-size: 28px; width: 40px; }
  .right-fixed { right: 20px; font-size: 28px; width: 40px; }
}

@media (max-width: 900px) {
  .fixed-couplet { display: none; } /* 屏幕太小时隐藏固定对联以防重叠 */
}

.action-buttons {
  margin-top: 40px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 32px;
  background: var(--festive-red);
  color: white;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
  box-shadow: 0 10px 20px rgba(217, 67, 78, 0.2);
}

.back-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(217, 67, 78, 0.3);
  filter: brightness(1.1);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}


@keyframes bounce {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

/* Lantern Animation */
.lantern {
  position: fixed;
  top: 0;
  width: 60px;
  height: 80px;
  background: var(--festive-red);
  border-radius: 25px 25px 20px 20px;
  box-shadow: 0 10px 25px rgba(217, 67, 78, 0.6), inset 0 0 15px rgba(255, 255, 255, 0.2);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: swing 3s ease-in-out infinite alternate;
  transform-origin: top center;
  font-size: 32px;
  color: var(--festive-gold);
}

.lantern::before {
  content: "";
  width: 40px;
  height: 5px;
  background: #333;
  position: absolute;
  top: -5px;
  border-radius: 3px;
}

.lantern::after {
  content: "";
  width: 2px;
  height: 60px;
  background: #333;
  position: absolute;
  top: -65px;
}

/* 穗子 */
.lantern-tassel {
  position: absolute;
  bottom: -30px;
  width: 4px;
  height: 30px;
  background: var(--festive-gold);
  border-radius: 2px;
  box-shadow: 0 5px 10px rgba(246, 224, 94, 0.4);
}

.lantern-left { left: 40px; cursor: pointer; }
.lantern-right { right: 40px; cursor: pointer; }

@keyframes swing {
  from { transform: rotate(-5deg); }
  to { transform: rotate(5deg); }
}

@media (max-width: 768px) {
  .lantern { display: none; }
  .seasonal-main { margin-top: 80px; }
}
