/* Top Bar Mini Controller */
.music-mini-controls {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.45);
    border-radius: 40px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    height: 44px;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.spotify-logo {
    width: 28px;
    height: 28px;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.spotify-logo:hover {
    transform: scale(1.1);
}

.song-info-pill {
    background: linear-gradient(90deg, #6f2d87, #9d65e9);
    color: white;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    padding: 0 16px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    max-width: 0;
    opacity: 0;
    transition: max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    flex-grow: 1; 
    min-width: 0;
}

.song-info-pill.is-visible {
    max-width: 220px;
    opacity: 1;
}

.music-btns {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.music-btns button {
    background: none;
    border: none;
    color: #6f2d87;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.music-btns button:hover {
    color: #f176ac;
    transform: translateY(-1px);
}

/* Modal Popup Overlay */
.music-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 5, 15, 0.65);
    backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.music-popup-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

/* Spotify Card Window */
.spotify-card {
    background: linear-gradient(170deg, #242424 0%, #121212 100%);
    width: min(380px, 92vw);
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 24px;
    padding: 24px 22px;
    text-align: center;
    color: white;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.spotify-card::-webkit-scrollbar {
    width: 5px;
}
.spotify-card::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

/* Header */
.spotify-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.spotify-badge {
    font-size: 0.85rem;
    font-weight: 800;
    color: #1DB954;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.spotify-auth-btn {
    background: #1DB954;
    color: #000;
    border: none;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, color 0.2s;
}

.spotify-auth-btn:hover {
    transform: scale(1.05);
    background: #1ed760;
}

/* Playlist Picker Box */
.spotify-playlist-picker {
    margin-bottom: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 10px 12px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spotify-picker-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spotify-playlist-picker label {
    font-size: 0.72rem;
    color: #1ed760;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.spotify-playlist-picker select {
    flex: 1;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 10px;
    outline: none;
    cursor: pointer;
    width: 100%;
    min-width: 0;
}

.spotify-playlist-picker select option {
    background: #181818;
    color: #fff;
    padding: 6px;
}

.spotify-playlist-input-row {
    display: flex;
    gap: 6px;
}

.spotify-playlist-input-row input {
    flex: 1;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 0.76rem;
    padding: 6px 10px;
    outline: none;
    min-width: 0;
}

.spotify-playlist-input-row input:focus {
    border-color: #1DB954;
}

.spotify-playlist-input-row input::placeholder {
    color: #888;
}

.spotify-playlist-input-row button {
    background: #1DB954;
    border: none;
    border-radius: 8px;
    color: #000;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 6px 14px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    white-space: nowrap;
}

.spotify-playlist-input-row button:hover {
    background: #1ed760;
    transform: translateY(-1px);
}

.spotify-picker-status {
    font-size: 0.72rem;
    color: #b3b3b3;
    margin-top: 1px;
    line-height: 1.3;
}

/* Album Art Box */
.album-art {
    width: 180px;
    height: 180px;
    margin: 8px auto 14px;
    background: linear-gradient(135deg, #f176ac, #9d65e9);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    overflow: hidden;
    position: relative;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.album-art span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Song & Artist Info */
#pop-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 10px;
}

#pop-artist {
    font-size: 0.85rem;
    color: #b3b3b3;
    margin: 0 0 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 10px;
}

/* Progress Slider */
.progress-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    margin: 0 0 6px;
    cursor: pointer;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: #1DB954;
    border-radius: 10px;
    width: 0%;
    transition: width 0.1s linear;
}

.time-stamps {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #888;
    margin-bottom: 12px;
}

/* Controls */
.music-card-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
    margin-bottom: 6px;
}

.music-card-controls button {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    transition: transform 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.music-card-controls button:hover {
    color: #1DB954;
    transform: scale(1.15);
}

#card-play-btn {
    font-size: 1.8rem;
    background: rgba(255, 255, 255, 0.1);
}

#card-play-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.close-music {
    background: none;
    border: none;
    color: #888;
    font-size: 1.6rem;
    cursor: pointer;
    margin: 4px auto 0;
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
}

.close-music:hover {
    color: #fff;
    transform: scale(1.2);
}
