@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --bg-color: #050510;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #8b9bb4;
    --accent: #00f3ff;
    --accent-glow: rgba(0, 243, 255, 0.4);
    --secondary-accent: #bc13fe;
    --font-family: 'Outfit', sans-serif;
    --header-height: 80px;
    --footer-height: 60px;
}

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(188, 19, 254, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 243, 255, 0.1) 0%, transparent 40%);
    color: var(--text-primary);
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Modern Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--accent), var(--secondary-accent));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
    margin-top: var(--header-height);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(5, 5, 16, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--card-border);
    z-index: 100;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: white;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Search Bar */
.search-container {
    position: relative;
    width: 300px;
}

.search-input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 50px;
    color: white;
    font-family: var(--font-family);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
    background: rgba(0, 0, 0, 0.3);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    width: 16px;
    height: 16px;
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
    padding-bottom: 4rem;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card */
.card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transform-style: preserve-3d;
}

.card:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(0, 243, 255, 0.2);
}

.card img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.card:hover img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.2rem;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.8));
    position: absolute;
    bottom: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 3;
    pointer-events: none;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.lyrics-btn {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(4px);
    border-radius: 20px;
    font-size: 0.75rem;
    transition: all 0.3s;
    padding: 0.4rem 1rem;
    margin-top: 0.5rem;
}

.lyrics-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: black;
    box-shadow: 0 0 10px var(--accent-glow);
}

.lyrics-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 4;
}

.card:hover .play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.play-btn svg {
    width: 24px;
    height: 24px;
    fill: white;
    margin-left: 4px;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

.card.playing .play-btn {
    opacity: 1;
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.card.playing .play-btn svg {
    fill: #000;
    margin-left: 0;
}

/* Footer */
footer {
    background: rgba(5, 5, 16, 0.8);
    backdrop-filter: blur(20px);
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid var(--card-border);
    margin-top: auto;
}

.footer-content {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-link {
    color: var(--accent);
    text-decoration: none;
    margin-left: 1rem;
}

/* Visualizer */
.visualizer {
    display: none;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    height: 50%;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    z-index: 2;
    padding-bottom: 80px;
    pointer-events: none;
}

.card.playing .visualizer {
    display: flex;
}

.bar {
    width: 6px;
    background: var(--accent);
    animation: barPulse 0.4s infinite ease-in-out;
    border-radius: 4px;
    box-shadow: 0 0 10px var(--accent-glow);
}

.bar:nth-child(1) { height: 20%; animation-delay: 0s; }
.bar:nth-child(2) { height: 40%; animation-delay: 0.1s; }
.bar:nth-child(3) { height: 60%; animation-delay: 0.2s; }
.bar:nth-child(4) { height: 35%; animation-delay: 0.3s; }
.bar:nth-child(5) { height: 25%; animation-delay: 0.15s; }

@keyframes barPulse {
    0%, 100% { 
        transform: scaleY(0.5); 
        opacity: 0.6;
    }
    50% { 
        transform: scaleY(2); 
        opacity: 1;
    }
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(20, 20, 30, 0.95);
    border: 1px solid var(--accent);
    box-shadow: 0 0 50px rgba(0, 243, 255, 0.1);
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--accent);
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    transition: transform 0.2s;
}

.close-modal:hover {
    transform: rotate(90deg);
}

.lyrics-text {
    white-space: pre-wrap;
    line-height: 1.6;
    color: var(--text-primary);
    margin-top: 1rem;
    text-align: center;
}

/* Player Bar */
.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 90px;
    background: rgba(5, 5, 16, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    box-sizing: border-box;
    z-index: 999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 -5px 20px rgba(0, 243, 255, 0.1);
}

.player-bar.active {
    transform: translateY(0);
}

.pb-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 25%;
}

.pb-cover {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--card-border);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.pb-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pb-title {
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0 5px rgba(0, 243, 255, 0.3);
}

.pb-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    max-width: 600px;
}

