/* Base模板样式 */

/* 主题模态框样式 */
.theme-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.theme-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.theme-modal-content {
    background: var(--panel);
    border-radius: 20px;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.theme-modal.show .theme-modal-content {
    transform: translateY(0);
}

.theme-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-option:hover {
    background: rgba(14, 165, 233, 0.1);
    transform: translateY(-2px);
}

.theme-preview {
    width: 100%;
    height: 60px;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.light-preview {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #e2e8f0;
}

.dark-preview {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #1e293b;
}

.auto-preview {
    background: linear-gradient(135deg, #f8fafc 0%, #1e293b 100%);
    border: 1px solid #e2e8f0;
}

.theme-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.theme-close:hover {
    background: rgba(14, 165, 233, 0.1);
    color: var(--accent);
}

/* 主题相关的 CSS 变量 */
:root[data-theme="light"] {
    /* 日间模式的颜色 - 使用默认值 */
    --primary: #3b82f6;
    --secondary: #6366f1;
    --accent: #0ea5e9;
}

:root[data-theme="dark"] {
    --primary: #6366f1;
    --secondary: #818cf8;
    --accent: #38bdf8;
    --bg: #0f172a;
    --panel: #1e293b;
    --text: #f8fafc;
    --text-dim: #94a3b8;
    --border: #2d3748;
}

/* Dock 夜间模式 */
[data-theme="dark"] .dock {
    background: rgba(17, 25, 40, 0.75);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .dock-item {
    background: rgba(17, 25, 40, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .dock-item:hover {
    background: rgba(14, 165, 233, 0.15);
}

/* Topbar 夜间模式 */
[data-theme="dark"] .topbar {
    background: rgba(17, 25, 40, 0.75);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .nav-link {
    color: var(--text);
}

[data-theme="dark"] .nav-link:hover {
    background: rgba(14, 165, 233, 0.15);
}

/* Dock 夜间模式样式 */
[data-theme="dark"] .gnome-dock {
    background: rgba(15, 23, 42, 0.75);  /* 深色半透明背景 */
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
}

[data-theme="dark"] .dock-icon {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
}

[data-theme="dark"] .dock-icon:hover,
[data-theme="dark"] .dock-icon.active {
    background: rgba(14, 165, 233, 0.15);
    color: var(--accent);
}

[data-theme="dark"] .dock-separator {
    background: rgba(255, 255, 255, 0.1);
}

/* Topbar 夜间模式样式 */
[data-theme="dark"] .gnome-top-bar {
    background: rgba(15, 23, 42, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
}

[data-theme="dark"] .activities-button,
[data-theme="dark"] .current-app,
[data-theme="dark"] .system-status,
[data-theme="dark"] .time {
    color: var(--text);
}

[data-theme="dark"] .activities-button:hover {
    background: rgba(14, 165, 233, 0.15);
}

[data-theme="dark"] .system-status i {
    color: var(--text);
}

/* 添加哔哩哔哩图标样式 */
.fab.fa-bilibili::before {
    content: ""; /* 清除原有内容 */
    display: inline-block;
    width: 1em;
    height: 1em;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M777.514667 131.669333a53.333333 53.333333 0 0 1 0 75.434667L728.746667 255.829333h49.92A160 160 0 0 1 938.666667 415.872v320a160 160 0 0 1-160 160H245.333333A160 160 0 0 1 85.333333 735.872v-320a160 160 0 0 1 160-160h49.749334L246.4 207.146667a53.333333 53.333333 0 0 1 75.392-75.434667l113.152 113.152c3.370667 3.370667 6.186667 7.04 8.448 10.965333h137.088c2.261333-3.925333 5.12-7.68 8.490667-11.008l113.109333-113.152a53.333333 53.333333 0 0 1 75.434667 0z m1.152 231.253334H245.333333a53.333333 53.333333 0 0 0-53.205333 49.365333l-0.128 4.010667v320c0 28.117333 21.76 51.114667 49.365333 53.162666l3.968 0.170667h533.333334a53.333333 53.333333 0 0 0 53.205333-49.365333l0.128-3.968v-320c0-29.44-23.893333-53.333333-53.333333-53.333334z m-426.666667 106.666666c29.44 0 53.333333 23.893333 53.333333 53.333334v53.333333a53.333333 53.333333 0 1 1-106.666666 0v-53.333333c0-29.44 23.893333-53.333333 53.333333-53.333334z m320 0c29.44 0 53.333333 23.893333 53.333333 53.333334v53.333333a53.333333 53.333333 0 1 1-106.666666 0v-53.333333c0-29.44 23.893333-53.333333 53.333333-53.333334z' fill='%23515151'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* 暗色模式下的图标颜色 */
[data-theme="dark"] .fab.fa-bilibili::before {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M777.514667 131.669333a53.333333 53.333333 0 0 1 0 75.434667L728.746667 255.829333h49.92A160 160 0 0 1 938.666667 415.872v320a160 160 0 0 1-160 160H245.333333A160 160 0 0 1 85.333333 735.872v-320a160 160 0 0 1 160-160h49.749334L246.4 207.146667a53.333333 53.333333 0 0 1 75.392-75.434667l113.152 113.152c3.370667 3.370667 6.186667 7.04 8.448 10.965333h137.088c2.261333-3.925333 5.12-7.68 8.490667-11.008l113.109333-113.152a53.333333 53.333333 0 0 1 75.434667 0z m1.152 231.253334H245.333333a53.333333 53.333333 0 0 0-53.205333 49.365333l-0.128 4.010667v320c0 28.117333 21.76 51.114667 49.365333 53.162666l3.968 0.170667h533.333334a53.333333 53.333333 0 0 0 53.205333-49.365333l0.128-3.968v-320c0-29.44-23.893333-53.333333-53.333333-53.333334z m-426.666667 106.666666c29.44 0 53.333333 23.893333 53.333333 53.333334v53.333333a53.333333 53.333333 0 1 1-106.666666 0v-53.333333c0-29.44 23.893333-53.333333 53.333333-53.333334z m320 0c29.44 0 53.333333 23.893333 53.333333 53.333334v53.333333a53.333333 53.333333 0 1 1-106.666666 0v-53.333333c0-29.44 23.893333-53.333333 53.333333-53.333334z' fill='%23FFFFFF'/%3E%3C/svg%3E");
}

/* 自定义HTML容器样式 - 作为装饰层 */
.custom-html-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;  /* 低层级，确保不影响交互 */
    pointer-events: none;  /* 禁用鼠标事件，使其不影响下层元素的点击 */
    overflow: hidden;  /* 防止内容溢出 */
}

/* 如果自定义HTML中有需要交互的元素，可以单独启用其事件 */
.custom-html-container a,
.custom-html-container button {
    pointer-events: auto;
}
