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

html {
  scroll-snap-type: y mandatory;
}

/* 全屏滚动吸附 */
section,
.hero-section,
.product-section,
.giftcard-section,
.footer-section {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow-x: hidden;
}

body {
  font-family:
    "Noto Sans SC",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: linear-gradient(180deg, #000000 0%, #0a0a1a 50%, #1a1a2e 100%);
  color: #ffffff;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ===== 五彩纸屑 ===== */
#confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  overflow: hidden;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  opacity: 0;
  animation: confetti-fall 4s ease-out forwards;
}

@keyframes confetti-fall {
  0% {
    opacity: 1;
    top: -10px;
    transform: translateX(0) rotateZ(0deg);
  }
  100% {
    opacity: 0;
    top: 100vh;
    transform: translateX(calc(var(--drift) * 1px)) rotateZ(720deg);
  }
}

/* ===== 烟花画布 ===== */
#fireworks-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}

/* ===== Hero Section ===== */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 40px 20px;
  overflow: hidden;
}

/* 星空背景 */
.stars-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.star {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #ffffff;
  border-radius: 50%;
  animation: twinkle var(--duration) ease-in-out infinite;
  opacity: 0;
}

.star:nth-child(3n) {
  background: #e86a33;
}

.star:nth-child(5n) {
  background: #f4a460;
}

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

/* Hero 内容 */
.hero-content {
  text-align: center;
  z-index: 10;
  animation: fadeInUp 1.5s ease-out forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(35px);
  }
  to {
    opacity: 1;
    transform: translateY(-5px);
  }
}

.birthday-icon {
  margin-bottom: 30px;
}

.cake-icon {
  font-size: 80px;
  display: inline-block;
  animation: bounce 2s ease-in-out infinite;
}

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

.main-title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

.title-text {
  background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.name-highlight {
  background: linear-gradient(135deg, #e86a33 0%, #f4a460 50%, #ffb347 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 0 10px;
  position: relative;
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    filter: drop-shadow(0 0 10px rgba(232, 106, 51, 0.5));
  }
  to {
    filter: drop-shadow(0 0 30px rgba(232, 106, 51, 0.8));
  }
}

.subtitle {
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: rgba(255, 255, 255, 0.7);
  font-weight: 300;
  margin-bottom: 60px;
  animation: fadeIn 2s ease-out 0.5s both;
}

.signature-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: -40px;
  margin-bottom: 60px;
  font-weight: 300;
  letter-spacing: 1px;
  animation: fadeIn 2s ease-out 1s both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 滚动提示 */
.scroll-indicator {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  animation: fadeIn 2s ease-out 1s both;
  z-index: 20;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid rgba(255, 255, 255, 0.5);
  border-bottom: 2px solid rgba(255, 255, 255, 0.5);
  transform: rotate(45deg);
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%,
  100% {
    transform: rotate(45deg) translateY(0);
  }
  50% {
    transform: rotate(45deg) translateY(10px);
  }
}

/* 气球 */
.floating-balloons {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.balloon {
  position: absolute;
  font-size: 50px;
  animation: float 6s ease-in-out infinite;
}

.balloon-1 {
  left: 10%;
  top: 20%;
  animation-delay: 0s;
}

.balloon-2 {
  right: 15%;
  top: 30%;
  animation-delay: 1s;
}

.balloon-3 {
  left: 20%;
  bottom: 20%;
  animation-delay: 2s;
}

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

/* ===== Product Section ===== */
.product-section {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 80px 20px;
  background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
}

.product-content {
  text-align: center;
  max-width: 800px;
  transform: translateY(-5px);
}

.product-badge {
  display: inline-block;
  background: linear-gradient(135deg, #e86a33 0%, #f4a460 100%);
  color: white;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
  animation: pulse 2s ease-in-out infinite;
}

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

.product-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.product-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 50px;
}

/* iPhone 展示区 */
.product-showcase {
  position: relative;
  margin: 40px 0;
}

.product-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(232, 106, 51, 0.4) 0%,
    rgba(244, 164, 96, 0.2) 40%,
    transparent 70%
  );
  animation: breathe 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes breathe {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.8;
  }
}

.iphone-container {
  position: relative;
  z-index: 10;
  animation: floatPhone 4s ease-in-out infinite;
}

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

