/* ===== PLAYLIST & USER FEATURES CSS ===== */

/* ===== WELCOME BANNER ===== */
.welcome-banner {
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(135deg, #1a3a2a, #0d2a1a);
    margin: 0; padding: 40px 32px; position: relative; overflow: hidden;
}
.welcome-text h1 { font-size: 36px; font-weight: 900; margin-bottom: 8px; }
.welcome-text p { color: var(--text-secondary); font-size: 16px; }
.welcome-icon { font-size: 120px; color: rgba(29,185,84,0.2); position: absolute; right: 32px; }
.btn-banner-primary { background: var(--spotify-green); color: #000; padding: 12px 28px; border-radius: 50px; font-weight: 700; font-size: 14px; text-decoration: none; transition: all 0.2s; }
.btn-banner-primary:hover { background: #1ed760; transform: scale(1.02); }
.btn-banner-outline { background: transparent; color: #fff; padding: 12px 28px; border-radius: 50px; font-weight: 700; font-size: 14px; text-decoration: none; border: 1px solid rgba(255,255,255,0.3); transition: all 0.2s; }
.btn-banner-outline:hover { border-color: #fff; }

/* ===== USER MENU ===== */
.btn-signup { background: transparent; color: var(--text-secondary); border: 1px solid #727272; padding: 8px 20px; border-radius: 50px; font-size: 14px; font-weight: 700; text-decoration: none; transition: all 0.2s; }
.btn-signup:hover { color: #fff; border-color: #fff; transform: scale(1.02); }
.btn-login-header { background: #fff; color: #000; border: none; padding: 8px 20px; border-radius: 50px; font-size: 14px; font-weight: 700; text-decoration: none; transition: all 0.2s; }
.btn-login-header:hover { background: #f0f0f0; transform: scale(1.02); }

.user-dropdown { position: relative; }
.user-avatar-btn { background: #000; border: none; color: #fff; display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 50px; cursor: pointer; font-size: 14px; font-weight: 600; font-family: inherit; transition: background 0.2s; }
.user-avatar-btn:hover { background: #282828; }
.user-avatar-btn i:first-child { font-size: 28px; color: var(--spotify-green); }
.user-dropdown-menu { position: absolute; top: calc(100% + 8px); right: 0; background: #282828; border-radius: 8px; min-width: 180px; box-shadow: 0 8px 32px rgba(0,0,0,0.5); z-index: 200; display: none; overflow: hidden; }
.user-dropdown-menu.show { display: block; }
.user-dropdown-menu a { display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: var(--text-primary); text-decoration: none; font-size: 14px; transition: background 0.2s; }
.user-dropdown-menu a:hover { background: rgba(255,255,255,0.1); }

/* ===== LIBRARY ===== */
.lib-add-btn { background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; padding: 4px; border-radius: 50%; transition: color 0.2s, background 0.2s; }
.lib-add-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.1); }
.library-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.library-header span { font-size: 14px; font-weight: 700; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }

.liked-thumb { background: linear-gradient(135deg, #450af5, #c4efd9) !important; color: #fff !important; }

.login-prompt { margin-top: 16px; padding: 16px; background: rgba(255,255,255,0.05); border-radius: 8px; text-align: center; }
.login-prompt p { font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; }
.btn-login-sm { display: inline-block; background: #fff; color: #000; padding: 8px 20px; border-radius: 50px; font-size: 13px; font-weight: 700; text-decoration: none; transition: all 0.2s; }
.btn-login-sm:hover { background: #f0f0f0; }

/* ===== TRACK ACTIONS ===== */
.track-actions { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.track-like-btn { background: none; border: none; color: var(--text-muted); font-size: 15px; cursor: pointer; padding: 4px; opacity: 0; transition: all 0.2s; }
.track-item:hover .track-like-btn { opacity: 1; }
.track-like-btn.liked { color: var(--spotify-green); opacity: 1; }
.track-like-btn:hover { color: var(--text-primary); }
.track-like-btn.liked:hover { color: #1ed760; }
.track-playlist-btn { background: none; border: none; color: var(--text-muted); font-size: 14px; cursor: pointer; padding: 4px; opacity: 0; transition: all 0.2s; }
.track-item:hover .track-playlist-btn { opacity: 1; }
.track-playlist-btn:hover { color: var(--text-primary); }
.track-duration { font-size: 13px; color: var(--text-secondary); min-width: 36px; text-align: right; }

/* ===== MODALS ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 1000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.modal-overlay.show { display: flex; }
.modal-box { background: #282828; border-radius: 12px; padding: 0; width: 90%; max-width: 440px; box-shadow: 0 24px 64px rgba(0,0,0,0.6); animation: modalIn 0.2s ease; }
@keyframes modalIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 16px; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.modal-header h3 i { color: var(--spotify-green); }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; padding: 4px; border-radius: 50%; transition: all 0.2s; }
.modal-close:hover { color: var(--text-primary); background: rgba(255,255,255,0.1); }
.modal-body { padding: 20px 24px 24px; }
.modal-body .form-group { margin-bottom: 16px; }
.modal-body .form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }
.modal-body .form-group input { width: 100%; background: #3e3e3e; border: 1px solid #535353; color: #fff; padding: 10px 14px; border-radius: 6px; font-size: 14px; font-family: inherit; }
.modal-body .form-group input:focus { outline: none; border-color: var(--spotify-green); }
.btn-modal-primary { width: 100%; background: var(--spotify-green); color: #000; border: none; padding: 12px; border-radius: 50px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; transition: background 0.2s; }
.btn-modal-primary:hover { background: #1ed760; }
.btn-modal-secondary { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); padding: 8px 16px; border-radius: 50px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; display: flex; align-items: center; gap: 6px; transition: all 0.2s; }
.btn-modal-secondary:hover { color: var(--text-primary); border-color: var(--text-primary); }

/* Playlist Picker */
.playlist-pick-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 6px; cursor: pointer; transition: background 0.2s; }
.playlist-pick-item:hover { background: rgba(255,255,255,0.1); }
.pick-thumb { width: 40px; height: 40px; background: #3e3e3e; border-radius: 4px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); flex-shrink: 0; }
.playlist-pick-item span { flex: 1; font-size: 14px; font-weight: 500; }
.pick-add-icon { color: var(--text-muted); font-size: 14px; }
.playlist-pick-item:hover .pick-add-icon { color: var(--spotify-green); }

/* ===== TOAST ===== */
.toast { position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%) translateY(20px); background: #282828; color: #fff; padding: 12px 24px; border-radius: 50px; font-size: 14px; font-weight: 500; z-index: 2000; opacity: 0; transition: all 0.3s; pointer-events: none; white-space: nowrap; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: #E22134; }

/* ===== EMPTY PLAYLIST ===== */
.empty-playlist { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-playlist i { font-size: 48px; margin-bottom: 16px; display: block; }
.empty-playlist p { font-size: 16px; margin-bottom: 4px; }

/* ===== TRACKS UPDATED ===== */
.track-item { display: grid; grid-template-columns: 40px 1fr 1fr 120px; gap: 16px; padding: 8px 16px; border-radius: 6px; align-items: center; cursor: pointer; transition: background 0.2s; }
.track-item:hover { background: rgba(255,255,255,0.07); }
.track-item.playing { background: rgba(29,185,84,0.1); }
.track-item.playing .track-title { color: var(--spotify-green); }
.tracks-header { display: grid; grid-template-columns: 40px 1fr 1fr 120px; gap: 16px; padding: 8px 16px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.tracks-header span { font-size: 12px; color: var(--text-secondary); font-weight: 500; letter-spacing: 0.5px; text-transform: uppercase; }

/* ===== PROFILE PAGE ===== */
.profile-page { max-width: 700px; margin: 0 auto; padding: 40px 24px; }
.profile-hero { display: flex; align-items: center; gap: 28px; margin-bottom: 40px; }
.profile-avatar { width: 120px; height: 120px; border-radius: 50%; background: linear-gradient(135deg, #1DB954, #0a8a3a); display: flex; align-items: center; justify-content: center; font-size: 48px; color: #fff; flex-shrink: 0; }
.profile-info h1 { font-size: 28px; font-weight: 800; margin-bottom: 4px; }
.profile-info p { color: var(--text-secondary); font-size: 14px; }
.profile-stats { display: flex; gap: 24px; margin-top: 12px; }
.profile-stat { text-align: center; }
.profile-stat strong { display: block; font-size: 20px; font-weight: 700; }
.profile-stat span { font-size: 12px; color: var(--text-secondary); }

@media (max-width: 600px) {
    .welcome-banner { flex-direction: column; text-align: center; }
    .welcome-icon { display: none; }
    .track-item, .tracks-header { grid-template-columns: 40px 1fr 100px; }
    .track-album { display: none; }
    .tracks-header span:nth-child(3) { display: none; }
}
