/* ========================================= */
/* CSS KHUSUS UNTUK MUSIC PLAYER             */
/* ========================================= */

/* --- Background Dinamis dari Album Art --- */
.background-blur {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    z-index: -1;
    background-size: cover;
    background-position: center;
    /* Blur diperbesar agar tidak mengganggu keterbacaan teks */
    filter: blur(40px) brightness(1.1);
    opacity: 0.3; /* Transparansi rendah agar gradien utama tetap dominan */
    transition: background-image 0.5s ease-in-out;
}

/* --- Welcome Panel (Glass Modal) --- */
.welcome-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.3); /* Overlay terang */
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.welcome-panel.hidden {
    opacity: 0;
    visibility: hidden;
}

.welcome-content {
    text-align: center;
    padding: 3rem;
    border-radius: 24px;
    max-width: 400px;
}

.welcome-content h2 {
    font-size: 1.5rem;
    color: #111;
    margin-bottom: 0.5rem;
}

.welcome-content p {
    color: #555;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* --- Player Utama --- */
.player-container {
    padding: 2.5rem;
    border-radius: 24px;
    margin-top: 1rem;
    max-width: 850px;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 1rem;
}

.glass-select {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 95, 115, 0.2);
    color: #005f73;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    outline: none;
    cursor: pointer;
}

/* --- Layout Grid (Desktop) --- */
.player-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2.5rem;
    align-items: center;
}

/* --- Album Art --- */
.album-art-wrapper {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.album-art-wrapper img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

/* --- Informasi Lagu --- */
.player-info {
    margin-bottom: 1.5rem;
}

.player-info h2 {
    font-size: 1.8rem;
    color: #111;
    font-weight: 700;
    margin-bottom: 0.2rem;
    letter-spacing: -0.5px;
}

.player-info p {
    color: #005f73;
    font-size: 1rem;
    font-weight: 500;
}

/* --- Progress & Volume Bar --- */
.progress-container, .volume-container {
    display: flex;
    align-items: center;
    justify-content: center; /* Memastikan semua elemen di tengah */
    gap: 15px;
    margin-bottom: 1.5rem;
    width: 100%;
}

.progress-container span {
    font-size: 0.85rem;
    color: #666;
    font-variant-numeric: tabular-nums; 
    min-width: 45px; /* Mengunci lebar teks agar slider TIDAK bergeser/miring */
    text-align: center;
}

.volume-container i {
    color: #666;
    width: 20px; /* Mengunci lebar ikon */
    text-align: center;
}

/* Styling Range Slider */
input[type="range"] {
    flex: 1;
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #005f73;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 95, 115, 0.4);
    transition: transform 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* --- Tombol Kontrol --- */
.controls {
    display: flex;
    align-items: center;
    justify-content: center; /* Memaksa tombol untuk berada persis di tengah */
    gap: 2rem; /* Jarak diseimbangkan */
    margin-bottom: 1.5rem;
    width: 100%;
}

.control-btn {
    background: none;
    border: none;
    color: #444;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}

.control-btn:hover {
    color: #005f73;
    transform: scale(1.1);
}

/* Tombol Play Besar */
.play-btn {
    background: linear-gradient(135deg, #005f73 0%, #0a9396 100%);
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 95, 115, 0.3);
}

.play-btn:hover {
    color: white;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 95, 115, 0.4);
}

/* --- Area Lirik --- */
.lyrics-container {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255,255,255,0.6);
}

.lyrics-scroll {
    text-align: left;
}

.lyrics-scroll p {
    margin: 0.5rem 0;
    transition: color 0.3s ease, font-size 0.3s ease;
}

.active-lyric {
    font-size: 1.15rem;
    font-weight: 600;
    color: #005f73; /* Warna saat lirik dinyanyikan */
}

.upcoming-lyric {
    font-size: 0.95rem;
    color: #888;
}

/* --- Responsive untuk Mobile --- */
@media (max-width: 768px) {
    .player-container {
        padding: 1.5rem; /* Mengecilkan padding agar tidak sesak di HP */
        margin: 1rem; /* Memberi jarak aman dari tepi layar HP */
        width: auto;
    }

    .player-layout {
        grid-template-columns: 1fr; 
        gap: 1.5rem;
    }
    
    .album-art-wrapper {
        display: flex;
        justify-content: center; /* Memastikan foto album di tengah */
    }

    .album-art-wrapper img {
        max-width: 250px; /* Membatasi besaran foto agar tidak memakan layar */
        height: auto;
        aspect-ratio: 1 / 1; 
        border-radius: 16px;
    }

    .player-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .player-info {
        text-align: center; /* Teks judul lagu dipusatkan di HP */
    }

    .controls {
        gap: 1.5rem; /* Tombol sedikit dirapatkan di HP */
    }
}