:root {
  --bg-dark: #07080c;
  --card-bg: rgba(16, 17, 24, 0.85);
  --border-color: rgba(255, 255, 255, 0.1);
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --accent-pink: #ec4899;
  --accent-purple: #a855f7;
  --accent-gradient: linear-gradient(135deg, #ec4899 0%, #a855f7 100%);
  --radius-lg: 24px;
  --radius-md: 14px;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  padding-bottom: 110px;
}

.app-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.18;
}

.bg-glow-1 {
  width: 550px;
  height: 550px;
  background: #ec4899;
  top: -100px;
  left: 15%;
}

.bg-glow-2 {
  width: 600px;
  height: 600px;
  background: #a855f7;
  bottom: -150px;
  right: 15%;
}

.navbar {
  border-bottom: 1px solid var(--border-color);
  background: rgba(7, 8, 12, 0.75);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-badge {
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 1.1rem;
}

.brand-text {
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.1rem;
}

.nav-actions {
  display: flex;
  gap: 10px;
}

.btn-primary, .btn-secondary {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

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

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
}

.main-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 24px;
}

.welcome-header {
  margin-bottom: 40px;
}

.wave-tag {
  display: inline-block;
  background: rgba(236, 72, 153, 0.15);
  color: var(--accent-pink);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.welcome-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.welcome-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 28px;
}

.playlists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.playlist-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.playlist-card:hover {
  border-color: rgba(236, 72, 153, 0.5);
  transform: translateY(-2px);
}

.playlist-icon {
  font-size: 28px;
}

.playlist-info h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.playlist-info span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Search Card */
.search-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(24px);
  padding: 14px;
  border-radius: var(--radius-lg);
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px 6px 6px 18px;
}

.search-icon {
  font-size: 1.2rem;
  margin-right: 12px;
}

.search-input-wrapper input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 1.05rem;
}

.search-btn {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
}

/* Track Cards Grid */
.results-grid {
  display: grid;
  gap: 14px;
}

.track-card-row {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
}

.track-card-row:hover, .track-card-row.playing {
  border-color: var(--accent-pink);
  background: rgba(236, 72, 153, 0.08);
}

.track-main-info {
  display: flex;
  align-items: center;
  gap: 16px;

}

.track-cover-sm {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  background: #1a1b26;
}

.track-title-text {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 2px;
}

.track-artist-text {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.track-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.play-row-btn {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  cursor: pointer;
}

/* Sticky Spotify Bottom Player Bar */
.spotify-player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  background: rgba(14, 15, 22, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px);
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.8);
}

.player-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 240px;
}

.player-cover-img {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
}

.player-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.player-artist {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.player-center {
  flex: 1;
  max-width: 550px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ctrl-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-main);
}

.ctrl-btn.main-play {
  background: var(--accent-gradient);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-timeline {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.player-timeline input[type=range] {
  flex: 1;
  accent-color: var(--accent-pink);
  cursor: pointer;
}

.dl-player-btn {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}

/* Mobile Optimization for Phones */
@media (max-width: 768px) {
  .main-container {
    padding: 20px 16px;
  }

  .welcome-title {
    font-size: 1.8rem;
  }

  .welcome-subtitle {
    font-size: 0.95rem;
  }

  .playlists-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .playlist-card {
    padding: 12px;
    gap: 10px;
  }

  .playlist-icon {
    font-size: 22px;
  }

  .playlist-info h4 {
    font-size: 0.88rem;
  }

  .playlist-info span {
    font-size: 0.75rem;
  }

  .search-input-wrapper {
    padding: 4px 4px 4px 12px;
  }

  .search-input-wrapper input {
    font-size: 0.9rem;
  }

  .search-btn {
    padding: 10px 16px;
    font-size: 0.88rem;
  }

  /* Fixed Mobile Bottom Player Bar */
  .spotify-player-bar {
    padding: 10px 14px;
    flex-direction: column;
    gap: 8px;
    bottom: 0;
  }

  .player-left {
    min-width: 100%;
    justify-content: space-between;
  }

  .player-cover-img {
    width: 44px;
    height: 44px;
  }

  .player-title {
    font-size: 0.88rem;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .player-artist {
    font-size: 0.78rem;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .player-center {
    width: 100%;
    max-width: 100%;
    gap: 4px;
  }

  .player-controls {
    gap: 12px;
  }

  .ctrl-btn.main-play {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .player-timeline {
    gap: 6px;
    font-size: 0.75rem;
  }

  .dl-player-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}
