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

body {
  background-color: #000;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}

.hologram-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
}

.hologram-wrapper {
  position: relative;
  /* 垂直翻转 - 适配分光镜反射 */
  transform: scaleY(-1);
  /* 限制在 2.5cm 区域内 - iPhone 12 约 35vw */
  width: 35vw;
  height: 35vw;
  max-width: 140px;
  max-height: 140px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 对齐框 */
.hologram-wrapper::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(0, 255, 255, 0.15);
  border-radius: 4px;
  pointer-events: none;
  z-index: 10;
}

/* ==================== 场景通用 ==================== */
.scene {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.scene.active {
  opacity: 1;
  visibility: visible;
}

/* 发光效果 */
.glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  background: radial-gradient(
    circle,
    rgba(0, 255, 255, 0.12) 0%,
    rgba(0, 255, 255, 0.04) 50%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
  animation: pulse 4s ease-in-out infinite;
}

.glow-pink {
  background: radial-gradient(
    circle,
    rgba(255, 100, 150, 0.2) 0%,
    rgba(255, 100, 150, 0.05) 50%,
    transparent 70%
  );
}

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

/* ==================== 场景1: 时钟 ==================== */
.clock {
  text-align: center;
  padding: 8px;
  position: relative;
  z-index: 1;
}

.time {
  font-size: 28px;
  font-weight: 300;
  color: #00ffff;
  text-shadow: 
    0 0 5px #00ffff,
    0 0 10px #00ffff,
    0 0 20px #00ffff,
    0 0 40px #0088ff;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.colon {
  opacity: 0.8;
}

.seconds {
  display: inline;
}

.sec-digit {
  display: inline-block;
  min-width: 0.6em;
  text-align: center;
  transition: transform 0.15s ease-out, opacity 0.15s ease-out;
}

.sec-digit.flip {
  animation: flipDown 0.3s ease-out;
}

@keyframes flipDown {
  0% {
    transform: scaleY(0.3) translateY(-50%);
    opacity: 0;
  }
  50% {
    transform: scaleY(1.1) translateY(5%);
    opacity: 0.8;
  }
  100% {
    transform: scaleY(1) translateY(0);
    opacity: 1;
  }
}

.date {
  font-size: 8px;
  color: #00ffff;
  opacity: 0.8;
  margin-top: 6px;
  letter-spacing: 1px;
  text-shadow: 
    0 0 3px #00ffff,
    0 0 6px #00ffff;
}

/* ==================== 场景2: 3D气球心形 ==================== */
.heart-container {
  width: 80px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: heartbeat 1.2s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  10% { transform: scale(1.15); }
  20% { transform: scale(1); }
  30% { transform: scale(1.1); }
  40% { transform: scale(1); }
}

.balloon-heart {
  position: relative;
  width: 55px;
  height: 50px;
  animation: floatHeart 2.5s ease-in-out infinite;
  filter: drop-shadow(0 0 15px rgba(255, 77, 109, 0.8))
          drop-shadow(0 0 30px rgba(255, 77, 109, 0.5));
}

@keyframes floatHeart {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-6px) rotate(2deg); }
}

/* 心形主体 - 气球质感 */
.heart-shape {
  position: absolute;
  width: 55px;
  height: 50px;
  left: 0;
  top: 0;
}

.heart-shape::before,
.heart-shape::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 44px;
  background: 
    radial-gradient(ellipse at 25% 25%, rgba(255, 255, 255, 0.5) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 70%, rgba(150, 0, 50, 0.4) 0%, transparent 50%),
    linear-gradient(135deg, #ff6b88 0%, #ff4d6d 30%, #e91e63 60%, #c2185b 100%);
  border-radius: 28px 28px 0 0;
}

.heart-shape::before {
  left: 28px;
  transform: rotate(-45deg);
  transform-origin: 0 100%;
}

.heart-shape::after {
  left: 0;
  transform: rotate(45deg);
  transform-origin: 100% 100%;
}

/* 气球高光 - 左上角 */
.heart-shine {
  position: absolute;
  width: 10px;
  height: 10px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.6) 30%,
    transparent 70%
  );
  border-radius: 50%;
  top: 6px;
  left: 10px;
  z-index: 10;
}

