/* Controls Container */
.controls-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
}

/* Music Controls */
.music-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 15px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.control-button {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.control-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

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

.music-icon {
    width: 20px;
    height: 20px;
    fill: rgba(255, 255, 255, 0.8);
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    transition: width 0.3s ease;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    background: white;
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

/* Social Buttons */
.social-buttons {
    display: flex;
    gap: 10px;
}

.social-button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.social-button svg {
    width: 24px;
    height: 24px;
    fill: white;
    z-index: 1;
    position: relative;
}

/* Discord button */
.social-button.discord {
    background: rgba(88, 101, 242, 0.8);
    border-color: rgba(88, 101, 242, 0.3);
}

.social-button.discord:hover {
    background: rgba(88, 101, 242, 1);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 20px rgba(88, 101, 242, 0.5);
    border-color: rgba(88, 101, 242, 0.6);
}

/* Ko-fi button */
.social-button.kofi {
    background: rgba(255, 94, 131, 0.8);
    border-color: rgba(255, 94, 131, 0.3);
}

.social-button.kofi:hover {
    background: rgba(255, 94, 131, 1);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 20px rgba(255, 94, 131, 0.5);
    border-color: rgba(255, 94, 131, 0.6);
}

/* Button ripple effect */
.social-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.social-button:active::before {
    width: 100px;
    height: 100px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .controls-container {
        bottom: 10px;
        left: 10px;
        flex-direction: row;
        justify-content: space-between;
        width: calc(100% - 20px);
    }

    .music-controls {
        flex: 1;
        max-width: 200px;
    }

    .volume-slider {
        width: 60px;
    }

    .social-buttons {
        gap: 8px;
    }

    .social-button {
        width: 40px;
        height: 40px;
    }

    .social-button svg {
        width: 20px;
        height: 20px;
    }
}

/* Animation for music playing */
@keyframes musicPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.music-controls.playing .control-button {
    animation: musicPulse 2s ease-in-out infinite;
}

/* Hide on small screens if needed */
@media (max-height: 500px) {
    .controls-container {
        transform: scale(0.8);
        transform-origin: bottom left;
    }
}

/* Athulan mode modifications */
body[data-realm="athulan"] .social-button.discord {
    background: rgba(138, 43, 226, 0.8);
    border-color: rgba(138, 43, 226, 0.3);
}

body[data-realm="athulan"] .social-button.discord:hover {
    background: rgba(138, 43, 226, 1);
    box-shadow: 0 5px 20px rgba(138, 43, 226, 0.5);
}

body[data-realm="athulan"] .control-button {
    background: rgba(138, 43, 226, 0.2);
}

body[data-realm="athulan"] .volume-slider {
    background: rgba(138, 43, 226, 0.2);
}

body[data-realm="athulan"] .volume-slider::-webkit-slider-thumb {
    background: rgba(147, 112, 219, 0.8);
}

/* Music prompt */
.music-prompt {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 20px 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10000;
    animation: promptAppear 0.5s ease-out;
}

.music-prompt .prompt-content {
    color: white;
    font-family: 'Kalam', cursive;
    font-size: 1.2rem;
    text-align: center;
}

@keyframes promptAppear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* NOUVEAU: Performance Controls Styles */
.performance-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.perf-label {
    font-size: 1.2rem;
    line-height: 1;
    user-select: none;
}

.perf-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.perf-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #2196F3; /* Bleu pour indiquer "activé" */
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}