/* ===================================== */
/*           VOLUME CONTROLS             */
/* ===================================== */

/* Горизонтальный слайдер */
.slider-wrapper {
    flex: 1;
    height: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.slider-base {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    transition: height 0.2s ease;
}

.slider-wrapper:hover .slider-base {
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
}

.slider-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 2px;
    width: 0%;
    position: absolute;
    left: 0;
    top: 0;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    transition: width 0.1s ease;
}

/* Вертикальный слайдер */
.vertical-volume-slider {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 120px;
    background: #1a1a1a;
    border-radius: 30px;
    padding: 15px 0;
    display: none;
    flex-direction: column;
    align-items: center;
    border: 1px solid #333;
    z-index: 10;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.vertical-volume-slider.active {
    display: flex;
    animation: slideUp 0.2s ease;
}

.vertical-volume-slider .slider-wrapper {
    width: 4px;
    height: 80px;
    transform: rotate(180deg);
}

.vertical-volume-slider .slider-base {
    width: 4px;
    height: 100%;
    background: #333;
}

.vertical-volume-slider .slider-fill {
    width: 100%;
    height: 0%;
    background: var(--accent-gradient);
}

.vertical-volume-slider .volume-percent {
    margin-top: 10px;
    font-size: 12px;
    color: var(--accent);
    font-weight: 600;
}

/* Кнопка громкости */
.volume-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #222;
    border: none;
    color: #ccc;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.volume-toggle:hover {
    background: #333;
    color: #fff;
    transform: scale(1.1);
}

.volume-toggle.muted {
    color: var(--red);
}

/* Анимации */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Индикатор громкости */
#volVal, #expandedVolVal {
    transition: color 0.2s ease;
}

.vol-zone:hover #volVal {
    color: var(--accent);
}

/* Для мобилок */
@media (max-width: 768px) {
    .vertical-volume-slider {
        bottom: 55px;
        width: 36px;
        height: 100px;
    }
    
    .vertical-volume-slider .slider-wrapper {
        height: 60px;
    }
    
    .volume-percent {
        font-size: 10px;
    }
    
    .volume-toggle {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}

/* ============================================
   VOLUME MODAL - МОБИЛЬНАЯ ГРОМКОСТЬ
   ============================================ */

.volume-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 20000;
    align-items: center;
    justify-content: center;
}

.volume-modal.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.volume-modal-content {
    width: 280px;
    background: #1a1a1f;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 215, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.volume-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

.volume-modal-header h3 {
    margin: 0;
    color: #ffd700;
    font-size: 18px;
}

.volume-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.volume-modal-body {
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.volume-vertical-slider {
    width: 40px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.volume-vertical-track {
    width: 100%;
    height: 100%;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
}

.volume-vertical-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(0deg, #ffd700, #ffaa00);
    border-radius: 20px;
    transition: height 0.1s;
}

.volume-percent {
    font-size: 24px;
    font-weight: 700;
    color: #ffd700;
    font-family: monospace;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* На телефоне громкость регулируется кнопками устройства —
   убираем все элементы громкости из интерфейса. */
@media (max-width: 768px) {
    .player-volume,
    .expanded-volume-container,
    .vertical-volume-slider,
    .volume-modal,
    #playerVolumeBtn,
    #playerVolumeSlider,
    #playerVolumeValue,
    #volumeToggleBtn {
        display: none !important;
    }

    .expanded-likes-group {
        width: 100%;
        justify-content: space-around !important;
    }
}
