/*
 * @file themes.css
 * @description 主题样式文件，包含各种主题变量定义和主题切换器样式
 * @author raanan
 * @date 2025-12-11
 */

/* S 主题变量模块 */
:root {
    /* Light Theme */
    --bg-primary: #F5F5F7;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #e0e0e0;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --border-color: #e0e0e0;
    --accent-color: #4a90e2;
    --accent-hover: #357abd;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --card-bg: #ffffff;
    --search-bg: #f5f5f5;
    --folder-color: #ffb74d;
    --bookmark-color: #4a90e2;

    /* Selected Colors */
    --selected-color-1: #00b259;
    --selected-color-2: #e6f5f0;
    --selected-color-3: rgba(42, 153, 77, 0.6);
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #404040;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-tertiary: #808080;
    --border-color: #404040;
    --accent-color: #5fa8f5;
    --accent-hover: #4a90e2;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --card-bg: #2d2d2d;
    --search-bg: #404040;
    --folder-color: #ffd54f;
    --bookmark-color: #5fa8f5;
}

/* Rosé Pine Dawn */
[data-theme="rose-pine-dawn"] {
    --bg-primary: #faf4ed;
    --bg-secondary: #fffaf3;
    --bg-tertiary: #f2e9e1;
    --text-primary: #464261;
    --text-secondary: #9893a5;
    --text-tertiary: #797593;
    --border-color: #f2e9e1;
    --accent-color: #56949f;
    --accent-hover: #286983;
    --shadow: 0 2px 8px rgba(250, 244, 237, 0.1);
    --card-bg: #fffaf3;
    --search-bg: #faf4ed;
    --folder-color: #ea9d34;
    --bookmark-color: #907aa9;
}

/* Nord Light */
[data-theme="nord-light"] {
    --bg-primary: #eceff4;
    --bg-secondary: #e5e9f0;
    --bg-tertiary: #d8dee9;
    --text-primary: #2e3440;
    --text-secondary: #4c566a;
    --text-tertiary: #434c5e;
    --border-color: #d8dee9;
    --accent-color: #81a1c1;
    --accent-hover: #5e81ac;
    --shadow: 0 2px 8px rgba(46, 52, 64, 0.1);
    --card-bg: #e5e9f0;
    --search-bg: #eceff4;
    --folder-color: #ebcb8b;
    --bookmark-color: #81a1c1;
}


/* Nord Dark主题 - 基于Nord设计系统的深色主题 */
[data-theme="nord-dark"] {
    --bg-primary: #2e3440;
    --bg-secondary: #3b4252;
    --bg-tertiary: #434c5e;
    --text-primary: #eceff4;
    --text-secondary: #e5e9f0;
    --text-tertiary: #d8dee9;
    --border-color: #434c5e;
    --accent-color: #88c0d0;
    --accent-hover: #81a1c1;
    --shadow: 0 2px 8px rgba(46, 52, 64, 0.3);
    --card-bg: #3b4252;
    --search-bg: #434c5e;
    --folder-color: #ebcb8b;
    --bookmark-color: #88c0d0;
}

/* E 主题变量模块 */

/* S 主题切换器模块 */

/* 主题切换器容器 */
.theme-switcher {
    position: relative;
    display: inline-block;
}

/* 主题切换器按钮 */
.theme-switcher-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-switcher-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--accent-color);
}

/* 主题选项容器 */
.theme-options {
    position: absolute;
    top: 0;
    right: 100%;
    /* 固定在主题切换器按钮的左侧 */
    margin-right: 0.5rem;
    /* 两个容器之间的间隔 */
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.5rem;
    display: flex;
    gap: 0.5rem;
    box-shadow: var(--shadow);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    transform: translateX(10px);
}

/* 主题选项容器显示状态 */
.theme-switcher.active .theme-options {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* 主题选项按钮 */
.theme-option {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 为每个主题选项设置特定背景色 */
.theme-option[data-theme="light"] {
    background-color: #F5F5F7;
}

.theme-option[data-theme="dark"] {
    background-color: #1a1a1a;
}

.theme-option[data-theme="rose-pine-dawn"] {
    background-color: #faf4ed;
}

.theme-option[data-theme="nord-light"] {
    background-color: #e5e9f0;
}

.theme-option[data-theme="nord-dark"] {
    background-color: #2e3440;
}

/* 主题选项按钮悬停效果 */
.theme-option:hover {
    transform: scale(1.1);
    border: 5px solid var(--accent-color);

}

/* 当前选中主题的样式 - 显示明显的选中状态 */
.theme-option.active {
    border: 5px solid var(--accent-color);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

/* E 主题切换器模块 */