/* Volume Control Popup */
.volume-popup {
    position: fixed;
    bottom: 45px;
    right: 10px;
    z-index: 10000;
    animation: volumePopupFadeIn 0.15s ease-out;
}

@keyframes volumePopupFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.volume-popup-content {
    background: linear-gradient(to bottom, 
        rgba(245, 248, 252, 0.98) 0%,
        rgba(235, 240, 248, 0.98) 50%,
        rgba(220, 228, 238, 0.98) 100%);
    border: 1px solid rgba(100, 130, 170, 0.8);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
    padding: 15px;
    min-width: 80px;
    backdrop-filter: blur(10px);
}

.volume-header {
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(150, 180, 210, 0.4);
    margin-bottom: 15px;
}

.volume-header span {
    color: #2e2e2e;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.volume-control-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.volume-slider-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* Vertical Volume Slider */
.volume-slider {
    writing-mode: vertical-lr;
    direction: rtl;
    width: 30px;
    height: 120px;
    background: linear-gradient(to bottom,
        rgba(230, 235, 245, 0.9),
        rgba(210, 220, 235, 0.9));
    border: 1px solid rgba(120, 150, 180, 0.6);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 12px;
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0.95),
        rgba(235, 240, 250, 0.95));
    border: 1px solid rgba(100, 130, 160, 0.7);
    border-radius: 2px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.1s;
}

.volume-slider::-webkit-slider-thumb:hover {
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 1),
        rgba(245, 248, 255, 1));
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.volume-slider::-webkit-slider-thumb:active {
    background: linear-gradient(to bottom,
        rgba(230, 240, 250, 0.95),
        rgba(220, 235, 248, 0.95));
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Firefox */
.volume-slider::-moz-range-thumb {
    width: 26px;
    height: 12px;
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0.95),
        rgba(235, 240, 250, 0.95));
    border: 1px solid rgba(100, 130, 160, 0.7);
    border-radius: 2px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.volume-slider::-moz-range-track {
    background: linear-gradient(to bottom,
        rgba(230, 235, 245, 0.9),
        rgba(210, 220, 235, 0.9));
    border: 1px solid rgba(120, 150, 180, 0.6);
    border-radius: 3px;
}

.volume-percentage {
    color: #2e2e2e;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    min-width: 40px;
}

.volume-buttons {
    display: flex;
    justify-content: center;
    padding-top: 8px;
    border-top: 1px solid rgba(150, 180, 210, 0.4);
    width: 100%;
}

.volume-button {
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0.6),
        rgba(235, 240, 250, 0.6));
    border: 1px solid rgba(120, 150, 180, 0.5);
    border-radius: 3px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.volume-button:hover {
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0.8),
        rgba(245, 248, 255, 0.8));
    border-color: rgba(100, 140, 180, 0.6);
}

.volume-button:active {
    background: linear-gradient(to bottom,
        rgba(220, 230, 245, 0.8),
        rgba(230, 238, 250, 0.8));
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
}

.volume-button img {
    width: 16px;
    height: 16px;
    display: block;
    opacity: 0.8;
}

.volume-button:hover img {
    opacity: 1;
}

.volume-button.muted {
    background: linear-gradient(to bottom,
        rgba(220, 225, 235, 0.6),
        rgba(210, 220, 230, 0.6));
}

.volume-button.muted img {
    opacity: 0.5;
    filter: grayscale(40%);
}

.volume-popup-content.muted .volume-percentage {
    color: #666;
}

.volume-popup-content.muted .volume-slider {
    filter: grayscale(40%);
    opacity: 0.7;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .volume-popup {
        right: 5px;
        bottom: 50px;
    }

    .volume-popup-content {
        padding: 12px;
    }

    .volume-slider {
        height: 100px;
    }
}
