/* Bottom Player Container */
.bottom-player {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--player-height);
    background-color: var(--bg-base);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    z-index: 1000;
}

/* Left: Track Info */
.player-info {
    width: 30%;
    display: flex;
    align-items: center;
    gap: 14px;
}

.cover-art {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    background-color: var(--bg-elevated);
    background-size: cover;
    background-position: center;
}

.track-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.track-details h4 {
    font-size: 14px;
    margin: 0 0 4px 0;
}

.track-details p {
    font-size: 12px;
    margin: 0;
    color: var(--text-subdued);
}

.like-btn {
    font-size: 20px;
    color: var(--text-subdued);
    cursor: pointer;
    transition: var(--transition-fast);
}

.like-btn:hover { color: var(--text-bright); }

/* Center: Controls & Seekbar */
.player-controls {
    width: 40%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.control-buttons {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 8px;
}

.control-buttons button {
    background: transparent;
    border: none;
    color: var(--text-subdued);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.control-buttons button:hover {
    color: var(--text-bright);
}

/* NeoSync Custom Glowing Play Button */
.play-btn-glow {
    background: var(--text-bright) !important;
    color: var(--bg-base) !important;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px !important;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.play-btn-glow:hover {
    transform: scale(1.1);
    background: var(--neon-purple) !important;
    color: var(--text-bright) !important;
    box-shadow: var(--neon-glow);
}

.progress-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-subdued);
}

/* Custom Range Input Styling */
input[type=range] {
    -webkit-appearance: none;
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: #4d4d4d;
    outline: none;
    cursor: pointer;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-bright);
    cursor: pointer;
    opacity: 0; /* Hide thumb until hover */
    transition: opacity var(--transition-fast);
}

input[type=range]:hover::-webkit-slider-thumb {
    opacity: 1;
}

input[type=range]:hover {
    background: var(--accent-main); /* Changes track color on hover */
}

/* Right: Additional Actions (Volume) */
.player-actions {
    width: 30%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    color: var(--text-subdued);
    font-size: 20px;
}

.player-actions i {
    cursor: pointer;
}

.player-actions i:hover {
    color: var(--text-bright);
}

.volume-slider {
    width: 90px;
}

/* Mobile Player Adjustments */
@media (max-width: 768px) {
    .bottom-player {
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: 8px;
        padding-right: 8px;
    }
    .player-actions { display: none; }
    .player-info { width: 60%; }
    .player-controls { width: 40%; align-items: flex-end; }
    .progress-container { display: none; }
}
/* --- THE PREMIUM PLAYER CSS --- */

/* 1. Main Container Setup */
.bottom-player {
    position: fixed !important;
    bottom: 0; left: 0; right: 0;
    height: 96px; /* Taller premium height */
    background-color: #000000 !important; /* Pure Black */
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 24px;
    z-index: 99999;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
}

