* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Tema Escuro (Padrão) */
body.dark-theme {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
}

/* Tema Claro */
body.light-theme {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    max-width: 900px;
    width: 100%;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Tema Escuro - Container */
body.dark-theme .container {
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Tema Claro - Container */
body.light-theme .container {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Header */
.player-header {
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Tema Escuro - Header */
body.dark-theme .player-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Tema Claro - Header */
body.light-theme .player-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.player-title h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(90deg, #00dbde, #fc00ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Tema Claro - Player Title p */
body.light-theme .player-title p {
    color: #666;
}

body.dark-theme .player-title p {
    color: #aaa;
}

.player-title p {
    font-size: 0.9rem;
    margin-top: 5px;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Tema Claro - Theme Toggle */
body.light-theme .theme-toggle {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.theme-toggle:hover {
    transform: rotate(30deg);
}

body.dark-theme .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

body.light-theme .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Player Body */
.player-body {
    display: flex;
    flex-direction: column;
    padding: 30px;
}

.album-info {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.album-cover {
    width: 180px;
    height: 180px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* ÁREA DE DETALHES DO ÁLBUM */
.album-details {
    margin-left: 30px;
    flex: 1;
    min-width: 0; /* Permite que o elemento encolha */
}

/* Container fixo para a barra de progresso */
.progress-container {
    width: 100%;
    max-width: 500px; /* TAMANHO MÁXIMO FIXO */
    min-width: 300px; /* TAMANHO MÍNIMO FIXO */
    margin-top: 25px;
}

.album-details h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Tema Claro - Album Details */
body.light-theme .album-details h2 {
    color: #333;
}

body.dark-theme .album-details h2 {
    color: #fff;
}

.album-details h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 500;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Tema Claro - Album Details h3 */
body.light-theme .album-details h3 {
    color: #666;
}

body.dark-theme .album-details h3 {
    color: #aaa;
}

.album-details p {
    line-height: 1.5;
    margin-bottom: 5px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Tema Claro - Album Details p */
body.light-theme .album-details p {
    color: #777;
}

body.dark-theme .album-details p {
    color: #888;
}

/* BARRA DE PROGRESSO COM TAMANHO TOTALMENTE FIXO E INDEPENDENTE */
.progress-area {
    width: 100%;
    margin: 0;
}

.progress-bar {
    height: 8px;
    width: 100%; /* Ocupa 100% do container fixo */
    border-radius: 50px;
    cursor: pointer;
    position: relative;
}

/* Tema Claro - Progress Bar */
body.light-theme .progress-bar {
    background: rgba(0, 0, 0, 0.1);
}

body.dark-theme .progress-bar {
    background: rgba(255, 255, 255, 0.1);
}

.progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00dbde, #fc00ff);
    border-radius: inherit;
    position: relative;
    transition: width 0.1s linear;
}

/* Bolinha indicadora de progresso */
.progress::after {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: #fff;
    right: -9px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    border: 2px solid #00dbde;
}

.progress-bar:hover .progress::after {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

/* Timer com tamanho fixo correspondente */
.timer {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-top: 10px;
    width: 100%;
}

/* Tema Claro - Timer */
body.light-theme .timer {
    color: #666;
}

body.dark-theme .timer {
    color: #aaa;
}

/* Controls */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0 30px;
}

.control-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Tema Claro - Control Btn */
body.light-theme .control-btn {
    color: #333;
}

body.dark-theme .control-btn {
    color: #fff;
}

.play-pause {
    background: linear-gradient(135deg, #00dbde, #fc00ff);
    width: 70px;
    height: 70px;
    font-size: 1.8rem;
    color: white !important;
}

.control-btn:hover {
    transform: scale(1.05);
}

body.dark-theme .control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.light-theme .control-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.play-pause:hover {
    transform: scale(1.05);
}

.volume-area {
    display: flex;
    align-items: center;
    margin-top: 20px;
}

.volume-icon {
    margin-right: 15px;
}

/* Tema Claro - Volume Icon */
body.light-theme .volume-icon {
    color: #666;
}

body.dark-theme .volume-icon {
    color: #aaa;
}

.volume-slider {
    width: 100%;
    height: 4px;
    border-radius: 50px;
    cursor: pointer;
}

/* Tema Claro - Volume Slider */
body.light-theme .volume-slider {
    background: rgba(0, 0, 0, 0.1);
}

body.dark-theme .volume-slider {
    background: rgba(255, 255, 255, 0.1);
}

.volume-percent {
    height: 100%;
    width: 70%;
    background: linear-gradient(90deg, #00dbde, #fc00ff);
    border-radius: inherit;
}

/* Playlist */
.playlist {
    margin-top: 20px;
    max-height: 250px;
    overflow-y: auto;
}

.playlist h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* Tema Claro - Playlist h3 */
body.light-theme .playlist h3 {
    color: #333;
}

body.dark-theme .playlist h3 {
    color: #fff;
}

.playlist-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

/* Tema Claro - Playlist Item */
body.light-theme .playlist-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.dark-theme .playlist-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.playlist-item.active {
    background: rgba(0, 219, 222, 0.1);
    border-left: 4px solid #00dbde;
}

.playlist-item img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 15px;
}

.playlist-item-info h4 {
    font-size: 1rem;
}

/* Tema Claro - Playlist Item Info h4 */
body.light-theme .playlist-item-info h4 {
    color: #333;
}

body.dark-theme .playlist-item-info h4 {
    color: #fff;
}

.playlist-item-info p {
    font-size: 0.85rem;
    margin-top: 3px;
}

/* Tema Claro - Playlist Item Info p */
body.light-theme .playlist-item-info p {
    color: #666;
}

body.dark-theme .playlist-item-info p {
    color: #aaa;
}

/* Botões ativos (shuffle e repeat) */
body.dark-theme .control-btn.active {
    background: rgba(0, 219, 222, 0.2);
    color: #00dbde;
}

body.light-theme .control-btn.active {
    background: rgba(0, 219, 222, 0.2);
    color: #008a8c;
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {
    .album-info {
        flex-direction: column;
        text-align: center;
    }
    
    .album-details {
        margin-left: 0;
        margin-top: 25px;
        width: 100%;
    }
    
    /* Container da barra de progresso ajustado para mobile */
    .progress-container {
        max-width: 400px;
        min-width: 280px;
        margin: 25px auto 0; /* Centraliza horizontalmente */
    }
    
    .progress-bar {
        height: 7px;
    }
    
    .progress::after {
        height: 16px;
        width: 16px;
        right: -8px;
    }
    
    .controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .control-btn {
        margin: 5px;
    }
    
    .playlist {
        max-height: 200px;
    }
    
    .album-details h2 {
        font-size: 1.8rem;
    }
    
    .album-details h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .player-header {
        padding: 20px;
    }
    
    .player-body {
        padding: 20px;
    }
    
    .album-cover {
        width: 150px;
        height: 150px;
    }
    
    /* Container da barra de progresso ajustado para celular */
    .progress-container {
        max-width: 320px;
        min-width: 250px;
    }
    
    .progress-bar {
        height: 6px;
    }
    
    .progress::after {
        height: 14px;
        width: 14px;
        right: -7px;
    }
    
    .timer {
        font-size: 0.8rem;
    }
    
    .play-pause {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .player-title h1 {
        font-size: 1.5rem;
    }
    
    .album-details h2 {
        font-size: 1.6rem;
    }
    
    .album-details h3 {
        font-size: 1rem;
    }
}

/* Para telas muito pequenas (menos de 350px) */
@media (max-width: 350px) {
    .progress-container {
        max-width: 280px;
        min-width: 200px;
    }
    
    .progress-bar {
        height: 5px;
    }
    
    .progress::after {
        height: 12px;
        width: 12px;
        right: -6px;
    }
    
    .album-details h2 {
        font-size: 1.4rem;
    }
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    border-radius: 10px;
}

body.dark-theme ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

body.light-theme ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #00dbde, #fc00ff);
    border-radius: 10px;
}

/* Animações */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.playing .album-cover img {
    animation: spin 20s linear infinite;
}

/* Efeito de foco para acessibilidade */
.control-btn:focus,
.theme-toggle:focus,
.playlist-item:focus {
    outline: 2px solid #00dbde;
    outline-offset: 2px;
}

