/* Music Player Styles - Mobile Optimized */
#music-player-container {
    position: fixed;
    top: 15px;
    left: 15px;
    width: 105px;
    background: rgba(8, 8, 12, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 7px;
    z-index: 999999;
    font-family: 'Outfit', sans-serif;
    color: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transition: opacity 0.5s ease, transform 0.5s ease;
    display: flex;
    flex-direction: column;
    gap: 5px;
    box-sizing: border-box;

    /* Hidden State */
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
}

#music-player-container.visible {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
}

/* MOBILE: Below weather panel to avoid overlap */
@media (max-width: 768px) {
    #music-player-container {
        top: 48px;
        /* Closer to weather panel */
        left: 10px;
        width: 75px;
        padding: 4px;
        gap: 2px;
        border-radius: 8px;
    }
}

.music-header {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 0;
    width: 100%;
    box-sizing: border-box;
}

.music-icon {
    display: none;
}

.music-info {
    flex: 1;
    overflow: hidden;
    text-align: center;
    min-width: 0;
}

.music-title-scroll {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.3px;
}

@media (max-width: 768px) {
    .music-title-scroll {
        font-size: 7px;
        /* Tiny text */
    }
}

/* Volume Button */
.volume-btn {
    padding: 3px;
    margin-left: 4px;
    opacity: 0.7;
}

.volume-btn:hover {
    opacity: 1;
}

.volume-btn svg {
    width: 12px !important;
    height: 12px !important;
}

@media (max-width: 768px) {
    .volume-btn svg {
        width: 10px !important;
        height: 10px !important;
    }

    .volume-btn {
        padding: 2px;
        margin-left: 2px;
    }
}

/* Volume Container (collapsible) */
.music-volume-container {
    display: none;
    align-items: center;
    width: 100%;
    padding: 3px 0;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .music-volume-container {
        padding: 2px 0;
    }
}

.music-progress-container {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
    padding: 0;
    box-sizing: border-box;
    margin: 0;
}

input[type=range].music-range {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    min-width: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    background-image: linear-gradient(#FFA500, #FFA500);
    background-size: 0% 100%;
    background-repeat: no-repeat;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

input[type=range].music-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 9px;
    width: 9px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.4);
    transition: transform 0.1s;
}

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

input[type=range].music-range::-moz-range-thumb {
    height: 9px;
    width: 9px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
    input[type=range].music-range {
        height: 2px;
    }

    input[type=range].music-range::-webkit-slider-thumb {
        height: 6px;
        width: 6px;
    }

    input[type=range].music-range::-moz-range-thumb {
        height: 6px;
        width: 6px;
    }
}

.music-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .music-controls {
        gap: 5px;
    }
}

.control-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.1s;
    color: white;
    flex-shrink: 0;
}

.control-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

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

.control-btn svg {
    width: 15px;
    height: 15px;
    display: block;
}

@media (max-width: 768px) {
    .control-btn svg {
        width: 10px;
        height: 10px;
    }
}

.play-btn {
    width: 26px;
    height: 26px;
    background: white;
    border-radius: 50%;
    color: black !important;
    opacity: 1;
    box-shadow: 0 2px 6px rgba(255, 255, 255, 0.2);
}

.play-btn svg {
    width: 11px;
    height: 11px;
}

.play-btn svg path {
    fill: #000;
}

@media (max-width: 768px) {
    .play-btn {
        width: 20px;
        height: 20px;
    }

    .play-btn svg {
        width: 8px;
        height: 8px;
    }
}

.music-time {
    display: none;
}