* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Noto Sans SC", "Alibaba PuHuiTi", "Microsoft YaHei", sans-serif;
}

.music-indicator {
  position: fixed;
  top: 20px;
  right: 20px;
  font-size: 2rem;
  color: #007bff;
  z-index: 1000;
  animation: spin 3s linear infinite;
  text-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.music-indicator:hover {
  transform: scale(1.2);
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #333;
  overflow-x: hidden;
  height: 100vh;
  position: relative;
}

.container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.page {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  text-align: center;
  transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
  transform: translateY(100%);
  z-index: 1;
}

.page.active {
  transform: translateY(0);
}

.page:not(.active) {
  pointer-events: none;
}

.hidden {
  display: none !important;
}

/* 背景层 */
.background-layer,
.background-layer-2,
.background-layer-3,
.background-layer-4,
.background-layer-5,
.background-layer-6 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.9;
}

.background-layer {
  background-image: url(./assets/bg1.png);
}

.background-layer-2 {
  background: linear-gradient(135deg, #87ceeb 0%, #98fb98 100%);
}

.background-layer-3 {
  background: linear-gradient(45deg, #fff9c4 0%, #fff176 100%);
}

.background-layer-4 {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.background-layer-5 {
  background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
}

.background-layer-6 {
  background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
}

.content {
  width: 100%;
  max-width: 800px;
  padding: 20px;
  z-index: 2;
}

.logo-container {
  margin-bottom: 20px;
}

.logo {
  width: 120px;
  height: auto;
}

.animated-title {
  font-size: 2.8rem;
  color: #007bff;
  margin-bottom: 15px;
  animation: fadeInUp 1s ease-out;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
  font-size: 1.4rem;
  margin-bottom: 50px;
  color: #666;
  animation: fadeInUp 1s ease-out 0.2s forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 牛奶瓶图片 */
.milk-bottle-container {
  margin: 30px 0;
  perspective: 1000px;
}

.milk-bottle-image {
  width: 260px;
  height: auto;
  margin: 0 auto;
  display: block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0px);
  }
}

.cta-button {
  margin-top: 20px;
  padding: 15px 40px;
  font-size: 1.2rem;
  background: linear-gradient(45deg, #007bff, #0056b3);
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  letter-spacing: 1px;
}

.cta-button:hover {
  transform: translateY(-5px);
}

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(0, 123, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
  }
}

.section-title {
  font-size: 2.2rem;
  margin-bottom: 30px;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease-out forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 10px;
}

.feature-card {
  border-radius: 15px;
  transition: transform 0.6s ease;
  opacity: 0;
  transform: translateX(250px);
  animation: slideInRight 0.6s ease-out forwards;
}

@keyframes slideInRight {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.feature-card:nth-child(1) {
  animation-delay: 0.6s;
}

.feature-card:nth-child(2) {
  animation-delay: 0.6s;
  animation-name: slideInLeft;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-250px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.feature-card:nth-child(3) {
  animation-delay: 0.6s;
}

.feature-card:hover {
  transform: translateY(-10px);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.feature-card h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: #007bff;
}

.feature-card p {
  font-size: 1rem;
  color: #fff;
  line-height: 1.6;
}

.nutrition-facts {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 25px;
  margin-bottom: 30px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.nutrition-header {
  border-bottom: 2px solid #007bff;
  padding-bottom: 15px;
  margin-bottom: 15px;
}

.nutrition-header h3 {
  font-size: 1.6rem;
  color: #007bff;
}

.nutrition-list {
  list-style: none;
}

.nutrition-list li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed #eee;
}

.nutrition-list li:last-child {
  border-bottom: none;
}

.nutrition-list li span:first-child {
  font-weight: 500;
  color: #333;
}

.nutrition-list li span:last-child {
  font-weight: 700;
  color: #007bff;
}

.timeline {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
}

.timeline-item {
  position: relative;
  margin-bottom: 10px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease-out forwards;
}

.timeline-item:nth-child(1) {
  animation-delay: 0.3s;
}

.timeline-item:nth-child(2) {
  animation-delay: 0.6s;
}

.timeline-item:nth-child(3) {
  animation-delay: 0.9s;
}

.timeline-item:nth-child(4) {
  animation-delay: 1.2s;
}

.timeline-item:nth-child(5) {
  animation-delay: 1.5s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.timeline-marker {
  position: absolute;
  width: 16px;
  height: 16px;
  background: #007bff;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #007bff;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  margin-top: -8px;
}

.timeline-content {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  padding: 15px;
  border: 1px solid #007bff;
  width: 80%;
  max-width: 400px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.timeline-item h3 {
  font-size: 1.3rem;
  color: #007bff;
  margin: 0 0 8px 0;
  font-weight: 700;
}

.timeline-item p {
  text-align: center;
  font-size: 1rem;
  color: #333;
  line-height: 1.5;
  margin: 0;
}

.game-stats {
  display: flex;
  justify-content: space-around;
  width: 100%;
  max-width: 500px;
  margin: 20px auto;
  background: rgba(255, 255, 255, 0.9);
  padding: 15px;
  border-radius: 15px;
}

#score,
#timer {
  font-size: 1.3rem;
  font-weight: 700;
  color: #007bff;
}

#game-board {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 500px;
  margin: 20px auto;
  background: rgba(255, 255, 255, 0.3);
  padding: 15px;
  border-radius: 15px;
  box-sizing: border-box;
}

.cell {
  aspect-ratio: 1;
  background: linear-gradient(135deg, #ffffff, #f0f8ff);
  border: 2px solid #ddd;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-sizing: border-box;
  overflow: hidden;
}

.cell:hover {
  background: #e3f2fd;
  transform: scale(1.1);
}

.cell.selected {
  background: #bbdefb;
  transform: scale(1.1);
  border-color: #007bff;
}

.cell.matched {
  visibility: hidden;
  transform: scale(0);
}

.game-controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.game-button {
  padding: 12px 25px;
  font-size: 1.1rem;
  background: linear-gradient(45deg, #6f42c1, #007bff);
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.game-button:hover {
  transform: translateY(-3px);
}

.hint-button {
  background: linear-gradient(45deg, #ffc107, #ff9800);
}

.reward-badge {
  font-size: 5rem;
  margin-bottom: 20px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

.score-display {
  background: rgba(255, 255, 255, 0.9);
  padding: 20px;
  border-radius: 15px;
  margin: 20px auto;
  max-width: 300px;
}

.score-display p {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

#final-score {
  font-size: 3rem;
  font-weight: 700;
  color: #007bff;
}

.coupon-section {
  background: linear-gradient(45deg, #ff6b6b, #ffa502);
  color: white;
  padding: 25px;
  border-radius: 15px;
  margin: 20px auto;
  max-width: 350px;
}

.highlight {
  font-weight: 700;
  text-decoration: underline;
}

.qr-code-placeholder {
  background: white;
  width: 150px;
  height: 150px;
  margin: 15px auto;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.qr-pattern {
  width: 120px;
  height: 120px;
  background: linear-gradient(90deg, #333 0%, #333 10%, transparent 10%, transparent 90%, #333 90%, #333 100%),
    linear-gradient(0deg, #333 0%, #333 10%, transparent 10%, transparent 90%, #333 90%, #333 100%),
    linear-gradient(90deg, #333 20%, #333 30%, transparent 30%, transparent 70%, #333 70%, #333 80%),
    linear-gradient(0deg, #333 20%, #333 30%, transparent 30%, transparent 70%, #333 70%, #333 80%);
  background-size: 100% 100%;
}

.milk-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1200 120" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" fill="%23ffffff" opacity=".25"/><path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" fill="%23ffffff" opacity=".5"/><path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z" fill="%23ffffff"/></svg>');
  background-size: cover;
  background-repeat: no-repeat;
  z-index: -1;
}

.brands-showcase {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.brand-item {
  text-align: center;
}

.brand-logo {
  font-size: 3rem;
  margin-bottom: 10px;
}

.brand-item p {
  font-weight: 500;
  color: #333;
}

.closing-message {
  font-size: 1.3rem;
  margin: 20px 0 30px;
  color: #666;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.page-indicator {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 100;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: #007bff;
  transform: scale(1.2);
}

.dot:hover {
  background: #0056b3;
}
