/* 音乐播放器 */
.music-player {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50px;
  padding: 12px 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}
.music-player:hover {
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}
.music-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.music-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 12px rgba(102, 126, 234, 0.4);
  padding: 0;
  position: relative;
}
.music-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.music-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 18px rgba(102, 126, 234, 0.6);
}
.music-btn:active {
  transform: scale(0.96);
}
.music-btn.play-pause {
  width: 52px;
  height: 52px;
}
.music-btn.play-pause svg {
  width: 24px;
  height: 24px;
}
.music-info {
  display: none;
}
.music-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.music-status {
  font-size: 12px;
  color: #666;
}
.audio-element {
  display: none;
}

/* 爱心特效样式 */
.heart {
  position: fixed;
  font-size: 20px;
  color: #ff6b9d;
  pointer-events: none;
  z-index: 9999;
  animation: heartFloat 3s ease-out forwards;
  user-select: none;
  will-change: transform, opacity;
}
@keyframes heartFloat {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  50% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translate(var(--offset-x, 0), -100vh) scale(1.5) rotate(360deg);
  }
}
.star {
  position: fixed;
  font-size: 16px;
  color: #ffd700;
  pointer-events: none;
  z-index: 9999;
  animation: starTwinkle 2.2s ease-out forwards;
  user-select: none;
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.8));
}
@keyframes starTwinkle {
  0% {
    opacity: 0;
    transform: scale(0.6) translateY(0) rotate(0deg);
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.4) translate(var(--star-offset-x, 0), -80vh) rotate(200deg);
  }
}

.profilepic {
  cursor: pointer;
  transition: transform 0.3s ease;
}
.profilepic:hover {
  transform: scale(1.05);
}

/* 聊天气泡样式 */
.chat-box {
  margin-top: 10px;
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
}
.chat-avatar-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.chat-bubble {
  max-width: 260px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 10px 14px;
  position: relative;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}
.chat-bubble::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 14px;
  border-width: 8px;
  border-style: solid;
  border-color: transparent rgba(255, 255, 255, 0.9) transparent transparent;
}
.chat-text {
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  word-break: break-all;
  white-space: pre-wrap;
}
.chat-text.show {
  opacity: 1;
  transform: translateY(0);
}

/* 计时标题 */
.timer-banner {
  text-align: center;
  margin-bottom: 40px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.timer-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 2px;
}
.timer-count {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 500;
}

/* 顶部标语 */
.top-slogan {
  text-align: center;
  font-size: 14px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: -40px;
  margin-bottom: 8px;
}

/* 顶部头像与标题间距优化 */
.panel-main__content .ih-item {
  margin-bottom: 24px;
}
.panel-cover__title {
  margin-top: 8px;
  margin-bottom: 6px;
}
.panel-cover__subtitle {
  margin-top: 4px;
}

/* 头像皇冠挂件 */
.avatar-with-crown {
  position: relative;
  display: inline-block;
}
.avatar-with-crown .avatar-crown {
  position: absolute;
  top: -12px;
  right: -6px;
  font-size: 32px;
  transform: rotate(30deg);
  transform-origin: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
}
.avatar-with-crown .avatar-crown::before {
  content: "👑";
}

/* 移动端全屏适配 */
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
body {
  position: fixed;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
#panel {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: -webkit-fill-available;
}
@media (max-width: 768px) {
  html,
  body {
    height: 100%;
    height: -webkit-fill-available;
  }
  #panel {
    height: 100vh;
    height: -webkit-fill-available;
  }
  .panel-cover {
    min-height: 100vh;
    min-height: -webkit-fill-available;
  }
  .music-player {
    bottom: 15px;
    right: 15px;
    left: auto;
    padding: 10px 12px;
    gap: 8px;
    border-radius: 40px;
  }
  .music-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }
  .music-btn svg {
    width: 18px;
    height: 18px;
  }
  .music-btn.play-pause {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }
  .music-btn.play-pause svg {
    width: 22px;
    height: 22px;
  }
  .music-btn {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .profilepic {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  * {
    touch-action: manipulation;
  }
}
@media (max-width: 480px) {
  .music-player {
    bottom: 10px;
    right: 10px;
    padding: 8px 10px;
    gap: 6px;
  }
  .music-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }
  .music-btn svg {
    width: 16px;
    height: 16px;
  }
  .music-btn.play-pause {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
  .music-btn.play-pause svg {
    width: 20px;
    height: 20px;
  }
}


