@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* --- DESIGN SYSTEM & TOKENS --- */
:root {
  --font-primary: 'Plus Jakarta Sans', sans-serif;
  --bg-main: #0B0F19;
  --bg-card: rgba(17, 24, 39, 0.55);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(139, 92, 246, 0.4);
  
  --primary-glow: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%); /* Violet to Pink */
  --secondary-glow: rgba(139, 92, 246, 0.15);
  
  --color-text-main: #F3F4F6;
  --color-text-muted: #9CA3AF;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-elastic: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- RESET & GLOBAL STYLES --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-main);
  color: var(--color-text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.12) 0%, transparent 45%);
  background-attachment: fixed;
}

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

/* --- HEADER --- */
header {
  border-bottom: 1px solid var(--border-color);
  padding: 1.2rem 0;
  background: rgba(9, 13, 26, 0.8);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

header .header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 800;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #FFF;
}

/* --- GLASS CONTAINER --- */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 28px;
  padding: 2.5rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.player-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
}

/* --- PLAYER HEADER (DISC) --- */
.player-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
}

.disc-container {
  position: relative;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vinyl-disc {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, #2d2d2d 30%, #111111 60%, #050505 100%);
  border: 10px solid #1a1a1a;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: rotateDisc 10s linear infinite;
  animation-play-state: paused;
}

.vinyl-disc.playing {
  animation-play-state: running;
}

.vinyl-center {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-glow);
  border: 4px solid #111;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
}

/* Visualizer bars */
.visualizer {
  position: absolute;
  bottom: -10px;
  display: flex;
  gap: 4px;
  height: 30px;
  align-items: flex-end;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.vinyl-disc.playing ~ .visualizer {
  opacity: 1;
}

.bar {
  width: 4px;
  background: #8B5CF6;
  border-radius: 2px;
  height: 100%;
  transform-origin: bottom;
  animation: bounceBar 1.2s ease-in-out infinite alternate;
}

.bar:nth-child(2) { animation-delay: 0.15s; background: #a78bfa; }
.bar:nth-child(3) { animation-delay: 0.3s; background: #ec4899; }
.bar:nth-child(4) { animation-delay: 0.45s; background: #f472b6; }
.bar:nth-child(5) { animation-delay: 0.6s; background: #8B5CF6; }

/* Track Details */
.track-details h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #FFF;
  margin-bottom: 0.3rem;
}

.track-details p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

/* --- PLAYER PROGRESS --- */
.player-progress {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-muted);
}

.progress-bar-container {
  flex-grow: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 99px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary-glow);
  border-radius: 99px;
  width: 0%;
  transition: width 0.1s linear;
}

/* --- CONTROLS --- */
.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.btn-control {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: #FFF;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-elastic);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

.btn-play-pause {
  background: var(--primary-glow);
  width: 65px;
  height: 65px;
  font-size: 1.6rem;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.btn-play-pause:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.6);
}

/* --- PLAYLIST --- */
.playlist-section {
  width: 100%;
  text-align: left;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  margin-top: 1rem;
}

.playlist-section h3 {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-text-main);
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
}

.playlist-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.playlist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.2rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.playlist-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.playlist-item.active {
  background: var(--secondary-glow);
  border-color: #8B5CF6;
}

.playlist-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-main);
}

.playlist-artist {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.1rem;
}

.playlist-duration {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.playlist-item.active .playlist-title {
  color: #FFF;
}

/* --- BUTTONS --- */
.btn {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.8rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-elastic);
  text-decoration: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* --- KEYFRAME ANIMATIONS --- */
@keyframes rotateDisc {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes bounceBar {
  0% { transform: scaleY(0.2); }
  100% { transform: scaleY(1.0); }
}
