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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: #fff;
  font-family: -apple-system, "Segoe UI", "Noto Sans TC", sans-serif;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
}

.bg {
  position: absolute;
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
  object-position: center center;
  opacity: 0;
  transition: opacity 1s ease;
}

.bg.show {
  opacity: 1;
}

.marquee {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  border-top: 2px solid #f5b800;
  overflow: hidden;
  white-space: nowrap;
  padding: 10px 0;
  z-index: 5;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.8);
}

.track {
  display: inline-block;
  animation: mq 30s linear infinite;
}

.track span {
  font-size: clamp(14px, 2.4vw, 22px);
  font-weight: bold;
  color: #ffd84a;
  text-shadow: 0 0 10px #f5b800;
  padding-right: 3rem;
}

@keyframes mq {
  from { transform: translateX(100vw); }
  to { transform: translateX(-100%); }
}

.marquee:hover .track {
  animation-play-state: paused;
}

.player {
  position: fixed;
  right: 18px;
  bottom: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid #f5b800;
  border-radius: 35px;
  padding: 6px 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.player button {
  background: none;
  border: 0;
  color: #ffd84a;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px 6px;
  transition: transform 0.2s;
}

.player button:hover {
  transform: scale(1.15);
}

.player span {
  font-size: 0.85rem;
  color: #ffe27a;
  min-width: 36px;
  text-align: center;
  font-weight: bold;
}

#toggle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #000;
  border: 2px solid #f5b800;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
  box-shadow: 0 0 10px rgba(245, 184, 0, 0.4);
  perspective: 400px;
}

.crown-box {
  width: 32px;
  height: 32px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
}

.crown-svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 4px #f5b800);
  transition: transform 0.3s, filter 0.3s;
}

.slash-line {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 3px;
  background: #ff3344;
  border-radius: 2px;
  transform: translateY(-50%) rotate(-45deg);
  box-shadow: 0 0 6px rgba(255, 51, 68, 0.9);
  transition: opacity 0.3s;
  pointer-events: none;
  opacity: 1;
}

#toggle.playing {
  border-color: #ffe066;
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.95);
  animation: glowPulse 2s infinite ease-in-out;
}

#toggle.playing .crown-svg {
  animation: crownRotate 3s infinite linear;
  filter: drop-shadow(0 0 8px #ffe57f) drop-shadow(0 0 14px #ffc107);
}

#toggle.playing .slash-line {
  opacity: 0;
}

@keyframes crownRotate {
  0% { transform: rotateY(0deg); }
  50% { transform: rotateY(180deg); }
  100% { transform: rotateY(360deg); }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(245, 184, 0, 0.5); }
  50% { box-shadow: 0 0 22px rgba(255, 226, 122, 1); }
}
