:root {
    --bg-main: #121212;
    --bg-side: #000000;
    --bg-bar: #181818;
    --bg-card: #282828;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --accent: #1db954;
    --hover: #2a2a2a;
    --glass: rgba(255, 255, 255, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
}

.screen {
    width: 100%;
    height: 100vh;
    display: flex;
}

.hidden {
    display: none !important;
}


#auth-screen {
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #121212 0%, #000000 100%);
}

.auth-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.auth-card h1 {
    color: var(--accent);
    margin-bottom: 10px;
    font-size: 32px;
}

.auth-card p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    background: #333;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 16px;
}

.form button {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    color: black;
    border: none;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.form button:hover {
    transform: scale(1.02);
}

.error {
    color: #ff4d4d;
    margin-top: 15px;
    font-size: 14px;
}


.sidebar {
    width: 240px;
    background-color: var(--bg-side);
    display: flex;
    flex-direction: column;
    padding: 24px 0 100px 0;
}

.logo {
    display: flex;
    align-items: center;
    padding: 0 24px;
    margin-bottom: 24px;
    font-weight: 700;
    font-size: 20px;
}

.logo img {
    width: 32px;
    height: 32px;
    margin-right: 12px;
}

nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-bottom: 20px;
}

.nav-btn {
    width: 100%;
    padding: 12px 24px;
    background: none;
    border: none;
    color: var(--text-secondary);
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

#logout-btn {
    margin-top: 0;
}

#admin-panel-btn {
    margin-top: 5px;
}

.nav-btn .icon {
    margin-right: 16px;
    font-size: 18px;
}

.nav-btn:hover,
.nav-btn.active {
    color: var(--text-primary);
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    padding: 0 0 20px 0;
    margin-top: auto;
}

#logout-btn {
    color: var(--text-secondary);
}

#logout-btn:hover {
    color: white;
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(to bottom, #222, var(--bg-main) 300px);
    overflow-y: auto;
    padding-bottom: 100px;
}

.top-bar {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 32px;
    position: sticky;
    top: 0;
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10;
}

#view-title {
    font-size: 24px;
    font-weight: 700;
}

#search-bar-container input {
    background: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    width: 300px;
    font-size: 14px;
}

.search-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin: 16px 10px 8px;
    letter-spacing: 1px;
}

.song-list {
    padding: 0 32px;
}

.song-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.song-item:hover {
    background: var(--hover);
}

.remove-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.2s;
    margin-left: 8px;
}

.song-item:hover .remove-btn {
    opacity: 1;
}

.remove-btn:hover {
    color: #ff4d4d;
    background: rgba(255, 77, 77, 0.15);
}

.song-item img {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    margin-right: 16px;
    object-fit: cover;
}

.song-item .info {
    flex: 1;
}

.song-item .title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.song-item .artist {
    font-size: 12px;
    color: var(--text-secondary);
}

.song-item .duration {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: 16px;
}


.player-bar {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 90px;
    background-color: var(--bg-bar);
    border-top: 1px solid #282828;
    display: flex;
    align-items: center;
    padding: 0 16px;
    justify-content: space-between;
    z-index: 100;
}

.now-playing {
    display: flex;
    align-items: center;
    width: 30%;
}

.now-playing img {
    width: 56px;
    height: 56px;
    border-radius: 4px;
    margin-right: 14px;
}

.track-info .title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.track-info .artist {
    font-size: 11px;
    color: var(--text-secondary);
}

.player-controls {
    flex: 1;
    max-width: 40%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.buttons {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.buttons button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    margin: 0 16px;
    cursor: pointer;
    position: relative;
}

.buttons button:hover {
    color: white;
}

.buttons button.active::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background-color: #ff4d9c;
    border-radius: 50%;
}

.nav-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
    vertical-align: middle;
}

.main-btn {
    background: white !important;
    color: black !important;
    width: 32px;
    height: 32px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px !important;
}

.main-btn:hover {
    transform: scale(1.1);
}

.progress-area {
    display: flex;
    align-items: center;
    width: 100%;
    font-size: 11px;
    color: var(--text-secondary);
}

.progress-bar-container {
    flex: 1;
    height: 4px;
    background: #4f4f4f;
    margin: 0 10px;
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: white;
    border-radius: 2px;
    width: 0%;
}

.progress-bar-container:hover .progress-bar {
    background: var(--accent);
}

.volume-control {
    width: 30%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.volume-control input {
    width: 100px;
    margin-left: 10px;
    accent-color: white;
}

@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }

    .logo span,
    .nav-btn span:not(.icon) {
        display: none !important;
    }

    .nav-btn {
        justify-content: center;
        padding: 12px 0;
    }

    .nav-btn .icon {
        margin-right: 0;
    }

    .now-playing {
        width: 60%;
    }

    .volume-control {
        display: none;
    }

    .player-controls {
        max-width: 40%;
    }

    #logout-btn {
        justify-content: center;
        margin-top: 0;
    }
}


.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-card);
    width: 90%;
    max-width: 450px;
    padding: 30px;
    border-radius: 12px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.modal-header h2 {
    font-size: 20px;
}

#close-admin-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 30px;
    cursor: pointer;
}

.admin-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.toggle-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid var(--text-secondary);
    background: none;
    color: var(--text-secondary);
    font-weight: bold;
    cursor: pointer;
}

.toggle-btn.active {
    background: var(--accent);
    color: black;
    border-color: var(--accent);
}

.admin-divider {
    height: 1px;
    background: #333;
    margin: 30px 0;
}

.admin-form h3 {
    margin-bottom: 20px;
    font-size: 16px;
}

.admin-form input {
    width: 100%;
    padding: 12px;
    background: #333;
    border: none;
    border-radius: 4px;
    color: white;
    margin-bottom: 12px;
}

.admin-form button {
    width: 100%;
    padding: 12px;
    background: var(--text-primary);
    color: black;
    border: none;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
}

/* ---- Playlist Import ---- */
.playlist-import-box {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 28px 32px;
    margin: 24px 0 20px;
}

.playlist-import-box h2 {
    font-size: 20px;
    margin-bottom: 8px;
}

.playlist-import-box > p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 18px;
}

.playlist-import-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.playlist-import-row input {
    flex: 1;
    padding: 10px 16px;
    background: #333;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
}

.playlist-import-row input:focus {
    outline: 2px solid var(--accent);
}

/* Download Playlist pill button */
#download-playlist-btn, #load-playlist-btn {
    background: var(--accent) !important;
    color: black !important;
    border-radius: 20px !important;
    width: auto !important;
    height: auto !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

#download-playlist-btn:hover, #load-playlist-btn:hover {
    transform: scale(1.03);
}