/* 第二个高光点 */
.heart-shine::after {
  content: '';
  position: absolute;
  width: 5px;
  height: 5px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.8) 0%,
    transparent 70%
  );
  border-radius: 50%;
  top: 14px;
  left: 4px;
}

/* ==================== 场景3: 烟花 ==================== */
#firework-canvas {
  width: 100%;
  height: 100%;
}

/* ==================== 场景4: 极光 ==================== */
#aurora-canvas {
  width: 100%;
  height: 100%;
}

/* ==================== 场景5: 发光水母 ==================== */
.jellyfish-container {
  width: 70px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.jellyfish {
  position: relative;
  animation: jellyfishFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 0 15px rgba(138, 43, 226, 0.8))
          drop-shadow(0 0 30px rgba(138, 43, 226, 0.5));
}

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

/* 水母头部 */
.jellyfish-head {
  width: 45px;
  height: 30px;
  background: 
    radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.6) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 80%, rgba(75, 0, 130, 0.5) 0%, transparent 60%),
    linear-gradient(180deg, 
      rgba(186, 85, 211, 0.9) 0%, 
      rgba(138, 43, 226, 0.8) 50%, 
      rgba(75, 0, 130, 0.7) 100%
    );
  border-radius: 50% 50% 40% 40%;
  position: relative;
  animation: jellyfishPulse 2s ease-in-out infinite;
}

@keyframes jellyfishPulse {
  0%, 100% { 
    transform: scaleX(1) scaleY(1);
  }
  50% { 
    transform: scaleX(1.1) scaleY(0.9);
  }
}

/* 水母内部发光 */
.jellyfish-head::before {
  content: '';
  position: absolute;
  width: 25px;
  height: 15px;
  background: radial-gradient(
    ellipse,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(186, 85, 211, 0.3) 50%,
    transparent 70%
  );
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
}

/* 触须容器 */
.jellyfish-tentacles {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin-top: -2px;
}

/* 触须 */
.tentacle {
  width: 3px;
  height: 35px;
  background: linear-gradient(
    to bottom,
    rgba(186, 85, 211, 0.8) 0%,
    rgba(138, 43, 226, 0.5) 50%,
    rgba(75, 0, 130, 0.2) 100%
  );
  border-radius: 0 0 3px 3px;
  animation: tentacleWave 2s ease-in-out infinite;
  transform-origin: top center;
}

.tentacle:nth-child(1) { animation-delay: 0s; height: 30px; }
.tentacle:nth-child(2) { animation-delay: 0.2s; height: 38px; }
.tentacle:nth-child(3) { animation-delay: 0.4s; height: 42px; }
.tentacle:nth-child(4) { animation-delay: 0.2s; height: 38px; }
.tentacle:nth-child(5) { animation-delay: 0s; height: 30px; }

@keyframes tentacleWave {
  0%, 100% { transform: skewX(-5deg); }
  50% { transform: skewX(5deg); }
}

/* ==================== 控制按钮 ==================== */
.controls {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  padding: 8px 15px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 25px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1000;
}

.controls.visible {
  opacity: 1;
  visibility: visible;
}

.control-btn {
  width: 38px;
  height: 38px;
  border: none;
  background: rgba(0, 255, 255, 0.1);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.control-btn:hover {
  background: rgba(0, 255, 255, 0.2);
  transform: scale(1.1);
}

.control-btn.active {
  background: rgba(0, 255, 255, 0.3);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

/* 点击区域 */
.toggle-area {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  z-index: 999;
}

/* ==================== 扫描线效果 ==================== */
.hologram-container::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 255, 0.015) 2px,
    rgba(0, 255, 255, 0.015) 4px
  );
  pointer-events: none;
  z-index: 100;
}

/* ==================== 响应式 ==================== */
@media (max-width: 430px) {
  .hologram-wrapper {
    width: 35vw;
    height: 35vw;
  }
  
  .time {
    font-size: 24px;
  }
  
  .date {
    font-size: 7px;
  }
  
  .control-btn {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }
  
  .controls {
    gap: 10px;
    padding: 8px 15px;
  }
  
  .jellyfish-head {
    width: 38px;
    height: 25px;
  }
  
  .tentacle {
    width: 2px;
  }
}

/* 防止选中 */
* {
  user-select: none;
  -webkit-user-select: none;
}
