/* 
 * Sufirain Core & Global Player Styles 
 * Glassmorphism, Premium Transitions, and Mini Player
 */

:root {
    --sf-accent: #374151;
    --sf-dark: #1A1A1A;
    --sf-glass: rgba(255, 255, 255, 0.85);
}

/* Page Transition Effects */
body.page-loading main#sf-main-content {
    opacity: 0;
    transform: translateY(10px);
}

main#sf-main-content {
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: translateY(0);
}

/* Full Width Bottom Player */
.sf-mini-player {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 15, 15, 0.95);
    /* Deep Dark Theme */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 0;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    /* Light Border */
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.sf-mini-player.active {
    transform: translateY(0);
}

.mini-player-content {
    display: flex;
    align-items: center;
    padding: 12px 32px;
    gap: 24px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

#mini-cover {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    background: #eaeaea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.mini-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.mini-controls button {
    background: none;
    border: none;
    color: #fff;
    /* Light Icon Color */
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mini-controls button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

#mini-play-pause {
    background: var(--sf-accent);
    color: white;
    width: 48px;
    height: 48px;
    box-shadow: 0 4px 12px rgba(55, 65, 81, 0.25);
}

#mini-play-pause:hover {
    background: #4b5563;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(55, 65, 81, 0.35);
}

.mini-progress-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-width: 0;
}

.mini-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#mini-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    /* White Text */
}

.mini-separator {
    color: #999;
    font-size: 13px;
}

#mini-artist {
    font-size: 13px;
    color: #bbb;
    /* Light Grey Text */
}

.mini-progress-bar {
    position: relative;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    /* Lighter Track */
    border-radius: 4px;
    width: 100%;
    cursor: pointer;
    /* Added pointer cursor for seeking */
    overflow: visible;
}

#mini-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--sf-accent);
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s linear;
}

/* Scrubber Dot visible on hover */
#mini-progress-fill::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 12px;
    height: 12px;
    background: var(--sf-accent);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mini-progress-bar:hover #mini-progress-fill::after {
    transform: translateY(-50%) scale(1);
}

/* Volume Controls */
.mini-volume-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    width: 120px;
    /* Fixed width for consistency */
}

.mini-volume-wrapper i {
    color: #fff;
    font-size: 14px;
    min-width: 16px;
    text-align: center;
}

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

#mini-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--sf-accent);
    cursor: pointer;
    transition: transform 0.1s;
}

#mini-volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .mini-player-content {
        padding: 12px 16px;
        gap: 16px;
        flex-wrap: wrap;
    }

    #mini-cover {
        width: 44px;
        height: 44px;
    }

    .mini-controls {
        gap: 12px;
    }

    .mini-controls button {
        width: 36px;
        height: 36px;
    }

    #mini-play-pause {
        width: 42px;
        height: 42px;
    }

    .mini-progress-wrapper {
        min-width: 100%;
        order: 3;
        margin-top: -8px;
    }

    .mini-volume-wrapper {
        display: none;
        /* Hide volume slider on mobile for cleaner layout */
    }
}

.sticky-player.hidden {
    display: none !important;
}