/* 样式切换器按钮 - 始终显示 */
.style-switcher {
    position: fixed;
    top: 60px;
    right: 20px;
    z-index: 1000;
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    border: 2px solid #0ea5e9;
    border-radius: 25px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.2);
    color: #0ea5e9;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}

.style-switcher:hover {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
}

.style-switcher .icon {
    font-size: 16px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.style-switcher:hover .icon {
    transform: rotate(360deg);
}

.style-switcher.switching {
    pointer-events: none;
    opacity: 0.7;
}

.style-switcher.switching .icon {
    animation: switching-spin 0.8s ease-in-out;
}

@keyframes switching-spin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

/* 加载状态样式 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(240, 248, 255, 0.98) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(14, 165, 233, 0.1);
    border-top: 4px solid #0ea5e9;
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    margin-bottom: 20px;
}

.loading-text {
    color: #0ea5e9;
    font-size: 16px;
    font-weight: 500;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* 样式切换通知 */
.style-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.3);
    z-index: 9999;
    opacity: 0;
    transform: translateY(100px) scale(0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 10px;
}

.style-notification.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.style-notification.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.style-notification.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.style-notification .icon {
    font-size: 16px;
    animation: notification-bounce 0.6s ease-out;
}

@keyframes notification-bounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .style-switcher {
        top: 50px;
        right: 15px;
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .style-notification {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
        font-size: 13px;
    }
    
    .loading-spinner {
        width: 40px;
        height: 40px;
        border-width: 3px;
    }
    
    .loading-text {
        font-size: 14px;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .style-switcher {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
        color: #0ea5e9;
        border-color: #0ea5e9;
    }
    
    .loading-overlay {
        background: linear-gradient(135deg, 
            rgba(30, 41, 59, 0.95) 0%, 
            rgba(51, 65, 85, 0.98) 100%);
    }
    
    .loading-text {
        color: #0ea5e9;
    }
}