:root {
    --bg: #0a0a0f;
    --panel: #0d0d12;
    --panel2: #111118;
    --text: #ffffff;
    --muted: #aaaaaa;
    --pink: #ff00aa;
    --purple: #7a00ff;
    --border: #222;
    --glow: 0 0 18px rgba(255, 0, 170, 0.25);
    --wobble: 0px;
    --player-height: 120px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    padding-bottom: 0;
}

.main {
    display: flex;
    height: 100vh;
    padding-bottom: 120px;
    box-sizing: border-box;
    overflow: hidden;
}

.admin-actions button {
    width: 28px;
    height: 28px;
    font-size: 14px;
}

.song-rename-input {
    flex: 1;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #ff00aa;
    background: #111;
    color: white;
    outline: none;
    box-shadow: 0 0 10px rgba(255,0,170,0.3);
}

.song-info {
    padding: 8px 12px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.content > div {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(90deg, var(--pink), var(--purple));
    box-shadow: var(--glow);
}

.logo img {
    height: 40px;
    display: block;
}

.topbar input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: #111;
    color: white;
    outline: none;
}


.sidebar {
    width: 270px;
    background: var(--panel);
    border-right: 1px solid var(--border);
    padding: 15px;

    overflow-y: auto;
    overflow-x: hidden;
}


.content {
    flex: 1;
    display: flex;
    gap: 15px;
    padding: 15px;

    overflow: hidden;
}


#songs,
#queue,
#playlistSongs {
    overflow-y: auto;
    max-height: 100%;
    padding-right: 5px;
}

#songPagination {
    padding: 10px;
    flex-shrink: 0;
}

#songs {
    display: flex;
    flex-direction: column;
}

.content > div {
    flex: 1;
    overflow: hidden;
}


.song-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);

    transition: 0.2s;
}

.song-row:hover {
    background: rgba(255, 0, 170, 0.12);
}

.song-row span {
    cursor: pointer;
    flex: 1;
}

.song-actions {
    display: flex;
    gap: 8px;
}



.queue-item {
    padding: 10px;
    margin: 4px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.queue-item:hover {
    background: rgba(122, 0, 255, 0.15);
}

.queue-item.active {
    background: var(--purple);
    box-shadow: 0 0 14px rgba(255, 0, 170, 0.4);
}



.playlist-view {
    width: 300px;
    border-left: 1px solid rgba(255,255,255,0.1);
    padding: 10px;

    overflow-y: auto;
    display: none;
}

.playlist-view.open {
    display: block;
}


.player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;

    height: 110px;

    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(6px);
    border-top: 1px solid rgba(255,255,255,0.08);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 8px;
    padding: 10px 15px;

    overflow: hidden;
}

.player::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='1200' height='90' viewBox='0 0 1200 90'><path d='M0 45 Q 150 10 300 45 T 600 45 T 900 45 T 1200 45' stroke='rgba(255,0,255,0.25)' stroke-width='3' fill='none'/></svg>") repeat-x;
    opacity: 0.25;
    animation: waveMove 6s linear infinite;
    pointer-events: none;
}

.player.paused::before {
    animation-play-state: paused;
}

.player::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: var(--progress, 0%);
    background: linear-gradient(90deg, hotpink, #b300ff);
    box-shadow: 0 0 12px hotpink, 0 0 18px #b300ff;
    transform: translateY(calc(var(--wobble, 0px) * -1));
}

.player.paused::after {
    transform: translateY(0px);
}

@keyframes waveMove {
    from { background-position-x: 0; }
    to { background-position-x: -1200px; }
}

.progress-orb {
    position: absolute;
    top: 50%;
    left: calc(var(--progress, 0%) - 7px);
    transform: translateY(-50%);

    width: 14px;
    height: 14px;

    border-radius: 50%;
    background: white;

    box-shadow: 0 0 10px hotpink, 0 0 20px #b300ff;

    pointer-events: none;
    transition: left 0.1s linear;
}
#seekBar {
    appearance: none;
    width: 100%;
    height: 4px;
    background: transparent;
    position: relative;
    z-index: 10;
}
#seekBar::-webkit-slider-thumb {
    appearance: none;
    width: 0;
    height: 0;
}
#seekBar::-moz-range-thumb {
    width: 0;
    height: 0;
}

.player button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: #1a1a1a;
    color: white;
    cursor: pointer;
    font-size: 18px;
    transition: 0.2s;
}

.player button:hover {
    background: #2a2a2a;
    box-shadow: 0 0 8px hotpink;
}

