/* General Page */
body {
  font-family: Arial, sans-serif;
  background: #111;
  color: white;
  margin: 0;
 /* padding-bottom: 80px;  space for bottom player */
}

#recommend_tag {
  margin-top: 60px;   /* push down */
  margin-left: 30px;  /* push right */
  font-size: 30px;
}

/* Search Bar */
#search-box {
  display: flex;
  justify-content: center;
  margin: 20px auto;
  max-width: 600px;
  width: 90%;
  position: relative;
}

#search-input {
  flex: 1;
  padding: 10px;
  border: 2px solid #555;
  border-radius: 8px 0 0 8px;
  outline: none;
  font-size: 16px;
}

#search-button {
  padding: 30px 30px;
  border: 2px solid #555;
  border-left: none;
  background: #222;
  color: white;
  cursor: pointer;
  border-radius: 0 8px 8px 0;
  font-size: 30px;
}

#searchBtn {
  padding: 10px 100px;
  font-size: 16px;
  text-align: left;
  border: none;
  border-radius: 18px;
  background: white;
  color: gray;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  position: fixed;
  top: 1%;
}

#searchBtn:hover {
  background: red;
  color: white;
}

/* Songs Grid */
#songs-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 5px;
  padding: 10px;
  max-width: 1000px;
  margin: auto;
}

.song-card {
  background: #222;
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  transition: background 0.3s;
}

.song-card:hover {
  background: #333;
}

.song-card img {
  width: 100%;
  border-radius: 8px;
}

.song-title {
  font-size: 14px;
  margin: 8px 0 4px;
  font-weight: bold;
}

.song-artist {
  font-size: 12px;
  color: #aaa;
}

/* Mini player remains fixed at bottom */
#player-bar {
  position: fixed;
  bottom: 60px;
  left: 0;
  right: 0;
  background: #222;
  border-top: 1px solid #444;
  margin-bottom: 3px;
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  cursor: pointer;
}

/* Full screen player */
#full-player {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #111;
  color: white;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#full-player button {
  opacity: 1;
}

#full-player img {
  width: 400px;
  height: 400px;
  border-radius: 12px;
  margin-bottom: 20px;
}

#minimize-btn {
  position: absolute;
  top: 15px;
  left: 15px;
  font-size: 24px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

#minimize-btn i {
  font-size: 24px;
}

.full-controls button {
  font-size: 24px;
  margin: 5px 10px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

#like-btn.liked,
#full-like-btn.liked {
  color: green;
}

#like-btn,
#full-like-btn {
  color: white;
}

.player-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-info img {
  width: 50px;
  height: 50px;
  border-radius: 6px;
}


.player-controls button {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  margin: 0 5px;
}

.player-controls button:hover {
  color: #1db954;
}

/* Seek bar inside player */
.seek-wrapper {
  display: flex;
  align-items: center;
  color: #FFFFFF;
  gap: 5px;
  margin-top: 1px;
}

.seek-wrapper span {
  font-size: 10px;
  color: #aaa;
}

.seek-wrapper input[type="range"] {
  flex: 1;
  margin: 0 5px;
}

.full-seek-wrapper {
  display: flex;
  align-items: center;
  color: #FFFFFF;
  gap: 5px;
  margin-top: 1px;
}

.full-seek-wrapper span {
  font-size: 15px;
  color: #aaa;
}

.full-seek-wrapper input[type="range"] {
  flex: 1;
  margin: 0 5px;
}

#searchPage {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0px;
  background: #121212;
  color: white;
  overflow-y: auto;
}

#searchBtnPage {
  background: #1db954;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: #000;
  font-weight: 700;
  font-size: 15px;
}

#searchPage .header {
  display: flex;
  align-items: center;
  padding: 10px;
  background: #181818;
}

#searchPage .header input {
  flex: 1;
  margin: 0 8px;
  padding: 8px;
  border: none;
  border-radius: 4px;
}


#searchPage .header #backBtn {
  background: #1db954;
  font-size: 18px;           /* arrow size */
  font-weight: bold;
  border: none;
  border-radius: 50%;        /* makes it round */
  width: 36px;               /* circle size */
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

#searchPage .header #backBtn:hover {
  background: #14833b;       /* darker green on hover */
}


#searchList .item {
  display: flex;
  align-items: center;
  padding: 10px;
  cursor: pointer;
}

#searchList .item:hover {
  background: #222;
}

#searchList img {
  width: 50px;
  height: 50px;
  border-radius: 4px;
  margin-right: 10px;
}

#searchList .meta {
  display: flex;
  flex-direction: column;
}

#searchList .name {
  font-weight: bold;
}

#searchList .artist {
  font-size: 0.85em;
  color: #aaa;
}


/* Bottom Homebox */
.homebox {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  background: #111;
  border-top: 1px solid white;
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  box-sizing: border-box;
  z-index: 9999;
}

.homebox .homepageButtonImage {
  display: flex;
  flex-direction: column;   /* stack icon on top, text below */
  align-items: center;
  justify-content: center;
  font-size: 14px;
  gap: 4px;
  background: none;
  border: none;
  color: white;             /* text color */
  cursor: pointer;
  flex: 1;                  /* each button takes equal space */
}

.homebox .homepageButtonImage i {
  font-size: 20px;
  color: white;
}



.homebox button:active {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

/* Pause/play Buffer Iconn */
.loading-spinner {
  width: 16px;
  height: 16px;
  border: 3px solid #fff;
  border-top: 3px solid #1db954; /* green spinner */
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

/* Home page Buffer Iconn */
.homePage-loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #fff;
  border-top: 3px solid #1db954; /* green spinner */
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  position: absolute;
  top: 45%;
  left: 45%;
  right: 50%;
}
@keyframes spin {
  100% { transform: rotate(360deg); }
}

.footer {
  background: #222;
  color: white;
  text-align: center;
  padding: 20px;
}


.recentItem {
  display: flex;
  align-items: center;
  margin: 8px 0;
}

.recentCover {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  margin-right: 10px;
}

.recentMeta {
  flex: 1;
}

.recentInfoRow {
  display: flex;
  justify-content: space-between; /* title+artist left, ❌ right */
  align-items: center;
}

.recentText {
  display: flex;
  flex-direction: column; /* stack title and artist */
 
  text-overflow: ellipsis;
}

.recentTitleText {
  display: flex;
  flex-direction: column;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-wrap: break-word; /* allow breaking inside words */
  overflow-wrap: break-word;
  max-width: 280px;
}

.recentArtistText {
  font-size: 0.9em;
  opacity: 0.7;
}

.recentDeleteBtn {
  flex-shrink: 0;
  margin-left: 10px;
  color: white;
  font-size: 38px;
  border: none;
  background: transparent;
  cursor: pointer;
}


#minimize-btn {
  font-size: 28px;
  margin-top: 0px; 
   }

#player-title, #full-title {
  font-weight: bold;
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  animation: marquee 8s linear infinite;
}

#player-artist, #full-artist {
  font-size: 12px;
  color: #aaa;
  display: inline-block;
  padding-left: 100%;
  animation: marquee 8s linear infinite;
  
}

.marquee {
  width: 200px;
  line-height: 20px;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
}

@keyframes marquee {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(-100%, 0); }
  }