.pb-buttons {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.pb-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pb-btn:hover {
    color: white;
    transform: scale(1.1);
}

.pb-play {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    color: black;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    transition: all 0.3s;
}

.pb-play:hover {
    background: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
    transform: scale(1.1);
}

.pb-play svg {
    margin-left: 2px;
}

.pb-play.playing {
    background: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Progress Bar */
.pb-progress-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.pb-slider {
    flex: 1;
    -webkit-appearance: none;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
}

.pb-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    transition: all 0.2s;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.pb-slider:hover::-webkit-slider-thumb {
    background: var(--accent);
    transform: scale(1.3);
    box-shadow: 0 0 15px var(--accent-glow);
}

.pb-spacer {
    width: 25%;
}

/* Tags */
.tags {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tag.genre {
    color: var(--accent);
    border-color: rgba(0, 243, 255, 0.2);
}

.tag.category {
    color: #ff0055;
    border-color: rgba(255, 0, 85, 0.2);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .player-bar {
        padding: 0 1rem;
        height: 80px;
    }
    
    .pb-controls {
        flex: 1;
        max-width: none;
    }
    
    .pb-spacer { display: none; }
    
    .pb-info {
        width: auto;
    }
    
    .pb-cover {
        width: 40px;
        height: 40px;
    }
    
    .pb-buttons {
        gap: 1rem;
    }
    
    .pb-btn {
        width: 36px;
        height: 36px;
    }
    
    .pb-play {
        width: 50px;
        height: 50px;
    }
    
    .search-container {
        width: 200px;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1.5rem;
    }
    
    .container {
        padding: 1rem;
    }
}
/* ============================================ */
/* FIX: Mobile Player Bar - Tidak Terpotong */
/* ============================================ */

@media (max-width: 768px) {
    /* Kurangi tinggi player bar */
    .player-bar {
        height: 70px !important; /* Dari 90px menjadi 70px */
        padding: 0 0.8rem !important; /* Dari 2rem menjadi 0.8rem */
    }
    
    /* Sembunyikan spacer di mobile */
    .pb-spacer {
        display: none !important;
    }
    
    /* Info song di kiri */
    .pb-info {
        width: auto !important;
        min-width: 0 !important;
        flex-shrink: 1 !important;
    }
    
    /* Cover lebih kecil */
    .pb-cover {
        width: 40px !important; /* Dari 50px */
        height: 40px !important; /* Dari 50px */
    }
    
    /* Judul lebih kecil dan scroll jika panjang */
    .pb-details {
        min-width: 0 !important;
        max-width: 120px !important; /* Batasi lebar */
    }
    
    .pb-title {
        font-size: 0.8rem !important; /* Dari 0.95rem */
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    /* Kontrol di tengah lebih compact */
    .pb-controls {
        flex: 1 !important;
        max-width: none !important;
        padding: 0 0.5rem !important;
    }
    
    /* Tombol lebih kecil */
    .pb-buttons {
        gap: 0.8rem !important; /* Dari 1.5rem */
    }
    
    .pb-btn {
        width: 30px !important; /* Dari 36px */
        height: 30px !important; /* Dari 36px */
    }
    
    .pb-play {
        width: 44px !important; /* Dari 50px */
        height: 44px !important; /* Dari 50px */
    }
    
    /* Progress bar lebih pendek */
    .pb-progress-container {
        gap: 0.5rem !important; /* Dari 1rem */
    }
    
    .pb-slider {
        margin: 0 0.3rem !important;
    }
    
    /* Font time lebih kecil */
    #currentTime, #duration {
        font-size: 0.65rem !important; /* Dari 0.75rem */
    }
    
    /* FAB agar tidak overlap */
    .fab {
        bottom: 85px !important; /* Dari 100px */
    }
}

/* Untuk layar sangat kecil (iPhone SE, dll) */
@media (max-width: 375px) {
    .player-bar {
        height: 65px !important;
        padding: 0 0.5rem !important;
    }
    
    .pb-title {
        max-width: 80px !important; /* Lebih sempit lagi */
        font-size: 0.75rem !important;
    }
    
    .pb-btn {
        width: 26px !important;
        height: 26px !important;
    }
    
    .pb-play {
        width: 38px !important;
        height: 38px !important;
    }
}