/* === MUSIC PLAYER === */
.music-player {
    position: fixed;
    bottom: 20px;
    right: 0;
    z-index: 9999;
    transform: translateX(calc(100% - 30px));
    transition: transform 0.4s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    padding-right: 15px;
    background: linear-gradient(135deg, rgba(26, 28, 34, 0.95), rgba(15, 17, 21, 0.95));
    border-radius: 50px 0 0 50px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(214, 148, 13, 0.3);
    border-right: none;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.4s ease;
}

.music-player.visible {
    opacity: 1;
}

/* Открытое состояние (по клику) */
.music-player.open {
    transform: translateX(0);
}

/* Стрелочка для указания */
.music-player::before {
    content: '◀';
    position: absolute;
    left: 8px;
    font-size: 0.8rem;
    color: #d6940d;
    animation: arrowPulse 2s ease-in-out infinite;
    cursor: pointer;
    z-index: 1;
    transition: all 0.3s ease;
}

/* Стрелочка меняется когда открыт */
.music-player.open::before {
    content: '▶';
}

@keyframes arrowPulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

.music-toggle {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #d6940d, #faa608);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(214, 148, 13, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    margin-left: 20px;
}

.music-toggle:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(214, 148, 13, 0.6);
    background: linear-gradient(135deg, #faa608, #d6940d);
}

.music-toggle:active {
    transform: translateY(0) scale(0.95);
}

.music-toggle.playing {
    animation: musicPulse 2s ease-in-out infinite;
}

.music-toggle svg {
    width: 24px;
    height: 24px;
    stroke: #fff;
    stroke-width: 2;
}

/* === Next Button === */
.music-next {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, rgba(100, 100, 100, 0.5), rgba(80, 80, 80, 0.5));
    border: none;
    border-radius: 50%;
    color: white;
    cursor: not-allowed;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    opacity: 0.4;
    pointer-events: none;
}

.music-next svg {
    width: 18px;
    height: 18px;
    stroke: #fff;
    stroke-width: 2;
    opacity: 0.5;
}

/* Активная кнопка когда музыка играет */
.music-next.visible {
    background: linear-gradient(135deg, #d6940d, #faa608);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(214, 148, 13, 0.4);
    opacity: 1;
    pointer-events: auto;
}

.music-next.visible svg {
    opacity: 1;
}

.music-next.visible:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(214, 148, 13, 0.6);
}

.music-next.visible:active {
    transform: translateY(0) scale(0.95);
}

/* === Volume Control === */
.music-volume-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    opacity: 0.4;
    transition: all 0.3s ease;
}

/* Активные кнопки когда музыка играет */
.music-volume-control.visible {
    opacity: 1;
}

.volume-btn {
    width: 28px;
    height: 18px;
    background: linear-gradient(135deg, rgba(100, 100, 100, 0.5), rgba(80, 80, 80, 0.5));
    border: none;
    border-radius: 4px;
    color: white;
    cursor: not-allowed;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.volume-btn svg {
    width: 12px;
    height: 12px;
    stroke: #fff;
    stroke-width: 2;
    opacity: 0.5;
}

/* Активные кнопки когда музыка играет */
.music-volume-control.visible .volume-btn {
    background: linear-gradient(135deg, #d6940d, #faa608);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(214, 148, 13, 0.4);
    pointer-events: auto;
}

.music-volume-control.visible .volume-btn svg {
    opacity: 1;
}

.music-volume-control.visible .volume-btn:hover {
    background: linear-gradient(135deg, #faa608, #d6940d);
    transform: scale(1.1);
}

.volume-display {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: #8b909a;
    text-align: center;
    width: 38px;
    padding: 2px 4px;
    background: rgba(26, 28, 34, 0.6);
    border-radius: 4px;
    border: 1px solid rgba(214, 148, 13, 0.15);
    box-sizing: border-box;
    transition: all 0.3s ease;
}

/* Яркий текст когда музыка играет */
.music-volume-control.visible .volume-display {
    color: #f8fafc;
    background: rgba(26, 28, 34, 0.8);
    border-color: rgba(214, 148, 13, 0.3);
}

@keyframes musicPulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(214, 148, 13, 0.4);
    }
    50% {
        box-shadow: 0 6px 20px rgba(214, 148, 13, 0.8), 0 0 0 10px rgba(214, 148, 13, 0);
    }
}

/* === Адаптивность === */
@media (max-width: 768px) {
    .music-player {
        bottom: 15px;
        right: 0;
        transform: translateX(calc(100% - 25px));
        gap: 8px;
        padding: 8px;
        padding-right: 12px;
    }
    
    .music-player.open {
        transform: translateX(0);
    }
    
    .music-toggle {
        width: 45px;
        height: 45px;
    }

    .music-toggle svg {
        width: 22px;
        height: 22px;
    }

    .music-next {
        width: 32px;
        height: 32px;
    }

    .music-next svg {
        width: 16px;
        height: 16px;
    }

    .volume-btn {
        width: 26px;
        height: 16px;
    }

    .volume-display {
        font-size: 0.65rem;
        width: 36px;
    }
}

@media (max-width: 480px) {
    .music-player {
        bottom: 10px;
        right: 0;
        transform: translateX(calc(100% - 23px));
        gap: 6px;
        padding: 6px;
        padding-right: 10px;
    }
    
    .music-player.open {
        transform: translateX(0);
    }
    
    .music-toggle {
        width: 40px;
        height: 40px;
    }

    .music-toggle svg {
        width: 20px;
        height: 20px;
    }

    .music-next {
        width: 30px;
        height: 30px;
    }

    .music-next svg {
        width: 14px;
        height: 14px;
    }

    .volume-btn {
        width: 24px;
        height: 14px;
    }

    .volume-btn svg {
        width: 10px;
        height: 10px;
    }

    .volume-display {
        font-size: 0.6rem;
        width: 34px;
    }
}

