:root {
  --primary: #f43f5e;
  --primary-glow: rgba(244, 63, 94, 0.45);
  --primary-dark: #be123c;
  --accent: #8b5cf6;
  --accent-glow: rgba(139, 92, 246, 0.4);
  --bg-dark: #07090e;
  --glass-bg: rgba(15, 18, 28, 0.72);
  --glass-bg-hover: rgba(24, 29, 45, 0.82);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-focus: rgba(244, 63, 94, 0.5);
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.65);
  --text-dim: rgba(255, 255, 255, 0.4);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-main: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 40px -10px var(--primary-glow);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  background-color: var(--bg-dark);
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background Video Container */
.video-bg-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  filter: brightness(0.65) contrast(1.1) saturate(1.15);
  transition: opacity 1.2s ease;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(7, 9, 14, 0.45) 0%, rgba(7, 9, 14, 0.85) 75%, #07090e 100%),
              linear-gradient(180deg, rgba(7, 9, 14, 0.6) 0%, transparent 40%, rgba(7, 9, 14, 0.75) 100%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Main App Wrapper */
.app-wrapper {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--primary-glow);
  flex-shrink: 0;
}

.brand-icon svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}

.brand-text h1 {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: linear-gradient(90deg, #fff, #fecdd3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text p {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.header-badges {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.badge-live {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(244, 63, 94, 0.18);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #ff6b87;
  padding: 0.45rem 0.9rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.live-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  animation: pulseLive 1.8s infinite;
}

@keyframes pulseLive {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7); }
  70% { transform: scale(1.2); box-shadow: 0 0 0 8px rgba(244, 63, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}

.badge-quality {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  padding: 0.45rem 0.85rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  backdrop-filter: blur(8px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(10px);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Center Stage Player */
.main-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

.player-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 2.2rem 2.2rem 2rem 2.2rem;
  box-shadow: var(--shadow-main);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.player-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

/* Vinyl & Artwork */
.artwork-wrapper {
  position: relative;
  width: 260px;
  height: 260px;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.artwork-halo {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  filter: blur(20px);
  opacity: 0.6;
  transition: all 0.5s ease;
  transform: scale(0.9);
}

.player-card.is-playing .artwork-halo {
  opacity: 0.95;
  transform: scale(1.15);
  animation: haloPulse 3s infinite alternate ease-in-out;
}

@keyframes haloPulse {
  0% { transform: scale(1.05); filter: blur(22px); }
  100% { transform: scale(1.25); filter: blur(32px); }
}

.artwork-disc {
  position: relative;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7), inset 0 0 0 2px rgba(255, 255, 255, 0.15);
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s ease;
}

.artwork-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease, transform 0.6s ease;
  will-change: transform;
}

.player-card.is-playing .artwork-img {
  animation: rotateVinyl 20s linear infinite;
}

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

/* Vinyl Center Hole / Hub */
.artwork-disc::after {
  content: '';
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, #0b0c10 35%, #252836 60%, rgba(255,255,255,0.4) 100%);
  border: 3px solid rgba(0, 0, 0, 0.8);
  box-shadow: 0 2px 10px rgba(0,0,0,0.6);
  pointer-events: none;
}

/* Equalizer Visualizer Bars */
.live-eq {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 22px;
  margin-bottom: 0.9rem;
}

.eq-bar {
  width: 3.5px;
  background: var(--primary);
  border-radius: 4px;
  height: 4px;
  transition: height 0.15s ease;
}

.player-card.is-playing .eq-bar:nth-child(1) { animation: eqAnim1 0.7s infinite alternate ease-in-out; }
.player-card.is-playing .eq-bar:nth-child(2) { animation: eqAnim2 0.9s infinite alternate ease-in-out; }
.player-card.is-playing .eq-bar:nth-child(3) { animation: eqAnim3 0.6s infinite alternate ease-in-out; }
.player-card.is-playing .eq-bar:nth-child(4) { animation: eqAnim4 0.8s infinite alternate ease-in-out; }
.player-card.is-playing .eq-bar:nth-child(5) { animation: eqAnim1 0.65s infinite alternate ease-in-out; }

@keyframes eqAnim1 { 0% { height: 4px; } 100% { height: 20px; } }
@keyframes eqAnim2 { 0% { height: 6px; } 100% { height: 24px; } }
@keyframes eqAnim3 { 0% { height: 3px; } 100% { height: 16px; } }
@keyframes eqAnim4 { 0% { height: 8px; } 100% { height: 22px; } }

/* Track Info */
.track-info {
  width: 100%;
  margin-bottom: 1.8rem;
  overflow: hidden;
}

.track-title-wrap {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  margin-bottom: 0.35rem;
}

.track-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--text-main);
  display: inline-block;
  transition: transform 0.3s ease;
}

.track-artist {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* Big Play / Stop Button */
.controls-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.8rem;
}

.play-btn {
  position: relative;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #e11d48 100%);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px -5px var(--primary-glow);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  outline: none;
}

.play-btn::before {
  content: '';
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border-radius: 50%;
  border: 2px solid rgba(244, 63, 94, 0.4);
  opacity: 0;
  transition: all 0.3s ease;
}

.play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 15px 40px -5px rgba(244, 63, 94, 0.6);
}

.play-btn:hover::before {
  opacity: 1;
  transform: scale(1.04);
}

.play-btn:active {
  transform: scale(0.96);
}

.play-btn svg {
  width: 32px;
  height: 32px;
  fill: #fff;
  transition: transform 0.2s ease;
}

.play-btn svg.icon-play {
  margin-left: 4px;
}

.play-btn.is-loading svg {
  animation: spin 1s linear infinite;
}

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

/* Volume Slider Controls */
.volume-group {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.65rem 1.1rem;
  border-radius: 50px;
  backdrop-filter: blur(10px);
}

.vol-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.vol-btn:hover {
  color: var(--text-main);
}

.vol-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.vol-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  cursor: pointer;
  transition: background 0.2s;
}

.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.vol-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  background: var(--primary);
}

.vol-value {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  min-width: 30px;
  text-align: right;
}

/* Footer Stream Meta */
.stream-meta-footer {
  width: 100%;
  display: flex;
  justify-content: space-around;
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.meta-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.meta-label {
  font-size: 0.65rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.meta-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* App Footer */
.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-left p span {
  color: var(--text-muted);
}

.creator-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.creator-link:hover {
  color: #ff6b87;
  text-shadow: 0 0 12px var(--primary-glow);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-links a:hover {
  color: var(--primary);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(18, 22, 36, 0.95);
  border: 1px solid var(--glass-border);
  color: #fff;
  padding: 0.75rem 1.4rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  backdrop-filter: blur(12px);
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .app-wrapper {
    padding: 1.2rem 1.2rem;
  }

  .player-card {
    padding: 1.8rem 1.4rem;
    border-radius: 22px;
  }

  .artwork-wrapper {
    width: 210px;
    height: 210px;
    margin-bottom: 1.5rem;
  }

  .artwork-disc {
    width: 200px;
    height: 200px;
  }

  .track-title {
    font-size: 1.2rem;
  }

  .track-artist {
    font-size: 0.85rem;
  }

  .play-btn {
    width: 74px;
    height: 74px;
  }

  .app-footer {
    flex-direction: column;
    gap: 0.8rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .header-badges .badge-quality {
    display: none;
  }

  .artwork-wrapper {
    width: 180px;
    height: 180px;
  }

  .artwork-disc {
    width: 175px;
    height: 175px;
  }
}