/* 2. Left Side (30%) */
.player-left {
    flex: 3;
    display: flex; align-items: center; gap: 16px;
    min-width: 180px;
}
.player-cover {
    width: 64px; height: 64px;
    border-radius: 8px; object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.player-track-info {
    display: flex; flex-direction: column;
    overflow: hidden; white-space: nowrap;
}
.player-track-info h4 { font-size: 16px; font-weight: 700; color: #fff; margin: 0 0 4px 0; }
.player-track-info p { font-size: 12px; color: #b3b3b3; margin: 0; }
.player-left-actions {
    display: flex; gap: 12px; color: #b3b3b3; font-size: 20px;
}
.player-left-actions i:hover { color: #fff; cursor: pointer; }


/* 3. Center Side (40% - The main focus) */
.player-center {
    flex: 4;
    display: flex; flex-direction: column; /* Stack progress over controls */
    align-items: center; justify-content: center;
    gap: 8px; max-width: 600px;
}

/* Top section: Time and Seekbar */
.player-progress-container {
    width: 100%; display: flex; align-items: center; gap: 10px;
}
.time-text { font-size: 11px; color: #b3b3b3; min-width: 35px; text-align: center; }
.progress-wrapper { flex: 1; height: 4px; display: flex; align-items: center; }

/* Bottom section: The Buttons */
.player-controls-container {
    display: flex; align-items: center; gap: 24px; margin-top: 4px;
}
.secondary-icon { font-size: 20px; color: #b3b3b3; cursor: pointer; transition: 0.2s; }
.secondary-icon:hover { color: #fff; }
.main-icon { font-size: 28px; color: #fff; cursor: pointer; transition: 0.2s; }
.main-icon:hover { transform: scale(1.1); }

/* THE PURPLE GLOWING PLAY BUTTON */
.play-circle-btn {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: #fff;
    color: #000;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 0px rgba(176, 38, 255, 0);
}
.play-circle-btn:hover {
    background: var(--neon-purple) !important;
    color: #fff !important;
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(176, 38, 255, 0.5);
}
/* When playing (added by JS) */
.play-circle-btn.playing {
    background: var(--neon-purple) !important;
    color: #fff !important;
    box-shadow: 0 0 15px rgba(176, 38, 255, 0.3);
}


/* 4. Right Side (30%) */
.player-right {
    flex: 3;
    display: flex; justify-content: flex-end; align-items: center; gap: 20px;
    min-width: 180px;
}
.volume-container { display: flex; align-items: center; gap: 10px; }
.volume-slider { width: 100px; }


/* --- SLIDER STYLING (Seek & Volume) --- */
input[type="range"] {
    -webkit-appearance: none; /* Hides the slider so that custom slider can be made */
    width: 100%; height: 4px; background: #404040; border-radius: 2px; outline: none; cursor: pointer;
}
/* The thumb (the grabby bit) */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; height: 12px; width: 12px; border-radius: 50%;
    background: #fff; cursor: pointer; opacity: 0; transition: 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
/* Show thumb on hover */
.progress-wrapper:hover input[type="range"]::-webkit-slider-thumb,
.volume-container:hover input[type="range"]::-webkit-slider-thumb {
    opacity: 1;
}

/* MOBILE TWEAKS */
@media (max-width: 768px) {
    .bottom-player { height: 110px; padding: 0 16px; bottom: env(safe-area-inset-bottom) !important; }
    .player-right { display: none !important; }
    .player-left { flex: 2; }
    .player-center { flex: 3; }
    .time-text { display: none; } /* Hide times on small screens */
}













/* --- SHUFFLE & REPEAT ACTIVE STATES --- */
.icon-active {
    color: var(--neon-purple) !important;
    text-shadow: var(--neon-glow);
}

.repeat-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.repeat-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--text-bright);
    color: #000;
    font-size: 9px;
    font-weight: 800;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(255,255,255,0.4);
}






/* Smooth animation for the Share and Like buttons */
.player-left-actions i {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}














/* =========================================
   HEAVY RESPONSIVENESS: BOTTOM PLAYER
   ========================================= */

@media (max-width: 768px) {
    .bottom-player {
        height: 72px !important; /* Smaller height for mobile */
        padding: 0 16px !important;
        /* Critical for APK WebView: respects Android navigation bar */
        padding-bottom: env(safe-area-inset-bottom) !important; 
    }

    /* Hide the Right section entirely */
    .player-right { display: none !important; }

    /* Left section (Album & Text) takes up majority space */
    .player-left { flex: 1; min-width: 0; }
    .player-cover { width: 44px !important; height: 44px !important; }
    .player-left-actions { display: none; } /* Hide heart/link on mobile player */
    .player-track-info h4 { font-size: 14px; }
    .player-track-info p { font-size: 12px; }

    /* Center section (Controls) pushes to the right */
    .player-center { flex: none; width: auto; align-items: flex-end; justify-content: center; margin-top: 0 !important;}
    
    /* Hide shuffle/repeat on mobile mini-player */
    .player-controls-container .secondary-icon { display: none !important; } 
    .player-controls-container { gap: 16px; margin: 0; }
    
    /* Smaller buttons */
    .main-icon { font-size: 26px !important; }
    .play-circle-btn { width: 36px !important; height: 36px !important; font-size: 22px !important; }

    /* PREMIUM TRICK: Move progress bar to the absolute top edge of the player */
    .player-progress-container {
        position: absolute;
        top: -2px; /* Pull it up to the border */
        left: 0;
        width: 100%;
        gap: 0;
    }
    .time-text { display: none; } /* Hide timers */
    .progress-wrapper { height: 2px; }
    .progress-wrapper input[type="range"] { height: 2px; border-radius: 0; }
    .progress-wrapper input[type="range"]::-webkit-slider-thumb { display: none; } /* Hide the draggable circle */
}