/**
 * 主题切换器样式
 * 浮动按钮和主题选择器界面
 */

/* 浮动主题切换按钮 */
.theme-toggle-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-gradient);
    color: var(--text-white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--shadow-primary-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.theme-toggle-btn:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.5);
}

.theme-toggle-btn:active {
    transform: scale(0.95) rotate(15deg);
}

.theme-toggle-btn i {
    transition: transform 0.3s ease;
}

.theme-toggle-btn:hover i {
    transform: rotate(180deg);
}

/* 主题选择模态框 */
.theme-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.theme-modal.active {
    opacity: 1;
}

.theme-modal-content {
    background: var(--card-bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-modal.active .theme-modal-content {
    transform: scale(1) translateY(0);
}

.theme-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-color);
}

.theme-modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.theme-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--hover-color);
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
}

.theme-modal-close:hover {
    background: var(--border-dark);
    color: var(--text-primary);
    transform: rotate(90deg);
}

/* 主题网格 */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    padding: 24px 28px;
}

@media (max-width: 768px) {
    .theme-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
        padding: 20px;
    }
}

/* 主题卡片 */
.theme-card {
    position: relative;
    background: var(--card-bg);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.theme-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-primary);
    transform: translateY(-4px);
}

.theme-card.active {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-primary-lg);
    background: var(--hover-color);
}

/* 主题预览 */
.theme-card-preview {
    width: 100%;
    height: 100px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    overflow: hidden;
    position: relative;
}

.theme-card-preview[data-preview-theme="default"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.theme-card-preview[data-preview-theme="pure-black"] {
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 100%);
}

.theme-card-preview[data-preview-theme="vintage"] {
    background: linear-gradient(135deg, #f5f1e8 0%, #d9cdb8 100%);
}

.theme-card-preview[data-preview-theme="forest"] {
    background: linear-gradient(135deg, #e8f5e9 0%, #a5d6a7 100%);
}

.theme-card-preview[data-preview-theme="sakura"] {
    background: linear-gradient(135deg, #fce4ec 0%, #f48fb1 100%);
}

.theme-card-preview[data-preview-theme="light"] {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.theme-preview-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.theme-preview-text {
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.theme-preview-text.short {
    width: 60%;
}

/* 深色主题预览调整 */
.theme-card-preview[data-preview-theme="default"] .theme-preview-text,
.theme-card-preview[data-preview-theme="pure-black"] .theme-preview-text {
    background: rgba(255, 255, 255, 0.2);
}

/* 浅色主题预览调整 */
.theme-card-preview[data-preview-theme="vintage"] .theme-preview-text,
.theme-card-preview[data-preview-theme="forest"] .theme-preview-text,
.theme-card-preview[data-preview-theme="sakura"] .theme-preview-text,
.theme-card-preview[data-preview-theme="light"] .theme-preview-text {
    background: rgba(255, 255, 255, 0.4);
}

/* 主题卡片信息 */
.theme-card-info {
    text-align: left;
}

.theme-card-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.theme-icon {
    font-size: 1.2rem;
}

.theme-card-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* 选中标记 */
.theme-card-check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    animation: checkPop 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes checkPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 通知提示 */
.theme-notification {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background: var(--card-bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-primary);
    padding: 14px 20px;
    border-radius: 50px;
    box-shadow: var(--shadow-primary-lg);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 99999;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-light);
}

.theme-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.theme-notification i {
    color: var(--success-color);
    font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .theme-toggle-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .theme-modal {
        padding: 10px;
    }

    .theme-modal-content {
        max-height: 95vh;
        border-radius: var(--radius-md);
    }

    .theme-modal-header {
        padding: 20px;
    }

    .theme-modal-header h3 {
        font-size: 1.25rem;
    }

    .theme-notification {
        bottom: 80px;
        right: 20px;
        font-size: 13px;
        padding: 12px 18px;
    }
}

/* 滚动条样式 */
.theme-modal-content::-webkit-scrollbar {
    width: 8px;
}

.theme-modal-content::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 10px;
}

.theme-modal-content::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.theme-modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
    background-clip: content-box;
}
















