/* scirco 主题样式 - 深色和亮色主题 */

/* ==================== 深色主题（默认） ==================== */
:root,
[data-theme="dark"],
body.theme-dark {
    /* 基础颜色 */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    
    /* 文字颜色 */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-accent: #a5b4fc;
    
    /* 边框颜色 */
    --border-primary: rgba(255, 255, 255, 0.08);
    --border-secondary: rgba(255, 255, 255, 0.12);
    --border-accent: rgba(99, 102, 241, 0.3);
    
    /* 毛玻璃效果 */
    --glass-bg: rgba(15, 23, 42, 0.75);
    --glass-bg-hover: rgba(30, 41, 59, 0.85);
    --glass-border: rgba(255, 255, 255, 0.06);
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    
    /* 主题特定 */
    --input-bg: rgba(255, 255, 255, 0.04);
    --input-border: rgba(255, 255, 255, 0.08);
    --input-focus: rgba(99, 102, 241, 0.2);
    
    /* 背景渐变 */
    --gradient-overlay: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);

    /* 兼容旧页面常用别名 */
    --dark: #0f172a;
    --darker: #020617;
    --light: #f8fafc;
    --gray: #94a3b8;
    --gray-light: #cbd5e1;
    --surface-strong: rgba(255, 255, 255, 0.08);
    --surface-stronger: rgba(255, 255, 255, 0.12);
}

/* ==================== 亮色主题 ==================== */
[data-theme="light"],
body.theme-light {
    /* 基础颜色 - 温暖的米白色 */
    --bg-primary: #faf9f7;
    --bg-secondary: #f0efed;
    --bg-tertiary: #e5e3e0;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    
    /* 文字颜色 */
    --text-primary: #1a1a2e;
    --text-secondary: #3d3d5c;
    --text-muted: #6b6b8d;
    --text-accent: #4f46e5;
    
    /* 边框颜色 */
    --border-primary: rgba(0, 0, 0, 0.08);
    --border-secondary: rgba(0, 0, 0, 0.12);
    --border-accent: rgba(99, 102, 241, 0.4);
    
    /* 毛玻璃效果 */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-bg-hover: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.06);
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    
    /* 主题特定 */
    --input-bg: rgba(255, 255, 255, 0.9);
    --input-border: rgba(0, 0, 0, 0.1);
    --input-focus: rgba(99, 102, 241, 0.15);
    
    /* 背景渐变 */
    --gradient-overlay: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);

    /* 兼容旧页面常用别名 */
    --dark: #faf9f7;
    --darker: #f0efed;
    --light: #1a1a2e;
    --gray: #6b6b8d;
    --gray-light: #3d3d5c;
    --surface-strong: rgba(79, 70, 229, 0.08);
    --surface-stronger: rgba(79, 70, 229, 0.14);
}

/* ==================== 过渡动画 ==================== */
body {
    transition: 
        background-color 0.4s ease,
        color 0.3s ease;
}

.theme-toggle,
.theme-btn {
    transition: all 0.3s ease;
}

/* 背景颜色过渡 */
.hero-bg,
.bg-animation,
.dynamic-bg {
    transition: opacity 0.4s ease;
}

/* 卡片过渡 */
.card,
.feature-card,
.game-card,
.auth-card,
.security-card {
    transition: 
        background-color 0.4s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.3s ease;
}

/* 输入框过渡 */
input,
textarea,
select {
    transition: 
        background-color 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

body.theme-light input,
body.theme-light textarea,
body.theme-light select {
    color: var(--text-primary);
}

body.theme-light input::placeholder,
body.theme-light textarea::placeholder {
    color: var(--text-muted);
}

/* ==================== 主题切换按钮样式 ==================== */
#theme-toggle,
.theme-toggle,
.theme-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border-primary);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#theme-toggle:hover,
.theme-toggle:hover,
.theme-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-secondary);
    transform: scale(1.05);
}

#theme-toggle:active,
.theme-toggle:active,
.theme-btn:active {
    transform: scale(0.95);
}

/* 暗色主题下按钮样式 */
body.theme-dark #theme-toggle,
body.theme-dark .theme-toggle,
body.theme-dark .theme-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

body.theme-dark #theme-toggle:hover,
body.theme-dark .theme-toggle:hover,
body.theme-dark .theme-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* 亮色主题下按钮样式 */
body.theme-light #theme-toggle,
body.theme-light .theme-toggle,
body.theme-light .theme-btn {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: var(--shadow-sm);
}

body.theme-light #theme-toggle:hover,
body.theme-light .theme-toggle:hover,
body.theme-light .theme-btn:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: var(--shadow-md);
}

/* ==================== 响应式调整 ==================== */
@media (max-width: 768px) {
    #theme-toggle,
    .theme-toggle,
    .theme-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}
