/* Configurações globais */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a1d, #2d2d34);
    color: #fff;
    align-items: center;
    justify-content: center;
    min-height: 100%; /* Adicionado para garantir que a altura ocupe 100% */
}

/* Rodapé */
footer {
    text-align: center;
    padding: 20px;
    background-color: #333;
    color: white;
    font-size: 14px;
    position: relative; /* Ajusta o rodapé no final da página */

    margin-top: -35px; /* Adiciona espaço acima do rodapé para evitar sobreposição */
}

footer p {
    margin: 0;
    font-size: 1rem;
}

@media (max-width: 600px) {
    footer {
        padding: 15px;
    }
    footer p {
        font-size: 0.9rem;
    }
}

#playPauseButton {
  font-size: 24px; /* Tamanho do ícone */
  cursor: pointer;
}


/* Container principal */
.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 95%;
    background: rgba(50, 50, 58, 0.9);
    position: relative;
    overflow: hidden;
}

/* Container do player */
.player-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 90%;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

/* Imagem de capa do álbum */
.album-cover {
    border-radius: 100%;
    
    
    width: 50%;
    max-width: 85vw;
    max-height: 55vh;
    display: flex;
    justify-content: center;
    align-items: center;
    
    margin-bottom: 20px;
}

.album-cover img {
    margin-bottom: 30px;
    margin: 0;
    width: 80%;
    height: 100%;
    object-fit: cover;
    border-radius: 100%;
    box-shadow: 0 8px 15px rgba(255, 204, 0, 0.4);
}

/* Contêiner do título */
#songTitleContainer {
    overflow: hidden; /* Esconde o conteúdo que ultrapassa */
    width: 100%; /* Usa toda a largura disponível */
    display: flex; /* Alinha o conteúdo no centro */
    justify-content: center;
    position: relative;
}

/* Título da música */
#songTitle {
    font-size: 1.5rem;
    margin: 20px 0;
    color: #ffcc00;
    text-shadow: 0px 0px 8px rgba(255, 204, 0, 0.8);
    white-space: nowrap; /* Impede quebra de linha */
    display: inline-block; /* Permite animação */
    width: fit-content; /* Garante que o texto tenha largura suficiente */
    animation: marquee 10s linear infinite; /* Animação de rolagem */
}

/* Animação para rolar o texto */
@keyframes marquee {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Controles */
.controls {
    display: flex;
    justify-content: center;
    gap: 36px; /* Aumento do espaçamento entre os botões */
    margin-top: 15px;
}

.controls button {
    font-size: 2.1rem;
    color: #ffcc00;
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.3s;
}
.control-button i {
    font-size: 30px; /* Tamanho desejado para os ícones */
}

.controls button:hover {
    
    transform: scale(1.1);
}

/* Destaque dos botões de repetição e aleatório ativos */
#shuffleBtn.active, #repeatBtn.active {
    color: red; /* Cor de destaque quando ativos */
}

/* Barra de progresso */
.progress-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 600px;
    margin-top: 20px;
}

#progressBar {
    width: 100%;
    appearance: none;
    height: 8px;
    background: #555;
    border-radius: 10px;
    outline: none;
}

#progressBar::-webkit-slider-thumb,
#progressBar::-moz-range-thumb {
    appearance: none;
    width: 15px;
    height: 15px;
    background: #ffcc00;
    border-radius: 50%;
    cursor: pointer;
}

/* Exibir o tempo abaixo da barra de progresso */
#currentTime, #duration {
    font-size: 1rem;
    color: #ffcc00;
    margin-top: 5px;
}

/* Barra de volume */
.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 90%;
    max-width: 600px;
    margin-top: 20px;
}

.volume-control input[type="range"] {
    flex: 1;
    appearance: none;
    height: 8px;
    background: #444;
    border-radius: 10px;
    outline: none;
}

.volume-control input[type="range"]::-webkit-slider-thumb,
.volume-control input[type="range"]::-moz-range-thumb {
    appearance: none;
    width: 15px;
    height: 15px;
    background: #ffcc00;
    border-radius: 50%;
    cursor: pointer;
}

/* Botão da lista de músicas */
.toggle-list-btn {
    margin-top: 15px;
    padding: 8px 16px;
    font-size: 1rem;
    background-color: #ffcc00;
    color: #333;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.toggle-list-btn:hover {
    background-color: #ffaa00;
}

/* Lista de músicas */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    color: #fff;
    overflow-y: auto;
    padding: 20px;
    transform: translateX(-100%);
    transition: transform 0.4s ease-in-out;
    z-index: 10;
}

.sidebar.show {
    transform: translateX(0);
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #ffcc00;
    cursor: pointer;
}

.songs-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.songs-list div {
    padding: 10px;
    background: #222;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.songs-list div:hover {
    background: #333;
}

/* Estilo do Popup de Anúncio */
#adPopup {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 320px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 11;
}

.ad-title {
    font-size: 1.5rem;
    color: #ff3333;
    font-weight: bold;
}

#adPopup button {
    margin-top: 15px;
    padding: 8px 12px;
    border: none;
    color: #fff;
    background-color: #ff5555;
    border-radius: 8px;
    cursor: pointer;
}

/* Responsividade para dispositivos menores */
@media (max-width: 600px) {
    .album-cover {
        max-width: 90%;
        max-height: 50vh;
    }
    
    #songTitle {
        font-size: 1.5rem;
    }
    
    .controls button {
        font-size: 1.5rem;
    }
    
    .progress-container, .volume-control {
        max-width: 100%;
    }
    
    #adPopup {
        width: 90%;
        bottom: 10px;
        right: 10px;
    }
}