/* ============================================
   MUSIC PLAYER PILL - DESIGN ELEGANTE MODERNO
   ============================================ */

.music-player-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
}

.music-player-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(18, 18, 18, 0.95) 100%);
    border: 1px solid rgba(100, 100, 100, 0.2);
    border-radius: 50px;
    padding: 0.4rem 0.8rem;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    max-width: 100%;
    font-size: 0.95em;
}

.music-player-pill.playing {
    border-color: rgba(230, 126, 34, 0.4);
    box-shadow: 
        0 4px 16px rgba(230, 126, 34, 0.2),
        0 0 20px rgba(230, 126, 34, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.music-player-pill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(230, 126, 34, 0.5) 50%,
        transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.music-player-pill.playing::before {
    opacity: 1;
}

/* Botões do Player */
.music-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--cor-texto-principal);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    flex-shrink: 0;
}

.music-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

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

.music-btn-play {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    background: linear-gradient(135deg, var(--cor-primaria), var(--cor-secundaria));
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

.music-btn-play:hover {
    box-shadow: 0 6px 16px rgba(230, 126, 34, 0.4);
    transform: scale(1.08);
}

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

.music-progress-container {
    flex: 1;
    max-width: 100px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin: 0 0.4rem;
    overflow: hidden;
    cursor: pointer;
    align-self: center;
}

/* Spinner de Loading */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Informação da Faixa */
.music-track-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    margin: 0 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-track-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--cor-texto-principal);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.music-track-artist {
    font-size: 0.7rem;
    color: var(--cor-texto-secundario);
    margin: 0.05rem 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.8;
}

/* Ondas Sonoras Animadas */
.music-wave {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.music-wave.active {
    opacity: 1;
}

.music-wave span {
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--cor-primaria), var(--cor-secundaria));
    border-radius: 10px;
    animation: wave 1s ease-in-out infinite;
}

.music-wave span:nth-child(1) {
    animation-delay: 0s;
}

.music-wave span:nth-child(2) {
    animation-delay: 0.2s;
}

.music-wave span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes wave {
    0%, 100% {
        height: 30%;
    }
    50% {
        height: 100%;
    }
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    .music-player-pill {
        gap: 0.5rem;
        padding: 0.4rem 0.75rem;
    }

    .music-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
    }

    .music-btn-play {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }

    .track-info-pill {
        margin: 0 0.25rem;
    }

    .track-title-pill {
        font-size: 0.85rem;
    }

    .track-artist-pill {
        font-size: 0.7rem;
    }

    .music-wave {
        height: 16px;
    }
}

@media (max-width: 480px) {
    .music-player-pill {
        padding: 0.4rem 0.6rem;
    }

    .track-info-pill {
        max-width: 120px;
    }
}

/* Estados de Foco para Acessibilidade */
.music-btn:focus-visible {
    outline: 2px solid var(--cor-primaria);
    outline-offset: 2px;
}