#nowPlaying {
    font-size: 15px;
    color: white;
    font-weight: 600;
}

.time {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 300px;
    color: #ccc;
}

.timeline {
    width: 100%;
    max-width: 600px;

    display: flex;
    align-items: center;
    gap: 10px;

    font-size: 12px;
    color: #ccc;
}

.seek-wrap {
    position: relative;
    flex: 1;
}

#seekBar {
    width: 100%;
    height: 6px;
    opacity: 0;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    cursor: pointer;
}
#seekBar::-webkit-slider-thumb {
    appearance: none;
    width: 0;
    height: 0;
}

#seekBar::-moz-range-thumb {
    width: 0;
    height: 0;
}

.hidden {
    display: none !important;
}



.sidebar {
    overflow-y: auto;
}



.playlist-box {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel);
}


.playlist-dropdown {
    background: #1e1e1e;
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 4px 8px;
    width:55px;
}



.admin-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 350px;

    max-height: 500px;
    overflow-y: auto;

    background: #0d0d12;
    border: 1px solid #7a00ff;
    border-radius: 10px;

    box-shadow: 0 0 25px rgba(255, 0, 170, 0.4);
    z-index: 9999;
}

.user-box {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 6px 10px;
    border-radius: 8px;

    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.08);

    color: white;
    font-size: 13px;
}

.user-box span {
    font-weight: bold;
    color: #fff;
}

.user-box button {
    background: #222;
    border: none;
    color: white;

    padding: 6px 10px;
    border-radius: 6px;

    cursor: pointer;
    font-size: 12px;

    transition: 0.2s;
}

.user-box button:hover {
    background: #333;
}

#uploadSection {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#uploadForm {
    display: flex;
    flex-direction: column;
    gap: 10px;

    padding: 12px;
    border-radius: 10px;

    background: var(--panel2);
    border: 1px solid var(--border);
}

#uploadForm input[name="title"] {
    padding: 10px;
    border-radius: 8px;

    background: #0a0a0f;
    border: 1px solid #333;

    color: white;
}

label.file {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 12px;
    border-radius: 8px;

    border: 1px dashed #444;
    cursor: pointer;

    color: var(--muted);
    width: 100%;
    text-align: center;

    box-sizing: border-box;
}

label.file input {
    display: none;
}

label.file:hover {
    border-color: var(--pink);
    color: white;
}

#uploadForm button {
    padding: 10px;
    border-radius: 8px;

    border: none;
    cursor: pointer;

    background: linear-gradient(90deg, var(--pink), var(--purple));
    color: white;
}

.controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.controls button {
    width: 52px;
    height: 52px;

    border-radius: 50%;
    border: 1px solid rgba(255, 0, 170, 0.2);

    background: rgba(10, 0, 20, 0.6);
    backdrop-filter: blur(10px);

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    transition: all 0.25s ease;

    box-shadow: var(--glow);
}

.controls svg {
    width: 22px;
    height: 22px;

    stroke: var(--pink);
    fill: none;

    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;

    transition: all 0.25s ease;
}

.controls button:hover {
    transform: scale(1.08);
    border-color: rgba(255, 0, 170, 0.5);

    box-shadow:
        0 0 18px rgba(255, 0, 170, 0.4),
        0 0 30px rgba(122, 0, 255, 0.3);
}

.controls button:hover svg {
    stroke: white;
}

.controls button.active {
    background: rgba(255, 0, 170, 0.12);
    border-color: rgba(255, 0, 170, 0.6);

    box-shadow: var(--glow);
}

.controls button.active svg {
    stroke: white;
}


#playBtn {
    width: 64px;
    height: 64px;

    background: rgba(255, 0, 170, 0.15);
    border: 1px solid rgba(255, 0, 170, 0.4);

    box-shadow: 0 0 25px rgba(255, 0, 170, 0.35);
}

#playBtn svg {
    stroke: white;
}

.webhook-box {
    margin-top: 12px;
    padding: 12px;
    border-radius: 10px;

    background: var(--panel2);
    border: 1px solid var(--border);
    box-shadow: var(--glow);
}

.webhook-box h3 {
    margin: 0 0 10px;
    color: var(--pink);
    font-size: 14px;
}

.webhook-box input {
    width: 100%;
    padding: 10px;

    border-radius: 8px;
    background: #0a0a0f;
    border: 1px solid #333;

    color: white;
    outline: none;

    margin-bottom: 8px;
}

