/* =====================
   RESET & BASE
===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background: #121212;
  color: #fff;
  overflow-x: hidden;
}

/* =====================
   APP LAYOUT
===================== */
.app {
  display: flex;
  min-height: 100vh;
}

/* =====================
   SIDEBAR (DESKTOP)
===================== */
.sidebar {
  width: 220px;
  background: #000;
  padding: 24px;
}

.sidebar h1 {
  margin-bottom: 28px;
}

.sidebar p {
  margin: 16px 0;
  color: #b3b3b3;
  cursor: pointer;
}

.sidebar p:hover {
  color: #1db954;
}

/* =====================
   MAIN CONTENT
===================== */
.main {
  flex: 1;
  padding: 28px;
  padding-bottom: 140px;
  overflow-y: auto;
}

/* MOBILE HEADER */
.mobile-header {
  display: none;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* =====================
   SEARCH
===================== */
.search-box {
  margin-bottom: 24px;
}

.search-box input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 28px;
  border: none;
  outline: none;
  background: #1e1e1e;
  color: white;
  font-size: 14px;
}

.search-box input::placeholder {
  color: #aaa;
}

/* =====================
   RECENTLY PLAYED
===================== */
.recent-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 16px;
  overflow-x: auto;
  margin-bottom: 32px;
  padding-bottom: 6px;
}

.recent-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #181818;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.recent-card:hover {
  background: #222;
}

.recent-card img {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
}

.recent-card h4 {
  font-size: 14px;
}

.recent-card p {
  font-size: 12px;
  color: #aaa;
}

/* =====================
   SONG GRID
===================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

/* SONG CARD */
.card {
  background: #181818;
  padding: 16px;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.card:hover {
  background: #222;
  transform: translateY(-4px);
}

.card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
}

.card h4 {
  margin-top: 10px;
  font-size: 15px;
}

.card p {
  margin-top: 4px;
  font-size: 13px;
  color: #aaa;
}

/* =====================
   PLAYER BAR
===================== */
.player {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 92px;
  background: #000;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 18px;
  z-index: 100;
}

.player-left {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 260px;
}

.player-left img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
}

.player-center {
  flex: 1;
  text-align: center;
}

.player-center button {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  margin: 0 8px;
  cursor: pointer;
}

.progress {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #aaa;
  margin-top: 6px;
}

.bar {
  flex: 1;
  height: 4px;
  background: #333;
  border-radius: 10px;
  cursor: pointer;
}

.fill {
  height: 100%;
  width: 0%;
  background: #1db954;
  border-radius: 10px;
}

/* =====================
   📱 MOBILE RESPONSIVE
===================== */
@media screen and (max-width: 768px) {

  /* HIDE SIDEBAR */
  .sidebar {
    display: none;
  }
  .mobile-header {
    display: block;
  }

  .main {
    padding: 16px;
    padding-bottom: 150px;
  }

  /* BIGGER RECENT CARDS */
  .recent-row {
    grid-auto-columns: minmax(260px, 1fr);
  }

  /* SONG GRID → 2 BIG CARDS */
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .card {
    padding: 14px;
  }

  .card h4 {
    font-size: 15px;
  }

  .card p {
    font-size: 13px;
  }

  /* PLAYER COMPACT */
  .player {
    height: 82px;
    padding: 10px 12px;
  }

  .player-left {
    width: auto;
    flex: 1;
  }

  .player-left img {
    width: 46px;
    height: 46px;
  }

  .player-center button {
    font-size: 20px;
  }

  .progress span {
    display: none;
  }
}

/* =====================
   📱 SMALL PHONES
===================== */
@media screen and (max-width: 420px) {

  /* SINGLE BIG CARD */
  /* .grid {
    grid-template-columns: 1fr;
  } */
  .card {
    max-width: 420px;
    margin: auto;
  }

  .recent-row {
    grid-auto-columns: minmax(90%, 1fr);
  }
}