/* iPhone 产品图 */
.iphone-image {
  max-width: 100%;
  width: 500px;
  height: auto;
  margin: 0 auto;
  display: block;
  border-radius: 20px;
  box-shadow:
    0 20px 60px rgba(232, 106, 51, 0.3),
    0 0 100px rgba(232, 106, 51, 0.1);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.iphone-image:hover {
  transform: scale(1.02) rotateY(2deg);
  box-shadow:
    0 30px 80px rgba(232, 106, 51, 0.4),
    0 0 120px rgba(232, 106, 51, 0.2);
}

/* 产品特性 */
.product-features {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.feature-icon {
  font-size: 30px;
}

.feature-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

/* ===== Gift Card Section ===== */
.giftcard-section {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 80px 20px;
  background: linear-gradient(180deg, #0f0f1a 0%, #1a0a1a 100%);
}

.giftcard-content {
  text-align: center;
  max-width: 600px;
  width: 100%;
  transform: translateY(-5px);
}

.section-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 50px;
  background: linear-gradient(135deg, #e86a33 0%, #f4a460 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 礼物卡 */
.giftcard-wrapper {
  perspective: 1000px;
}

.giftcard {
  background: linear-gradient(145deg, #2a2a3a 0%, #1a1a2a 100%);
  border-radius: 20px;
  padding: 3px;
  position: relative;
  overflow: hidden;
  animation: cardFloat 5s ease-in-out infinite;
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

.giftcard:hover {
  transform: rotateY(5deg) rotateX(-5deg) scale(1.02);
}

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

/* 光泽效果 */
.giftcard-shine {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 60%
  );
  animation: shine 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

.giftcard-inner {
  background: linear-gradient(145deg, #1f1f2f 0%, #151520 100%);
  border-radius: 18px;
  padding: 30px;
  position: relative;
}

.giftcard-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}

.gift-icon {
  font-size: 24px;
  animation: wiggle 2s ease-in-out infinite;
}

@keyframes wiggle {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-10deg);
  }
  75% {
    transform: rotate(10deg);
  }
}

.card-type {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, #e86a33 0%, #f4a460 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.1em;
}

.giftcard-body {
  margin-bottom: 20px;
}

.gift-item {
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(255, 255, 255, 0.03);
  padding: 20px;
  border-radius: 15px;
}

.gift-image {
  flex-shrink: 0;
}

.mini-iphone-img {
  width: 80px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(232, 106, 51, 0.3);
}

.gift-details {
  text-align: left;
  flex: 1;
}

.gift-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 5px;
  color: #fff;
}

.gift-spec {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 10px;
}

.gift-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}

.currency {
  font-size: 16px;
  color: #e86a33;
}

.amount {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #e86a33 0%, #f4a460 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 分割线 */
.giftcard-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  position: relative;
}

.divider-circle {
  width: 20px;
  height: 20px;
  background: #0f0f1a;
  border-radius: 50%;
  position: absolute;
}

.divider-circle.left {
  left: -30px;
}
.divider-circle.right {
  right: -30px;
}

.divider-line {
  flex: 1;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.2) 0px,
    rgba(255, 255, 255, 0.2) 10px,
    transparent 10px,
    transparent 20px
  );
}

.giftcard-footer {
  text-align: center;
}

.card-notice {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 5px;
}

.card-validity {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 15px;
}

.card-stamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.stamp-icon {
  width: 18px;
  height: 18px;
  background: #22c55e;
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.card-message {
  margin-top: 25px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
}

.card-message p {
  background: linear-gradient(135deg, #e86a33 0%, #f4a460 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Footer Section ===== */
.footer-section {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 80px 20px;
  background: linear-gradient(180deg, #1a0a1a 0%, #000000 100%);
  position: relative;
}

.footer-content {
  text-align: center;
}

.celebration-icons {
  font-size: 40px;
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.celebration-icons span {
  animation: bounce 1.5s ease-in-out infinite;
}

.celebration-icons span:nth-child(1) {
  animation-delay: 0s;
}
.celebration-icons span:nth-child(2) {
  animation-delay: 0.1s;
}
.celebration-icons span:nth-child(3) {
  animation-delay: 0.2s;
}
.celebration-icons span:nth-child(4) {
  animation-delay: 0.3s;
}
.celebration-icons span:nth-child(5) {
  animation-delay: 0.4s;
}

.footer-title {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 900;
  background: linear-gradient(135deg, #e86a33 0%, #f4a460 50%, #ffb347 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}

.footer-message {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
  margin-bottom: 40px;
}

/* 烟花按钮 */
.firework-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #e86a33 0%, #f4a460 50%, #ffb347 100%);
  color: white;
  border: none;
  padding: 15px 40px;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(232, 106, 51, 0.4);
}

.firework-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(232, 106, 51, 0.6);
}

.firework-btn:active {
  transform: translateY(0);
}

.btn-icon {
  font-size: 24px;
}

.footer-decoration {
  margin-top: 50px;
  display: flex;
  justify-content: center;
  gap: 30px;
}

.sparkle {
  font-size: 30px;
  animation: sparkle 2s ease-in-out infinite;
}

.sparkle:nth-child(2) {
  animation-delay: 0.5s;
}
.sparkle:nth-child(3) {
  animation-delay: 1s;
}

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

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
  .balloon {
    font-size: 35px;
  }

  .iphone {
    width: 160px;
    height: 340px;
  }

  .screen-time {
    font-size: 36px;
  }

  .product-features {
    gap: 20px;
  }

  .gift-item {
    flex-direction: column;
    text-align: center;
  }

  .gift-details {
    text-align: center;
  }

  .celebration-icons {
    font-size: 30px;
    gap: 15px;
  }
}

/* ===== 滚动动画触发类 ===== */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
