/* 背景切换器样式 */
.background-switcher-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.background-switcher-toggle {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.background-switcher-toggle:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.background-switcher-panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    gap: 10px;
    min-width: 250px;
    max-height: 400px;
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.background-switcher-panel.active {
    display: flex;
}

.background-switcher-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
    color: #333;
}

.background-style-item {
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid transparent;
}

.background-style-item:hover {
    background: #f5f5f5;
    transform: translateX(-5px);
}

.background-style-item.active {
    border-color: #4a6cf7;
    background: rgba(74, 108, 247, 0.1);
}

.background-preview {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.background-style-name {
    font-size: 14px;
    color: #555;
    flex: 1;
}

.background-style-item:hover .background-style-name {
    color: #4a6cf7;
}

/* 动画关键帧 */
@keyframes movement {
    0%, 100% {
        background-size: 
            130vmax 130vmax,
            80vmax 80vmax,
            90vmax 90vmax,
            110vmax 110vmax,
            90vmax 90vmax;
        background-position: 
            -80vmax -80vmax,
            60vmax -30vmax,
            10vmax 10vmax,
            -30vmax -10vmax,
            50vmax 50vmax;
    }
    25% {
        background-size: 
            100vmax 100vmax,
            90vmax 90vmax,
            100vmax 100vmax,
            90vmax 90vmax,
            60vmax 60vmax;
        background-position: 
            -60vmax -90vmax,
            50vmax -40vmax,
            0vmax -20vmax,
            -40vmax -20vmax,
            40vmax 60vmax;
    }
    50% {
        background-size: 
            80vmax 80vmax,
            110vmax 110vmax,
            80vmax 80vmax,
            60vmax 60vmax,
            80vmax 80vmax;
        background-position: 
            -50vmax -70vmax,
            40vmax -30vmax,
            10vmax 0vmax,
            20vmax 10vmax,
            30vmax 70vmax;
    }
    75% {
        background-size: 
            90vmax 90vmax,
            90vmax 90vmax,
            100vmax 100vmax,
            90vmax 90vmax,
            70vmax 70vmax;
        background-position: 
            -50vmax -40vmax,
            50vmax -30vmax,
            20vmax 0vmax,
            -10vmax 10vmax,
            40vmax 60vmax;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .background-switcher-container {
        bottom: calc(50% - 22.5px);
        left: 10px;
    }
    
    .background-switcher-toggle {
        width: 45px;
        height: 45px;
    }
    
    .background-switcher-panel {
        min-width: 200px;
        bottom: auto;
        top: 50%;
        right: auto;
        left: 65px;
        transform: translateY(-50%);
    }
}

/* 自定义滚动条 */
.background-switcher-panel::-webkit-scrollbar {
    width: 6px;
}

.background-switcher-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.background-switcher-panel::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.background-switcher-panel::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 暗夜模式样式 */
.dark-theme .background-switcher-toggle {
    background: rgba(40, 40, 40, 0.8);
    border: 2px solid #555;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.dark-theme .background-switcher-toggle:hover {
    background: rgba(50, 50, 50, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.dark-theme .background-switcher-toggle svg path {
    fill: #ddd;
}

.dark-theme .background-switcher-panel {
    background: rgba(30, 30, 30, 0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid #444;
}

.dark-theme .background-switcher-title {
    color: #ddd;
}

.dark-theme .background-style-item {
    background: rgba(40, 40, 40, 0.5);
}

.dark-theme .background-style-item:hover {
    background: rgba(50, 50, 50, 0.8);
    transform: translateX(-5px);
}

.dark-theme .background-style-item.active {
    border-color: #5a7cf7;
    background: rgba(90, 124, 247, 0.15);
}

.dark-theme .background-preview {
    border: 2px solid #555;
}

.dark-theme .background-style-name {
    color: #ccc;
}

.dark-theme .background-style-item:hover .background-style-name {
    color: #5a7cf7;
}

/* 暗夜模式滚动条 */
.dark-theme .background-switcher-panel::-webkit-scrollbar-track {
    background: #2a2a2a;
}

.dark-theme .background-switcher-panel::-webkit-scrollbar-thumb {
    background: #666;
}

.dark-theme .background-switcher-panel::-webkit-scrollbar-thumb:hover {
    background: #888;
}