/* =========================================================
   सुर संगम | Festival Audio Player Stylesheet
   Modern Glassmorphism, Vinyl Animation, Responsive Layout
   ========================================================= */

:root {
  --bg-dark: #0a0d14;
  --bg-card: rgba(18, 24, 38, 0.78);
  --bg-glass: rgba(14, 19, 32, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.1);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.35);
  --radius-lg: 20px;
  --radius-md: 12px;
}

[data-theme="warm-amber"] {
  --bg-dark: #120c06;
  --bg-card: rgba(36, 24, 14, 0.8);
  --border-subtle: rgba(245, 158, 11, 0.18);
  --accent: #f59e0b;
  --accent-glow: rgba(245, 158, 11, 0.35);
}

[data-theme="twilight"] {
  --bg-dark: #0f0b1e;
  --bg-card: rgba(28, 20, 52, 0.8);
  --border-subtle: rgba(168, 85, 247, 0.18);
  --accent: #c084fc;
  --accent-glow: rgba(168, 85, 247, 0.35);
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Outfit', 'Mukta', sans-serif;
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.player-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 0;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.25s;
}

.btn-back-home:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--accent);
  transform: translateX(-2px);
}

.page-title-badge {
  font-family: 'Yatra One', cursive;
  font-size: 1.35rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-right-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.time-box {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.4rem 0.8rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
}

.btn-theme {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
}

/* Layout Grid: Left Player, Right Playlist */
.player-page-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 2rem;
  padding: 2.5rem 0 4rem;
}

/* Left: Active Audio Deck */
.audio-deck-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(16px);
  position: sticky;
  top: 5rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Video Stage & View Switcher - Pure Audio-Only Mode (No Video Displayed) */
.video-stage {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0.001 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  left: -9999px !important;
  top: -9999px !important;
  z-index: -9999 !important;
  display: block !important;
}

.video-stage iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.btn-view-toggle {
  display: none !important;
}

/* Vinyl Record Animation */
.vinyl-deck {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, #2a2a2a 20%, #111 60%, #000 100%);
  border: 8px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  animation: rotateDisc 10s linear infinite;
  animation-play-state: paused;
}

@keyframes rotateDisc {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.vinyl-center-label {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ff5722);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.vinyl-center-label img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.page-title-badge img {
  width: 22px;
  height: 22px;
  object-fit: cover;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
}

.deck-track-info {
  width: 100%;
  margin-bottom: 1.5rem;
}

.deck-tag {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.deck-title {
  font-family: 'Yatra One', cursive;
  font-size: 1.45rem;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 0.3rem;
}

.deck-singer {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Seek Bar */
.deck-seek-wrap {
  width: 100%;
  margin-bottom: 1.5rem;
}

.seek-slider {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  accent-color: var(--accent);
}

.seek-time-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* Playback Controls */
.deck-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  margin-bottom: 1.5rem;
}

.control-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--accent);
  transform: scale(1.05);
}

.control-btn.active {
  background: var(--accent);
  color: #000;
}

.btn-main-play {
  width: 58px;
  height: 58px;
  background: var(--accent);
  color: #000;
  border: none;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-main-play:hover {
  filter: brightness(1.15);
  transform: scale(1.08);
}

/* Volume & Speed */
.deck-extra-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.volume-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-mute {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
}

.volume-slider {
  width: 75px;
  accent-color: var(--accent);
  cursor: pointer;
}

.btn-speed {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
}

/* Right: Playlist List */
.playlist-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  backdrop-filter: blur(16px);
}

.playlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.playlist-header h3 {
  font-family: 'Yatra One', cursive;
  font-size: 1.4rem;
  color: #fff;
}

.playlist-search-box input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.5rem 1.25rem;
  color: #fff;
  font-family: inherit;
  outline: none;
  width: 240px;
  transition: all 0.25s;
}

.playlist-search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

.song-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.song-item-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.song-item-row:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-subtle);
  transform: translateX(4px);
}

.song-item-row.active {
  background: rgba(56, 189, 248, 0.12);
  border-color: var(--accent);
}

.song-num {
  font-weight: 700;
  color: var(--text-muted);
  width: 24px;
}

.song-thumb-col {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.song-row-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.song-info-col {
  flex: 1;
  min-width: 0;
}

.song-name-text {
  font-weight: 600;
  color: #fff;
  font-size: 0.95rem;
}

.song-singer-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.tag-pill {
  color: var(--accent);
}

.song-actions-col {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.fav-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.song-dur-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.row-play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.row-play-btn:hover {
  background: var(--accent);
  color: #000;
}

@media (max-width: 900px) {
  .player-page-grid {
    grid-template-columns: 1fr;
  }
  .audio-deck-card {
    position: static;
  }
}
