/* ===== BASE COLORS ===== */
:root {
  --dark-bg: #1a1a1a;
  --card-bg: #2a2a2a;
  --accent: #ff6600;
  --text: #fff;
  --muted: #ccc;
  --border: #333;
  --success: #4caf50;
  --error: #f44336;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--dark-bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== MOBILE-FIRST LAYOUT ===== */
.mobile-logo {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #111;
  justify-content: center;
  align-items: center;
  height: 60px;
  border-bottom: 1px solid var(--border);
  z-index: 200;
  backdrop-filter: blur(10px);
}

.mobile-logo img {
  width: 120px;
  height: auto;
}

/* Hide desktop sidebar on mobile */
.sidebar {
  display: none;
}

/* Main content */
.main {
  padding: 15px;
  padding-top: 75px;
  padding-bottom: 140px;
  min-height: 100vh;
}

/* ===== SECTIONS ===== */
.section {
  margin-bottom: 40px;
}

.section h2 {
  color: var(--accent);
  margin-bottom: 20px;
  font-size: 22px;
  font-weight: 600;
  border-left: 4px solid var(--accent);
  padding-left: 15px;
}

/* ===== BACK NAVIGATION ===== */
.back-nav {
  margin-bottom: 20px;
  margin-top: -10px;
}

.back-nav a {
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  font-size: 16px;
  transition: color 0.2s ease;
}

.back-nav a:hover {
  color: var(--accent);
}

/* ===== ALBUM GRID ===== */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 15px;
}

/* ===== ALBUM CARDS ===== */
.card {
  background: var(--card-bg);
  padding: 12px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
}

.card:hover img {
  transform: scale(1.03);
}

.card h4 {
  margin: 12px 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.card p {
  color: var(--muted);
  font-size: 13px;
}

/* ===== ALBUM VIEW (Updated & Improved) ===== */
.album-view {
  padding: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.album-header {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.album-cover {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.album-info {
  flex: 1;
  min-width: 250px;
}

.album-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.album-meta {
  color: var(--muted);
  margin-bottom: 20px;
  font-size: 15px;
}

.album-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.play-all, 
.share-btn {
  background: var(--accent);
  color: #000;
  border: none;
  padding: 14px 24px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  transition: all 0.25s ease;
  box-shadow: 0 3px 10px rgba(255,102,0,0.25);
}

.play-all:hover,
.share-btn:hover {
  background: #e55a00;
  transform: translateY(-2px);
}

/* ===== TRACKLIST ===== */
.tracklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.track-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  padding: 14px 18px;
  border-radius: 12px;
  transition: background 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.track-item:hover {
  background: rgba(255,102,0,0.12);
}

.track-num {
  color: var(--muted);
  font-weight: 600;
  width: 30px;
  text-align: right;
  margin-right: 10px;
}

.track-name {
  flex: 1;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-play {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.track-play:hover {
  color: var(--accent);
  background: rgba(255,102,0,0.1);
}

/* ===== PLAYER BAR ===== */
.player-bar {
  position: fixed;
  bottom: 65px;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, #111 0%, #0a0a0a 100%);
  border-top: 1px solid var(--border);
  padding: 15px;
  z-index: 150;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}

.player-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  margin-bottom: 15px;
}

.player-controls button {
  background: none;
  border: none;
  color: var(--text);
  font-size: 20px;
  padding: 12px;
  cursor: pointer;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

#playPauseBtn {
  background: var(--accent);
  color: #000;
  font-size: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(255,102,0,0.3);
}

.player-track {
  text-align: center;
  margin-bottom: 15px;
}

.player-track h4 {
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#progressBar {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--card-bg);
  -webkit-appearance: none;
}

#progressBar::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
}

/* ===== PLAYER OPTIONS ===== */
.player-options {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
}

.player-options button {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  padding: 8px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-options button.active {
  color: var(--accent);
}

/* ===== MOBILE NAV ===== */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, #111 0%, #0a0a0a 100%);
  border-top: 1px solid var(--border);
  padding: 12px 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
}

.mobile-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.mobile-nav a.active {
  color: var(--accent);
  background: rgba(255,102,0,0.1);
}

/* ===== DESKTOP STYLES ===== */
@media (min-width: 1024px) {
  .mobile-logo, .mobile-nav { display: none; }

  .sidebar {
    display: flex;
    width: 250px;
    background: #111;
    padding: 20px;
    height: 100vh;
    position: fixed;
    flex-direction: column;
    gap: 15px;
    top: 0;
    left: 0;
  }

  .sidebar .logo img {
    width: 150px;
  }

  .sidebar nav a {
    display: block;
    padding: 12px 15px;
    color: var(--muted);
    border-radius: 8px;
    text-decoration: none;
    margin-bottom: 5px;
    transition: all 0.3s ease;
  }

  .sidebar nav a:hover {
    background: var(--accent);
    color: #000;
  }

  body {
    display: flex;
    height: 100vh;
    overflow: hidden;
  }

  .main {
    margin-left: 250px;
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    padding-bottom: 100px;
  }

  .player-bar {
    left: 250px;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .album-header {
    gap: 40px;
  }

  .album-cover {
    width: 300px;
    height: 300px;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .album-header {
    flex-direction: column;
    text-align: center;
  }
  .album-cover {
    width: 220px;
    height: 220px;
  }
  .album-title {
    font-size: 26px;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
  :root {
    --dark-bg: #000;
    --card-bg: #222;
    --border: #666;
    --muted: #ddd;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .sidebar,
  .player-bar,
  .mobile-nav,
  .mobile-logo {
    display: none !important;
  }
  .main {
    margin: 0 !important;
    padding: 20px !important;
  }
}
