/* --- General --- */
body {
  margin: 0;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: url('https://wallpapercave.com/wp/wp7004375.png') no-repeat center center fixed; 
  background-size: cover;
  color: #fbfbfb;
  position: relative;
  overflow: hidden; /* prevent page scroll */
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 0%); /* subtle dark overlay */
  z-index: -1;
}

/* Mobile Btn */
.mobile-btn {
  background: #00cbff57;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  margin-left: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
}

.mobile-btn:hover {
  background: #00d80b08;
}

/* --- Header --- */
header {
  display: flex;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgb(255 0 0 / 0%); /* very clear glass */
  backdrop-filter: blur(6px);
  border-radius: 12px;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
header h1 { margin: 0; }
header .user a { color: #fff; text-decoration: none; margin-left: 1rem; }

h2 {
    display: block;
    font-size: 1.5em;
    margin-block-start: 0.83em;
    margin-block-end: 0.83em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    font-weight: bold;
    font-size: 14px;
    unicode-bidi: isolate;
}

/* --- Main --- */
.main-container {
  display: flex;
  gap: 1rem;
  height: calc(100vh - 90px);
  padding: 1rem;
}

/* --- Player Search Bar --- */
.player-section #search {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border-radius: 8px;
  border: none;
  margin-bottom: 1rem;
  box-sizing: border-box;
  background: rgba(255,255,255,0.01); /* almost transparent glass */
  color: #fff;
}

/* --- Playlist Section --- */
.playlist-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background: rgba(30,30,30,0.06); /* clear glass */
  backdrop-filter: blur(6px);
  border-radius: 16px;
  overflow: hidden; /* prevent page scroll */
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  position: relative; /* For dropdown positioning */
}

.playlist-section input {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  border: none;
  background: rgba(255,255,255,0.01);
  color: #fff;
}

.playlist-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto; /* scroll only inside playlist */
}

.playlist-section ul::-webkit-scrollbar { display: none; }
.playlist-section ul { -ms-overflow-style: none; scrollbar-width: none; }

.playlist-section li {
  background: rgba(255,255,255,0.01);
  padding: 0.8rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-section li:hover {
  background: rgba(29,185,84,0.12);
  transform: translateX(2px);
}

.playlist-section li.current-song {
  background: rgba(29,185,84,0.2);
  font-weight: bold;
}

/* --- Search Dropdown --- */
#search-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem); /* Below the search input */
  left: 0;
  right: 0;
  background: rgba(30,30,30,0.95); /* clear glass */
  backdrop-filter: blur(6px);
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  list-style: none;
  padding: 0;
  margin: 0;
  display: none;
}

#search-dropdown::-webkit-scrollbar { display: none; }
#search-dropdown { -ms-overflow-style: none; scrollbar-width: none; }

#search-dropdown li {
  padding: 0.8rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.2s;
}

#search-dropdown li:hover {
  background: rgba(29,185,84,0.15);
}

#search-dropdown li:last-child {
  border-bottom: none;
}

#search-dropdown li img.thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
}

#search-dropdown li span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Player Section --- */
.player-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 6px 20px rgb(0 0 0);
  padding: 1rem;
  overflow-y: auto;
  -ms-overflow-style: none;  /* Hide scrollbar in IE and Edge */
  scrollbar-width: none;  /* Hide scrollbar in Firefox */
}

.player-section::-webkit-scrollbar {
  display: none;  /* Hide scrollbar in Chrome, Safari and Opera */
}

.now-playing {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 30px;
}

.now-playing img {
  width: 200px;
  height: 200px;
  margin-left: 0rem;
  margin-bottom: 2rem;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgb(0 0 0);
}

.meta div { margin: 0.2rem 0; }

.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem;
}

.controls button {
  padding: 0.5rem 0.8rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background: rgb(29 185 84 / 26%);
  color: #fff;
  font-size: large;
}

.controls button:hover {
  background: rgba(29,185,84,0.35);
}

#seek {
  width: 100%;
  margin-top: 1rem;
}

/* --- Auth Cards --- */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.auth-card {
  background: rgba(30,30,30,0.06);
  backdrop-filter: blur(6px);
  border-radius: 16px;
  box-shadow: 0 6px 20px rgb(240 240 240 / 10%);
  width: 300px;
  text-align: center;
}

.auth-card input {
  width: 100%;
  padding: 0.7rem;
  margin-bottom: 1rem;
  border-radius: 6px;
  border: none;
  background: rgba(255,255,255,0.01);
  color: #fff;
}

.auth-card button {
  width: 100%;
  padding: 0.7rem;
  border: none;
  border-radius: 6px;
  background: rgba(29,185,84,0.2);
  color: #fff;
  cursor: pointer;
}

.auth-card button:hover {
  background: rgb(0 255 90 / 48%);
}

.auth-card a { color: #5c8068; text-decoration: none; }
.auth-card a:hover { text-decoration: underline; }

/* --- Responsive / Mobile --- */
@media (max-width: 768px) {
  .main-container { flex-direction: column; height: auto; }
  .player-section { width: 100%; padding: 1rem; }
  .now-playing img { width: 150px; height: 150px; }
  .controls button { padding: 0.6rem; font-size: 0.9rem; }
  #seek { margin-top: 0.5rem; }

  .playlist-section {
    width: 100%;
    padding: 0.5rem;
    max-height: 50vh; /* allows scroll only inside playlist */
    overflow-y: auto;
  }

  .playlist-section li { font-size: 0.9rem; padding: 0.6rem 0.8rem; }
  header { flex-direction: column; gap: 0.5rem; padding: 1rem; }
  header h1 { font-size: 1.2rem; text-align: center; }

  #search-dropdown {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 50vh;
    border-radius: 16px 16px 0 0;
  }
}

#playlist li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
}

#playlist li:hover {
  background: rgba(255, 255, 255, 0.1);
}

#playlist li img.thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
}

#playlist li.current-song {
  background: rgba(255, 255, 255, 0.2);
  font-weight: bold;
}

.thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 8px;
}

