/* Spotify-inspired dark theme */
:root {
    --bg-dark: #121212;
    --bg-light: #282828;
    --accent-green: #1DB954;
    --text-light: #FFFFFF;
    --text-muted: #B3B3B3;
    --glass-bg: rgba(255, 255, 255, 0.1);
}

/* General */
body {
    margin: 0;
    font-family: 'Nunito', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://wallpapercat.com/w/full/1/8/f/2561959-1920x1080-desktop-1080p-juice-wrld-background-image.jpg') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-light);
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Mobile Btn */
.mobile-btn {
  background: #333;
  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: #555;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: #28282800;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}
header .user a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}
header .user a:hover {
    color: var(--accent-green);
}

/* Main layout */
.app-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
}
.main-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

/* Playlist section (now just search with dropdown) */
.playlist-section {
    position: relative;
    padding: 1rem;
    background: #28282800;
}
#search {
    width: 30%;
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    background: rgb(255 255 255 / 3%);
    color: var(--text-light);
    font-size: 0.9rem;
}
#search::placeholder {
    color: var(--text-muted);
}
#playlist {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background: var(--bg-light);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 10;
    list-style: none;
    padding: 0;
    margin: 0;
}
#playlist::-webkit-scrollbar {
    width: 8px;
}
#playlist::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}
#playlist li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}
#playlist li:hover {
    background: var(--glass-bg);
}
#playlist li.current-song {
    background: var(--accent-green);
    color: var(--bg-dark);
    font-weight: 600;
}
#playlist li img.thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}
#playlist 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;
    justify-content: center;
    padding: 2rem;
    background: #12121200;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.player-section::-webkit-scrollbar {
    display: none; /* Hide scrollbar in Chrome/Safari */
}
.now-playing {
    text-align: center;
    margin-bottom: 2rem;
}
.now-playing img {
    width: 300px;
    height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
}
.now-playing #title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}
.now-playing #artist {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin: 0.5rem 0;
}
#audio {
    width: 0%;
    height: 0%;
    max-width: 600px;
}
#seek {
    width: 100%;
    max-width: 600px;
    accent-color: var(--accent-green);
}
#time {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0.5rem 0;
}
.controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}
.controls button {
    background: var(--glass-bg);
    border: none;
    border-radius: 4px;
    color: var(--text-light);
    padding: 0.8rem;
    cursor: pointer;
    transition: background 0.2s;
}
.controls button:hover {
    background: var(--accent-green);
    color: var(--bg-dark);
}
#volume {
    width: 100px;
    accent-color: var(--accent-green);
}

/* Responsive design */
@media (max-width: 768px) {
    header {
        padding: 1rem;
    }
    header h1 {
        font-size: 1.2rem;
    }
    .playlist-section {
        padding: 0.5rem;
    }
    .player-section {
        padding: 1rem;
    }
    .now-playing img {
        width: 200px;
        height: 200px;
    }
    #audio, #seek {
        max-width: 100%;
    }
    #playlist {
        max-height: 200px;
    }
}
