/* Main Audio Player */
.background-audio-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    padding: 15px;
    border-radius: 25px;
    z-index: 9999;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Play/Pause Button */
.audio-control-btn {
    background: #0073aa;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.audio-control-btn:hover {
    background: #005a87;
    transform: scale(1.1);
}

.audio-control-btn.playing .play-icon {
    display: none;
}

.audio-control-btn:not(.playing) .pause-icon {
    display: none;
}

/* Volume Controls */
.volume-slider {
    width: 80px;
    height: 5px;
    border-radius: 5px;
    background: #555;
    outline: none;
    transition: background 0.3s;
}

.volume-slider:hover {
    background: #666;
}

.volume-icon {
    color: white;
    font-size: 16px;
}

/* Toggle Switch Styles */
.audio-toggle-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.toggle-label {
    color: white;
    font-size: 12px;
    font-weight: 500;
}

/* Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #0073aa;
}

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

/* Standalone Toggle Switch */
.standalone-audio-toggle {
    display: inline-block;
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.standalone-audio-toggle.audio-enabled {
    border-color: #0073aa;
    background: #e7f3ff;
}

.standalone-audio-toggle.audio-disabled {
    border-color: #6c757d;
    background: #f8f9fa;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #dc3545;
    transition: .4s;
    border-radius: 30px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.audio-power-toggle:checked + .toggle-slider {
    background-color: #28a745;
}

.audio-power-toggle:checked + .toggle-slider:before {
    transform: translateX(30px);
}

.toggle-text {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.toggle-status {
    margin-top: 8px;
    display: flex;
    gap: 15px;
    font-size: 12px;
    font-weight: 600;
}

.status-on, .status-off {
    padding: 2px 8px;
    border-radius: 4px;
    transition: all 0.3s;
}

.status-on {
    color: #28a745;
}

.status-off {
    color: #dc3545;
}

.audio-enabled .status-on {
    background: #d4edda;
}

.audio-disabled .status-off {
    background: #f8d7da;
}

/* Manual Audio Player */
.manual-audio-player {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid #ddd;
}

.manual-audio-player .audio-controls {
    justify-content: center;
}

.manual-audio-player .audio-control-btn {
    background: #28a745;
}

.manual-audio-player .audio-control-btn:hover {
    background: #218838;
}

/* Responsive Design */
@media (max-width: 768px) {
    .background-audio-player {
        bottom: 10px;
        right: 10px;
        left: 10px;
        border-radius: 15px;
        padding: 12px;
    }
    
    .audio-controls {
        justify-content: space-between;
        gap: 8px;
    }
    
    .audio-toggle-switch {
        margin-left: 5px;
        padding-left: 5px;
    }
    
    .standalone-audio-toggle {
        width: 100%;
        text-align: center;
    }
}