:root {
  /* Color Palette - Deep Nocturne */
  --bg-deep: #0a0a0c;
  --bg-surface: #141418;
  --bg-card: #1c1c22;
  --accent-primary: #ff3d71;
  --accent-secondary: #00d1ff;
  --text-main: #ffffff;
  --text-muted: #9494a5;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --glass: rgba(20, 20, 24, 0.8);
  
  /* Typography */
  --font-display: 'Syncopate', sans-serif;
  --font-body: 'Outfit', sans-serif;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 48px;
  --space-2xl: 80px;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
}

/* Layout Structure */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: var(--space-lg);
  flex-shrink: 0;
}

@media (max-width: 1024px) {
  .sidebar, .activity-sidebar {
    display: none;
  }
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -1px;
  margin-bottom: var(--space-2xl);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--accent-primary);
}

.nav-group {
  margin-bottom: var(--space-xl);
}

.nav-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  display: block;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

.nav-link.active {
  position: relative;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  right: -24px;
  width: 4px;
  height: 20px;
  background: var(--accent-primary);
  border-radius: 4px 0 0 4px;
}

/* Main Content Area */
.main-viewport {
  flex-grow: 1;
  overflow-y: auto;
  padding-bottom: 120px; /* Player height space */
  scroll-behavior: smooth;
  background: linear-gradient(135deg, #0a0a0c 0%, #1a1a24 100%);
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) var(--space-xl);
  background: linear-gradient(to bottom, var(--bg-deep), transparent);
  backdrop-filter: blur(10px);
}

.search-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  padding: var(--space-sm) var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 300px;
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-main);
  outline: none;
  width: 100%;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Sections */
section {
  padding: 0 var(--space-xl);
  margin-top: var(--space-xl);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--space-lg);
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0;
  text-transform: uppercase;
}

.view-all {
  color: var(--accent-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Hero Slider / Featured */
.featured-hero {
  position: relative;
  height: 380px;
  border-radius: 24px;
  overflow: hidden;
  margin: 0 var(--space-xl);
  background: #111;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-2xl);
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

.badge-featured {
  background: var(--accent-primary);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 3.5rem;
  margin: var(--space-md) 0;
  line-height: 1;
}

/* Grids */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-lg);
}

.album-card {
  background: var(--bg-card);
  padding: var(--space-md);
  border-radius: 16px;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
  cursor: pointer;
}

.album-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-subtle);
  background: #25252d;
}

.album-art {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  margin-bottom: var(--space-md);
  overflow: hidden;
}

.album-title {
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* Player Bar */
.player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: var(--glass);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 0 var(--space-xl);
  justify-content: space-between;
  z-index: 1000;
}

@media (max-width: 768px) {
  .player-bar {
    height: 80px;
    padding: 0 var(--space-md);
  }
  
  .volume-controls, .playback-bar {
    display: none;
  }

  .current-track {
    width: auto;
    flex: 1;
  }

  .player-controls {
    flex-grow: 0;
    width: auto;
  }
}

.current-track {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 300px;
}

.track-art {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: var(--bg-card);
}

.player-controls {
  flex-grow: 1;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.control-buttons {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.play-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--text-main);
  color: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

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

.playback-bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.progress-rail {
  flex-grow: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  position: relative;
}

.progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 35%;
  background: var(--accent-primary);
  border-radius: 2px;
}

.volume-controls {
  width: 300px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-md);
}

/* Utilities */
.hidden-mobile {
  display: flex;
}

@media (max-width: 768px) {
  .hidden-mobile {
    display: none !important;
  }
}

.placeholder-image {
  background: linear-gradient(45deg, #1c1c22, #2a2a35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  position: relative;
  overflow: hidden;
}

.placeholder-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  100% { left: 100%; }
}

.btn-primary {
  background: var(--accent-primary);
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 100px;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition-fast);
  text-transform: uppercase;
}

.btn-primary:hover {
  box-shadow: 0 0 20px rgba(255, 61, 113, 0.4);
}

.icon-button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.icon-button:hover {
  color: var(--text-main);
}

/* Right Sidebar / Activities */
.activity-sidebar {
  width: 300px;
  background-color: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  padding: var(--space-lg);
  flex-shrink: 0;
}

.activity-item {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.activity-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.activity-info {
  font-size: 0.85rem;
}

.friend-name {
  font-weight: 600;
  display: block;
}

.friend-action {
  color: var(--text-muted);
}

.friend-song {
  color: var(--accent-secondary);
  display: block;
  margin-top: 2px;
}