.webhook-box button {
    width: 100%;
    padding: 10px;

    border: none;
    border-radius: 8px;

    background: linear-gradient(90deg, var(--pink), var(--purple));
    color: white;

    cursor: pointer;
    margin-top: 6px;

    transition: 0.2s;
}

.webhook-box button:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(255, 0, 170, 0.4);
}

.playlist-box {
    padding: 12px;
    border-radius: 10px;

    background: var(--panel2);
    border: 1px solid var(--border);
}

.playlist-box h3 {
    margin: 0 0 10px;
    color: var(--pink);
}

#playlistName {
    width: 100%;
    padding: 10px;

    border-radius: 8px;
    background: #0a0a0f;
    border: 1px solid #333;

    color: white;
    margin-bottom: 8px;
}

.playlist-box button {
    width: 100%;
    padding: 10px;

    border: none;
    border-radius: 8px;

    background: var(--purple);
    color: white;

    cursor: pointer;
}

#playlists {
    margin-top: 10px;
}

#playlists div {
    padding: 8px;
    margin-top: 6px;

    background: #111;
    border-radius: 8px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    cursor: pointer;
    transition: 0.2s;
}

#playlists div:hover {
    background: rgba(255, 0, 170, 0.12);
    color: var(--pink);
}

#playlists button {
    background: transparent;
    border: none;
    color: #ff4d6d;
    cursor: pointer;
}


#songs,
#queue {
    scrollbar-width: thin;
}

.auth-logo {
    display: flex;
    justify-content: center;
    padding: 15px 0 5px;
}

.auth-logo img {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(255, 0, 170, 0.4));
}
/*
#authOverlay {
    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);

    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s ease;
    z-index: 9999;
}

.auth-card {
    width: 340px;

    background: var(--panel);
    border: 1px solid var(--purple);
    border-radius: 14px;

    box-shadow: var(--glow);
    overflow: hidden;

    animation: fadeIn 0.25s ease;
}
*/

.auth-tabs {
    display: flex;
}

.auth-tabs button {
    flex: 1;
    padding: 12px;

    background: var(--panel2);
    border: none;

    color: white;
    cursor: pointer;

    transition: 0.2s;
}

.auth-tabs button:hover {
    background: #1a1a1a;
}

.auth-body {
    padding: 12px;
}

.auth-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-panel input {
    width: 100%;
    padding: 10px;

    background: #0a0a0f;
    border: 1px solid #333;

    color: white;
    border-radius: 8px;

    outline: none;
}

.auth-panel input:focus {
    border-color: var(--pink);
    box-shadow: 0 0 12px rgba(255, 0, 170, 0.4);
}

.auth-panel button {
    padding: 10px;

    border: none;
    border-radius: 8px;

    background: linear-gradient(90deg, var(--pink), var(--purple));
    color: white;

    cursor: pointer;
}

.auth-panel button:hover {
    transform: translateY(-1px);
}

#authOverlay.hidden {
    display: none !important;
}

.upload-spinner {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: white;
}

.spinner {
    width: 45px;
    height: 45px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top: 4px solid #ff00aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

#toastContainer {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(20, 20, 30, 0.95);
    border: 1px solid rgba(255, 0, 170, 0.4);
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    box-shadow: 0 0 18px rgba(255, 0, 170, 0.25);
    font-size: 14px;
    min-width: 180px;

    animation: toastIn 0.25s ease, toastOut 0.25s ease 2.7s forwards;
}



@keyframes pulseGlow {
    0% { box-shadow: 0 0 10px hotpink, 0 0 20px #b300ff; }
    50% { box-shadow: 0 0 18px hotpink, 0 0 30px #b300ff; }
    100% { box-shadow: 0 0 10px hotpink, 0 0 20px #b300ff; }
}

.pulse {
    animation: pulseGlow 1.2s infinite ease-in-out;
}

.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    padding: 10px;
    flex-wrap: wrap;
}

.pagination button {
    background: #1a1a1a;
    border: 1px solid #333;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.pagination button:hover {
    background: #2a2a2a;
    box-shadow: 0 0 8px hotpink;
}

.pagination button.active {
    background: var(--purple);
    box-shadow: 0 0 12px rgba(255, 0, 170, 0.5);
}

@keyframes toastIn {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes toastOut {
    to { transform: translateY(10px); opacity: 0; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {

    .main {
        flex-direction: column;
        height: auto;

        /* IMPORTANT FIX */
        padding-bottom: 140px;
    }

    .content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }
}