/**
 * 主题切换器样式
 * 提供美观的主题切换UI界面
 */

/* 主题切换器容器 */
.theme-switcher {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

/* 切换按钮 */
.theme-switcher-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

.theme-switcher-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

.theme-switcher-toggle:active {
    transform: scale(0.95);
}

/* 主题选项面板 */
.theme-switcher-panel {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.theme-switcher-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* 面板标题 */
.theme-switcher-title {
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-align: center;
    text-transform: uppercase;
}

/* 主题选项列表 */
.theme-options-list {
    padding: 10px;
    max-height: 400px;
    overflow-y: auto;
}

/* 滚动条样式 */
.theme-options-list::-webkit-scrollbar {
    width: 6px;
}

.theme-options-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.theme-options-list::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

.theme-options-list::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* 单个主题选项 */
.theme-option {
    display: flex;
    align-items: center;
    padding: 15px;
    margin: 5px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.theme-option:hover {
    background-color: #f8f9fa;
    border-color: #e9ecef;
    transform: translateX(5px);
}

.theme-option.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

/* 主题图标 */
.theme-option .theme-icon {
    font-size: 32px;
    margin-right: 15px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.theme-option.active .theme-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    animation: icon-pulse 1.5s infinite;
}

@keyframes icon-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* 主题信息 */
.theme-option .theme-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.theme-option .theme-info strong {
    font-size: 15px;
    color: #333;
    margin-bottom: 4px;
    font-weight: 600;
}

.theme-option .theme-info small {
    font-size: 12px;
    color: #777;
}

.theme-option.active .theme-info strong {
    color: #667eea;
}

/* 通知消息 */
.theme-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 500;
    min-width: 200px;
    max-width: 400px;
}

.theme-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.theme-notification-success {
    border-left: 4px solid #4caf50;
    color: #2e7d32;
}

.theme-notification-error {
    border-left: 4px solid #f44336;
    color: #c62828;
}

.theme-notification-info {
    border-left: 4px solid #2196f3;
    color: #1565c0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .theme-switcher {
        bottom: 20px;
        right: 20px;
    }

    .theme-switcher-toggle {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .theme-switcher-panel {
        width: 280px;
        bottom: 65px;
    }

    .theme-option .theme-icon {
        font-size: 28px;
        width: 45px;
        height: 45px;
    }

    .theme-option .theme-info strong {
        font-size: 14px;
    }

    .theme-option .theme-info small {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .theme-switcher {
        bottom: 15px;
        right: 15px;
    }

    .theme-switcher-panel {
        width: calc(100vw - 30px);
        right: -15px;
    }

    .theme-notification {
        right: 15px;
        left: 15px;
        max-width: calc(100vw - 30px);
    }
}

/* 主题切换动画 */
@keyframes theme-switch {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

body.theme-switching {
    animation: theme-switch 0.5s ease;
}

/* 深色模式支持（针对极简黑主题） */
@media (prefers-color-scheme: dark) {
    .theme-switcher-panel {
        background: #2d2d2d;
        color: white;
    }

    .theme-option .theme-info strong {
        color: #e0e0e0;
    }

    .theme-option .theme-info small {
        color: #b0b0b0;
    }

    .theme-option:hover {
        background-color: #3d3d3d;
    }
}
