/* css/music-section.css */
/* SEÇÃO DE MÚSICA - FORJADOS MINISTÉRIO */
/* Player de áudio personalizado e responsivo */

:root {
    --gold: #d4af37;
    --gold-light: #ffd966;
    --gold-dark: #b8860b;
    --dark-bg: #0a0a0a;
    --dark-card: #111111;
    --dark-player: #1a1a1a;
    --transition: all 0.3s ease;
}

.music-section {
    background: linear-gradient(0deg, var(--dark-bg) 0%, #0c0c0c 100%);
    padding: clamp(2rem, 8vw, 5rem) 0;
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

/* Elemento de fundo - ondas sonoras estilizadas */
.music-section::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 20px,
        rgba(212, 175, 55, 0.03) 20px,
        rgba(212, 175, 55, 0.03) 40px
    );
    pointer-events: none;
}

.music-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
    z-index: 2;
}

/* Card principal do player */
.music-player-card {
    background: var(--dark-player);
    border-radius: 30px;
    padding: clamp(1.5rem, 5vw, 2.5rem);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(212, 175, 55, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.15);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.music-player-card:hover {
    box-shadow: 0 30px 50px rgba(212, 175, 55, 0.15), 0 0 0 1px rgba(212, 175, 55, 0.4);
}

/* Cabeçalho do player */
.player-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .player-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

/* Capa do álbum/EP */
.album-art {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--gold);
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .album-art {
        width: 120px;
        height: 120px;
    }
}

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.album-art:hover img {
    transform: scale(1.1);
}

/* Informações da faixa */
.track-info {
    flex-grow: 1;
}

.track-title {
    color: #fff;
    font-size: clamp(1.3rem, 5vw, 1.8rem);
    font-weight: 700;
    margin-bottom: 0.3rem;
    letter-spacing: -0.5px;
}

.track-artist {
    color: var(--gold);
    font-size: clamp(0.9rem, 4vw, 1.1rem);
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.track-album {
    color: #888;
    font-size: clamp(0.8rem, 3vw, 0.9rem);
}

/* Player de áudio principal */
.main-player {
    margin: 2rem 0;
}

/* Controles de áudio personalizados */
.audio-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.control-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.control-btn:hover {
    background: var(--gold);
    color: #000;
    transform: scale(1.1);
    border-color: var(--gold);
}

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

.control-btn.play-pause {
    width: 60px;
    height: 60px;
    background: var(--gold);
    color: #000;
    font-size: 1.5rem;
    border: none;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.control-btn.play-pause:hover {
    background: var(--gold-light);
    transform: scale(1.05);
}

/* Barra de progresso */
.progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.time {
    color: #888;
    font-size: 0.85rem;
    font-family: monospace;
    min-width: 45px;
}

.time.current-time {
    text-align: right;
}

.time.duration-time {
    text-align: left;
}

.progress-bar {
    flex-grow: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.progress-handle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: #fff;
    border: 2px solid var(--gold);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
}

.progress-bar:hover .progress-handle {
    opacity: 1;
}

/* Controles secundários (volume, etc) */
.secondary-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.volume-control i {
    color: var(--gold);
    font-size: 1.1rem;
    width: 20px;
}

.volume-slider {
    width: 100px;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: var(--gold);
    border-radius: 50%;
    cursor: pointer;
}

@media (max-width: 480px) {
    .volume-slider {
        width: 80px;
    }
}

/* Playlist */
.playlist {
    margin-top: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 1rem;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.playlist-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.playlist-title i {
    color: var(--gold);
}

.playlist-items {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 250px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--gold) rgba(255, 255, 255, 0.1);
}

.playlist-items::-webkit-scrollbar {
    width: 5px;
}

.playlist-items::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.playlist-items::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 3px;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    color: #aaa;
    border: 1px solid transparent;
    margin-bottom: 0.3rem;
}

.playlist-item:hover {
    background: rgba(212, 175, 55, 0.1);
    color: #fff;
    border-color: rgba(212, 175, 55, 0.2);
}

.playlist-item.active {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold);
    border-color: var(--gold);
}

.playlist-item .track-number {
    width: 25px;
    height: 25px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.playlist-item.active .track-number {
    background: var(--gold);
    color: #000;
}

.playlist-item .track-name {
    flex-grow: 1;
    font-size: 0.95rem;
}

.playlist-item .track-duration {
    font-size: 0.8rem;
    color: #888;
}

.playlist-item.active .track-duration {
    color: var(--gold);
}

.playlist-item .playing-indicator {
    color: var(--gold);
    display: none;
}

.playlist-item.active .playing-indicator {
    display: inline;
}

/* Visualizador de áudio (opcional) */
.audio-visualizer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 40px;
    margin: 1rem 0;
}

.visualizer-bar {
    width: 3px;
    height: 100%;
    background: linear-gradient(to top, var(--gold), var(--gold-light));
    border-radius: 2px;
    animation: visualizer 1s ease infinite;
    transform-origin: bottom;
}

@keyframes visualizer {
    0%, 100% { transform: scaleY(0.3); }
    50% { transform: scaleY(1); }
}

.visualizer-bar:nth-child(1) { animation-delay: 0s; }
.visualizer-bar:nth-child(2) { animation-delay: 0.2s; }
.visualizer-bar:nth-child(3) { animation-delay: 0.1s; }
.visualizer-bar:nth-child(4) { animation-delay: 0.3s; }
.visualizer-bar:nth-child(5) { animation-delay: 0.4s; }

/* Mensagem de erro/suporte */
.audio-fallback {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 0, 0, 0.1);
    border-radius: 15px;
    border: 1px solid #ff4444;
    color: #ff8888;
    display: none;
}

.audio-fallback.show {
    display: block;
}

.audio-fallback i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.audio-fallback a {
    color: var(--gold);
    text-decoration: none;
}

.audio-fallback a:hover {
    text-decoration: underline;
}

/* Botões de compartilhamento */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.share-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.share-btn:hover {
    background: var(--gold);
    color: #000;
    transform: translateY(-2px);
}

/* Responsividade adicional */
@media (max-width: 380px) {
    .music-player-card {
        padding: 1rem;
    }
    
    .control-btn.play-pause {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .control-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .secondary-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .share-buttons {
        align-self: center;
    }
}

@media (min-width: 768px) {
    .secondary-controls {
        flex-direction: row;
        align-items: center;
    }
}