/* Reset und Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0a0a0a;
  color: #ffffff;
  overflow-x: hidden;
}

/* Login Page Styles */
.login-body {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 480px;
}

.login-card {
  background: rgba(26, 26, 26, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 48px 40px;
  text-align: center;
}

.login-header .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.login-header .logo svg {
  color: #06b6d4;
}

.login-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
}

.login-subtitle {
  font-size: 16px;
  color: #a1a1aa;
  margin-bottom: 40px;
  line-height: 1.5;
}

.feature-list {
  margin-bottom: 40px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  text-align: left;
}

.feature-item svg {
  color: #06b6d4;
  flex-shrink: 0;
}

.feature-item span {
  color: #e4e4e7;
  font-size: 14px;
}

.spotify-login-btn {
  width: 100%;
  background: #1db954;
  color: white;
  border: none;
  border-radius: 50px;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 24px;
}

.spotify-login-btn:hover {
  background: #1ed760;
  transform: translateY(-1px);
}

.login-disclaimer {
  font-size: 12px;
  color: #71717a;
  line-height: 1.4;
}

/* Player Page Styles */
.player-body {
  background: #0a0a0a;
  height: 100vh;
  overflow: hidden;
}

.player-container {
  display: flex;
  height: calc(100vh - 90px);
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: #121212;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
}

.sidebar-header {
  padding: 0 24px 32px;
}

.sidebar-header .logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-header .logo svg {
  color: #06b6d4;
}

.sidebar-header .logo span {
  font-size: 20px;
  font-weight: 700;
}

.sidebar-nav {
  flex: 1;
  padding: 0 16px;
}

.nav-item {
  width: 100%;
  background: none;
  border: none;
  color: #b3b3b3;
  padding: 12px 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 8px;
}

.nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
  color: #ffffff;
  background: rgba(6, 182, 212, 0.2);
}

.user-section {
  padding: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #06b6d4, #ec4899);
  border-radius: 50%;
}

.user-name {
  font-size: 14px;
  font-weight: 500;
}

.logout-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Main Content */
.main-content {
  flex: 1;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  overflow-y: auto;
  padding: 32px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.content-header h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

.content-header p {
  color: #a1a1aa;
  margin-bottom: 40px;
}

.recently-played,
.featured-playlists {
  margin-bottom: 48px;
}

.recently-played h3,
.featured-playlists h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 24px;
}

.track-grid,
.playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
}

.track-card,
.playlist-card {
  background: rgba(26, 26, 26, 0.6);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.track-card:hover,
.playlist-card:hover {
  background: rgba(26, 26, 26, 0.8);
  transform: translateY(-2px);
}

.track-image,
.playlist-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.track-image img,
.playlist-image img {
  width: 10%;
  height: 10%;
  object-fit: cover;
}

.track-name,
.playlist-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-artist,
.playlist-description {
  font-size: 12px;
  color: #a1a1aa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Search Styles */
.search-header {
  margin-bottom: 32px;
}

.search-box {
  position: relative;
  max-width: 400px;
}

.search-box svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #71717a;
}

.search-box input {
  width: 100%;
  background: rgba(26, 26, 26, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 12px 16px 12px 48px;
  color: #ffffff;
  font-size: 14px;
}

.search-box input::placeholder {
  color: #71717a;
}

.search-box input:focus {
  outline: none;
  border-color: #06b6d4;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.category-card {
  background: linear-gradient(135deg, #06b6d4, #ec4899);
  border-radius: 12px;
  padding: 24px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.category-card:hover {
  transform: translateY(-2px);
}

.category-card span {
  font-size: 16px;
  font-weight: 600;
}

/* Library Styles */
.library-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.library-filters {
  display: flex;
  gap: 8px;
}

.filter-btn {
  background: rgba(26, 26, 26, 0.6);
  color: #a1a1aa;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: #06b6d4;
  color: #ffffff;
}

/* Player Bar */
.player-bar {
  height: 90px;
  background: #181818;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
}

.now-playing {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
}

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

.track-image {
  width: 56px;
  height: 56px;
  border-radius: 4px;
  overflow: hidden;
}

.track-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.track-details {
  min-width: 0;
}

.track-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-artist {
  font-size: 12px;
  color: #a1a1aa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.like-btn {
  background: none;
  border: none;
  color: #a1a1aa;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.like-btn:hover {
  color: #ffffff;
}

.like-btn.liked {
  color: #06b6d4;
}

/* Player Controls */
.player-controls {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.control-buttons {
  display: flex;
  align-items: center;
  gap: 16px;
}

.control-btn {
  background: none;
  border: none;
  color: #a1a1aa;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.control-btn:hover {
  color: #ffffff;
}

.control-btn.active {
  color: #06b6d4;
}

.play-btn {
  background: #ffffff;
  color: #000000;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.play-btn:hover {
  transform: scale(1.05);
}

.progress-section {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 600px;
}

.time-current,
.time-total {
  font-size: 11px;
  color: #a1a1aa;
  min-width: 40px;
  text-align: center;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
}

.progress-track {
  position: relative;
  height: 100%;
}

.progress-fill {
  height: 100%;
  background: #ffffff;
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s ease;
}

.progress-handle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
  left: 0%;
}

.progress-bar:hover .progress-handle {
  opacity: 1;
}

/* Volume Section */
.volume-section {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
}

.volume-btn {
  background: none;
  border: none;
  color: #a1a1aa;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.volume-btn:hover {
  color: #ffffff;
}

.volume-slider {
  width: 80px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
}

.volume-track {
  position: relative;
  height: 100%;
}

.volume-fill {
  height: 100%;
  background: #ffffff;
  border-radius: 2px;
  width: 50%;
  transition: width 0.1s ease;
}

.volume-handle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
  left: 50%;
}

.volume-slider:hover .volume-handle {
  opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
  .player-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    flex-direction: row;
    padding: 16px;
  }

  .sidebar-nav {
    display: flex;
    gap: 8px;
    padding: 0;
  }

  .nav-item {
    margin-bottom: 0;
    white-space: nowrap;
  }

  .main-content {
    padding: 16px;
  }

  .player-bar {
    flex-direction: column;
    height: auto;
    padding: 16px;
    gap: 16px;
  }

  .now-playing {
    min-width: auto;
    width: 100%;
    justify-content: center;
  }

  .volume-section {
    min-width: auto;
  }
}
