:root {
  --bg: #0a0a1a;
  --text: #c8d6f8;
  --purple: #8b5cf6;
  --purple-light: #a78bfa;
  --purple-neon: #c084fc;
  --blue: #3b82f6;
  --blue-light: #60a5fa;
  --blue-neon: #38bdf8;
  --cyan: #06b6d4;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(139, 92, 246, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(59, 130, 246, 0.06) 0%, transparent 60%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(139, 92, 246, 0.015) 2px,
      rgba(139, 92, 246, 0.015) 4px
    );
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

/* 页面标题 */
.page-title {
  position: fixed;
  top: 120px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2.2em;
  font-weight: 800;
  color: #e8e0ff;
  letter-spacing: 6px;
  z-index: 10;
  text-shadow:
    0 0 10px rgba(139, 92, 246, 0.8),
    0 0 30px rgba(139, 92, 246, 0.5),
    0 0 60px rgba(59, 130, 246, 0.4),
    0 0 80px rgba(139, 92, 246, 0.3);
  animation: titlePulse 2s ease-in-out infinite;
}

@keyframes titlePulse {
  0%, 100% { text-shadow: 0 0 10px rgba(139, 92, 246, 0.8), 0 0 30px rgba(139, 92, 246, 0.5), 0 0 60px rgba(59, 130, 246, 0.4), 0 0 80px rgba(139, 92, 246, 0.3); }
  50% { text-shadow: 0 0 15px rgba(139, 92, 246, 1), 0 0 45px rgba(139, 92, 246, 0.7), 0 0 75px rgba(59, 130, 246, 0.6), 0 0 100px rgba(139, 92, 246, 0.4); }
}

/* 狼区域 */
.wolf-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  z-index: 10;
  margin-top: 500px;
}

.breath-gif {
  position: fixed;
  top: 200px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: auto;
  z-index: 10;
  filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.4));
}

.wolf-btn {
  padding: 18px 56px;
  font-size: 1.4em;
  font-weight: 800;
  border: 2px solid rgba(139, 92, 246, 0.6);
  border-radius: 16px;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(59, 130, 246, 0.3));
  backdrop-filter: blur(10px);
  color: #fff;
  letter-spacing: 4px;
  box-shadow:
    0 0 15px rgba(139, 92, 246, 0.4),
    0 0 40px rgba(59, 130, 246, 0.2),
    inset 0 0 20px rgba(139, 92, 246, 0.1);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.wolf-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.wolf-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(192, 132, 252, 0.9);
  box-shadow:
    0 0 25px rgba(139, 92, 246, 0.6),
    0 0 60px rgba(59, 130, 246, 0.4),
    0 0 100px rgba(139, 92, 246, 0.3),
    inset 0 0 30px rgba(139, 92, 246, 0.15);
}

.wolf-btn:hover::before {
  left: 100%;
}

.wolf-btn:active {
  transform: scale(0.95);
}

.wolf-counter {
  font-size: 1.2em;
  color: #b8c8f0;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

.wolf-counter span {
  font-weight: 800;
  font-size: 1.4em;
  color: #c084fc;
  margin: 0 4px;
  text-shadow:
    0 0 10px rgba(192, 132, 252, 0.8),
    0 0 20px rgba(139, 92, 246, 0.5);
}

/* 滚动狼 */
.roll-wolf {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(250px, 50vw, 600px);
  height: auto;
  z-index: 5;
  pointer-events: none;
  filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.3));
}

.roll-rtl {
  animation: rollRightToLeft 3s linear forwards;
}

.roll-ltr {
  animation: rollLeftToRight 3s linear forwards;
}

@keyframes rollRightToLeft {
  from { left: 110vw; }
  to { left: -10vw; }
}

@keyframes rollLeftToRight {
  from { left: -10vw; }
  to { left: 110vw; }
}

/* 随机表情 */
.move-emoji {
  position: fixed;
  width: 120px;
  height: auto;
  z-index: 20;
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.4));
}

.move-emoji.shrink {
  transition: transform 0.5s ease, opacity 0.5s ease;
  transform: scale(0);
  opacity: 0;
}

/* 涟漪 */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.6), rgba(59, 130, 246, 0.2));
  transform: scale(0);
  animation: rippleAnim 0.4s ease-out forwards;
  pointer-events: none;
}

@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

/* 背景粒子方块 */
.bg-square {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 4px;
  opacity: 0;
  animation: squareFade 3s ease-in-out forwards;
}

@keyframes squareFade {
  0% { opacity: 0; transform: scale(0) rotate(0deg); }
  20% { opacity: 0.6; transform: scale(1) rotate(45deg); }
  80% { opacity: 0.3; transform: scale(1) rotate(90deg); }
  100% { opacity: 0; transform: scale(0) rotate(135deg); }
}

footer {
  position: fixed;
  bottom: 20px;
  text-align: center;
  font-size: 0.8em;
  color: rgba(139, 92, 246, 0.4);
  z-index: 10;
  letter-spacing: 1px;
}

/* ========== 移动端适配 ========== */

/* 平板及以下 (≤768px) */
@media (max-width: 768px) {
  .page-title {
    top: 60px;
    font-size: 1.5em;
    letter-spacing: 3px;
  }

  .breath-gif {
    top: 110px;
    width: 140px;
  }

  .wolf-section {
    margin-top: 280px;
    gap: 16px;
  }

  .wolf-btn {
    padding: 16px 40px;
    font-size: 1.1em;
    letter-spacing: 2px;
    border-radius: 14px;
  }

  .wolf-counter {
    font-size: 1em;
    letter-spacing: 1px;
  }

  .wolf-counter span {
    font-size: 1.2em;
  }

  .move-emoji {
    width: 80px;
  }

  footer {
    font-size: 0.7em;
    bottom: 12px;
    padding: 0 16px;
  }
}

/* 小屏手机 (≤480px) */
@media (max-width: 480px) {
  .page-title {
    top: 40px;
    font-size: 1.25em;
    letter-spacing: 2px;
  }

  .breath-gif {
    top: 75px;
    width: 110px;
  }

  .wolf-section {
    margin-top: 220px;
    gap: 14px;
  }

  .wolf-btn {
    padding: 14px 32px;
    font-size: 1em;
    letter-spacing: 2px;
    border-radius: 12px;
  }

  .wolf-counter {
    font-size: 0.9em;
  }

  .wolf-counter span {
    font-size: 1.1em;
  }

  .move-emoji {
    width: 60px;
  }

  footer {
    font-size: 0.65em;
    bottom: 8px;
    padding: 0 12px;
  }
}

/* 超小屏 (≤375px) */
@media (max-width: 375px) {
  .page-title {
    top: 30px;
    font-size: 1.1em;
  }

  .breath-gif {
    top: 60px;
    width: 90px;
  }

  .wolf-section {
    margin-top: 180px;
    gap: 10px;
  }

  .wolf-btn {
    padding: 12px 28px;
    font-size: 0.95em;
  }

  .wolf-counter {
    font-size: 0.8em;
  }

  .wolf-counter span {
    font-size: 1em;
  }

  .move-emoji {
    width: 50px;
  }

  footer {
    font-size: 0.6em;
    bottom: 6px;
  }
}