/* ==========================================================
   KTV PLAYER SCREEN (MONITOR 2 / SMART TV)
   Clean, distraction-free, cinematic neon aesthetic
   ========================================================== */

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #050508;
  color: #ffffff;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  user-select: none;
}

/* Auto-hide mouse cursor after 2.5s */
body.hide-cursor {
  cursor: none;
}

#player-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: radial-gradient(circle at center, #15102a 0%, #06050e 100%);
}

/* Ambient Animated Visualizer (Shown for Audio or Standby) */
.ambient-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at 30% 40%, rgba(99, 102, 241, 0.25) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(236, 72, 153, 0.25) 0%, transparent 50%);
  animation: pulseAmbient 12s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes pulseAmbient {
  0% { transform: scale(1) rotate(0deg); opacity: 0.7; }
  50% { transform: scale(1.15) rotate(3deg); opacity: 0.95; }
  100% { transform: scale(1) rotate(-3deg); opacity: 0.7; }
}

/* 1. Local Media Player (HTML5 Video/Audio) */
#local-media-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

#local-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
}

/* Audio-only local track visuals */
.audio-visual-backdrop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 3;
}

.vinyl-disc {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, #2d3748 0%, #1a202c 40%, #000 100%);
  box-shadow: 0 0 50px rgba(0, 242, 254, 0.4), inset 0 0 30px rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: spinVinyl 8s linear infinite;
}

.vinyl-center {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff007f, #7928ca);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  font-size: 14px;
}

@keyframes spinVinyl {
  100% { transform: rotate(360deg); }
}

/* 2. YouTube IFrame Player Container */
#yt-player-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  background: #000;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#yt-player {
  width: 100% !important;
  height: 100% !important;
  border: none;
  pointer-events: auto;
}

/* 3. Lyrics Canvas Overlay */
#lyrics-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 15;
  pointer-events: none;
}

/* 4. Top "Now Playing" Notification Overlay */
.now-playing-banner {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(-150%);
  z-index: 25;
  background: rgba(15, 15, 25, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  padding: 12px 36px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(0, 242, 254, 0.3);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.now-playing-banner.show {
  transform: translateX(-50%) translateY(0);
}

.source-badge {
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.source-badge.local {
  background: linear-gradient(135deg, #00f2fe, #4facfe);
  color: #000;
}

.source-badge.youtube {
  background: linear-gradient(135deg, #ff0844, #ffb199);
  color: #fff;
}

.song-info {
  display: flex;
  flex-direction: column;
}

.song-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.song-artist {
  font-size: 14px;
  color: #94a3b8;
}

/* 5. Bottom "Up Next" Overlay */
.up-next-pill {
  position: absolute;
  bottom: 25px;
  right: 35px;
  z-index: 25;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
  pointer-events: none;
}

.up-next-pill.show {
  opacity: 1;
  transform: translateY(0);
}

.up-next-label {
  font-size: 12px;
  font-weight: 800;
  color: #38bdf8;
  text-transform: uppercase;
}

.up-next-title {
  font-size: 15px;
  font-weight: 600;
  color: #e2e8f0;
}

/* 6. Standby Screen (When No Song Playing) */
.standby-screen {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #111827 0%, #030712 100%);
  text-align: center;
  padding: 40px;
  transition: opacity 0.5s ease;
}

.standby-screen.hidden {
  display: none;
}

.standby-logo {
  font-size: 64px;
  font-weight: 900;
  letter-spacing: 4px;
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 50%, #ff007f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
  text-shadow: 0 0 35px rgba(0, 242, 254, 0.4);
}

.standby-tagline {
  font-size: 22px;
  color: #94a3b8;
  margin-bottom: 40px;
}

.standby-instructions {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 24px 40px;
  backdrop-filter: blur(10px);
  max-width: 600px;
}

.standby-instructions h3 {
  font-size: 18px;
  color: #38bdf8;
  margin-bottom: 12px;
}

.standby-url {
  font-size: 24px;
  font-family: monospace;
  font-weight: bold;
  color: #f1f5f9;
  background: rgba(0, 0, 0, 0.4);
  padding: 10px 20px;
  border-radius: 10px;
  display: inline-block;
  margin: 10px 0;
  border: 1px dashed rgba(56, 189, 248, 0.5);
}

/* Pitch / Volume HUD Overlay (Temporary Flash) */
.hud-alert {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  z-index: 30;
  background: rgba(0, 0, 0, 0.85);
  border: 2px solid #00f2fe;
  border-radius: 20px;
  padding: 20px 40px;
  color: #00f2fe;
  font-size: 28px;
  font-weight: 800;
  box-shadow: 0 0 40px rgba(0, 242, 254, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hud-alert.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
