/* 主题切换过渡动画 - 从中心扩散 */
.theme-transition {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-left: -10px;
    margin-top: -10px;
    z-index: 99999;
    pointer-events: none;
    border-radius: 50%;
    background: rgba(220,38,38,0.98);
    transform: scale(0);
    opacity: 0;
}
.theme-transition.active {
    animation: themeExpand 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* 动画分三阶段：
   1. 0-45%: 圆形扩散覆盖屏幕，保持不透明
   2. 45-55%: 停顿，此时切换主题
   3. 55-100%: 圆形快速淡出
*/
@keyframes themeExpand {
    0% {
        opacity: 1;
        transform: scale(0);
    }
    45% {
        opacity: 1;
        transform: scale(150);
    }
    50% {
        opacity: 1;
        transform: scale(150);
    }
    55% {
        opacity: 1;
        transform: scale(150);
    }
    100% {
        opacity: 0;
        transform: scale(150);
    }
}

/* 主题按钮样式 */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1002;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--text-muted);
    padding: 8px 16px;
    font-family: 'Courier New', monospace;
    font-size: 0.7em;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: all 0.3s ease, border-color 0.8s cubic-bezier(0.4, 0, 0.2, 1), color 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}
.theme-toggle:hover {
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(220,38,38,0.3);
}

/* 深色主题变量 */
:root {
    --primary: #dc2626;
    --bg-dark: #050508;
    --text: #e0e0e0;
    --text-muted: #666;
}

/* 浅色主题变量 */
[data-theme="light"] {
    --primary: #0066cc;
    --bg-dark: #f0f5ff;
    --text: #1a2a3a;
    --text-muted: #5a7a9a;
}

/* 主题过渡动画 */
body {
    transition: background 1s cubic-bezier(0.4, 0, 0.2, 1), color 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
