@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Outfit:wght@100..900&family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&family=Space+Grotesk:wght@300..700&family=Urbanist:ital,wght@0,100..900;1,100..900&display=swap&family=Urbanist:ital,wght@0,100..900;1,100..900&family=Wix+Madefor+Text:ital,wght@0,400..800;1,400..800&family=Albert+Sans:ital,wght@0,100..900;1,100..900&family=Instrument+Sans:ital,wght@0,400..700;1,400..700&family=Google+Sans:ital,opsz,wght@0,17..18,400..700;1,17..18,400..700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Host+Grotesk:ital,wght@0,300..800;1,300..800&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Quicksand:wght@300..700&family=Sour+Gummy:ital,wght@0,100..900;1,100..900&family=Space+Grotesk:wght@300..700&family=Varela+Round&family=Elms+Sans:ital,wght@0,100..900;1,100..900&family=Oswald:wght@200..700&family=Bricolage+Grotesque:opsz,wght@12..96,200..800&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Sulphur+Point:wght@300;400;700&display=swap');
/* REMIX ICONS */
@import url('https://cdn.jsdelivr.net/npm/remixicon@4.9.1/fonts/remixicon.css');

* {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

html {
    scroll-behavior: smooth;
}

:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --tracklist-bg: #f5f5f5;
    --primary: #1DB954;
    --scrollbar_thumb: #717171;
    --scrollbar_thumb_hover: #494949;
    --scrollbar_thumb_track: #bfbfbf;
}

body.dark {
    --bg-color: #121212;
    --text-color: #ffffff;
    --tracklist-bg: #181818;
    --scrollbar_thumb: #717171;
    --scrollbar_thumb_hover: gray;
    --scrollbar_thumb_track: #131313;
}

body {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

#widget-container {
    display: flex;
    width: 100%;
    height: 100%;
}

/* Capa e Controles */
.player-side {
    flex: 1;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    transition: background-image 0.3s ease;
}

.player-side::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.2) 100%);
    z-index: 1;
}

.player-info {
    z-index: 2;
    color: white;
    text-align: center;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    z-index: 2;
}

.btn-play {
    background: var(--primary);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: white;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s;
}

.btn-play:active {
    transform: scale(0.95);
}

.btn-ctrl {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 24px;
    display: none;
    /* Escondido por padrão, aparece só na playlist */
    transition: opacity 0.2s;
}

.btn-ctrl:hover {
    opacity: 0.8;
}

/* Lista de Músicas */
.tracklist-side {
    flex: 1;
    background: var(--tracklist-bg);
    overflow-y: auto;
    display: none;
}

.track-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.1);
    cursor: pointer;
    transition: background 0.2s;
}

.track-item:hover {
    background: rgba(128, 128, 128, 0.15);
}

.track-item.active {
    background: var(--primary);
    border-left: none
        /*4px solid var(--primary)*/
    ;
    color: #fff;
}

.track-item img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    margin-right: 12px;
    object-fit: cover;
}

.track-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.track-title {
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-author {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 3px;
}

/* Comportamentos baseados no tipo */
body.type-track #widget-container {
    flex-direction: column;
}

body.type-track .tracklist-side {
    display: none !important;
}

body.type-playlist .tracklist-side {
    display: block;
}

body.type-playlist .btn-ctrl {
    display: block;
}

/* SCROLLBAR TRACKLIST */
/* width */
.tracklist-side::-webkit-scrollbar {
    width: 4px;
    height: 3px;
}

/* Track */
.tracklist-side::-webkit-scrollbar-track {
    background: var(--scrollbar_thumb_track);
}

/* Handle */
.tracklist-side::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar_thumb);
    border-radius: 0px;
}

/* Handle on hover */
.tracklist-side::-webkit-scrollbar-thumb:hover {
    background-color: var(--scrollbar_thumb_hover);
}

/* SCROLLBAR */
/* width */
body::-webkit-scrollbar {
    width: 4px;
    height: 3px;
}

/* Track */
body::-webkit-scrollbar-track {
    background: transparent;
}

/* Handle */
body::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar_thumb);
    border-radius: 0px;
}

/* Handle on hover */
body::-webkit-scrollbar-thumb:hover {
    background-color: var(--scrollbar_thumb_hover);
}