* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ========== 移动端（尤其 iPad Safari）动态视口高度适配 ==========
   iPad Safari 在「隐藏浏览器状态栏成一条」时，旧的 100vh 不会同步，
   仍按状态栏可见时的大高度计算，导致壁纸、排版、任务栏整体错位。
   修复：
     1) 用 CSS 变量 --app-viewport-h 存储「真实可用高度」；
     2) 核心容器 body / #desktop / html 用 100dvh 优先、100vh 回退（dvh = 动态视口，
        会随 iOS Safari 工具栏/状态栏收起/展开实时变化）；
     3) 不支持 dvh 的旧浏览器回退到 100vh；
     4) 另外由 JS（app.js）设置 --app-viewport-h = innerHeight，
        解决某些 WebView 即使 dvh 也不跟随的问题。 */
html, body {
    height: 100vh;
    height: var(--app-viewport-h, 100dvh);
    width: 100vw;
    width: 100dvw;
}
#boot-screen, #transition-overlay, #error-overlay {
    height: 100vh;
    height: var(--app-viewport-h, 100dvh);
    width: 100vw;
    width: 100dvw;
}

body.animation-disabled *,
body.animation-disabled *::before,
body.animation-disabled *::after {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
}

#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    pointer-events: none;
}

#transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
}

body:has(#boot-screen:not(.hidden))::before,
body:has(#boot-screen:not(.hidden))::after,
body:has(#setup-screen:not(.hidden))::before,
body:has(#setup-screen:not(.hidden))::after {
    display: none;
}

.boot-logo {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 60px;
}

.boot-loader {
    width: 200px;
    height: 200px;
    object-fit: contain;
}

@keyframes bootSpin {
    to { transform: rotate(360deg); }
}

#setup-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    transition: background 0.3s ease;
}

#setup-screen.hidden {
    display: none;
}

.setup-container {
    max-width: 800px;
    width: 90%;
    text-align: center;
}

.setup-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.setup-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounceDown {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(5px); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(40px); }
}

/* 深色主题 */
#setup-screen.theme-dark .setup-step h1 {
    color: white;
}
#setup-screen.theme-dark .setup-step p {
    color: #dddddd;
}
#setup-screen.theme-dark .setup-wallpaper-option span {
    color: white;
}
#setup-screen.theme-dark .setup-engine-option span {
    color: white;
}
#setup-screen.theme-dark .setup-toggle-item span {
    color: white;
}

/* 浅色主题 */
#setup-screen.theme-light .setup-step h1 {
    color: #333;
}
#setup-screen.theme-light .setup-step p {
    color: #666;
}
#setup-screen.theme-light .setup-wallpaper-option span {
    color: #333;
}
#setup-screen.theme-light .setup-engine-option span {
    color: #333;
}
#setup-screen.theme-light .setup-toggle-item span {
    color: #333;
}

#setup-screen.theme-dark .setup-layout-option span,
#setup-screen.theme-dark .setup-taskbar-option span {
    color: white;
}

#setup-screen.theme-light .setup-layout-option span,
#setup-screen.theme-light .setup-taskbar-option span {
    color: #333;
}

.setup-layout-options,
.setup-taskbar-options {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
    margin: 40px 0;
}

/* 桌面端：桌面排列方式 4 个选项排成一行 */
.setup-layout-options {
    flex-wrap: nowrap;
    gap: 20px;
    max-width: 800px;
}

.setup-layout-option,
.setup-taskbar-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px;
    background: #ffffff;
    border-radius: 12px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    width: 200px;
    color: #1a1a1a;
}

/* 桌面端：桌面排列方式卡片自适应填满一行 */
.setup-layout-option {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    padding: 20px 10px;
}

.option-note {
    font-size: 12px !important;
    color: #888 !important;
    font-weight: normal !important;
}

#setup-screen.theme-light .setup-layout-option,
#setup-screen.theme-light .setup-taskbar-option {
    background: #ffffff;
}

.setup-layout-option:hover,
.setup-taskbar-option:hover {
    background: #f0f0f0;
}

#setup-screen.theme-light .setup-layout-option:hover,
#setup-screen.theme-light .setup-taskbar-option:hover {
    background: #f0f0f0;
}

.setup-layout-option.active,
.setup-taskbar-option.active {
    border-color: var(--accent-color);
    background: #ffffff;
}

#setup-screen.theme-dark .setup-layout-option,
#setup-screen.theme-dark .setup-taskbar-option {
    background: #2a2a2a;
    color: #ffffff;
}

#setup-screen.theme-dark .setup-layout-option:hover,
#setup-screen.theme-dark .setup-taskbar-option:hover {
    background: #3a3a3a;
}

#setup-screen.theme-dark .setup-layout-option.active,
#setup-screen.theme-dark .setup-taskbar-option.active {
    border-color: var(--accent-color);
    background: #2a2a2a;
}

.layout-preview,
.taskbar-preview {
    width: 140px;
    height: 140px;
    background: #f0f0f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#setup-screen.theme-dark .layout-preview,
#setup-screen.theme-dark .taskbar-preview {
    background: rgba(255, 255, 255, 0.1);
}

.vertical-preview {
    flex-direction: column;
    gap: 12px;
}

.vertical-preview .layout-icon {
    width: 32px;
    height: 32px;
}

.horizontal-preview {
    flex-direction: row;
    gap: 12px;
    padding: 12px;
}

.layout-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    border-radius: 10px;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--accent-color) 30%, transparent);
}

.taskbar-preview {
    height: 80px;
    background: #e0e0e0;
    justify-content: center;
}

.classic-preview {
    background: transparent;
    border: 2px solid #4da6ff;
}

.ppt-preview {
    background: transparent;
    border: 2px dashed #4da6ff;
}

#setup-screen.theme-dark .taskbar-preview {
    background: rgba(255, 255, 255, 0.1);
}

#setup-screen.theme-dark .classic-preview {
    border-color: rgba(255, 255, 255, 0.3);
}

#setup-screen.theme-dark .ppt-preview {
    border-color: rgba(255, 255, 255, 0.3);
}

.taskbar-bar {
    height: 48px;
    background: #ffffff;
    backdrop-filter: blur(20px);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

#setup-screen.theme-dark .taskbar-bar {
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.taskbar-bar.full {
    width: 100%;
}

.taskbar-bar.floating {
    width: 60%;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.setup-tip {
    font-size: 14px !important;
    color: #888 !important;
    margin-top: 20px !important;
    font-style: italic;
}

.setup-step h1 {
    font-size: 42px;
    font-weight: 600;
    margin-bottom: 20px;
}

.setup-step p {
    font-size: 18px;
    margin-bottom: 40px;
}

.setup-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 14px 36px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.setup-btn:hover {
    background: var(--accent-hover);
}

.setup-btn.secondary {
    background: #333;
    margin-right: 16px;
}

.setup-btn.secondary:hover {
    background: #444;
}

/* 浅色主题按钮 */
#setup-screen.theme-light .setup-btn.secondary {
    background: rgba(0,0,0,0.1);
    color: #333;
}
#setup-screen.theme-light .setup-btn.secondary:hover {
    background: rgba(0,0,0,0.2);
}

.setup-wallpapers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 40px 0;
}

.setup-wallpaper-option {
    cursor: pointer;
    transition: transform 0.2s;
}

.setup-wallpaper-option:hover {
    transform: scale(1.05);
}

.setup-wallpaper-option.active .setup-wallpaper-preview {
    border: 3px solid var(--accent-color);
}

.setup-wallpaper-preview {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 3px solid transparent;
    transition: border-color 0.2s;
}

.default-preview {
    background: repeating-linear-gradient(135deg, #f5f9ff 0px, #f5f9ff 40px, rgba(24, 122, 255, 0.1) 40px, rgba(24, 122, 255, 0.1) 80px), linear-gradient(180deg, #f5f9ff 0%, #e8f4ff 100%);
}

.win11-preview {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

.nature-preview {
    background: url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=400&h=240&fit=crop') center/cover no-repeat;
}

.dark-preview {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.setup-wallpaper-option span {
    color: white;
    font-size: 14px;
}

.setup-engines {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 40px auto;
    flex-wrap: wrap;
    max-width: 600px;
}

.setup-engine-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 40px;
    background: #1a1a1a;
    border-radius: 12px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

/* 浅色主题引擎卡片 */
#setup-screen.theme-light .setup-engine-option {
    background: rgba(255,255,255,0.9);
}
#setup-screen.theme-light .setup-engine-option:hover {
    background: rgba(255,255,255,1);
}
#setup-screen.theme-light .setup-engine-option i {
    filter: invert(1);
}

.setup-engine-option:hover {
    background: #222;
}

.setup-engine-option.active {
    border-color: var(--accent-color);
}

.setup-engine-option i {
    font-size: 36px;
    color: white;
}

.setup-engine-option span {
    color: white;
    font-size: 14px;
}

.setup-engine-option svg {
    width: 36px;
    height: 36px;
}

.setup-toggle-container {
    margin: 40px 0;
}

.setup-toggle-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    color: white;
    font-size: 16px;
}

/* 自由模式预览：图标散落摆放 */
.free-preview {
    position: relative;
}

.free-preview .layout-icon {
    position: absolute;
}

.free-preview .layout-icon:nth-child(1) {
    top: 18px;
    left: 18px;
}

.free-preview .layout-icon:nth-child(2) {
    top: 78px;
    left: 60px;
}

.free-preview .layout-icon:nth-child(3) {
    top: 40px;
    left: 100px;
}

/* 起始页模式预览：顶部搜索栏 + 下方图标行 */
.startpage-preview {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.startpage-search-bar {
    width: 80%;
    height: 14px;
    background: var(--accent-color);
    border-radius: 7px;
    opacity: 0.6;
}

.startpage-row {
    display: flex;
    gap: 16px;
}

.startpage-preview .layout-icon.small {
    width: 24px;
    height: 24px;
}

/* ===== 安装向导最后一步：其余偏好设置 ===== */
.setup-prefs {
    width: 100%;
    max-width: 520px;
    margin: 30px auto 0;
    text-align: left;
}

.setup-pref-section {
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

#setup-screen.theme-light .setup-pref-section {
    background: rgba(255, 255, 255, 0.9);
}

.setup-pref-section + .setup-pref-section {
    margin-top: 12px;
}

.setup-pref-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.setup-toggle-label {
    flex: 1;
}

.setup-toggle-title {
    font-size: 15px;
    font-weight: 600;
    color: white;
}

#setup-screen.theme-light .setup-toggle-title {
    color: #333;
}

.setup-toggle-desc {
    font-size: 12px;
    color: #bbb;
    margin-top: 4px;
    line-height: 1.5;
}

#setup-screen.theme-light .setup-toggle-desc {
    color: #888;
}

.setup-pref-title {
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 10px;
}

#setup-screen.theme-light .setup-pref-title {
    color: #333;
}

.setup-select-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.setup-select-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}

#setup-screen.theme-light .setup-select-option {
    background: rgba(0, 0, 0, 0.05);
}

.setup-select-option:hover {
    background: rgba(255, 255, 255, 0.15);
}

#setup-screen.theme-light .setup-select-option:hover {
    background: rgba(0, 0, 0, 0.1);
}

.setup-select-option.selected {
    background: color-mix(in srgb, var(--accent-color) 20%, transparent);
    border-color: var(--accent-color);
}

.setup-select-option i:first-child {
    font-size: 16px;
    color: #bbb;
    width: 20px;
    text-align: center;
}

#setup-screen.theme-light .setup-select-option i:first-child {
    color: #888;
}

.setup-select-option span {
    flex: 1;
    font-size: 13px;
    color: white;
}

#setup-screen.theme-light .setup-select-option span {
    color: #333;
}

.setup-select-option .setup-check {
    font-size: 12px;
    color: var(--accent-color);
    opacity: 0;
}

.setup-select-option.selected .setup-check {
    opacity: 1;
}

.setup-nav {
    margin-top: 40px;
}

/* ===== 移动端安装向导适配 ===== */
@media (max-width: 768px) {
    #setup-screen {
        overflow-y: auto;
    }

    .setup-container {
        width: 100%;
        max-width: 100%;
        padding: 24px 16px;
        box-sizing: border-box;
    }

    .setup-step.active {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* 桌面排列方式：2x2 网格 */
    .setup-layout-options {
        flex-wrap: wrap;
        gap: 12px;
        max-width: 100%;
        margin: 24px 0;
    }

    .setup-layout-option {
        flex: 0 0 calc(50% - 6px);
        width: auto;
        padding: 14px 8px;
        gap: 6px;
    }

    .setup-layout-option span {
        font-size: 13px;
    }

    .layout-preview {
        width: 120px;
        height: 120px;
    }

    .free-preview .layout-icon:nth-child(1) {
        top: 12px;
        left: 12px;
    }

    .free-preview .layout-icon:nth-child(2) {
        top: 64px;
        left: 50px;
    }

    .free-preview .layout-icon:nth-child(3) {
        top: 34px;
        left: 76px;
    }

    .startpage-preview {
        padding: 12px;
    }

    /* 其余偏好设置 */
    .setup-prefs {
        max-width: 100%;
        margin: 20px auto 0;
    }

    .setup-pref-section {
        padding: 14px 14px;
    }

    .setup-pref-toggle {
        gap: 12px;
    }

    .setup-toggle-title {
        font-size: 14px;
    }

    .setup-select-option {
        padding: 10px 10px;
    }

    .setup-nav {
        margin-top: 24px;
    }

    .setup-btn {
        padding: 10px 20px;
    }
}

.hidden {
    display: none !important;
}

:root {
    --taskbar-height: 48px;
    --title-bar-height: 32px;
    --accent-color: #187aff;
    --accent-hover: #0066dd;
    --window-bg: rgba(255, 255, 255, 0.55);
    --window-border: #e5e5e5;
    --window-titlebar-bg: rgba(255, 255, 255, 0.3);
    --window-content-bg: rgba(255, 255, 255, 0.95);
    --taskbar-bg: rgba(255, 255, 255, 0.85);
    --taskbar-blur: 20px;
    --taskbar-hover-bg: rgba(0, 0, 0, 0.05);
    --taskbar-active-bg: rgba(0, 0, 0, 0.05);
    --start-menu-bg: rgba(255, 255, 255, 0.85);
    --start-menu-blur: 20px;
    --start-menu-search-bg: #f5f5f5;
    --start-menu-app-hover-bg: rgba(0, 0, 0, 0.05);
    --text-color: #1a1a1a;
    --text-secondary: #666666;
    --icon-text-color: #333333;
    --icon-text-shadow: none;
    --widget-bg: rgba(255, 255, 255, 0.8);
    --widget-border: rgba(0, 0, 0, 0.1);
    --widget-header-bg: rgba(0, 0, 0, 0.05);
    --widget-text-color: #333333;
    --widget-text-secondary: rgba(0, 0, 0, 0.5);
    --widget-btn-bg: rgba(0, 0, 0, 0.1);
    --widget-input-bg: rgba(0, 0, 0, 0.05);
    --widget-input-border: rgba(0, 0, 0, 0.1);
    /* 待办事项在关闭高斯模糊时的背景（由 setWallpaperStyle 根据壁纸深浅动态设置） */
    --todo-blur-disabled-bg: rgba(255, 255, 255, 0.98);
    --settings-sidebar-bg: rgba(255, 255, 255, 0.3);
    --settings-sidebar-border: rgba(0, 0, 0, 0.1);
    --settings-main-bg: rgba(255, 255, 255, 0.2);
    --settings-header-bg: rgba(255, 255, 255, 0.4);
    --settings-header-border: rgba(0, 0, 0, 0.05);
    --page-section-bg: rgba(255, 255, 255, 0.6);
    --page-section-border: rgba(0, 0, 0, 0.05);
    --sidebar-item-hover-bg: rgba(0, 0, 0, 0.05);
    --info-item-border: rgba(0, 0, 0, 0.05);
    --input-bg: #ffffff;
    --input-border: #e5e5e5;
    --card-bg: #ffffff;
    --card-hover-bg: #f5f5f5;
    --scrollbar-thumb: rgba(0, 0, 0, 0.2);
    --scrollbar-track: transparent;
    --search-bg: rgba(255, 255, 255, 0.7);
    --search-border: rgba(255, 255, 255, 0.5);
    --search-text: #333333;
    --search-placeholder: #999999;
    --search-icon: #666666;
    --notepad-toolbar-bg: rgba(255, 255, 255, 0.3);
    --notepad-btn-bg: rgba(255, 255, 255, 0.5);
    --notepad-btn-hover-bg: rgba(255, 255, 255, 0.7);
    --notepad-sidebar-bg: rgba(255, 255, 255, 0.4);
    --notepad-header-bg: rgba(255, 255, 255, 0.3);
    --notepad-item-hover-bg: #f0f0f0;
    --notepad-content-bg: rgba(255, 255, 255, 0.95);
    --context-menu-bg: rgba(255, 255, 255, 0.85);
    --context-menu-border: rgba(255, 255, 255, 0.5);
    --calendar-bg: rgba(255, 255, 255, 0.4);
    --calendar-header-bg: rgba(255, 255, 255, 0.6);
    --calendar-hover-bg: rgba(0, 0, 0, 0.05);
    --explorer-sidebar-bg: rgba(255, 255, 255, 0.5);
    --explorer-main-bg: rgba(255, 255, 255, 0.95);
    --explorer-toolbar-bg: rgba(255, 255, 255, 0.6);
    --explorer-hover-bg: rgba(0, 0, 0, 0.05);
    --calculator-display-bg: #f5f5f5;
    --calculator-number-bg: #f5f5f5;
    --calculator-number-hover-bg: #ebebeb;
    --calculator-operator-bg: #f0f0f0;
    --calculator-operator-hover-bg: #e5e5e5;
    --calculator-clear-bg: #fef2f2;
    --calculator-clear-hover-bg: #fee2e2;
    --music-container-bg: rgba(255, 255, 255, 0.4);
    --music-progress-bg: #e0e0e0;
    --music-btn-hover-bg: rgba(0, 0, 0, 0.05);
    --photos-toolbar-bg: rgba(255, 255, 255, 0.5);
    --photos-sidebar-bg: rgba(255, 255, 255, 0.5);
    --photos-main-bg: rgba(255, 255, 255, 0.95);
    --photos-toolbar-btn-bg: rgba(0, 0, 0, 0.05);
    --photos-toolbar-btn-border: rgba(0, 0, 0, 0.1);
    --photos-toolbar-btn-hover-bg: rgba(0, 0, 0, 0.1);
    --photos-sidebar-hover-bg: rgba(0, 0, 0, 0.05);
    --about-version-bg: #f5f5f5;
    --about-version-hover-bg: #e5e5e5;
    --code-textarea-bg: rgba(0, 0, 0, 0.05);
    --carousel-bg: #f8f9fa;
    --minimal-search-bg: rgba(255, 255, 255, 0.85);
    --minimal-search-border: rgba(0, 0, 0, 0.15);
    --minimal-search-icon: #666;
    --minimal-search-text: #333;
    --minimal-suggestions-bg: rgba(255, 255, 255, 0.95);
    --minimal-suggestions-border: rgba(0, 0, 0, 0.08);
    --minimal-suggestion-icon: #666;
    --minimal-suggestion-text: #333;
    --minimal-btn-bg: rgba(255, 255, 255, 0.9);
    --minimal-btn-border: rgba(0, 0, 0, 0.12);
    --minimal-btn-text: #444;
    --minimal-panel-bg: rgba(255, 255, 255, 0.85);
    --minimal-panel-border: rgba(0, 0, 0, 0.08);
    --minimal-panel-text: #333;
    --minimal-panel-text-secondary: #888;
    --minimal-panel-divider: rgba(0, 0, 0, 0.08);
    --minimal-select-bg: rgba(0, 0, 0, 0.03);
    --minimal-select-border: rgba(0, 0, 0, 0.1);
    --error-overlay-bg: #ffffff;
    --error-overlay-text: #333333;
    --error-overlay-hint: #666666;
    --error-overlay-message-bg: #f5f5f5;
    --error-overlay-message-border: #e0e0e0;
    --error-btn-secondary-bg: #e0e0e0;
    --error-btn-secondary-text: #333333;
    --form-input-bg: #ffffff;
    --form-input-border: rgba(0, 0, 0, 0.12);
    --icon-selector-bg: #ffffff;
    --icon-selector-border: rgba(0, 0, 0, 0.12);
    --icon-selector-hover-bg: #f8f8f8;
    --dialog-bg: #ffffff;
    --dialog-border: rgba(0, 0, 0, 0.08);
    --dialog-header-bg: #f5f5f5;
    --dialog-header-border: rgba(0, 0, 0, 0.06);
    --dialog-close-hover-bg: rgba(0, 0, 0, 0.06);
    --creator-tabs-bg: #f5f5f5;
    --creator-tab-border: rgba(0, 0, 0, 0.06);
    --dialog-footer-border: rgba(0, 0, 0, 0.06);
    --btn-cancel-bg: rgba(0, 0, 0, 0.05);
    --btn-cancel-hover-bg: rgba(0, 0, 0, 0.1);
    --btn-cancel-text: var(--text-secondary);
    /* 统一按钮设计体系：主要 / 次要 / 危险 */
    --btn-primary-bg: var(--accent-color);
    --btn-primary-hover: var(--accent-hover);
    --btn-primary-text: #ffffff;
    --btn-secondary-bg: transparent;
    --btn-secondary-hover: rgba(0, 0, 0, 0.06);
    --btn-secondary-text: var(--text-color);
    --btn-secondary-border: rgba(0, 0, 0, 0.18);
    --btn-danger-bg: #e81123;
    --btn-danger-hover: #c50f1f;
    --btn-danger-text: #ffffff;
}

body.dark-mode {
    --window-bg: rgba(32, 32, 36, 0.55);
    --window-border: rgba(255, 255, 255, 0.1);
    --window-titlebar-bg: rgba(32, 32, 36, 0.3);
    --window-content-bg: rgba(32, 32, 36, 0.95);
    --text-color: #e0e0e0;
    --text-secondary: #999999;
    --icon-text-color: #ffffff;
    --icon-text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8), 0 0 8px rgba(0, 0, 0, 0.5), 1px 0 0 rgba(0, 0, 0, 0.4), -1px 0 0 rgba(0, 0, 0, 0.4), 0 1px 0 rgba(0, 0, 0, 0.4), 0 -1px 0 rgba(0, 0, 0, 0.4);
    --widget-bg: rgba(32, 32, 36, 0.8);
    --widget-border: rgba(255, 255, 255, 0.1);
    --widget-header-bg: rgba(255, 255, 255, 0.05);
    --widget-text-color: #e0e0e0;
    --widget-text-secondary: rgba(255, 255, 255, 0.6);
    --widget-btn-bg: rgba(255, 255, 255, 0.1);
    --widget-input-bg: rgba(255, 255, 255, 0.05);
    --widget-input-border: rgba(255, 255, 255, 0.1);
    --settings-sidebar-bg: rgba(32, 32, 36, 0.3);
    --settings-sidebar-border: rgba(255, 255, 255, 0.1);
    --settings-main-bg: rgba(32, 32, 36, 0.2);
    --settings-header-bg: rgba(32, 32, 36, 0.4);
    --settings-header-border: rgba(255, 255, 255, 0.05);
    --page-section-bg: rgba(32, 32, 36, 0.6);
    --page-section-border: rgba(255, 255, 255, 0.05);
    --sidebar-item-hover-bg: rgba(255, 255, 255, 0.05);
    --info-item-border: rgba(255, 255, 255, 0.05);
    --input-bg: #2a2a2e;
    --input-border: rgba(255, 255, 255, 0.1);
    --card-bg: #2a2a2e;
    --card-hover-bg: #3a3a3e;
    --scrollbar-thumb: rgba(255, 255, 255, 0.2);
    --scrollbar-track: transparent;
    --search-bg: rgba(32, 32, 36, 0.7);
    --search-border: rgba(255, 255, 255, 0.1);
    --search-text: #e0e0e0;
    --search-placeholder: #666666;
    --search-icon: #999999;
    --notepad-toolbar-bg: rgba(255, 255, 255, 0.05);
    --notepad-btn-bg: rgba(255, 255, 255, 0.1);
    --notepad-btn-hover-bg: rgba(255, 255, 255, 0.15);
    --notepad-sidebar-bg: rgba(255, 255, 255, 0.05);
    --notepad-header-bg: rgba(255, 255, 255, 0.05);
    --notepad-item-hover-bg: rgba(255, 255, 255, 0.05);
    --notepad-content-bg: rgba(32, 32, 36, 0.95);
    --context-menu-bg: rgba(32, 32, 36, 0.9);
    --context-menu-border: rgba(255, 255, 255, 0.1);
    --calendar-bg: rgba(32, 32, 36, 0.7);
    --calendar-header-bg: rgba(255, 255, 255, 0.05);
    --calendar-hover-bg: rgba(255, 255, 255, 0.05);
    --explorer-sidebar-bg: rgba(32, 32, 36, 0.5);
    --explorer-main-bg: rgba(32, 32, 36, 0.95);
    --explorer-toolbar-bg: rgba(32, 32, 36, 0.6);
    --explorer-hover-bg: rgba(255, 255, 255, 0.05);
    --calculator-display-bg: #2a2a2e;
    --calculator-number-bg: #2a2a2e;
    --calculator-number-hover-bg: #3a3a3e;
    --calculator-operator-bg: #3a3a3e;
    --calculator-operator-hover-bg: #4a4a4e;
    --calculator-clear-bg: rgba(220, 38, 38, 0.2);
    --calculator-clear-hover-bg: rgba(220, 38, 38, 0.3);
    --music-container-bg: rgba(32, 32, 36, 0.4);
    --music-progress-bg: rgba(255, 255, 255, 0.1);
    --music-btn-hover-bg: rgba(255, 255, 255, 0.05);
    --photos-toolbar-bg: rgba(32, 32, 36, 0.5);
    --photos-sidebar-bg: rgba(32, 32, 36, 0.5);
    --photos-main-bg: rgba(32, 32, 36, 0.95);
    --photos-toolbar-btn-bg: rgba(255, 255, 255, 0.05);
    --photos-toolbar-btn-border: rgba(255, 255, 255, 0.1);
    --photos-toolbar-btn-hover-bg: rgba(255, 255, 255, 0.1);
    --photos-sidebar-hover-bg: rgba(255, 255, 255, 0.05);
    --about-version-bg: #2a2a2e;
    --about-version-hover-bg: #3a3a3e;
    --code-textarea-bg: rgba(255, 255, 255, 0.05);
    --carousel-bg: #1e1e2e;
    --minimal-search-bg: rgba(32, 32, 36, 0.85);
    --minimal-search-border: rgba(255, 255, 255, 0.15);
    --minimal-search-icon: #999;
    --minimal-search-text: #e0e0e0;
    --minimal-suggestions-bg: rgba(32, 32, 36, 0.95);
    --minimal-suggestions-border: rgba(255, 255, 255, 0.08);
    --minimal-suggestion-icon: #999;
    --minimal-suggestion-text: #e0e0e0;
    --minimal-btn-bg: rgba(32, 32, 36, 0.9);
    --minimal-btn-border: rgba(255, 255, 255, 0.12);
    --minimal-btn-text: #e0e0e0;
    --minimal-panel-bg: rgba(32, 32, 36, 0.85);
    --minimal-panel-border: rgba(255, 255, 255, 0.08);
    --minimal-panel-text: #e0e0e0;
    --minimal-panel-text-secondary: #999;
    --minimal-panel-divider: rgba(255, 255, 255, 0.08);
    --minimal-select-bg: rgba(255, 255, 255, 0.03);
    --minimal-select-border: rgba(255, 255, 255, 0.1);
    --error-overlay-bg: #2a2a2e;
    --error-overlay-text: #e0e0e0;
    --error-overlay-hint: #999999;
    --error-overlay-message-bg: #1e1e2e;
    --error-overlay-message-border: rgba(255, 255, 255, 0.1);
    --error-btn-secondary-bg: #3a3a3e;
    --error-btn-secondary-text: #e0e0e0;
    --form-input-bg: #2a2a2e;
    --form-input-border: rgba(255, 255, 255, 0.1);
    --icon-selector-bg: #2a2a2e;
    --icon-selector-border: rgba(255, 255, 255, 0.1);
    --icon-selector-hover-bg: #3a3a3e;
    --dialog-bg: #2a2a2e;
    --dialog-border: rgba(255, 255, 255, 0.08);
    --dialog-header-bg: #1e1e2e;
    --dialog-header-border: rgba(255, 255, 255, 0.06);
    --dialog-close-hover-bg: rgba(255, 255, 255, 0.06);
    --creator-tabs-bg: #1e1e2e;
    --creator-tab-border: rgba(255, 255, 255, 0.06);
    --dialog-footer-border: rgba(255, 255, 255, 0.06);
    --btn-cancel-bg: rgba(255, 255, 255, 0.05);
    --btn-cancel-hover-bg: rgba(255, 255, 255, 0.1);
    --btn-cancel-text: var(--text-secondary);
    /* 统一按钮设计体系：主要 / 次要 / 危险 */
    --btn-primary-bg: var(--accent-color);
    --btn-primary-hover: var(--accent-hover);
    --btn-primary-text: #ffffff;
    --btn-secondary-bg: transparent;
    --btn-secondary-hover: rgba(255, 255, 255, 0.08);
    --btn-secondary-text: var(--text-color);
    --btn-secondary-border: rgba(255, 255, 255, 0.18);
    --btn-danger-bg: #e81123;
    --btn-danger-hover: #c50f1f;
    --btn-danger-text: #ffffff;
}

body.dark-mode {
    --taskbar-bg: rgba(32, 32, 36, var(--taskbar-transparency, 0.85));
    --taskbar-hover-bg: rgba(255, 255, 255, 0.1);
    --taskbar-active-bg: rgba(255, 255, 255, 0.1);
    --start-menu-bg: rgba(32, 32, 36, var(--start-menu-transparency, 0.85));
    --start-menu-search-bg: rgba(255, 255, 255, 0.08);
    --start-menu-app-hover-bg: rgba(255, 255, 255, 0.1);
}

body {
    --taskbar-bg: rgba(255, 255, 255, var(--taskbar-transparency, 0.85));
    --taskbar-blur: var(--taskbar-blur-amount, 20px);
    --start-menu-bg: rgba(255, 255, 255, var(--start-menu-transparency, 0.85));
    --start-menu-blur: var(--start-menu-blur-amount, 20px);
    color: var(--text-color);
    overflow: hidden;
    user-select: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    /* 高度由全局 html, body 规则（--app-viewport-h / 100dvh）统一控制，
       避免 iPad Safari 隐藏状态栏后 100vh 不变导致的布局错位。*/
    position: relative;
}

/* ========== 错误覆盖层 ========== */
#error-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: fadeIn 0.3s ease;
}

#error-overlay.hidden {
    display: none;
}

.error-overlay-content {
    background: var(--error-overlay-bg);
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

.error-overlay-icon {
    font-size: 64px;
    color: #ff6b6b;
    margin-bottom: 20px;
}

.error-overlay-content h2 {
    color: var(--error-overlay-text);
    margin-bottom: 16px;
    font-size: 24px;
}

.error-overlay-message {
    background: var(--error-overlay-message-bg);
    border: 1px solid var(--error-overlay-message-border);
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    color: #d32f2f;
    text-align: left;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.error-overlay-hint {
    color: var(--error-overlay-hint);
    font-size: 14px;
    margin-bottom: 24px;
}

.error-overlay-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.error-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-btn-clear {
    background: #ff6b6b;
    color: white;
}

.error-btn-clear:hover {
    background: #ff5252;
}

.error-btn-reload {
    background: var(--error-btn-secondary-bg);
    color: var(--error-btn-secondary-text);
}

.error-btn-reload:hover {
    filter: brightness(1.1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.glow-disabled {
    background: #f0f0f0;
}

body.glow-disabled::before,
body.glow-disabled::after {
    display: none;
}

/* 关闭高斯模糊时，所有非个性化定制的透明窗口改为不透明以保证可读性。
   注意：#taskbar / #start-menu / #volume-popup 使用个性化定制变量
   (--taskbar-transparency / --start-menu-transparency)，保持用户自定义，不覆盖。 */
body.blur-disabled,
body.blur-disabled * {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

/* 窗口主体及内部区域 */
body.blur-disabled .window,
body.blur-disabled .window-titlebar,
body.blur-disabled .window-content {
    background: rgba(255, 255, 255, 0.98) !important;
}

/* 设置/资源管理器/记事本/照片 侧栏与内容区 */
body.blur-disabled .settings-sidebar,
body.blur-disabled .settings-main,
body.blur-disabled .photos-sidebar,
body.blur-disabled .explorer-sidebar,
body.blur-disabled .explorer-content,
body.blur-disabled .notes-list-container,
body.blur-disabled .notepad-content,
body.blur-disabled .calendar-container {
    background: rgba(255, 255, 255, 0.98) !important;
}

/* 桌面小组件 */
body.blur-disabled .widget {
    background: rgba(255, 255, 255, 0.98) !important;
}

/* 对话框与通知 */
body.blur-disabled .dialog-content,
body.blur-disabled .notification-content {
    background: #ffffff !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

/* 右键菜单 */
body.blur-disabled #context-menu,
body.blur-disabled #text-context-menu,
body.blur-disabled #taskbar-context-menu,
body.blur-disabled #shortcut-context-menu,
body.blur-disabled #widget-context-menu,
body.blur-disabled #miniprogram-context-menu,
body.blur-disabled .context-submenu-content {
    background: rgba(255, 255, 255, 0.98) !important;
}

body.dark-mode.blur-disabled #context-menu,
body.dark-mode.blur-disabled #text-context-menu,
body.dark-mode.blur-disabled #taskbar-context-menu,
body.dark-mode.blur-disabled #shortcut-context-menu,
body.dark-mode.blur-disabled #widget-context-menu,
body.dark-mode.blur-disabled #miniprogram-context-menu,
body.dark-mode.blur-disabled .context-submenu-content {
    background: rgba(32, 32, 36, 0.98) !important;
}

body.dark-mode.blur-disabled .dialog-content,
body.dark-mode.blur-disabled .notification-content {
    background: rgba(32, 32, 36, 0.98) !important;
}

/* 搜索栏与搜索建议 */
body.blur-disabled .search-container,
body.blur-disabled .search-suggestions,
body.blur-disabled #search-widget-menu,
body.blur-disabled .icon-selector-panel {
    background: #ffffff !important;
}

/* 深色主题元素（照片查看器、Toast 提示）保持深色但提高不透明度 */
body.blur-disabled .photo-viewer-window,
body.blur-disabled .photo-viewer-window .window-titlebar,
body.blur-disabled .photo-viewer-window .window-content {
    background: rgba(20, 20, 20, 0.98) !important;
}

body.blur-disabled .toast-notification {
    background: rgba(30, 30, 30, 0.98) !important;
}

/* 最小模式元素 */
body.blur-disabled #minimal-search-input,
body.blur-disabled #minimal-exit-btn,
body.blur-disabled #minimal-settings-panel,
body.blur-disabled #minimal-pinned-apps {
    background: rgba(255, 255, 255, 0.98) !important;
}

/* 待办事项：深色壁纸下关闭高斯模糊时使用深色背景，避免白底白字重合 */
body.blur-disabled #todo-widget {
    background: var(--todo-blur-disabled-bg) !important;
}

body.titlebar-blur-only .window {
    background: transparent !important;
}

body.titlebar-blur-only .window-titlebar {
    background: rgba(255, 255, 255, 0.8) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    backdrop-filter: blur(20px) !important;
}

body.dark-mode.titlebar-blur-only .window-titlebar {
    background: rgba(32, 32, 36, 0.85) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    backdrop-filter: blur(20px) !important;
}

body.titlebar-blur-only .window-content {
    background: var(--window-content-bg);
}

body.titlebar-blur-only .window-content * {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

body.titlebar-blur-only .photo-viewer-window {
    background: rgba(26, 26, 26, 0.98) !important;
}

body.titlebar-blur-only .photo-viewer-window .window-content {
    background: rgba(13, 13, 13, 0.98) !important;
}

body.titlebar-blur-only .photo-viewer-window .window-titlebar {
    background: rgba(30, 30, 30, 0.8) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    backdrop-filter: blur(20px) !important;
}

body:not(.titlebar-blur-only) .settings-sidebar,
body:not(.titlebar-blur-only) .settings-main,
body:not(.titlebar-blur-only) .settings-header,
body:not(.titlebar-blur-only) .explorer-sidebar,
body:not(.titlebar-blur-only) .explorer-content,
body:not(.titlebar-blur-only) .photos-sidebar,
body:not(.titlebar-blur-only) .notes-list-container,
body:not(.titlebar-blur-only) .notepad-content {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

body.glow-disabled .settings-main {
    background: #f5f5f5;
}

body.dark-mode.glow-disabled .settings-main {
    background: rgba(32, 32, 36, 0.9);
}

body.glow-disabled .window-splash {
    background: var(--accent-color);
}

body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 107, 107, 0.4) 0%, transparent 30%),
        radial-gradient(circle at 80% 20%, rgba(78, 205, 196, 0.4) 0%, transparent 30%),
        radial-gradient(circle at 40% 40%, rgba(255, 193, 7, 0.3) 0%, transparent 25%),
        radial-gradient(circle at 60% 70%, rgba(106, 100, 192, 0.4) 0%, transparent 30%),
        radial-gradient(circle at 10% 30%, color-mix(in srgb, var(--accent-color) 30%, transparent) 0%, transparent 25%),
        radial-gradient(circle at 90% 90%, rgba(255, 159, 64, 0.3) 0%, transparent 25%);
    animation: bubbleFloat 20s ease-in-out infinite;
    pointer-events: none;
}

body::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 30% 20%, rgba(129, 236, 236, 0.3) 0%, transparent 25%),
        radial-gradient(circle at 70% 80%, rgba(255, 118, 117, 0.3) 0%, transparent 30%),
        radial-gradient(circle at 50% 50%, rgba(162, 155, 254, 0.3) 0%, transparent 35%);
    animation: bubbleFloat2 25s ease-in-out infinite;
    pointer-events: none;
}

@keyframes bubbleFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(2%, 3%) rotate(5deg); }
    50% { transform: translate(-1%, 5%) rotate(-3deg); }
    75% { transform: translate(3%, -2%) rotate(2deg); }
}

@keyframes bubbleFloat2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-3%, 2%) rotate(-5deg); }
    66% { transform: translate(2%, -3%) rotate(3deg); }
}

#desktop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    background: transparent;
}

.bing-wallpaper-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.8s ease;
    z-index: 0;
    pointer-events: none;
}

.bing-wallpaper-layer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.55) 100%);
    pointer-events: none;
}

.bing-wallpaper-layer.loaded {
    opacity: 1;
}

/* ===== 设置流程：Bing 每日壁纸增强可读性 =====
   Bing 壁纸色彩/明暗不可预测，偏好设置页中的文字极易看不清。
   解决：为壁纸整体加上高斯模糊 + 深色遮罩叠层，
   让前景的设置选项（卡片、标题、开关、单选）与背景有足够对比。*/
#setup-screen .bing-wallpaper-layer {
    /* 整体壁纸覆盖高斯模糊：saturate 保持色彩不会发灰 */
    filter: blur(22px) saturate(1.15);
    -webkit-filter: blur(22px) saturate(1.15);
    /* 放大一点补偿模糊造成的边缘透明光晕 */
    transform: scale(1.06);
    -webkit-transform: scale(1.06);
    /* 模糊 + 放大 过渡，与加载淡入同时播放 */
    transition: filter 0.8s ease, -webkit-filter 0.8s ease, transform 0.8s ease, -webkit-transform 0.8s ease, opacity 0.8s ease;
}

#setup-screen .bing-wallpaper-layer::after {
    /* 在壁纸上面叠一层深色遮罩：
       - 四周：比之前更强的 vignette
       - 中间：由纯透明改为 35% 黑色，保证偏好设置文字即使在亮色壁纸中央也能看清 */
    background:
        linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.35) 50%, rgba(0,0,0,0.5) 100%),
        radial-gradient(ellipse at center, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.6) 100%);
}

/* 视频壁纸层 - 用于动态视频壁纸 */
.video-wallpaper-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
    background: #000;
}

/* 焦点模糊遮罩层 - 放在壁纸前面，模糊壁纸内容 */
#desktop-blur-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 1;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition: backdrop-filter 0.5s ease-in-out, -webkit-backdrop-filter 0.5s ease-in-out;
}

#desktop-blur-overlay.active {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#desktop-icons {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 8px;
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: calc(20px + var(--taskbar-height));
    align-content: flex-start;
    overflow: auto;
    transition: flex-direction 0.3s ease;
    z-index: 2;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 86px;
    height: 90px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    box-sizing: border-box;
    overflow: hidden;
}

.desktop-icon:hover {
    background: rgba(255, 255, 255, 0.15);
}

.desktop-icon:active {
    background: rgba(255, 255, 255, 0.25);
}

.desktop-folder.folder-drop-hover {
    background: rgba(255, 193, 7, 0.3);
    transform: scale(1.05);
}

.desktop-folder .folder-icon-img {
    background: rgba(120, 120, 120, 0.4) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
}

.desktop-folder .folder-default-icon {
    color: #ffc107;
    font-size: 24px;
}

.folder-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
    width: 100%;
    height: 100%;
    padding: 6px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.folder-preview-icon {
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    overflow: hidden;
}

/* 文件夹预览中的图片图标（data URL / favicon 外链） */
.folder-preview-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

/* 文件夹图标预览的剩余数量角标：项目超过4个时在预览窗口（.folder-preview-grid）的右下角显示 +N */
.folder-preview-more {
    position: absolute;
    right: 8px;
    bottom: 8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-sizing: border-box;
    display: inline-flex;
    width: auto;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 3;
}
/* 大图标模式下角标位置同样跟随预览窗口 padding 内边距 */
body.desktop-large-icons .folder-preview-more {
    right: 10px;
    bottom: 10px;
}
/* 预览网格内的角标：作为 grid 直接子元素时，防止被 grid 布局拉伸 */
.folder-preview-grid > .folder-preview-more {
    grid-column: unset;
    grid-row: unset;
    width: auto;
    height: 16px;
}
/* 新建文件夹图标右下角的"+N"数字角标：
   浅色模式下存在 color 被 body 的 var(--text-color) 继承 / 覆盖的情况，
   导致深色底黑字完全看不清。显式声明：无论深浅主题，一律保持深色半透明底 + 白字。 */
body .folder-preview-more,
body.desktop-large-icons .folder-preview-more,
body.layout-startpage .folder-preview-more,
.folder-preview-grid > .folder-preview-more {
    background: rgba(0, 0, 0, 0.7) !important;
    color: #ffffff !important;
}

.folder-window {
    position: absolute;
    background: var(--widget-bg, rgba(255, 255, 255, 0.8));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--widget-border, rgba(0, 0, 0, 0.1));
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transform-origin: top left;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
                opacity 0.25s ease;
}

.folder-window.closing {
    pointer-events: none;
}

.folder-window-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    cursor: move;
    user-select: none;
}

.folder-window-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--widget-text-color, #333);
    display: flex;
    align-items: center;
}

.folder-window-close {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    color: var(--widget-text-color, #666);
    font-size: 12px;
    transition: background 0.15s;
}

.folder-window-close:hover {
    background: rgba(0, 0, 0, 0.08);
}

.folder-window-content {
    height: calc(100% - 45px);
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 8px;
}

.folder-item-icon {
    width: 80px !important;
    height: 80px !important;
}

.folder-window-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.folder-window-view-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: var(--widget-text-color, #666);
    background: transparent;
    font-size: 12px;
    transition: background 0.15s, color 0.15s;
}

.folder-window-view-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

.folder-window-view-btn.active {
    color: #187aff;
}

/* 文件夹窗口 - 大图标模式 */
.folder-window.folder-large-mode .folder-window-content {
    gap: 14px;
    padding: 18px;
}

.folder-window.folder-large-mode .folder-item-icon {
    width: 120px !important;
    height: 132px !important;
    justify-content: flex-start;
}

.folder-window.folder-large-mode .folder-item-icon .icon-img {
    width: 84px !important;
    height: 84px !important;
    font-size: 40px;
    border-radius: 20px;
    margin-bottom: 8px;
}

.folder-window.folder-large-mode .folder-item-icon span {
    font-size: 13px;
    line-height: 1.25;
    max-width: 116px;
    display: block;
    white-space: normal;
    word-break: break-word;
    overflow: hidden;
    max-height: 32px;
    width: 100%;
    box-sizing: border-box;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

/* 桌面文件夹悬停大预览 */
.folder-hover-preview {
    position: fixed;
    z-index: 100000;
    min-width: 200px;
    max-width: 360px;
    background: var(--widget-bg, rgba(255, 255, 255, 0.92));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--widget-border, rgba(0, 0, 0, 0.1));
    border-radius: 12px;
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.18);
    padding: 12px;
    box-sizing: border-box;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.92);
    transform-origin: top left;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.folder-hover-preview.folder-hover-preview-visible {
    opacity: 1;
    transform: scale(1);
}

.folder-hover-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--widget-text-color, #333);
    display: flex;
    align-items: center;
    padding: 2px 2px 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-hover-empty {
    text-align: center;
    color: var(--widget-text-secondary, rgba(0, 0, 0, 0.5));
    font-size: 13px;
    padding: 20px 0;
}

.folder-hover-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
    gap: 10px;
    max-height: 260px;
    overflow-y: auto;
}

.folder-hover-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.folder-hover-item .icon-img {
    width: 56px;
    height: 56px;
    font-size: 26px;
    border-radius: 14px;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    overflow: hidden;
}

.folder-hover-item .icon-img img,
.folder-hover-item .icon-img i {
    display: block;
    max-width: 70%;
    max-height: 70%;
}

.folder-hover-item-name {
    font-size: 11px;
    color: var(--widget-text-color, #333);
    text-align: center;
    max-width: 78px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-hover-item .icon-img .mp-badge {
    position: absolute;
    bottom: -3px;
    right: -3px;
}

.folder-empty-tip {
    width: 100%;
    text-align: center;
    color: var(--widget-text-secondary, rgba(0, 0, 0, 0.5));
    font-size: 13px;
    padding: 40px 0;
}

.folder-rename-input {
    padding: 2px 6px;
    font-size: 12px;
    border: 1px solid #187aff;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    outline: none;
    text-align: center;
    width: 70px;
}

.desktop-icon .icon-img {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 6px;
    border-radius: 12px;
    color: white;
    flex-shrink: 0;
}

/* 图标风格 - 无界 */
body.icon-style-borderless .desktop-icon .icon-img {
    background: transparent !important;
    color: var(--icon-text-color, var(--accent-color));
    font-size: 32px;
    width: 48px;
    height: 48px;
}

body.icon-style-borderless .desktop-icon .icon-img i {
    color: inherit;
}

/* 图标风格 - 液态玻璃 */
body.icon-style-liquid .desktop-icon .icon-img {
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1), inset 0 1px 1px rgba(255,255,255,0.3), inset 0 -1px 1px rgba(0,0,0,0.05);
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
}

body.icon-style-liquid .desktop-icon .icon-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.25), transparent);
    border-radius: 12px 12px 0 0;
    pointer-events: none;
}

body.icon-style-liquid .desktop-icon .icon-img i {
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(255,255,255,0.4), 0 0 8px rgba(255,255,255,0.2);
    filter: drop-shadow(0 0 1px rgba(255,255,255,0.3));
    opacity: 0.95;
}

/* 图标风格 - 拟物 */
body.icon-style-skeuomorphic .desktop-icon .icon-img {
    box-shadow: 2px 2px 5px rgba(0,0,0,0.35), inset 1px 1px 2px rgba(255,255,255,0.4), inset -1px -1px 2px rgba(0,0,0,0.2);
    border: 1px solid rgba(0,0,0,0.15);
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}

body.icon-style-skeuomorphic .desktop-icon .icon-img i {
    text-shadow: 0 1px 2px rgba(0,0,0,0.5), 0 -1px 1px rgba(255,255,255,0.3);
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.4));
}

body.icon-style-skeuomorphic .desktop-icon:active .icon-img {
    box-shadow: 1px 1px 2px rgba(0,0,0,0.35), inset 1px 1px 2px rgba(255,255,255,0.2);
    transform: translateY(1px);
}

body.icon-style-skeuomorphic .desktop-icon:active .icon-img i {
    text-shadow: 0 1px 1px rgba(0,0,0,0.4);
    filter: drop-shadow(0 0 1px rgba(0,0,0,0.3));
}

/* ====== 焦点模糊效果 ====== */

/* 焦点在桌面时：背景模糊 */
#desktop.focus-blur-active {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* 焦点不在 KJ 时：取消模糊，图标 80% 透明 */
#desktop.focus-blur-inactive {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

#desktop.focus-blur-inactive .desktop-icon {
    opacity: 0.8;
}

/* ====== 图标风格 - 任务栏图标 ====== */

/* 无界风格 */
body.icon-style-borderless .taskbar-app i {
    font-size: 24px;
}

/* 液态玻璃风格 - 给任务栏图标加背景容器 */
body.icon-style-liquid .taskbar-app {
    width: 36px;
    height: 32px;
    border-radius: 8px;
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08), inset 0 1px 1px rgba(255,255,255,0.25), inset 0 -1px 1px rgba(0,0,0,0.04);
    border: 1px solid rgba(255,255,255,0.18);
    position: relative;
    overflow: hidden;
}

body.icon-style-liquid .taskbar-app::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.2), transparent);
    border-radius: 7px 7px 0 0;
    pointer-events: none;
}

body.icon-style-liquid .taskbar-app i {
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(255,255,255,0.4), 0 0 6px rgba(255,255,255,0.15);
    filter: drop-shadow(0 0 1px rgba(255,255,255,0.3));
    opacity: 0.95;
}

body.icon-style-liquid .taskbar-app.active {
    background: color-mix(in srgb, var(--accent-color) 15%, transparent);
}

body.icon-style-liquid .taskbar-app:hover {
    background: rgba(0,0,0,0.06);
}

/* 拟物风格 - 给任务栏图标加背景容器 */
body.icon-style-skeuomorphic .taskbar-app {
    width: 34px;
    height: 30px;
    border-radius: 6px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--accent-color) 40%, white), color-mix(in srgb, var(--accent-color) 25%, #ccc));
    box-shadow: 1px 2px 4px rgba(0,0,0,0.2), inset 0 1px 1px rgba(255,255,255,0.5), inset -1px -1px 1px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.12);
}

body.icon-style-skeuomorphic .taskbar-app i {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15));
}

body.icon-style-skeuomorphic .taskbar-app.active {
    background: linear-gradient(145deg, color-mix(in srgb, var(--accent-color) 60%, white), color-mix(in srgb, var(--accent-color) 45%, #ddd));
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.15), 0 1px 1px rgba(255,255,255,0.4);
}

body.icon-style-skeuomorphic .taskbar-app:hover {
    background: linear-gradient(145deg, color-mix(in srgb, var(--accent-color) 50%, white), color-mix(in srgb, var(--accent-color) 35%, #bbb));
}

body.icon-style-skeuomorphic .taskbar-app:active {
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
    transform: translateY(1px);
}

/* 液态玻璃和拟物模式隐藏任务栏底部小横条 */
body.icon-style-liquid .taskbar-app.active::after,
body.icon-style-skeuomorphic .taskbar-app.active::after {
    display: none;
}

/* ====== 图标风格 - 标题栏图标 ====== */

/* 无界风格 */
body.icon-style-borderless .window-icon i {
    font-size: 16px;
}

/* ====== 图标风格 - 开始菜单图标 ====== */

/* 无界风格 */
body.icon-style-borderless .app-item .icon-wrapper {
    background: transparent !important;
    color: var(--accent-color);
    font-size: 24px;
}

body.icon-style-borderless .app-item .icon-wrapper i {
    color: inherit;
}

/* 液态玻璃风格 - 保留原始背景色，叠加玻璃效果 */
body.icon-style-liquid .app-item .icon-wrapper {
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1), inset 0 1px 1px rgba(255,255,255,0.3), inset 0 -1px 1px rgba(0,0,0,0.05);
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
}

body.icon-style-liquid .app-item .icon-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.25), transparent);
    border-radius: 10px 10px 0 0;
    pointer-events: none;
}

body.icon-style-liquid .app-item .icon-wrapper i {
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(255,255,255,0.4), 0 0 8px rgba(255,255,255,0.2);
    filter: drop-shadow(0 0 1px rgba(255,255,255,0.3));
    opacity: 0.95;
}

/* 拟物风格 - 保留原始背景色，叠加立体效果 */
body.icon-style-skeuomorphic .app-item .icon-wrapper {
    box-shadow: 2px 2px 5px rgba(0,0,0,0.35), inset 1px 1px 2px rgba(255,255,255,0.4), inset -1px -1px 2px rgba(0,0,0,0.2);
    border: 1px solid rgba(0,0,0,0.15);
}

body.icon-style-skeuomorphic .app-item .icon-wrapper i {
    text-shadow: 0 1px 2px rgba(0,0,0,0.5), 0 -1px 1px rgba(255,255,255,0.3);
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.4));
}

/* 液态玻璃风格 - 给标题栏图标加背景容器 */
body.icon-style-liquid .window-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
    box-shadow: 0 1px 6px rgba(0,0,0,0.08), inset 0 1px 1px rgba(255,255,255,0.25), inset 0 -1px 1px rgba(0,0,0,0.04);
    border: 1px solid rgba(255,255,255,0.18);
    position: relative;
    overflow: hidden;
}

body.icon-style-liquid .window-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.2), transparent);
    border-radius: 4px 4px 0 0;
    pointer-events: none;
}

body.icon-style-liquid .window-icon i {
    position: relative;
    z-index: 1;
    font-size: 13px;
    text-shadow: 0 1px 2px rgba(255,255,255,0.4), 0 0 6px rgba(255,255,255,0.15);
    filter: drop-shadow(0 0 1px rgba(255,255,255,0.3));
    opacity: 0.95;
}

/* 拟物风格 - 给标题栏图标加背景容器 */
body.icon-style-skeuomorphic .window-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: linear-gradient(145deg, #f0f4fa, #dce4ef);
    box-shadow: 1px 1px 3px rgba(0,0,0,0.18), inset 0 1px 1px rgba(255,255,255,0.5), inset -1px -1px 1px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.12);
}

body.icon-style-skeuomorphic .window-icon i {
    color: #444;
    font-size: 11px;
    text-shadow: 0 1px 1px rgba(255,255,255,0.6), 0 -1px 1px rgba(0,0,0,0.15);
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.12));
}

.desktop-icon span {
    color: var(--icon-text-color, white);
    font-size: 12px;
    text-align: center;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    line-height: 1.3;
    max-height: 16px;
    width: 100%;
    box-sizing: border-box;
    text-shadow: var(--icon-text-shadow, 0 1px 3px rgba(0, 0, 0, 0.3));
}

/* 确保 -webkit-box-orient 不被压缩工具移除 */
.desktop-icon span {
    /*! autoprefixer: off */
    -webkit-box-orient: vertical;
    /*! autoprefixer: on */
}

.desktop-icon.selected {
    background: color-mix(in srgb, var(--accent-color) 40%, transparent);
    outline: 2px solid var(--accent-color);
    outline-offset: -2px;
}

/* ====== 桌面大图标模式 ====== */
body.desktop-large-icons #desktop-icons {
    gap: 12px;
}
body.desktop-large-icons .desktop-icon {
    width: 118px;
    height: 122px;
    padding: 10px;
}
body.desktop-large-icons .desktop-icon .icon-img {
    width: 72px;
    height: 72px;
    font-size: 36px;
    margin-bottom: 10px;
    border-radius: 18px;
}
body.desktop-large-icons .desktop-icon span {
    font-size: 14px;
    line-height: 1.3;
    max-height: 18px;
}
/* 大图标模式下文件夹图标本身更大，更直观展示内部预览 */
body.desktop-large-icons .desktop-folder .folder-icon-img {
    border-radius: 20px;
}
body.desktop-large-icons .desktop-folder .folder-default-icon {
    font-size: 34px;
}
body.desktop-large-icons .folder-preview-grid {
    gap: 5px;
    padding: 8px;
}
body.desktop-large-icons .folder-preview-icon {
    font-size: 20px;
    border-radius: 8px;
}
/* 无界风格大图标 */
body.desktop-large-icons.icon-style-borderless .desktop-icon .icon-img {
    font-size: 52px;
    width: 80px;
    height: 80px;
}
/* 无界风格大图标：图标（80px + 10px 间距）加大后，原 122px 盒高放不下下方文字，
   底部文字会被 overflow:hidden 裁切（吞字）。这里同步增高图标盒，保证名称完整显示。 */
body.desktop-large-icons.icon-style-borderless .desktop-icon {
    width: 118px;
    height: 132px;
    padding: 10px;
}
/* 起始页模式大图标适配：桌面端 —— 同步放大 grid cell，让大图标不撑破网格 */
body.desktop-large-icons.layout-startpage {
    --icon-cell-w: 118px;
    --icon-cell-h: 122px;
    --icon-cell-gap: 16px;
}
body.desktop-large-icons.layout-startpage #desktop-icons {
    /* 起始页大图标：列不满时整组居中（桌面端也做，避免右留大片白） */
    justify-content: center;
}
body.desktop-large-icons.layout-startpage .desktop-icon {
    width: var(--icon-cell-w);
    height: var(--icon-cell-h);
    /* 大图标放在 grid cell 内，内部内容左右上下居中 */
    justify-content: center;
    align-items: center;
}
body.desktop-large-icons.layout-startpage .desktop-icon .icon-img {
    width: 72px;
    height: 72px;
    font-size: 36px;
    margin-bottom: 10px;
}
body.desktop-large-icons.layout-startpage .desktop-icon span {
    font-size: 14px;
}

/* 移动端对大图标做适度缩小，避免超出屏幕（只在 <=768px 生效） */
@media screen and (max-width: 768px) {
    body.desktop-large-icons.layout-startpage {
        /* 放大 grid cell 到移动端大图标尺寸，让 cell 能包住图标，网格不被撑破 */
        --icon-cell-w: 104px;
        --icon-cell-h: 108px;
        --icon-cell-gap: 12px;
    }
    body.desktop-large-icons.layout-startpage .desktop-icon {
        width: var(--icon-cell-w);
        height: var(--icon-cell-h);
        padding: 8px 6px;
        justify-content: center;
        align-items: center;
    }
    body.desktop-large-icons.layout-startpage .desktop-icon .icon-img {
        width: 62px;
        height: 62px;
        font-size: 30px;
        border-radius: 16px;
        margin-bottom: 6px;
    }
    body.desktop-large-icons.layout-startpage .desktop-icon span {
        font-size: 13px;
    }
}

/* 桌面大图标模式下，文件夹窗口内标准视图（未开启文件夹大图标）的名称也完整显示，
   避免继承桌面大图标放大 icon-img 后名称被单行截断吞字 */
body.desktop-large-icons .folder-window:not(.folder-large-mode) .folder-item-icon {
    height: 128px !important;
    justify-content: flex-start;
}
body.desktop-large-icons .folder-window:not(.folder-large-mode) .folder-item-icon .icon-img {
    width: 72px !important;
    height: 72px !important;
    font-size: 36px;
    border-radius: 18px;
    margin-bottom: 10px;
}
body.desktop-large-icons .folder-window:not(.folder-large-mode) .folder-item-icon span {
    font-size: 13px;
    line-height: 1.25;
    max-width: 116px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /*! autoprefixer: off */
    -webkit-box-orient: vertical;
    /*! autoprefixer: on */
    max-height: 32px;
    width: 100%;
    box-sizing: border-box;
    word-break: break-word;
    flex-shrink: 0;
}

/* 文件夹窗口内小程序图标：大图标模式下，上面 .folder-item-icon span 的
   width:100%/display:-webkit-box 会把微信角标 .mp-badge 撑成图标宽度，
   这里用更高优先级把角标恢复为右下角固定尺寸的小圆点 */
.folder-window .folder-item-icon[data-type="miniprogram"] .icon-img .mp-badge {
    width: 15px !important;
    height: 15px !important;
    min-width: 15px !important;
    min-height: 15px !important;
    max-width: 15px !important;
    max-height: 15px !important;
    flex: 0 0 auto !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #07c160 !important;
    color: #ffffff !important;
    border: 1.5px solid #ffffff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    position: absolute;
    right: -3px;
    bottom: -3px;
    pointer-events: none;
    z-index: 2;
}
.folder-window .folder-item-icon[data-type="miniprogram"] .icon-img .mp-badge i {
    font-size: 8px;
    line-height: 1;
    color: #ffffff !important;
}

.desktop-icon.dragging {
    opacity: 0.7;
    transform: scale(1.05);
    z-index: 1000;
}

/* === 移动图标模式（仅移动端 ≤768px 触发，样式两端通用）=== */
@keyframes iconMoveWobble {
    0%, 100% { transform: rotate(-2.5deg); }
    50%      { transform: rotate(2.5deg); }
}
.desktop-icon.move-wobble {
    animation: iconMoveWobble 0.6s ease-in-out infinite;
}
.desktop-icon.move-wobble:nth-child(2n) { animation-delay: 0.15s; }
.desktop-icon.move-wobble:nth-child(3n) { animation-delay: 0.3s; }
.desktop-icon.move-wobble:nth-child(5n) { animation-delay: 0.45s; }

/* 拖拽中的图标暂停晃动，避免 animation 的 rotate 干扰手指跟随 */
body.icon-move-mode .desktop-icon.widget-dragging {
    animation: none !important;
}

#icon-move-toolbar {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100003;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    border-radius: 24px;
    background: var(--context-menu-bg, rgba(32, 32, 36, 0.92));
    border: 1px solid var(--context-menu-border, rgba(255, 255, 255, 0.1));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
}
#icon-move-toolbar.hidden { display: none; }
.move-toolbar-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    /* 工具栏自身背景是 --context-menu-bg（浅色模式白底、深色模式深底），
       文字颜色必须随主题模式（--text-color）而非壁纸（--icon-text-color）变化，
       否则在浅色模式 + 深色壁纸时会出现白底白字不可读的问题 */
    color: var(--text-color, #fff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.move-toolbar-info i { flex-shrink: 0; }
.move-toolbar-done {
    flex-shrink: 0;
    padding: 5px 14px;
    border: none;
    border-radius: 16px;
    background: var(--accent-color, #187aff);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

body.icon-move-mode #desktop-icons { z-index: 100002; touch-action: none; }
/* 移动图标模式下，图标本身也禁用触摸滚动，确保长按拖拽时浏览器不会抢占手势去滚动容器 */
body.icon-move-mode #desktop-icons .desktop-icon { touch-action: none; }
body.icon-move-mode .desktop-folder { cursor: pointer; }

/* "移动图标" 菜单项仅移动端可见 */
.context-item.mobile-only-item { display: none; }
/* 桌面端专属菜单项（移动端隐藏） */
.context-item.desktop-only-item { display: flex; }
@media screen and (max-width: 768px) {
    .context-item.mobile-only-item { display: flex; }
    .context-item.desktop-only-item { display: none !important; }
    .move-toolbar-info { font-size: 12px; }
    #move-selection-info {
        max-width: 50vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: inline-block;
    }
    /* 拖拽进行中时自动隐藏工具栏，避免遮挡手指操作 */
    body.icon-move-mode.dragging-active #icon-move-toolbar {
        opacity: 0;
        pointer-events: none;
        transform: translateX(-50%) translateY(-100%);
        transition: opacity 0.2s ease, transform 0.2s ease;
    }
    /* 工具栏自动折叠：提示文字隐藏，只保留完成按钮 */
    #icon-move-toolbar.toolbar-collapsed {
        background: transparent;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        box-shadow: none;
        padding: 0;
        left: auto;
        right: 12px;
        transform: none;
    }
    #icon-move-toolbar.toolbar-collapsed .move-toolbar-info {
        display: none;
    }
    #icon-move-toolbar.toolbar-collapsed .move-toolbar-done {
        border-radius: 50%;
        width: 44px;
        height: 44px;
        padding: 0;
        justify-content: center;
        background: rgba(0, 0, 0, 0.7);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
    }
    #icon-move-toolbar.toolbar-collapsed .move-toolbar-done span {
        display: none;
    }
    /* 移动端无 hover，调整大小手柄默认不可见导致用户无法发现/触控；
       常驻显示并增大触控区，同时禁用触摸滚动避免拖拽手柄时浏览器抢占手势。
       width/height 使用 !important 以覆盖后面基础规则 .widget-resize-handle 的 20px */
    .widget-resize-handle {
        opacity: 0.5 !important;
        width: 24px !important;
        height: 24px !important;
        touch-action: none;
    }
    .widget-resize-handle::before {
        width: 14px;
        height: 14px;
        bottom: 5px;
        right: 5px;
    }
    /* 拖拽调整大小时手柄高亮（覆盖上面的 0.5） */
    .widget.resizing .widget-resize-handle {
        opacity: 1 !important;
    }
}

#desktop-icons.desktop-icons-hidden {
    display: none;
}

#desktop-icons.widgets-bottom-mode {
    pointer-events: none;
}

#desktop-icons.widgets-bottom-mode .desktop-icon {
    pointer-events: auto;
}

/* === 起始页模式 === */
:root {
    /* 起始页搜索栏顶部定位：
       用 100dvh 基准 + --app-viewport-h 兜底，保证 iPad Safari 隐藏状态栏时
       搜索栏相对「真实视口顶部」始终固定为 18%，不会因 100vh 不变而错位。*/
    --startpage-search-top: calc(0.18 * var(--app-viewport-h, 100dvh));
    --startpage-icons-top: calc(0.18 * var(--app-viewport-h, 100dvh) + 100px);
    --startpage-icons-gap: 32px;
    --icon-cell-w: 96px;
    --icon-cell-h: 96px;
    --icon-cell-gap: 12px;
}

body.layout-startpage #search-widget {
    top: var(--startpage-search-top) !important;
    left: 50% !important;
    right: auto;
    transform: translateX(-50%) !important;
    transition: top 0.4s ease, left 0.4s ease, transform 0.4s ease;
}

body.layout-startpage #desktop-icons {
    flex-direction: row !important;
    top: var(--startpage-icons-top);
    left: var(--startpage-icons-gap);
    right: var(--startpage-icons-gap);
    justify-content: flex-start;
    align-content: flex-start;
    transition: top 0.4s ease, flex-direction 0.3s ease;
}

body:not(.layout-startpage) #search-widget {
    transition: top 0.4s ease, left 0.4s ease, transform 0.4s ease;
}

body.layout-startpage #search-widget .search-container {
    cursor: default;
}

/* === 起始页模式：小组件嵌入桌面（CSS Grid 网格布局 === */
body.layout-startpage #desktop-icons {
    display: grid;
    grid-template-columns: repeat(auto-fill, var(--icon-cell-w));
    grid-auto-rows: var(--icon-cell-h);
    gap: var(--icon-cell-gap);
    align-content: flex-start;
    grid-auto-flow: dense;
}

body.layout-startpage #desktop-icons .widget {
    position: relative !important;
    margin: 0 !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    transition: transform 0.25s ease, opacity 0.25s ease;
    width: 100% !important;
    height: 100% !important;
}

body.layout-startpage #desktop-icons .widget.widget-dragging,
body.layout-startpage #desktop-icons .desktop-icon.widget-dragging {
    position: fixed !important;
    opacity: 0.8;
    transform: scale(1.05) !important;
    transition: none;
    z-index: 9999 !important;
    pointer-events: none;
}

body.layout-startpage #desktop-icons .desktop-icon {
    transition: transform 0.25s ease;
}

/* 通用 placeholder 样式：纵向/横向/起始页三种布局下拖拽插入提示符均可见 */
#desktop-icons .grid-placeholder {
    border: 2px dashed var(--accent-color, #187aff);
    border-radius: 8px;
    background: color-mix(in srgb, var(--accent-color, #187aff) 10%, transparent);
    opacity: 0.6;
    box-sizing: border-box;
    /* flex 布局（纵向/横向）下匹配图标尺寸以正确占位 */
    width: 86px;
    height: 90px;
}
/* 起始页 grid 布局下用 grid-column/grid-row span 控制占位，尺寸由 grid 自动分配 */
body.layout-startpage #desktop-icons .grid-placeholder {
    width: auto;
    height: auto;
    border: 2px dashed var(--accent-color);
    border-radius: 8px;
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
    opacity: 0.6;
}

@media screen and (max-width: 768px) {
    body.layout-startpage {
        --startpage-search-top: 110px;
        --startpage-icons-top: 195px;
        --startpage-icons-gap: 12px;
        --icon-cell-w: 80px;
        --icon-cell-h: 90px;
        --icon-cell-gap: 8px;
    }
    body.layout-startpage #search-widget {
        top: var(--startpage-search-top) !important;
        left: 50% !important;
        right: auto;
        transform: translateX(-50%) !important;
        max-width: 92%;
    }
    body.layout-startpage .search-time-display {
        height: var(--startpage-search-top);
        justify-content: center;
    }
    body.layout-startpage .search-time {
        font-size: 48px;
        letter-spacing: 1px;
    }
    body.layout-startpage .search-date {
        font-size: 13px;
        margin-top: 6px;
    }
    body.layout-startpage #desktop-icons {
        top: var(--startpage-icons-top);
        left: var(--startpage-icons-gap);
        right: var(--startpage-icons-gap);
        /* 移动端图标网格居中：auto-fill 在容器宽度不能整除 cell 时会在右侧留白，
           用 justify-content: center 把整组列居中，左右留白对称，消除右侧大片空白 */
        justify-content: center;
    }
    body.layout-startpage #search-widget .search-container {
        height: 48px;
        border-radius: 24px;
        padding: 0 14px;
    }
    body.layout-startpage #search-widget .search-container input {
        font-size: 16px;
    }
    body.layout-startpage #search-widget .search-container .search-icon {
        font-size: 16px;
        margin-right: 8px;
    }
    body.layout-startpage #search-widget .search-container .search-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    body.layout-startpage .desktop-icon span {
        font-size: 12px;
    }
    body.layout-startpage .desktop-icon {
        width: var(--icon-cell-w);
        height: var(--icon-cell-h);
        padding: 6px 4px;
    }
    body.layout-startpage .desktop-icon .icon-img {
        width: 50px;
        height: 50px;
        font-size: 24px;
        border-radius: 14px;
        margin-bottom: 4px;
    }
    body.layout-startpage .desktop-folder .folder-icon-img {
        width: 50px;
        height: 50px;
    }
}

/* ===== 自由模式：图标绝对定位，随意拖放 ===== */
body.layout-free #desktop-icons {
    flex-direction: unset !important;
    flex-wrap: unset !important;
    gap: 0 !important;
    overflow: visible !important;
    align-content: unset !important;
}

body.layout-free .desktop-icon {
    position: absolute !important;
    transition: none;
}

/* 文件夹窗口内的图标始终采用固定（流式）布局：
   避免自由模式下 .desktop-icon 的绝对定位破坏 folder-window-content 的 flex 换行，
   导致文件夹内图标错乱。 */
body.layout-free .folder-window-content .desktop-icon {
    position: relative !important;
}

body.layout-free .desktop-icon.dragging {
    z-index: 1000;
    opacity: 0.85;
    transition: none;
}

/* 自由模式下不显示拖拽插入指示器 */
body.layout-free .drop-indicator {
    display: none !important;
}

/* 移动端自由模式 */
@media screen and (max-width: 768px) {
    body.layout-free #desktop-icons {
        overflow: visible !important;
    }
}

#selection-box {
    position: absolute;
    border: 1px solid var(--accent-color);
    background: color-mix(in srgb, var(--accent-color) 15%, transparent);
    pointer-events: none;
    z-index: 9999;
    border-radius: 6px;
    display: none;
}

.drop-indicator {
    position: absolute;
    background: #1976d2;
    pointer-events: none;
    z-index: 9998;
    display: none;
    box-shadow: 0 0 4px rgba(25, 118, 210, 0.6);
    transition: top 0.1s ease;
}

#search-widget {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 600px;
    z-index: 100;
    transition: top 0.4s ease, left 0.4s ease, transform 0.4s ease;
}

.search-time-display {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    /* 起始页搜索栏上方的时间/日期显示高度：
       原 18vh 在 iPad Safari 隐藏状态栏时不会跟随变化（100vh 基准不变），
       导致搜索栏相对顶部位置错位。改为 dvh（动态视口高度），并用
       --app-viewport-h × 0.18 作为兜底（JS 实时设置真实可用高度）。*/
    height: 18vh;
    height: calc(var(--app-viewport-h, 100dvh) * 0.18);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--icon-text-color, #333333);
    text-shadow: var(--icon-text-shadow, none);
    user-select: none;
    pointer-events: none;
    z-index: 99;
}

.search-time-display.hidden {
    display: none;
}

.search-time {
    font-size: 72px;
    font-weight: 200;
    line-height: 1;
    letter-spacing: 2px;
}

.search-date {
    font-size: 16px;
    opacity: 0.7;
    margin-top: 12px;
    font-weight: 300;
}

#search-widget-menu {
    position: fixed;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 6px;
    z-index: 10001;
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}

#search-widget-menu.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.search-container {
    display: flex;
    align-items: center;
    background: var(--search-bg, rgba(255, 255, 255, 0.7));
    border-radius: 30px;
    padding: 8px 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--search-border, rgba(255, 255, 255, 0.5));
    transition: padding 0.3s ease, border-radius 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    cursor: move;
}

.search-container.size-small {
    padding: 6px 12px;
    border-radius: 20px;
}

.search-container.size-medium {
    padding: 10px 20px;
    border-radius: 28px;
}

.search-container.size-large {
    padding: 14px 24px;
    border-radius: 35px;
}

.search-icon {
    color: var(--search-icon, #666);
    font-size: 16px;
    margin-right: 10px;
}

#search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    outline: none;
    color: var(--search-text, #333);
}

#search-input::placeholder {
    color: var(--search-placeholder, #999);
}

.search-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.search-btn:hover {
    background: var(--accent-hover);
}

.search-suggestions {
    position: absolute;
    width: 100%;
    background: var(--search-bg, rgba(255, 255, 255, 0.7));
    border-radius: 12px;
    margin-top: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--search-border, rgba(255, 255, 255, 0.5));
    z-index: 1000;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-10px);
    transition: max-height 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.search-suggestions.show {
    max-height: 400px;
    opacity: 1;
    transform: translateY(0);
}

.search-suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s;
}

.search-suggestions.show .search-suggestion-item {
    opacity: 1;
    transform: translateY(0);
}

.search-suggestion-item:hover,
.search-suggestion-item.selected {
    background: color-mix(in srgb, var(--accent-color) 15%, transparent);
}

.search-suggestion-item i {
    color: var(--search-icon);
    width: 20px;
}

.search-suggestion-item span {
    flex: 1;
    font-size: 14px;
    color: var(--search-text);
}

/* 搜索历史：清除历史项（危险操作，红色提示） */
.search-suggestion-item.search-history-clear i,
.search-suggestion-item.search-history-clear span {
    color: #e53935;
}
.search-suggestion-item.search-history-clear:hover {
    background: rgba(229, 57, 53, 0.12);
}
body.dark-mode .search-suggestion-item.search-history-clear:hover {
    background: rgba(229, 57, 53, 0.18);
}

#add-shortcut-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#add-shortcut-dialog.hidden {
    display: none;
}

#add-shortcut-dialog.hidden .dialog-content {
    animation: dialogClose 0.2s ease-out forwards;
}

#add-miniprogram-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#add-miniprogram-dialog.hidden {
    display: none;
}

#add-miniprogram-dialog.hidden .dialog-content {
    animation: dialogClose 0.2s ease-out forwards;
}

/* 小程序图标预览 + 角标 */
.mp-icon-preview-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mp-icon-preview {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #07c160;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    flex-shrink: 0;
    overflow: visible;
}

.mp-icon-preview img {
    max-width: 70%;
    max-height: 70%;
    object-fit: contain;
    border-radius: 4px;
}

.mp-icon-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mp-badge {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #07c160 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    border: 1.5px solid #ffffff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    pointer-events: none;
    z-index: 2;
}

.mp-badge i {
    font-size: 8px;
    line-height: 1;
    color: #ffffff !important;
}

/* 桌面小程序图标：主图标 + 右下角微信角标 */
.desktop-icon[data-type="miniprogram"] .icon-img {
    position: relative;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.desktop-icon[data-type="miniprogram"] .icon-img > i,
.desktop-icon[data-type="miniprogram"] .icon-img > img {
    display: block;
    margin: auto;
}

.desktop-icon[data-type="miniprogram"] .icon-img .mp-badge {
    /* 覆盖 .desktop-icon span 中的 width:100%/display:-webkit-box/-webkit-line-clamp 等会把角标撑坏的规则 */
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto !important;
    width: 15px !important;
    height: 15px !important;
    min-width: 15px !important;
    min-height: 15px !important;
    max-width: 15px !important;
    max-height: 15px !important;
    position: absolute;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    border-width: 1.5px;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    text-indent: 0 !important;
    max-height: 15px !important;
    color: #ffffff !important;
    background: #07c160 !important;
    z-index: 2;
    pointer-events: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.desktop-icon[data-type="miniprogram"] .icon-img .mp-badge i {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 8px;
    line-height: 1;
    color: #ffffff !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    overflow: visible !important;
    text-indent: 0 !important;
    text-align: center;
}

/* 图标选择器 */
.icon-selector {
    position: relative;
}

.icon-selector-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--icon-selector-bg);
    border: 1px solid var(--icon-selector-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-selector-trigger:hover {
    background: var(--icon-selector-hover-bg);
    border-color: var(--accent-color);
}

.icon-selector-trigger i:first-child {
    font-size: 18px;
    color: var(--accent-color);
    width: 24px;
    text-align: center;
}

.icon-selector-trigger span {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.icon-selector-trigger i:last-child {
    font-size: 12px;
    color: #999;
    transition: transform 0.2s;
}

.icon-selector-trigger.open i:last-child {
    transform: rotate(180deg);
}

.icon-selector-panel {
    position: fixed;
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 100001;
    padding: 12px;
    animation: iconPanelOpen 0.2s ease forwards;
    box-sizing: border-box;
}

.icon-selector-panel.hidden {
    display: none;
}

@keyframes iconPanelOpen {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.icon-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 8px;
    margin-bottom: 10px;
}

.icon-search-box i {
    color: #999;
    font-size: 14px;
}

.icon-search-box input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    width: 100%;
    color: #333;
}

.icon-categories {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.icon-category-btn {
    padding: 4px 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    background: transparent;
    font-size: 12px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
}

.icon-category-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.icon-category-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
    gap: 4px;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px;
}

.icon-grid::-webkit-scrollbar {
    width: 4px;
}

.icon-grid::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 2px;
}

.icon-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    color: #555;
    transition: all 0.15s;
    border: 2px solid transparent;
    gap: 2px;
}

.icon-grid-item i {
    font-size: 18px;
}

.icon-grid-label {
    font-size: 9px;
    line-height: 1.2;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    opacity: 0.8;
}

.icon-grid-item:hover {
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
    color: var(--accent-color);
}

.icon-grid-item.selected {
    background: color-mix(in srgb, var(--accent-color) 15%, transparent);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

body.dark-mode .icon-selector-trigger span {
    color: var(--text-color);
}

body.dark-mode .icon-selector-trigger i:last-child {
    color: var(--text-secondary);
}

body.dark-mode .icon-selector-panel {
    background: var(--icon-selector-bg);
    border: 1px solid var(--icon-selector-border);
}

body.dark-mode .icon-search-box {
    background: rgba(255, 255, 255, 0.06);
}

body.dark-mode .icon-search-box i {
    color: var(--text-secondary);
}

body.dark-mode .icon-search-box input {
    color: var(--text-color);
}

body.dark-mode .icon-search-box input::placeholder {
    color: var(--text-secondary);
}

body.dark-mode .icon-category-btn {
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

body.dark-mode .icon-category-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

body.dark-mode .icon-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

body.dark-mode .icon-grid-item {
    color: var(--text-color);
}

#creator-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#creator-dialog.hidden {
    display: none;
}

#creator-dialog.hidden .dialog-content {
    animation: dialogClose 0.2s ease-out forwards;
}

.dialog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.dialog-content {
    position: relative;
    background: var(--dialog-bg);
    backdrop-filter: none;
    border-radius: 12px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--dialog-border);
    overflow: hidden;
    animation: dialogOpen 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transition: width 0.3s ease, max-width 0.3s ease;
}

.creator-content {
    width: 500px;
    max-height: 85vh;
    background: var(--dialog-bg);
    backdrop-filter: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.creator-content .dialog-header,
.creator-content .creator-tabs,
.creator-content .dialog-footer {
    flex-shrink: 0;
}

.creator-content .dialog-body {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

#creator-dialog .dialog-content {
    width: 500px;
}

@media (max-width: 768px) {
    .creator-content {
        width: 100vw !important;
        max-width: 100vw !important;
        max-height: 100dvh !important;
        max-height: 100vh !important;
        height: 100dvh;
        height: 100vh;
        border-radius: 0;
        overflow: hidden;
    }

    #creator-dialog .dialog-content {
        width: 100vw !important;
        max-width: 100vw !important;
        max-height: 100dvh !important;
        max-height: 100vh !important;
        height: 100dvh;
        height: 100vh;
        border-radius: 0;
        overflow: hidden;
    }

    #creator-dialog .dialog-overlay {
        background: rgba(0, 0, 0, 0.7);
    }
}

@media (max-width: 768px) {
    .theme-preset-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .theme-preset-card {
        height: 68px;
    }
    .theme-editor-panel {
        width: 100%;
        max-width: 100vw;
        max-height: 92vh;
        border-radius: 0;
    }
}

.creator-tabs {
    display: flex;
    background: var(--creator-tabs-bg);
    border-bottom: 1px solid var(--creator-tab-border);
}

.creator-tab {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.creator-tab:hover {
    color: var(--text-color);
    background: var(--dialog-close-hover-bg);
}

.creator-tab.active {
    color: var(--text-color);
    border-bottom-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
}

.creator-tab-content {
    display: none;
}

.creator-tab-content.active {
    display: block;
}

.creator-code-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 16px;
    padding: 12px 0;
}

@media (max-width: 768px) {
    .creator-code-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.creator-code-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.creator-code-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.creator-checkbox-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.api-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.api-dialog-overlay.hidden {
    display: none;
}

.api-dialog {
    background: var(--dialog-bg);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.api-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--dialog-header-border);
}

.api-dialog-header h2 {
    margin: 0;
    font-size: 18px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.api-dialog-header i {
    color: var(--accent-color);
}

.api-dialog-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.api-dialog-close:hover {
    background: var(--dialog-close-hover-bg);
    color: var(--text-color);
}

.api-dialog-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.api-dialog-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--dialog-footer-border);
    display: flex;
    justify-content: flex-end;
}

.api-category {
    margin-bottom: 20px;
}

.api-category:last-child {
    margin-bottom: 0;
}

.api-category h4 {
    margin: 0 0 12px 0;
    font-size: 15px;
    color: var(--accent-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.api-dialog-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    user-select: text;
    -webkit-user-select: text;
}

.api-item {
    display: flex;
    gap: 12px;
    padding: 10px 12px;
    background: color-mix(in srgb, var(--accent-color) 3%, transparent);
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid color-mix(in srgb, var(--accent-color) 8%, transparent);
    transition: all 0.2s ease;
    align-items: flex-start;
}

.api-item:hover {
    background: color-mix(in srgb, var(--accent-color) 8%, transparent);
    border-color: color-mix(in srgb, var(--accent-color) 15%, transparent);
}

.api-item:last-child {
    margin-bottom: 0;
}

.api-item code {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    color: #e91e63;
    padding: 4px 8px;
    background: rgba(233, 30, 99, 0.08);
    border-radius: 4px;
    white-space: nowrap;
    user-select: text;
    -webkit-user-select: text;
}

.api-item p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    flex: 1;
    user-select: text;
    -webkit-user-select: text;
}

.creator-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-color);
}

/* API 参考对话框中的 Markdown 文档渲染 */
.api-doc-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    padding: 20px;
}
.api-doc-empty {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
    padding: 30px 0;
}
.api-doc-content {
    user-select: text;
    -webkit-user-select: text;
}
.api-doc-content .md-h1 { font-size: 22px; border-bottom: 2px solid var(--window-border); padding-bottom: 8px; margin: 20px 0 12px; }
.api-doc-content .md-h2 { font-size: 18px; border-bottom: 1px solid var(--window-border); padding-bottom: 6px; margin: 18px 0 10px; }
.api-doc-content .md-h3 { font-size: 16px; margin: 16px 0 8px; }
.api-doc-content .md-h4 { font-size: 15px; margin: 14px 0 6px; }
.api-doc-content .md-h5 { font-size: 14px; margin: 12px 0 6px; }
.api-doc-content .md-h6 { font-size: 13px; color: var(--text-secondary); margin: 10px 0 6px; }
.api-doc-content .md-p { margin: 8px 0; line-height: 1.7; }
.api-doc-content .md-hr { border: none; border-top: 1px solid var(--window-border); margin: 16px 0; }
.api-doc-content .md-ul, .api-doc-content .md-ol { margin: 8px 0; padding-left: 24px; }
.api-doc-content .md-ul { list-style: disc; }
.api-doc-content .md-ol { list-style: decimal; }
.api-doc-content .md-ul li, .api-doc-content .md-ol li { margin: 4px 0; line-height: 1.6; }
.api-doc-content .md-quote { margin: 10px 0; padding: 8px 14px; border-left: 3px solid var(--accent-color); background: color-mix(in srgb, var(--accent-color) 6%, transparent); border-radius: 0 6px 6px 0; }
.api-doc-content .md-quote p { margin: 4px 0; }
.api-doc-content .md-pre { background: var(--dialog-bg); border: 1px solid var(--window-border); border-radius: 6px; padding: 12px 14px; overflow-x: auto; margin: 10px 0; }
.api-doc-content .md-pre code { font-family: 'Monaco', 'Consolas', monospace; font-size: 13px; line-height: 1.5; }
.api-doc-content .md-code-lang { display: inline-block; font-family: 'Monaco', 'Consolas', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-secondary); background: color-mix(in srgb, var(--accent-color) 8%, transparent); padding: 2px 8px; border-radius: 4px; margin-bottom: 8px; }
.api-doc-content .md-tok-keyword { color: #187aff; font-weight: 600; }
.api-doc-content .md-tok-string { color: #2e7d32; }
.api-doc-content .md-tok-comment { color: #8a8a8a; font-style: italic; }
.api-doc-content .md-tok-number { color: #e67e22; }
.api-doc-content .md-tok-function { color: #6a5acd; }
.api-doc-content .md-tok-global { color: var(--accent-color); font-weight: 600; }
.api-doc-content .md-tok-operator { color: var(--text-secondary); }
.api-doc-content .md-tok-variable { color: var(--text-color); }
body.dark-mode .api-doc-content .md-tok-keyword { color: #6ab0f3; }
body.dark-mode .api-doc-content .md-tok-string { color: #98c379; }
body.dark-mode .api-doc-content .md-tok-comment { color: #5c6370; }
body.dark-mode .api-doc-content .md-tok-number { color: #d19a66; }
body.dark-mode .api-doc-content .md-tok-function { color: #c678dd; }
.api-doc-content .md-inline-code { background: color-mix(in srgb, var(--accent-color) 6%, transparent); padding: 2px 6px; border-radius: 4px; font-family: 'Monaco', 'Consolas', monospace; font-size: 13px; }
.api-doc-content .md-table { border-collapse: collapse; margin: 10px 0; width: 100%; }
.api-doc-content .md-table th, .api-doc-content .md-table td { border: 1px solid var(--window-border); padding: 6px 10px; font-size: 13px; }
.api-doc-content .md-table th { background: color-mix(in srgb, var(--accent-color) 8%, transparent); font-weight: 600; }
.api-doc-content .md-table tr:nth-child(even) td { background: color-mix(in srgb, var(--accent-color) 3%, transparent); }
.api-doc-content .md-link { color: var(--accent-color); text-decoration: none; }
.api-doc-content .md-link:hover { text-decoration: underline; }
.api-doc-content .md-b { font-weight: 600; }

.creator-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.form-hint {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
    display: block;
}

.code-textarea.small {
    height: 60px;
    resize: vertical;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    padding: 8px;
    border: 1px solid var(--window-border);
    border-radius: 6px;
    background: var(--code-textarea-bg);
    color: var(--text-color);
    resize: vertical;
}

.code-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0;
}

.code-editor-group {
    display: flex;
    flex-direction: column;
    margin-top: 0;
}

.btn-fullscreen {
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent-color) 30%, transparent);
    color: var(--accent-color);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-fullscreen:hover {
    background: color-mix(in srgb, var(--accent-color) 20%, transparent);
}

#fullscreen-code-editor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #1a1a2e;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    animation: fullscreenOpen 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

#fullscreen-code-editor.hidden {
    display: none;
}

.fullscreen-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #16213e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.fullscreen-editor-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.fullscreen-editor-controls {
    display: flex;
    gap: 8px;
}

.fullscreen-editor-body {
    flex: 1;
    padding: 0;
    overflow: hidden;
}

.fullscreen-code-textarea {
    width: 100%;
    height: 100%;
    padding: 16px;
    border: none;
    border-radius: 8px;
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: none;
    outline: none;
    box-sizing: border-box;
}

.fullscreen-code-textarea:focus {
    box-shadow: 0 0 0 2px var(--accent-color);
}

#fullscreen-code-editor .CodeMirror {
    height: 100%;
    border: none;
    border-radius: 0;
    font-size: 16px;
}

.fullscreen-editor-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    background: #16213e;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes fullscreenOpen {
    0% {
        opacity: 0;
        transform: scale(0.9);
        border-radius: 20px;
    }
    100% {
        opacity: 1;
        transform: scale(1);
        border-radius: 0;
    }
}

.code-textarea {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
}

.code-textarea:focus {
    border-color: var(--accent-color);
}

.CodeMirror {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    height: 200px;
}

.CodeMirror-fullscreen {
    border: none;
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 16px;
    height: 100%;
}

@keyframes dialogOpen {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes dialogClose {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
}

.dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: color-mix(in srgb, var(--accent-color) 6%, var(--dialog-header-bg));
    border-bottom: 1px solid var(--dialog-header-border);
}

.dialog-header span {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.dialog-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
}

.dialog-close:hover {
    background: var(--dialog-close-hover-bg);
}

.dialog-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 16px;
    width: 100%;
    box-sizing: border-box;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--form-input-border);
    border-radius: 8px;
    background: var(--form-input-bg);
    color: var(--text-color);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-group input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color) 15%, transparent);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.color-picker {
    display: grid;
    grid-template-columns: repeat(4, 32px);
    gap: 8px;
    width: fit-content;
    box-sizing: border-box;
}

.color-option {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    display: block;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

.dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--dialog-footer-border);
}

.btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel {
    background: var(--btn-cancel-bg);
    color: var(--btn-cancel-text);
}

.btn-cancel:hover {
    background: var(--btn-cancel-hover-bg);
}

.btn-primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
}

.btn-primary:hover {
    background: var(--btn-primary-hover);
}

.btn-secondary {
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
    border: 1px solid var(--btn-secondary-border);
}

.btn-secondary:hover {
    background: var(--btn-secondary-hover);
    border-color: var(--btn-secondary-border);
}

.btn-danger {
    background: var(--btn-danger-bg);
    color: var(--btn-danger-text);
}

.btn-danger:hover {
    background: var(--btn-danger-hover);
}

#update-notification {
    position: fixed;
    bottom: calc(var(--taskbar-height) + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 20px color-mix(in srgb, var(--accent-color) 40%, transparent);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

#update-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

#update-notification.hidden {
    display: none;
}

.update-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.update-content i {
    font-size: 18px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.update-content span {
    font-size: 14px;
    font-weight: 500;
}

.update-refresh-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.update-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

#taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--taskbar-height);
    background: var(--taskbar-bg);
    backdrop-filter: blur(var(--taskbar-blur));
    -webkit-backdrop-filter: blur(var(--taskbar-blur));
    display: flex;
    align-items: center;
    padding: 0 8px;
    z-index: 9999;
    box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

#taskbar.taskbar-hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

#taskbar.ppt-taskbar.taskbar-hidden {
    transform: translateX(-50%) translateY(calc(100% + 24px));
    opacity: 0;
    pointer-events: none;
}

#taskbar.ppt-taskbar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: auto;
    min-width: 300px;
    max-width: 80%;
    bottom: 24px;
    border-radius: 12px;
    padding: 4px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), left 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), padding 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: move;
}

/* 确保任务栏应用有足够的空间，但不会完全占满 */
#taskbar.ppt-taskbar #taskbar-apps {
    margin: 0 8px;
    flex: 0 1 auto;
    min-width: 0;
}

#taskbar.ppt-taskbar #start-btn,
#taskbar.ppt-taskbar .taskbar-bookmarks-btn,
#taskbar.ppt-taskbar .taskbar-workspaces-btn {
    flex-shrink: 0;
}

#taskbar.ppt-taskbar #system-tray {
    flex-shrink: 0;
}

#start-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    width: 48px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.15s;
}

#start-btn:hover {
    background: var(--taskbar-hover-bg);
}

#start-btn.active {
    background: var(--accent-color);
    color: white;
}

#start-btn .kj-logo-img {
    height: 24px;
    width: auto;
}

#start-btn .kj-logo-white {
    display: none;
}

body.dark-mode #start-btn .kj-logo-dark {
    display: none;
}

body.dark-mode #start-btn .kj-logo-white {
    display: inline-block;
}

#start-btn.active .kj-logo-dark {
    display: none;
}

#start-btn.active .kj-logo-white {
    display: inline-block;
}

#start-btn .kj-logo {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-color);
}

#taskbar-apps {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-left: 8px;
}

.taskbar-app {
    width: 44px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 20px;
    transition: background 0.15s, opacity 0.2s ease, transform 0.2s ease;
    position: relative;
}

.taskbar-app:hover {
    background: var(--taskbar-hover-bg);
}

.taskbar-app.active {
    background: var(--taskbar-active-bg);
}

.taskbar-app.active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

#system-tray {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
}

#clock {
    color: var(--text-color);
    font-size: 13px;
    text-align: right;
    line-height: 1.4;
    padding: 4px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

#clock:hover {
    background: var(--taskbar-hover-bg);
}

#volume-control {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.15s;
    height: 40px;
}

#volume-control:hover {
    background: var(--taskbar-hover-bg);
}

#volume-control.playing {
    background: var(--accent-color);
}

#volume-control.playing #volume-icon {
    color: white;
}

#volume-icon {
    font-size: 16px;
    color: var(--text-color);
    transition: color 0.15s;
}

#volume-control:hover #volume-icon {
    color: var(--accent-color);
}

/* 修复：playing 状态下 hover 时图标保持白色，避免与强调色背景重合 */
#volume-control.playing:hover #volume-icon {
    color: white;
}

#network-status {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.15s;
    height: 40px;
}

#network-status:hover {
    background: var(--taskbar-hover-bg);
}

#network-icon {
    font-size: 16px;
    color: var(--text-color);
    transition: color 0.15s;
}

#network-status:hover #network-icon {
    color: var(--accent-color);
}

#network-status.offline {
    animation: pulse 2s infinite;
}

#todo-tray {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.15s;
    height: 40px;
}

#todo-tray:hover {
    background: var(--taskbar-hover-bg);
}

#todo-tray i {
    font-size: 16px;
    color: var(--text-color);
    transition: color 0.15s;
}

#todo-tray:hover i {
    color: var(--accent-color);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

#volume-popup {
    position: fixed;
    bottom: calc(var(--taskbar-height) + 10px);
    right: 10px;
    width: 350px;
    background: var(--start-menu-bg);
    backdrop-filter: blur(var(--start-menu-blur));
    -webkit-backdrop-filter: blur(var(--start-menu-blur));
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10000;
}

#volume-popup.show {
    animation: widgetSlideInRight 0.3s ease forwards;
}

#volume-popup:not(.show) {
    animation: widgetSlideOutRight 0.3s ease forwards;
}

.volume-popup-header {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
}

#volume-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, var(--accent-color) 0%, var(--accent-color) 100%, rgba(0, 0, 0, 0.1) 100%, rgba(0, 0, 0, 0.1) 100%);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#volume-value {
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

#audio-apps-container {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.audio-apps-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.audio-app-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    margin-bottom: 6px;
}

.audio-app-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.audio-app-info {
    flex: 1;
    min-width: 0;
}

.audio-app-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-color);
}

.audio-app-track {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audio-app-controls {
    display: flex;
    gap: 4px;
}

.audio-app-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.audio-app-btn:hover {
    background: rgba(0, 0, 0, 0.2);
}

.audio-app-btn.close-btn:hover {
    background: rgba(255, 59, 48, 0.2);
    color: #ff3b30;
}

#start-menu {
    position: fixed;
    bottom: calc(var(--taskbar-height) + 10px);
    left: 10px;
    width: 520px;
    max-width: calc(100vw - 20px);
    max-height: 500px;
    background: var(--start-menu-bg);
    backdrop-filter: blur(var(--start-menu-blur));
    -webkit-backdrop-filter: blur(var(--start-menu-blur));
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

#start-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#start-menu.ppt-mode {
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    bottom: 84px;
}

#start-menu.ppt-mode.show {
    transform: translateX(-50%) translateY(0);
}

.taskbar-bookmarks-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: calc(var(--taskbar-height) - 8px);
    margin: 4px 0 4px 4px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
}

.taskbar-bookmarks-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.taskbar-bookmarks-btn.active {
    background: var(--accent-color);
    color: white;
}

/* ===== 桌面工作区按钮 ===== */
.taskbar-workspaces-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: calc(var(--taskbar-height) - 8px);
    margin: 4px 0 4px 4px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
}

.taskbar-workspaces-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.taskbar-workspaces-btn.active {
    background: var(--accent-color);
    color: white;
}

/* ===== 桌面工作区：任务视图面板 ===== */
.task-view {
    position: fixed;
    bottom: calc(var(--taskbar-height) + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: min(760px, calc(100vw - 40px));
    max-height: calc(100vh - var(--taskbar-height) - 60px);
    background: var(--start-menu-bg);
    backdrop-filter: blur(var(--start-menu-blur));
    -webkit-backdrop-filter: blur(var(--start-menu-blur));
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 100000;
    padding: 16px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    box-sizing: border-box;
}

.task-view.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.task-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    flex-shrink: 0;
}

.task-view-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-view-add {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: none;
    border-radius: 8px;
    background: var(--accent-color);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: filter 0.2s;
}

.task-view-add:hover {
    filter: brightness(1.1);
}

.task-view-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    overflow-y: auto;
    padding: 2px;
}

.ws-card {
    position: relative;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: border-color 0.2s, background 0.2s;
}

.ws-card:hover {
    border-color: var(--accent-color);
    background: rgba(0, 0, 0, 0.05);
}

.ws-card.current {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(24, 122, 255, 0.25);
}

.ws-card-body {
    cursor: pointer;
    padding: 10px;
}

.ws-preview {
    height: 120px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(24, 122, 255, 0.1), rgba(0, 0, 0, 0.02));
    border: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 10px;
    padding: 8px;
    overflow: hidden;
    box-sizing: border-box;
}

body.dark-mode .ws-card:hover {
    background: rgba(255, 255, 255, 0.1);
}

.ws-preview-empty {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: rgba(0, 0, 0, 0.4);
    font-size: 12px;
}

.ws-preview-empty i {
    font-size: 28px;
}

body.dark-mode .ws-preview-empty {
    color: rgba(255, 255, 255, 0.4);
}

.ws-mini-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.ws-mini-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    overflow: hidden;
}

.ws-mini-icon-img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    font-size: 14px;
    position: relative;
}

/* 迷你预览（工作区/文件夹封面/悬浮预览）里不需要显示微信角标，否则角标的 position:absolute
   会因为最近的已定位祖先不是自己父容器，泄漏到外层卡片右下角，造成"工作区右下角出现
   微信标志"的Bug。仅桌面 .desktop-icon[data-type="miniprogram"] 与文件夹窗口真正
   打开的 folder-item-icon 允许显示角标。 */
.ws-mini-icon-img .mp-badge,
.folder-preview-icon .mp-badge,
.folder-preview-grid .mp-badge,
.folder-hover-item .mp-badge {
    display: none !important;
}

.ws-mini-icon-img i,
.ws-mini-icon-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.ws-mini-icon-img img {
    width: 100%;
    height: 100%;
    border-radius: 6px;
}

.ws-mini-icon span {
    font-size: 9px;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.ws-name-box {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 22px;
}

.ws-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ws-current-badge {
    font-size: 10px;
    background: var(--accent-color);
    color: #fff;
    padding: 1px 6px;
    border-radius: 8px;
    flex-shrink: 0;
}

.ws-name-input {
    width: 100%;
    font-size: 14px;
    padding: 3px 6px;
    border: 1px solid var(--accent-color);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-color);
    outline: none;
    box-sizing: border-box;
}

body.dark-mode .ws-name-input {
    background: rgba(255, 255, 255, 0.1);
}

.ws-card-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.ws-card:hover .ws-card-actions {
    opacity: 1;
}

.ws-action-btn {
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ws-action-btn:hover {
    background: rgba(0, 0, 0, 0.6);
}

.ws-action-delete:hover {
    background: #e81123;
}

@media (max-width: 768px) {
    .task-view {
        width: calc(100vw - 24px);
        padding: 12px;
        bottom: calc(var(--taskbar-height) + 8px);
    }
    .task-view-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    .ws-preview {
        height: 90px;
    }
    .ws-card-actions {
        opacity: 1;
    }
}

body.dark-mode .ws-card {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .ws-preview {
    background: linear-gradient(135deg, rgba(24, 122, 255, 0.2), rgba(0, 0, 0, 0.2));
}

.bookmarks-bar {
    position: fixed;
    bottom: calc(var(--taskbar-height) + 10px);
    left: 10px;
    width: 320px;
    height: 480px;
    background: var(--start-menu-bg);
    backdrop-filter: blur(var(--start-menu-blur));
    -webkit-backdrop-filter: blur(var(--start-menu-blur));
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    transform-origin: bottom left;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bookmarks-bar.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.bookmarks-bar.hidden {
    display: none;
}

.bookmarks-bar.window-mode {
    bottom: auto;
    left: auto;
    transform-origin: top left;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.bookmarks-bar.window-mode .bookmarks-bar-header {
    cursor: move;
    user-select: none;
}

.bookmarks-bar.window-mode.dragging {
    transition: none;
    user-select: none;
}

.bookmarks-bar.window-mode .bookmarks-bar-actions .bookmarks-bar-btn {
    cursor: pointer;
}

@media (max-width: 768px) {
    .bookmarks-bar {
        width: calc(100vw - 20px);
        height: 60vh;
        left: 10px;
        right: 10px;
    }
    .bookmarks-bar.window-mode {
        width: calc(100vw - 40px);
        height: 70vh;
    }
    #bookmark-window-btn {
        display: none;
    }
}

@media (max-width: 480px) {
    .bookmarks-bar {
        width: calc(100vw - 16px);
        left: 8px;
        right: 8px;
        bottom: calc(var(--taskbar-height) + 8px);
        height: 65vh;
        border-radius: 10px;
    }
    .bookmarks-bar.window-mode {
        width: calc(100vw - 32px);
        height: 75vh;
    }
}

.bookmarks-bar-resize {
    position: absolute;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s;
}

.bookmarks-bar:hover .bookmarks-bar-resize {
    opacity: 1;
}

.bookmarks-bar-resize-top {
    top: 0;
    left: 6px;
    right: 6px;
    height: 6px;
    cursor: ns-resize;
    margin-top: -3px;
}

.bookmarks-bar-resize-bottom {
    bottom: 0;
    left: 6px;
    right: 6px;
    height: 6px;
    cursor: ns-resize;
    margin-bottom: -3px;
}

.bookmarks-bar-resize-left {
    top: 6px;
    bottom: 6px;
    left: 0;
    width: 6px;
    cursor: ew-resize;
    margin-left: -3px;
}

.bookmarks-bar-resize-right {
    top: 6px;
    bottom: 6px;
    right: 0;
    width: 6px;
    cursor: ew-resize;
    margin-right: -3px;
}

.bookmarks-bar-resize-top-left {
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    cursor: nwse-resize;
    margin-top: -6px;
    margin-left: -6px;
}

.bookmarks-bar-resize-top-right {
    top: 0;
    right: 0;
    width: 12px;
    height: 12px;
    cursor: nesw-resize;
    margin-top: -6px;
    margin-right: -6px;
}

.bookmarks-bar-resize-bottom-left {
    bottom: 0;
    left: 0;
    width: 12px;
    height: 12px;
    cursor: nesw-resize;
    margin-bottom: -6px;
    margin-left: -6px;
}

.bookmarks-bar-resize-bottom-right {
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    cursor: nwse-resize;
    margin-bottom: -6px;
    margin-right: -6px;
}

.bookmarks-bar-resize-bottom-right::after {
    content: '';
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 10px;
    height: 10px;
    border-right: 2px solid rgba(255, 255, 255, 0.3);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 0 0 2px 0;
}

.bookmarks-bar-resizing {
    user-select: none;
    transition: none !important;
}

.bookmarks-bar-resizing .bookmarks-bar-list {
    pointer-events: none;
}

.bookmarks-bar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bookmarks-bar-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.bookmark-back-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    flex-shrink: 0;
}

.bookmark-back-btn.hidden {
    display: none;
}

.bookmarks-bar-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bookmarks-breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-color);
    overflow: hidden;
}

.bookmarks-breadcrumb-item {
    cursor: pointer;
    white-space: nowrap;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.15s;
}

.bookmarks-breadcrumb-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.bookmarks-breadcrumb-item.current {
    color: var(--accent-color);
    cursor: default;
}

.bookmarks-breadcrumb-item.current:hover {
    background: transparent;
}

.bookmarks-breadcrumb-separator {
    color: rgba(255, 255, 255, 0.4);
    font-size: 10px;
    flex-shrink: 0;
}

.bookmarks-bar-title i {
    margin-right: 6px;
    color: var(--accent-color);
}

.bookmarks-bar-actions {
    display: flex;
    gap: 4px;
}

.bookmarks-bar-btn {
    height: 28px;
    padding: 0 10px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-color);
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s;
    white-space: nowrap;
}

.bookmarks-bar-btn:hover {
    background: var(--accent-color);
    color: white;
}

.bookmarks-bar-btn.sync-active {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.bookmarks-bar-btn.sync-active:hover {
    background: #10b981;
    color: white;
}

.bookmarks-bar-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.bookmarks-bar-list::-webkit-scrollbar {
    width: 6px;
}

.bookmarks-bar-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.bookmark-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
    margin-bottom: 2px;
}

.bookmark-item:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: translateX(2px);
    color: #222;
}

.bookmark-item:hover .bookmark-name {
    color: #222;
}

.bookmark-item:hover .bookmark-url {
    color: #555;
}

.bookmark-folder-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--accent-color) 15%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 13px;
    flex-shrink: 0;
}

.bookmark-link-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.bookmark-link-icon img {
    width: 16px;
    height: 16px;
    border-radius: 2px;
}

.bookmark-info {
    flex: 1;
    min-width: 0;
}

.bookmark-name {
    font-size: 13px;
    color: var(--text-color);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bookmark-url {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bookmark-item-delete {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    opacity: 0;
    transition: all 0.2s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bookmark-item:hover .bookmark-item-delete {
    opacity: 1;
}

.bookmark-item-delete:hover {
    background: rgba(255, 0, 0, 0.15);
    color: #ff4444;
}

.bookmarks-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.bookmarks-empty i {
    font-size: 36px;
    margin-bottom: 12px;
    opacity: 0.3;
}

.bookmarks-empty p {
    font-size: 14px;
    margin: 0 0 6px 0;
    color: var(--text-color);
}

.bookmarks-empty span {
    font-size: 12px;
}

.bookmark-folder-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    border-radius: 6px;
    margin-top: 4px;
}

.bookmark-folder-title:hover {
    background: rgba(255, 255, 255, 0.6);
    color: #222;
}

.bookmark-folder-title:hover .folder-name {
    color: #222;
}

.bookmark-folder-title:hover i.fa-folder {
    color: var(--accent-color);
}

.bookmark-folder-title:hover .folder-arrow {
    color: #555;
}

.bookmark-folder-title .folder-arrow {
    font-size: 10px;
    transition: transform 0.2s;
}

.bookmark-folder-title.collapsed .folder-arrow {
    transform: rotate(-90deg);
}

.bookmark-folder-content {
    overflow: hidden;
    max-height: 3000px;
    transition: max-height 0.3s ease-out, opacity 0.2s ease;
    opacity: 1;
}

.bookmark-folder-title.collapsed + .bookmark-folder-content {
    max-height: 0;
    opacity: 0;
    transition: max-height 0.2s ease-in, opacity 0.15s ease;
}

.bookmark-view-menu {
    position: absolute;
    top: 52px;
    right: 12px;
    width: 260px;
    background: var(--start-menu-bg);
    backdrop-filter: blur(var(--start-menu-blur));
    -webkit-backdrop-filter: blur(var(--start-menu-blur));
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    padding: 8px;
    z-index: 10001;
    animation: bookmarkViewMenuFadeIn 0.15s ease;
}

@keyframes bookmarkViewMenuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bookmark-view-section {
    margin-bottom: 8px;
}

.bookmark-view-section:last-child {
    margin-bottom: 0;
}

.bookmark-view-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    padding: 6px 10px 4px;
}

.bookmark-view-options {
    display: flex;
    gap: 4px;
    padding: 0 4px;
}

.bookmark-view-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-color);
    transition: background 0.15s;
    border: 1px solid transparent;
}

.bookmark-view-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

.bookmark-view-option.active {
    background: rgba(24, 122, 255, 0.15);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.bookmark-view-option i {
    font-size: 18px;
}

.bookmark-import-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-color);
    transition: background 0.15s;
}

.bookmark-import-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

.bookmark-import-option i {
    font-size: 16px;
    color: var(--accent-color);
    width: 20px;
    text-align: center;
}

.bookmark-folder-picker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bookmarkViewMenuFadeIn 0.15s ease;
}

.bookmark-folder-picker {
    background: var(--start-menu-bg);
    backdrop-filter: blur(var(--start-menu-blur));
    -webkit-backdrop-filter: blur(var(--start-menu-blur));
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    padding: 20px;
    width: 420px;
    max-width: 90vw;
}

.bookmark-folder-picker-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
}

.bookmark-folder-picker-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 14px;
}

.bookmark-folder-list {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 6px;
}

.bookmark-folder-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-color);
    transition: background 0.15s;
    margin-bottom: 2px;
}

.bookmark-folder-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.bookmark-folder-item i {
    font-size: 16px;
    color: var(--accent-color);
    width: 20px;
    text-align: center;
}

.bookmark-folder-item .folder-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.bookmark-folder-item .folder-item-name {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bookmark-folder-item .folder-item-count {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.bookmark-folder-item .fa-chevron-right {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.bookmark-folder-picker-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.bookmark-folder-picker-btn {
    padding: 8px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.15s;
}

.bookmark-folder-picker-btn.cancel {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-color);
}

.bookmark-folder-picker-btn.cancel:hover {
    background: rgba(255, 255, 255, 0.15);
}

.bookmark-folder-picker-btn.confirm {
    background: var(--accent-color, #187aff);
    color: white;
}

.bookmark-folder-picker-btn.confirm:hover {
    filter: brightness(1.1);
}

.bookmarks-bar-list.card-view {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 8px;
    padding: 12px;
}

.bookmarks-bar-list.card-view .bookmark-item {
    width: calc(50% - 4px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 8px 12px !important;
    margin-bottom: 0;
    text-align: center;
    gap: 8px;
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.bookmarks-bar-list.card-view .bookmark-item:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.7);
    color: #222;
}

.bookmarks-bar-list.card-view .bookmark-item:hover .bookmark-name {
    color: #222;
}

.bookmarks-bar-list.card-view .bookmark-item img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.bookmarks-bar-list.card-view .bookmark-item .bookmark-link-icon {
    font-size: 20px;
    margin-right: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
}

.bookmarks-bar-list.card-view .bookmark-item .bookmark-link-icon img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.bookmarks-bar-list.card-view .bookmark-item .bookmark-info {
    width: 100%;
}

.bookmarks-bar-list.card-view .bookmark-item .bookmark-name {
    font-size: 12px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
}

.bookmarks-bar-list.card-view .bookmark-item .bookmark-url {
    display: none;
}

.bookmarks-bar-list.card-view .bookmark-item .bookmark-item-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    opacity: 0;
}

.bookmarks-bar-list.card-view .bookmark-item:hover .bookmark-item-delete {
    opacity: 1;
}

.bookmarks-bar-list.card-view .bookmark-folder-title {
    width: calc(50% - 4px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 8px 12px !important;
    text-align: center;
    gap: 8px;
    border-radius: 8px;
    margin-bottom: 0;
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.15s, transform 0.15s, border-color 0.15s;
}

.bookmarks-bar-list.card-view .bookmark-folder-title:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.7);
    color: #222;
}

.bookmarks-bar-list.card-view .bookmark-folder-title:hover .folder-name {
    color: #222;
}

.bookmarks-bar-list.card-view .bookmark-folder-title:hover i.fa-folder {
    color: var(--accent-color);
}

.bookmarks-bar-list.card-view .bookmark-folder-title i.fa-folder {
    font-size: 28px;
    margin-right: 0;
}

.bookmarks-bar-list.card-view .bookmark-folder-title .folder-arrow {
    display: none;
}

.bookmarks-bar-list.card-view .bookmark-folder-content {
    width: 100%;
    padding-left: 12px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    margin: 4px 0;
}

.bookmarks-bar-list.card-view .bookmark-folder-title.collapsed + .bookmark-folder-content {
    display: none;
}

.card-folder-item {
    width: calc(50% - 4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 8px 12px;
    text-align: center;
    gap: 8px;
    border-radius: 8px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.15s, transform 0.15s, border-color 0.15s;
    box-sizing: border-box;
}

.card-folder-item:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.7);
    color: #222;
}

.card-folder-item:hover i {
    color: var(--accent-color);
}

.card-folder-item:hover .folder-name {
    color: #222;
}

.card-folder-item:hover .folder-count {
    color: #555;
    opacity: 1;
}

.card-folder-item i {
    font-size: 28px;
    color: var(--accent-color);
}

.card-folder-item .folder-name {
    font-size: 12px;
    line-height: 1.3;
    font-weight: 600;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
}

.card-folder-item .folder-count {
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.7;
}

.bookmarks-bar-list.card-view .bookmark-folder-content .bookmark-item {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 12px !important;
    text-align: left;
    gap: 10px;
    background: transparent;
    border: none;
    position: static;
}

.bookmarks-bar-list.card-view .bookmark-folder-content .bookmark-item:hover {
    transform: translateX(2px);
    background: rgba(255, 255, 255, 0.6);
    color: #222;
}

.bookmarks-bar-list.card-view .bookmark-folder-content .bookmark-item:hover .bookmark-name {
    color: #222;
}

.bookmarks-bar-list.card-view .bookmark-folder-content .bookmark-item:hover .bookmark-url {
    color: #555;
}

.bookmarks-bar-list.card-view .bookmark-folder-content .bookmark-item .bookmark-link-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 14px;
}

.bookmarks-bar-list.card-view .bookmark-folder-content .bookmark-item .bookmark-link-icon img {
    width: 16px;
    height: 16px;
    border-radius: 2px;
}

.bookmarks-bar-list.card-view .bookmark-folder-content .bookmark-item .bookmark-info {
    width: auto;
    flex: 1;
}

.bookmarks-bar-list.card-view .bookmark-folder-content .bookmark-item .bookmark-name {
    font-size: 13px;
    line-height: 1.4;
    display: block;
    white-space: nowrap;
    -webkit-line-clamp: unset;
}

.bookmarks-bar-list.card-view .bookmark-folder-content .bookmark-item .bookmark-url {
    display: block;
}

.bookmarks-bar-list.card-view .bookmark-folder-content .bookmark-item .bookmark-item-delete {
    position: static;
    opacity: 0;
}

body.dark-mode .bookmark-item:hover {
    background: var(--accent-color);
    color: white;
}

body.dark-mode .bookmark-item:hover .bookmark-name {
    color: white;
}

body.dark-mode .bookmark-item:hover .bookmark-url {
    color: rgba(255, 255, 255, 0.85);
}

body.dark-mode .bookmark-folder-title:hover {
    background: var(--accent-color);
    color: white;
}

body.dark-mode .bookmark-folder-title:hover .folder-name {
    color: white;
}

body.dark-mode .bookmark-folder-title:hover i.fa-folder {
    color: white;
}

body.dark-mode .bookmark-folder-title:hover .folder-arrow {
    color: rgba(255, 255, 255, 0.85);
}

body.dark-mode .bookmarks-bar-list.card-view .bookmark-item:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

body.dark-mode .bookmarks-bar-list.card-view .bookmark-item:hover .bookmark-name {
    color: white;
}

body.dark-mode .bookmarks-bar-list.card-view .bookmark-folder-title:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

body.dark-mode .bookmarks-bar-list.card-view .bookmark-folder-title:hover .folder-name {
    color: white;
}

body.dark-mode .bookmarks-bar-list.card-view .bookmark-folder-title:hover i.fa-folder {
    color: white;
}

body.dark-mode .card-folder-item:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

body.dark-mode .card-folder-item:hover i {
    color: white;
}

body.dark-mode .card-folder-item:hover .folder-name {
    color: white;
}

body.dark-mode .card-folder-item:hover .folder-count {
    color: rgba(255, 255, 255, 0.85);
    opacity: 1;
}

body.dark-mode .bookmarks-bar-list.card-view .bookmark-folder-content .bookmark-item:hover {
    background: var(--accent-color);
    color: white;
}

body.dark-mode .bookmarks-bar-list.card-view .bookmark-folder-content .bookmark-item:hover .bookmark-name {
    color: white;
}

body.dark-mode .bookmarks-bar-list.card-view .bookmark-folder-content .bookmark-item:hover .bookmark-url {
    color: rgba(255, 255, 255, 0.85);
}

#widget-calendar {
    position: fixed;
    bottom: calc(var(--taskbar-height) + 10px);
    right: 10px;
    width: 380px;
    background: var(--start-menu-bg);
    backdrop-filter: blur(var(--start-menu-blur));
    -webkit-backdrop-filter: blur(var(--start-menu-blur));
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 9997;
    padding: 16px;
    overflow: hidden;
}

.ppt-taskbar ~ #widget-calendar {
    bottom: 84px;
    right: 50%;
    transform: translateX(50%);
}

.widget-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.widget-calendar-header span {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color);
    cursor: pointer;
    border-radius: 4px;
    padding: 2px 6px;
    transition: background 0.15s, color 0.15s;
}

.widget-calendar-header span:hover {
    background: rgba(0, 0, 0, 0.05);
}

.widget-calendar-header span.year-mode {
    background: var(--accent-color);
    color: #fff;
}

.widget-calendar-nav {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    color: var(--text-color);
    border-radius: 4px;
    transition: background 0.15s;
}

.widget-calendar-nav:hover {
    background: rgba(0, 0, 0, 0.05);
}

.widget-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}

.widget-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.widget-calendar-day {
    width: 45px;
    height: 45px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-color);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.widget-calendar-day:hover {
    background: rgba(0, 0, 0, 0.05);
}

.widget-calendar-day.today {
    background: var(--accent-color);
    color: white;
}

.widget-calendar-day.today .lunar-small {
    color: rgba(255, 255, 255, 0.8);
}

.widget-calendar-day.other-month {
    color: #ccc;
}

/* 任务栏日历 月份滑动动画 */
.widget-cal-slide-wrap {
    overflow: hidden;
}

/* 任务栏日历 年份选择器 */
.widget-cal-year-picker {
    margin-top: 4px;
}

.widget-cal-year-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
}

.widget-cal-year-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.widget-cal-year-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-color);
    transition: background 0.15s, color 0.15s;
}

.widget-cal-year-cell:hover {
    background: rgba(0, 0, 0, 0.05);
}

.widget-cal-year-cell.active {
    background: var(--accent-color);
    color: #fff;
}

/* 任务栏日历 今天按钮 - 强调色描边 */
.widget-cal-today-wrap {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.widget-cal-today-btn {
    width: 100%;
    padding: 8px;
    border: 1.5px solid var(--accent-color) !important;
    color: var(--accent-color) !important;
    font-weight: 600;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.widget-cal-today-btn:hover {
    background: var(--accent-color) !important;
    color: #fff !important;
}

.widget-calendar-time {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
    font-size: 28px;
    font-weight: 300;
    color: var(--text-color);
}

@keyframes widgetSlideInRight {
    from {
        opacity: 0;
        right: -320px;
    }
    to {
        opacity: 1;
        right: 10px;
    }
}

@keyframes widgetSlideOutRight {
    from {
        opacity: 1;
        right: 10px;
    }
    to {
        opacity: 0;
        right: -320px;
    }
}

@keyframes widgetSlideInCenter {
    from {
        opacity: 0;
        right: calc(50% + 320px);
        transform: translateX(50%);
    }
    to {
        opacity: 1;
        right: 50%;
        transform: translateX(50%);
    }
}

@keyframes widgetSlideOutCenter {
    from {
        opacity: 1;
        right: 50%;
        transform: translateX(50%);
    }
    to {
        opacity: 0;
        right: calc(50% + 320px);
        transform: translateX(50%);
    }
}

#widget-calendar.show {
    animation: widgetSlideInRight 0.3s ease forwards;
}

#widget-calendar:not(.show) {
    animation: widgetSlideOutRight 0.3s ease forwards;
}

.ppt-taskbar ~ #widget-calendar.show {
    animation: widgetSlideInCenter 0.3s ease forwards;
}

.ppt-taskbar ~ #widget-calendar:not(.show) {
    animation: widgetSlideOutCenter 0.3s ease forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

.hidden {
    display: none !important;
}

.start-menu-search {
    padding: 12px 16px;
    border-bottom: 1px solid var(--window-border);
}

.start-menu-search input {
    width: 100%;
    padding: 8px 14px;
    border: 1px solid var(--window-border);
    border-radius: 18px;
    font-size: 13px;
    outline: none;
    background: var(--start-menu-search-bg);
    color: var(--text-color);
}

.start-menu-search input::placeholder {
    color: var(--text-secondary);
}

.start-menu-apps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    padding: 10px 8px;
    overflow-y: auto;
    flex: 1;
}

.app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

/* Electron 客户端专属开始菜单入口（如下载管理器）：网页版默认隐藏，
   仅桌面客户端（body.electron-env）显示，见 kj-electron.css */
.app-item.electron-only-item { display: none; }

/* Electron 客户端专属任务栏右键菜单项（如下载管理器）：网页版默认隐藏，
   仅桌面客户端（body.electron-env）显示，见 kj-electron.css */
.context-item.electron-only-item { display: none; }

.app-item:hover {
    background: var(--start-menu-app-hover-bg);
}

.app-item .icon-wrapper {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border-radius: 10px;
    color: white;
}

.app-item span {
    font-size: 11px;
    color: var(--text-color);
    text-align: center;
}

.start-menu-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--window-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.start-menu-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.15s;
}

.user-section:hover {
    background: var(--start-menu-app-hover-bg);
}

.user-section i {
    font-size: 24px;
    color: var(--text-secondary);
}

.user-section span {
    font-size: 12px;
    color: var(--text-color);
}

.power-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.15s;
}

.power-btn:hover {
    background: var(--start-menu-app-hover-bg);
    color: var(--text-color);
}

.fullscreen-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.15s;
}

.fullscreen-btn:hover {
    background: var(--start-menu-app-hover-bg);
    color: var(--text-color);
}

/* 开始菜单响应式适配 */
@media screen and (max-width: 600px) {
    #start-menu {
        width: calc(100vw - 20px);
        max-height: 70vh;
    }
    
    .start-menu-apps {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .app-item .icon-wrapper {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }
    
    .app-item span {
        font-size: 12px;
    }
}

@media screen and (max-width: 400px) {
    #start-menu {
        width: calc(100vw - 20px);
        max-height: 75vh;
    }
    
    .start-menu-apps {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .app-item .icon-wrapper {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
    
    .app-item span {
        font-size: 13px;
    }
}

/* 竖屏手机适配 */
@media screen and (max-height: 700px) and (orientation: portrait) {
    #start-menu {
        max-height: 60vh;
    }
    
    .start-menu-apps {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 小屏幕窗口适配 */
@media screen and (max-width: 768px) {
    .window {
        min-width: calc(100vw - 40px) !important;
        min-height: calc(100vh - var(--taskbar-height) - 60px) !important;
        max-width: calc(100vw - 20px) !important;
        max-height: calc(100vh - var(--taskbar-height) - 40px) !important;
    }
    .window.maximized {
        max-width: 100vw !important;
        max-height: 100vh !important;
    }

    /* 移动端禁止文本选择，支持长按右键菜单 */
    body,
    #desktop,
    #desktop-icons,
    .desktop-icon,
    .desktop-icon * {
        -webkit-user-select: none !important;
        user-select: none !important;
        -webkit-touch-callout: none !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    /* 移动端桌面图标：允许触摸滚动（非起始页模式）。
       两轴均设为 auto（与起始页一致），避免单轴 hidden 导致移动端触摸无法滚动：
       浏览器对“一轴 hidden + 一轴 auto”的 flex 容器常不识别为可触摸滚动的滚动容器。
       实际只在内容溢出的方向出现滚动条，另一轴不溢出故不滚动，视觉无变化。 */
    #desktop-icons {
        overflow: auto !important;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        left: 12px;
        right: 12px;
        top: 12px;
        gap: 6px;
    }

    /* 起始页模式在移动端使用网格布局 */
    body.layout-startpage #desktop-icons {
        overflow-x: visible !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        top: var(--startpage-icons-top);
        left: var(--startpage-icons-gap);
        right: var(--startpage-icons-gap);
        gap: var(--icon-cell-gap);
    }

    /* 纵向排列模式在移动端：图标竖向排列满高后向右换列，
       多列沿水平方向溢出，左右触摸滑动查看溢出的图标列 */
    body.layout-vertical #desktop-icons {
        overflow: auto !important;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }

    /* 横向排列模式在移动端：图标自动换行，垂直方向溢出，
       上下触摸滑动查看换行后溢出的图标 */
    body.layout-horizontal:not(.layout-startpage) #desktop-icons {
        overflow: auto !important;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }

    /* 移动端非起始页模式：搜索栏默认固定在中间偏下位置（可拖动覆盖）。
       position/width/z-index 锁定，top/left/transform 交由 JS 内联样式接管 */
    body:not(.layout-startpage) #search-widget {
        top: 62%;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translate(-50%, -50%);
        width: calc(100% - 24px) !important;
        max-width: calc(100% - 24px) !important;
        position: fixed !important;
        z-index: 1000 !important;
    }
    body:not(.layout-startpage) #search-time-display {
        display: none !important;
    }
    body:not(.layout-startpage) #desktop-icons {
        top: 12px !important;
    }
    body.layout-vertical:not(.layout-startpage) #desktop-icons {
        top: 12px !important;
    }

    /* 移动端自定义滚动条样式 */
    #desktop-icons::-webkit-scrollbar {
        height: 6px;
    }
    #desktop-icons::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 3px;
    }
    #desktop-icons::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 3px;
    }
    #desktop-icons::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.5);
    }

    /* 移动端更新通知适配 */
    #update-notification {
        width: calc(100vw - 32px);
        max-width: calc(100vw - 32px);
        padding: 12px 16px;
        bottom: calc(var(--taskbar-height) + 8px);
        left: 16px;
        transform: translateX(0) translateY(10px);
    }

    #update-notification.show {
        transform: translateX(0) translateY(0);
    }

    .update-content {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: space-between;
    }

    .update-content i {
        font-size: 16px;
    }

    .update-content span {
        font-size: 13px;
        flex: 1;
        min-width: 0;
        line-height: 1.4;
    }

    .update-refresh-btn {
        width: 100%;
        margin-top: 2px;
        padding: 8px 16px;
        font-size: 13px;
    }

    /* 移动端文件夹窗口适配 */
    .folder-window {
        max-width: calc(100vw - 24px);
        max-height: calc(100vh - 120px);
    }
    .folder-window-header {
        padding: 12px 14px;
        min-height: 48px;
        touch-action: none;
    }
    .folder-window-title {
        font-size: 15px;
    }
    .folder-window-title i {
        font-size: 18px;
    }
    .folder-window-close {
        width: 36px;
        height: 36px;
        font-size: 16px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: transparent;
    }
    .folder-window-view-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: transparent;
    }
    .folder-window-header-actions {
        gap: 6px;
    }
    .folder-window-content {
        padding: 12px;
        gap: 10px 6px;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .folder-item-icon {
        width: 68px !important;
        height: 76px !important;
        padding: 4px 2px;
    }
    .folder-item-icon .icon-img {
        width: 44px !important;
        height: 44px !important;
        font-size: 20px;
        border-radius: 12px;
        margin-bottom: 4px;
    }
    .folder-item-icon span {
        font-size: 11px;
        line-height: 1.2;
    }
    .folder-window.folder-large-mode .folder-item-icon {
        width: 104px !important;
        height: 116px !important;
        justify-content: flex-start;
    }
    .folder-window.folder-large-mode .folder-item-icon .icon-img {
        width: 72px !important;
        height: 72px !important;
        font-size: 34px;
        border-radius: 18px;
        margin-bottom: 6px;
    }
    .folder-window.folder-large-mode .folder-item-icon span {
        font-size: 12px;
        max-width: 100px;
        line-height: 1.25;
        display: block;
        white-space: normal;
        word-break: break-word;
        overflow: hidden;
        max-height: 30px;
        width: 100%;
        box-sizing: border-box;
        text-overflow: ellipsis;
        flex-shrink: 0;
    }
    .folder-empty-tip {
        font-size: 14px;
        padding: 50px 0;
    }
    .folder-rename-input {
        font-size: 14px !important;
        width: 90px !important;
        padding: 6px 10px !important;
        min-height: 32px;
        border-radius: 6px !important;
    }

    /* 移动端设置：侧边栏改为抽屉式覆盖层，通过汉堡按钮打开 */
    .settings-container {
        position: relative !important;
    }

    .settings-sidebar {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 240px !important;
        max-width: 80vw !important;
        min-width: 0 !important;
        height: auto !important;
        z-index: 30 !important;
        background: var(--settings-sidebar-bg) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-right: 1px solid var(--settings-sidebar-border) !important;
        padding: 12px 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    .settings-sidebar.show {
        visibility: visible !important;
        pointer-events: auto !important;
    }

    .settings-sidebar.show.mobile-open {
        transform: translateX(0) !important;
    }

    /* 抽屉模式下保持完整文字，不使用窄版图标样式
       注意：必须提升选择器特异性（用 body 限定）才能覆盖桌面端默认
       .settings-sidebar.show.narrow .sidebar-item span { display: none }（line 9358），
       否则后定义的桌面端规则会赢，导致文字被隐藏 */
    body .settings-sidebar.show.narrow,
    body .settings-sidebar.show.narrow.mobile-open {
        width: 240px !important;
    }

    body .settings-sidebar.show.narrow .sidebar-item {
        min-width: auto;
        padding: 10px 16px;
        justify-content: flex-start;
        gap: 12px;
    }

    body .settings-sidebar.show.narrow .sidebar-item span {
        display: inline;
    }

    body .settings-sidebar.show.narrow .sidebar-item i {
        margin: 0;
        width: 20px;
    }

    /* 移动端汉堡按钮 */
    .header-hamburger.visible {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: transparent;
        border: none;
        color: var(--text-color);
        font-size: 16px;
        cursor: pointer;
        border-radius: 8px;
        -webkit-tap-highlight-color: transparent;
        transition: background 0.15s;
        flex-shrink: 0;
    }

    .header-hamburger.visible:hover,
    .header-hamburger.visible:active {
        background: var(--sidebar-item-hover-bg);
    }

    /* 移动端抽屉遮罩：用 body 限定提升特异性，覆盖桌面端默认 display:none */
    body .settings-sidebar-backdrop {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 25;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    body .settings-sidebar-backdrop.show {
        opacity: 1;
        pointer-events: auto;
    }

    /* 移动端设置头部按钮间距收紧 */
    .header-left {
        gap: 4px;
    }

    .header-back {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* 设置窗口各级容器防溢出 */
    .settings-container {
        overflow: hidden !important;
        width: 100% !important;
        min-width: 0 !important;
        height: 100% !important;
    }

    .settings-main {
        min-width: 0 !important;
        overflow: hidden !important;
        width: 100% !important;
        height: 100% !important;
    }

    .settings-header {
        padding: 12px 14px;
        flex-shrink: 0;
    }

    .settings-content {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        min-width: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 16px 12px !important;
        -webkit-overflow-scrolling: touch;
    }

    .settings-page {
        min-width: 0 !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }

    .page-section {
        min-width: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 14px !important;
        margin-bottom: 12px !important;
        overflow-x: hidden !important;
    }

    .dark-mode-options {
        gap: 10px;
    }

    .dark-mode-option {
        min-width: 0;
        padding: 10px 6px;
    }

    .dark-mode-preview {
        width: 52px;
        height: 52px;
    }

    .dark-mode-name {
        font-size: 12px;
    }

    /* 确保包含设置的窗口内容区不溢出 */
    .window[data-app="settings"] .window-content {
        overflow: hidden !important;
        padding: 0 !important;
    }

    .window[data-app="settings"] .app-content {
        overflow: hidden !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    /* 移动端设置首页适配 */
    .settings-home {
        gap: 16px;
    }
    .home-header {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 8px;
    }
    .home-logo {
        font-size: 42px;
    }
    .home-version {
        font-size: 14px;
    }
    .home-btn {
        margin-left: 0;
        width: 100%;
        padding: 10px 16px;
        font-size: 14px;
    }
    .home-stats {
        flex-wrap: wrap;
        gap: 10px;
    }
    .stat-card {
        min-width: calc(50% - 5px);
        padding: 14px;
        flex: 1 1 calc(50% - 5px);
    }
    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
        margin-bottom: 8px;
    }
    .stat-value {
        font-size: 20px;
        margin-bottom: 8px;
    }
    .home-categories {
        flex-wrap: wrap;
        gap: 10px;
    }
    .category-card {
        flex: 1 1 calc(50% - 5px);
        min-width: calc(50% - 5px);
        padding: 16px;
    }
    .category-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin-bottom: 10px;
    }
    .category-title {
        font-size: 14px;
    }
    .category-desc {
        font-size: 12px;
    }
    .home-footer {
        padding: 12px 14px;
    }
    .settings-page {
        padding: 12px;
    }
    .page-section {
        padding: 16px;
        margin-bottom: 16px;
    }
}

/* 触摸反馈小圆点 */
.touch-ripple {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(24, 122, 255, 0.3);
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%) scale(0);
    animation: touchRipple 0.4s ease-out forwards;
}

@keyframes touchRipple {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0.6;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

@media screen and (max-width: 480px) {
    .window {
        min-width: calc(100vw - 20px) !important;
        min-height: calc(100vh - var(--taskbar-height) - 40px) !important;
        max-width: calc(100vw - 10px) !important;
        max-height: calc(100vh - var(--taskbar-height) - 20px) !important;
    }
    .window.maximized {
        max-width: 100vw !important;
        max-height: 100vh !important;
    }
}

/* ========== 开发者面板 ========== */
#dev-panel {
    position: fixed;
    top: 60px;
    right: 20px;
    width: 340px;
    max-height: 70vh;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-size: 13px;
    color: #e0e0e0;
    transition: opacity 0.2s;
}

#dev-panel.hidden {
    opacity: 0;
    pointer-events: none;
}

.dev-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    cursor: move;
    user-select: none;
}

.dev-panel-title {
    font-weight: 600;
    font-size: 13px;
    color: #fff;
}

.dev-panel-controls {
    display: flex;
    gap: 4px;
}

.dev-panel-btn {
    width: 26px;
    height: 26px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #ccc;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.dev-panel-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.dev-panel-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: max-height 0.3s;
}

.dev-panel-body.dev-panel-body-hidden {
    max-height: 0 !important;
    overflow: hidden;
}

.dev-tabs {
    display: flex;
    padding: 6px 8px 0;
    gap: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto;
}

.dev-tab {
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: #999;
    font-size: 12px;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    transition: all 0.15s;
    white-space: nowrap;
}

.dev-tab:hover {
    color: #ccc;
    background: rgba(255, 255, 255, 0.05);
}

.dev-tab.active {
    color: #187aff;
    background: rgba(24, 122, 255, 0.1);
}

.dev-tab-content {
    padding: 12px;
    overflow-y: auto;
    max-height: calc(70vh - 80px);
    flex: 1;
}

/* 系统信息 */
.dev-info-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dev-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
}

.dev-info-label {
    font-size: 11px;
    color: #888;
    font-weight: 500;
}

.dev-info-value {
    font-size: 12px;
    color: #e0e0e0;
    word-break: break-all;
}

.dev-ua {
    font-size: 10px;
    color: #aaa;
}

/* 存储 */
.dev-storage-section h4,
.dev-css-section h4,
.dev-perf-section h4,
.dev-tools-section h4 {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: #187aff;
    font-weight: 600;
}

.dev-storage-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.dev-storage-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    font-size: 11px;
}

.dev-storage-key {
    color: #187aff;
    font-weight: 600;
    min-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dev-storage-val {
    flex: 1;
    color: #aaa;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dev-storage-del {
    padding: 2px 8px;
    border: none;
    background: rgba(255, 80, 80, 0.2);
    color: #ff5050;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: background 0.15s;
}

.dev-storage-del:hover {
    background: rgba(255, 80, 80, 0.35);
}

.dev-empty {
    color: #666;
    font-size: 12px;
    padding: 8px;
    text-align: center;
}

.dev-add-storage {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

/* CSS 变量 */
.dev-css-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.dev-css-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
}

.dev-css-name {
    font-size: 11px;
    color: #187aff;
    min-width: 120px;
    font-family: 'Consolas', monospace;
}

.dev-css-input {
    flex: 1;
    padding: 3px 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    color: #e0e0e0;
    border-radius: 4px;
    font-size: 11px;
    font-family: 'Consolas', monospace;
    outline: none;
}

.dev-css-input:focus {
    border-color: #187aff;
}

/* 性能 */
.dev-perf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.dev-perf-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
}

.dev-perf-label {
    font-size: 11px;
    color: #888;
}

.dev-perf-value {
    font-size: 18px;
    font-weight: 700;
    color: #187aff;
}

.dev-perf-chart-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 8px;
    overflow: hidden;
}

#dev-fps-chart {
    width: 100%;
    height: 80px;
}

/* 工具 */
.dev-tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 16px;
}

.dev-tool-btn {
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.15s;
    text-align: left;
}

.dev-tool-btn:hover {
    background: rgba(24, 122, 255, 0.15);
    border-color: rgba(24, 122, 255, 0.3);
}

.dev-command-input {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.dev-command-output {
    font-family: 'Consolas', monospace;
    font-size: 11px;
    max-height: 150px;
    overflow-y: auto;
}

.dev-cmd-result {
    padding: 6px 8px;
    background: rgba(24, 122, 255, 0.08);
    border-radius: 6px;
    margin-bottom: 4px;
}

.dev-cmd-return {
    color: #4caf50;
}

.dev-cmd-error {
    padding: 6px 8px;
    background: rgba(255, 80, 80, 0.08);
    border-radius: 6px;
    margin-bottom: 4px;
}

.dev-cmd-err {
    color: #ff5050;
}

/* 通用按钮和输入 */
.dev-btn {
    padding: 6px 14px;
    border: none;
    background: #187aff;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.15s;
}

.dev-btn:hover {
    background: #1565d8;
}

.dev-input {
    flex: 1;
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    color: #e0e0e0;
    border-radius: 6px;
    font-size: 12px;
    outline: none;
}

.dev-input:focus {
    border-color: #187aff;
}

/* 网格叠加层 */
#dev-grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(24, 122, 255, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(24, 122, 255, 0.15) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 99998;
}

#windows-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: var(--taskbar-height);
    pointer-events: none;
    z-index: 1000;
}

.window {
    position: absolute;
    background: var(--window-bg);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--window-border);
    pointer-events: all;
    display: flex;
    flex-direction: column;
    min-width: 400px;
    min-height: 280px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: top 0.25s cubic-bezier(0.4, 0, 0.2, 1), left 0.25s cubic-bezier(0.4, 0, 0.2, 1), width 0.25s cubic-bezier(0.4, 0, 0.2, 1), height 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-radius 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.window.dragging {
    transform: scale(0.99) !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25), 0 0 0 1px color-mix(in srgb, var(--accent-color) 50%, transparent) !important;
    border-color: color-mix(in srgb, var(--accent-color) 60%, transparent) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, left 0s, top 0s !important;
}

@keyframes windowOpen {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.window.opening {
    animation: windowOpen 0.2s ease;
}

/* Custom App Content */
.custom-app-content {
    height: 100%;
    overflow: auto;
}

.custom-app-shadow-host {
    width: 100%;
    height: 100%;
    display: block;
}

.kj-error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    padding: 40px 20px;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.kj-error-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 36px;
}

.kj-error-icon.error-403 {
    background: linear-gradient(135deg, #ff6b6b, #ff3b30);
    color: white;
}

.kj-error-icon.error-404 {
    background: linear-gradient(135deg, #5a9cf5, var(--accent-color));
    color: white;
}

.kj-error-code {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.kj-error-code.error-403 {
    color: #ff3b30;
}

.kj-error-code.error-404 {
    color: var(--accent-color);
}

.kj-error-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
}

.kj-error-message {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 400px;
    line-height: 1.6;
    margin-bottom: 32px;
}

.kj-error-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.kj-error-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kj-error-btn.primary {
    background: var(--accent-color);
    color: white;
}

.kj-error-btn.primary:hover {
    background: var(--accent-hover);
}

.kj-error-btn.secondary {
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
    color: var(--accent-color);
    border: 1px solid color-mix(in srgb, var(--accent-color) 30%, transparent);
}

.kj-error-btn.secondary:hover {
    background: color-mix(in srgb, var(--accent-color) 20%, transparent);
}

.custom-app-content.system-style {
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;
    --success-color: #00d68f;
    --warning-color: #ff9500;
    --error-color: #ff3b30;
    --bg-primary: rgba(255, 255, 255, 0.8);
    --bg-secondary: rgba(255, 255, 255, 0.6);
    --border-color: rgba(0, 0, 0, 0.1);
}

body.dark-mode .custom-app-content.system-style {
    --text-primary: #e0e0e0;
    --text-secondary: #999999;
    --text-muted: #666666;
    --success-color: #00d68f;
    --warning-color: #ff9500;
    --error-color: #ff3b30;
    --bg-primary: rgba(32, 32, 36, 0.8);
    --bg-secondary: rgba(32, 32, 36, 0.6);
    --border-color: rgba(255, 255, 255, 0.1);
}

.custom-app-content.system-style .btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    outline: none;
}

.custom-app-content.system-style .btn-cancel {
    background: rgba(255, 255, 255, 0.8);
    color: #666666;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.custom-app-content.system-style .btn-cancel:hover {
    background: rgba(255, 255, 255, 0.9);
}

.custom-app-content.system-style .btn-primary {
    background: var(--accent-color);
    color: white;
}

.custom-app-content.system-style .btn-primary:hover {
    background: var(--accent-hover);
}

.custom-app-content.system-style .btn-secondary {
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
    color: var(--accent-color);
    border: 1px solid color-mix(in srgb, var(--accent-color) 30%, transparent);
}

.custom-app-content.system-style .btn-secondary:hover {
    background: color-mix(in srgb, var(--accent-color) 20%, transparent);
}

.custom-app-content.system-style .form-group {
    margin-bottom: 16px;
    width: 100%;
}

.custom-app-content.system-style .form-group label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 500;
}

.custom-app-content.system-style .form-group input,
.custom-app-content.system-style .form-group select,
.custom-app-content.system-style .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a1a;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
    outline: none;
}

.custom-app-content.system-style .form-group input:focus,
.custom-app-content.system-style .form-group select:focus,
.custom-app-content.system-style .form-group textarea:focus {
    border-color: var(--accent-color);
}

.custom-app-content.system-style .form-group input::placeholder {
    color: #999;
}

.custom-app-content.system-style .form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.custom-app-content.system-style .form-group select {
    cursor: pointer;
}

.custom-app-content.system-style .card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.custom-app-content.system-style .card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.custom-app-content.system-style .card-body {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.custom-app-content.system-style .list-group {
    list-style: none;
    padding: 0;
    margin: 0;
}

.custom-app-content.system-style .list-group-item {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
    color: #333;
}

.custom-app-content.system-style .list-group-item:last-child {
    border-bottom: none;
}

.custom-app-content.system-style .list-group-item:hover {
    background: color-mix(in srgb, var(--accent-color) 5%, transparent);
}

.custom-app-content.system-style .list-group-item.active {
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
    color: var(--accent-color);
}

.custom-app-content.system-style .toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.custom-app-content.system-style .toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.custom-app-content.system-style .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.custom-app-content.system-style .toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.custom-app-content.system-style .toggle-switch input:checked + .toggle-slider {
    background-color: var(--accent-color);
}

.custom-app-content.system-style .toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

.custom-app-content.system-style .progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.custom-app-content.system-style .progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #00d68f);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.custom-app-content.system-style .badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.custom-app-content.system-style .badge-primary {
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
    color: var(--accent-color);
}

.custom-app-content.system-style .badge-success {
    background: rgba(0, 214, 143, 0.1);
    color: #00d68f;
}

.custom-app-content.system-style .badge-warning {
    background: rgba(255, 149, 0, 0.1);
    color: #ff9500;
}

.custom-app-content.system-style .badge-error {
    background: rgba(255, 59, 48, 0.1);
    color: #ff3b30;
}

.custom-app-content.system-style .alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.custom-app-content.system-style .alert-info {
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
    color: var(--accent-color);
    border: 1px solid color-mix(in srgb, var(--accent-color) 20%, transparent);
}

.custom-app-content.system-style .alert-success {
    background: rgba(0, 214, 143, 0.1);
    color: #00d68f;
    border: 1px solid rgba(0, 214, 143, 0.2);
}

.custom-app-content.system-style .alert-warning {
    background: rgba(255, 149, 0, 0.1);
    color: #ff9500;
    border: 1px solid rgba(255, 149, 0, 0.2);
}

.custom-app-content.system-style .alert-error {
    background: rgba(255, 59, 48, 0.1);
    color: #ff3b30;
    border: 1px solid rgba(255, 59, 48, 0.2);
}

.custom-app-content.system-style hr {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin: 16px 0;
}

.custom-app-content.system-style .grid {
    display: grid;
    gap: 16px;
}

.custom-app-content.system-style .grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.custom-app-content.system-style .grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.custom-app-content.system-style .grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.custom-app-content.system-style .flex {
    display: flex;
}

.custom-app-content.system-style .flex-column {
    flex-direction: column;
}

.custom-app-content.system-style .flex-center {
    align-items: center;
    justify-content: center;
}

.custom-app-content.system-style .flex-between {
    justify-content: space-between;
}

.custom-app-content.system-style .flex-wrap {
    flex-wrap: wrap;
}

.custom-app-content.system-style .gap-sm {
    gap: 8px;
}

.custom-app-content.system-style .gap-md {
    gap: 16px;
}

.custom-app-content.system-style .gap-lg {
    gap: 24px;
}

.custom-app-content.system-style .text-center {
    text-align: center;
}

.custom-app-content.system-style .text-muted {
    color: #999;
}

.custom-app-content.system-style .text-primary {
    color: var(--accent-color);
}

.custom-app-content.system-style .text-success {
    color: #00d68f;
}

.custom-app-content.system-style .text-warning {
    color: #ff9500;
}

.custom-app-content.system-style .text-error {
    color: #ff3b30;
}

.custom-app-content.system-style .mb-0 {
    margin-bottom: 0;
}

.custom-app-content.system-style .mb-1 {
    margin-bottom: 4px;
}

.custom-app-content.system-style .mb-2 {
    margin-bottom: 8px;
}

.custom-app-content.system-style .mb-3 {
    margin-bottom: 16px;
}

.custom-app-content.system-style .mb-4 {
    margin-bottom: 24px;
}

.custom-app-content.system-style .mt-0 {
    margin-top: 0;
}

.custom-app-content.system-style .mt-1 {
    margin-top: 4px;
}

.custom-app-content.system-style .mt-2 {
    margin-top: 8px;
}

.custom-app-content.system-style .mt-3 {
    margin-top: 16px;
}

.custom-app-content.system-style .mt-4 {
    margin-top: 24px;
}

.custom-app-body {
    padding: 16px;
    min-height: 100%;
    box-sizing: border-box;
}

.custom-app-body * {
    max-width: 100%;
}

@keyframes windowCloseInterrupted {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.window.closing-interrupted {
    animation: windowCloseInterrupted 0.15s ease-out;
}

@keyframes windowClose {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

.window.closing {
    animation: windowClose 0.15s ease-in forwards;
}

.window.maximized {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: calc(100vh - var(--taskbar-height)) !important;
    border-radius: 0;
    z-index: 9999 !important;
}

.window.minimized {
    display: none;
}

.window-titlebar {
    height: var(--title-bar-height);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    padding: 0 12px;
    cursor: move;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.window.maximized .window-titlebar {
    cursor: default;
}

.window-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 图片图标样式（支持文件导入的自定义图标） */
.window-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.icon-img img {
    max-width: 70%;
    max-height: 70%;
    object-fit: contain;
    border-radius: 4px;
}

.taskbar-app img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* 图标上传按钮样式 */
.icon-upload-section {
    padding: 10px 8px 6px;
    border-top: 1px solid var(--window-border, rgba(0,0,0,0.08));
    margin-top: 8px;
}

.icon-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px dashed var(--accent-color, #187aff);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    color: var(--accent-color, #187aff);
    transition: all 0.15s;
}

.icon-upload-btn:hover {
    background: color-mix(in srgb, var(--accent-color, #187aff) 10%, transparent);
}

/* 添加快捷方式对话框：图标操作按钮容器（获取网站图标 / 上传自定义图标） */
.shortcut-icon-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.shortcut-icon-actions .icon-upload-btn {
    flex: 1;
    padding: 7px 8px;
}

.window-title {
    flex: 1;
    font-size: 13px;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.window-controls {
    display: flex;
    gap: 2px;
}

.window-control {
    width: 46px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 12px;
    transition: background 0.1s;
}

.window-control:hover {
    background: rgba(0, 0, 0, 0.08);
}

.window-control.close:hover {
    background: #e81123;
    color: white;
}

.window-control.immersive-music:hover {
    background: var(--accent-color);
    color: white;
}

.window-control.blackhole-fullscreen-btn:hover {
    background: #ff6b00;
    color: white;
}

.window-splash {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4d9fff 0%, var(--accent-color) 50%, #0056cc 100%);
    z-index: 1000;
    animation: splashFadeOut 0.4s ease-out forwards;
    animation-delay: 0.8s;
}

.window-splash .splash-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: white;
    margin-bottom: 20px;
    animation: splashIconPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.window-splash .splash-title {
    color: white;
    font-size: 18px;
    font-weight: 600;
    opacity: 0;
    animation: splashTitleFade 0.4s ease-out forwards;
    animation-delay: 0.2s;
}

.window-splash.hidden {
    display: none;
}

@keyframes splashIconPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes splashTitleFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes splashFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        pointer-events: none;
    }
}

.window-content {
    flex: 1;
    overflow: auto;
    background: transparent;
    position: relative;
}

/* ========== 内置浏览器导航栏 ========== */
.web-navigation {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--window-bg, rgba(255, 255, 255, 0.9));
    border-bottom: 1px solid var(--window-border, rgba(0, 0, 0, 0.08));
    flex-shrink: 0;
}

.web-nav-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: var(--text-color, #333);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: background 0.15s, color 0.15s;
}

.web-nav-btn:hover {
    background: var(--button-hover, rgba(0, 0, 0, 0.06));
}

.web-address {
    flex: 1;
    min-width: 0;
    height: 30px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: var(--button-bg, rgba(0, 0, 0, 0.05));
    font-size: 12px;
    color: var(--text-color, #333);
    outline: none;
    cursor: text;
    user-select: text;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: border-color 0.15s, background 0.15s;
}

.web-address:hover {
    background: var(--button-hover, rgba(0, 0, 0, 0.08));
}

.web-address:focus {
    background: var(--button-hover, rgba(0, 0, 0, 0.08));
    border-color: var(--accent-color, #187aff);
}

.app-website .window-content {
    overflow: hidden;
    padding: 0;
}

/* ========== 多标签浏览器 ========== */
.window-titlebar .browser-tabs {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    padding: 2px 4px;
    cursor: default;
}
.window-titlebar .browser-tabs::-webkit-scrollbar { display: none; }
.browser-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 180px;
    min-width: 60px;
    height: 26px;
    padding: 0 8px;
    border-radius: 6px;
    background: var(--button-bg, rgba(0, 0, 0, 0.05));
    color: var(--text-secondary, #666);
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
    user-select: none;
}
.browser-tab:hover { background: var(--button-hover, rgba(0, 0, 0, 0.1)); }
.browser-tab.active {
    background: var(--accent-color, #187aff);
    color: #fff;
}
.browser-tab-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.browser-tab-close {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 10px;
    flex-shrink: 0;
    opacity: 0.7;
}
.browser-tab-close:hover { background: rgba(0, 0, 0, 0.15); opacity: 1; }
.browser-tab.active .browser-tab-close:hover { background: rgba(255, 255, 255, 0.25); }
.browser-tab-add {
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary, #666);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}
.browser-tab-add:hover { background: var(--button-hover, rgba(0, 0, 0, 0.1)); color: var(--text-color, #333); }
.browser-content {
    position: relative;
}
.browser-tab-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.browser-tab-frame webview,
.browser-tab-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
}
.browser-content .web-address.web-address,
.browser-content .web-address.web-address:focus {
    /* 已由全局 .web-address 统一样式接管（含光标、边框、聚焦态），此处保留占位避免误用 */
}

/* 标签页悬停预览卡片（设置-性能-标签页悬停预览卡片的外观） */
.kj-tab-preview {
    position: fixed;
    z-index: 2147483100;
    width: 320px;
    background: var(--bg-color, #fff);
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.12));
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    animation: kjPreviewIn 0.18s ease-out;
}
@keyframes kjPreviewIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.kj-tab-preview-title {
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-color, #333);
    border-bottom: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.kj-tab-preview-screenshot {
    width: 100%;
    height: 180px;
    background: var(--button-bg, rgba(0, 0, 0, 0.04));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--text-secondary, #888);
}
.kj-tab-preview-screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* splash 显示期间锁定滚动 */
.window-content.splash-lock-scroll {
    overflow: hidden;
}

.app-content {
    width: 100%;
    height: 100%;
}

.app-content.hidden {
    display: none;
}

.window-statusbar {
    height: 24px;
    background: #f9f9f9;
    border-top: 1px solid var(--window-border);
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-size: 12px;
    color: var(--text-secondary);
}

.window.maximized .resize-handle,
.window.minimized .resize-handle {
    display: none;
}

.resize-handle {
    position: absolute;
    z-index: 10;
}

.resize-top,
.resize-bottom {
    left: 8px;
    right: 8px;
    height: 6px;
    cursor: ns-resize;
}

.resize-top {
    top: 0;
}

.resize-bottom {
    bottom: 0;
}

.resize-left,
.resize-right {
    top: 8px;
    bottom: 8px;
    width: 6px;
    cursor: ew-resize;
}

.resize-left {
    left: 0;
}

.resize-right {
    right: 0;
}

.resize-corner {
    width: 12px;
    height: 12px;
}

.resize-top-left {
    top: 0;
    left: 0;
    cursor: nwse-resize;
}

.resize-top-right {
    top: 0;
    right: 0;
    cursor: nesw-resize;
}

.resize-bottom-left {
    bottom: 0;
    left: 0;
    cursor: nesw-resize;
}

.resize-bottom-right {
    bottom: 0;
    right: 0;
    cursor: nwse-resize;
}

#context-menu, #text-context-menu, #taskbar-context-menu, #shortcut-context-menu, #widget-context-menu, #custom-widget-context-menu, #folder-context-menu, #miniprogram-context-menu {
    position: fixed;
    background: var(--context-menu-bg, rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--context-menu-border, rgba(255, 255, 255, 0.5));
    padding: 6px;
    z-index: 100000;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}

#context-menu.show, #text-context-menu.show, #taskbar-context-menu.show, #shortcut-context-menu.show, #widget-context-menu.show, #custom-widget-context-menu.show, #folder-context-menu.show, #miniprogram-context-menu.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.context-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-color);
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
}

.context-item:hover {
    background: color-mix(in srgb, var(--accent-color) 15%, transparent);
}

.context-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.context-item.danger {
    color: #ff4d4f;
}

.context-item.danger:hover {
    background: rgba(255, 77, 79, 0.12);
}

.context-item.danger:hover i {
    color: #ff4d4f;
}

.context-item i {
    width: 20px;
    color: var(--text-secondary);
    text-align: center;
    flex-shrink: 0;
    transition: color 0.15s;
}

.context-item:hover i {
    color: var(--accent-color);
}

.context-item span {
    flex: 1;
    white-space: nowrap;
}

.context-item .check-placeholder {
    width: 20px;
    flex-shrink: 0;
}

.context-divider {
    height: 1px;
    background: var(--window-border);
    margin: 4px 8px;
}

.context-submenu {
    position: relative;
}

.context-submenu .context-item {
    justify-content: flex-start;
}

.context-submenu .context-item .submenu-arrow {
    margin-left: auto;
    font-size: 10px;
}

.context-submenu-content {
    position: absolute;
    left: 100%;
    top: 0;
    background: var(--context-menu-bg, rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--context-menu-border, rgba(255, 255, 255, 0.5));
    padding: 6px;
    min-width: 140px;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.context-submenu:hover > .context-submenu-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* 触摸设备：禁用 hover 触发子菜单，改用 .submenu-open 类 */
@media (hover: none) {
    .context-submenu:hover > .context-submenu-content {
        opacity: 0;
        visibility: hidden;
        transform: translateX(-10px);
    }
    .context-submenu.submenu-open > .context-submenu-content {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }
}

.context-submenu-content .context-item {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.context-submenu-content .context-item i {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.context-submenu-content .context-item i.fa-check {
    color: var(--accent-color);
    visibility: hidden;
}

.context-submenu-content .context-item i.fa-check.visible {
    visibility: visible;
}

.context-submenu-content .context-item i.engine-icon {
    color: var(--text-secondary);
}

.context-submenu-content .context-item[data-engine="google"] i.engine-icon {
    color: #4285f4;
}

.context-submenu-content .context-item[data-engine="bing"] i.engine-icon {
    color: #00a4ef;
}

.context-submenu-content .context-item[data-engine="baidu"] i.engine-icon {
    color: #306CFF;
}

.engine-svg,
.search-svg,
.sogou-svg,
.search-svg-sogou,
.svg-360,
.search-svg-360 {
    width: 16px;
    height: 16px;
}

.engine-svg,
.svg-360 {
    display: inline-block;
    vertical-align: middle;
    margin-right: 2px;
}

.search-svg,
.search-svg-sogou,
.search-svg-360 {
    width: 18px;
    height: 18px;
    display: inline-block;
    vertical-align: middle;
}

.hidden {
    display: none !important;
}

.context-submenu-content .context-item .menu-text {
    flex: 1;
    text-align: left;
    white-space: nowrap;
}

.context-submenu-content .context-item .check-placeholder {
    width: 20px;
    flex-shrink: 0;
}

#login-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

#widgets-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 100;
}

#widgets-container .widget {
    pointer-events: auto;
}

.widget {
    width: 220px;
    background: var(--widget-bg);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid var(--widget-border);
    overflow: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease;
    position: absolute;
}

.widget.widget-hidden {
    display: none !important;
}

.widget:hover {
    /* 保留原有的 transform，不覆盖缩放 */
}

/* ========== 小组件净边模式 ========== */
.widget.widget-borderless {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.widget.widget-borderless .widget-header {
    display: none !important;
}

.widget.widget-borderless .widget-content {
    background: transparent !important;
}

/* ========== 小组件折叠 ========== */
.widget.widget-collapsed .widget-content {
    display: none !important;
}
.widget.widget-collapsed .widget-resize-handle {
    display: none !important;
}
.widget.widget-collapsed {
    height: auto !important;
}

/* 调整大小手柄 */
.widget-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    cursor: nwse-resize;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s;
}

.widget:hover .widget-resize-handle {
    opacity: 0.5;
}

.widget-resize-handle:hover {
    opacity: 1 !important;
}

.widget-resize-handle::before {
    content: '';
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 12px;
    height: 12px;
    border-right: 2px solid var(--text-color);
    border-bottom: 2px solid var(--text-color);
}

/* 调整大小模式 */
.widget.resizing {
    outline: 2px dashed var(--accent-color);
    outline-offset: 2px;
}

.widget.resizing .widget-resize-handle {
    opacity: 1 !important;
}

/* 小组件拖动模式 */
.widget.widget-dragging {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25), 0 0 0 2px color-mix(in srgb, var(--accent-color) 60%, transparent) !important;
    border-color: color-mix(in srgb, var(--accent-color) 70%, transparent) !important;
    transition: box-shadow 0.15s ease, border-color 0.15s ease !important;
}

/* 搜索栏拖动时的描边效果（仅作用于内层圆角容器） */
#search-widget.widget-dragging .search-container {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25), 0 0 0 2px color-mix(in srgb, var(--accent-color) 60%, transparent) !important;
    border-color: color-mix(in srgb, var(--accent-color) 70%, transparent) !important;
    transition: box-shadow 0.15s ease, border-color 0.15s ease !important;
}

/* 小组件拖动开始时的抖动动画（一次抖动） */
@keyframes widget-flip {
    0% { transform: scale(var(--widget-scale, 1)) rotate(0deg); }
    50% { transform: scale(var(--widget-scale, 1)) rotate(-8deg); }
    100% { transform: scale(var(--widget-scale, 1)) rotate(0deg); }
}

.widget.widget-flip-animate,
#search-widget.widget-flip-animate {
    animation: widget-flip 0.4s ease-in-out;
    animation-fill-mode: forwards;
}

/* 居中吸附指示器 */
#center-snap-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    display: none;
}

#center-snap-indicator.active {
    display: block;
}

.center-line {
    position: absolute;
    background: var(--accent-color, #187aff);
    opacity: 0.5;
    transition: opacity 0.15s ease;
}

.center-line-h {
    left: 0;
    right: 0;
    height: 2px;
    top: 50%;
    transform: translateY(-50%);
}

.center-line-v {
    top: 0;
    bottom: 0;
    width: 2px;
    left: 50%;
    transform: translateX(-50%);
}

#snap-lines-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.snap-line {
    position: absolute;
    background: var(--accent-color, #187aff);
    opacity: 0.6;
    z-index: 9999;
}

.snap-line-h {
    left: 0;
    right: 0;
    height: 1px;
}

.snap-line-v {
    top: 0;
    bottom: 0;
    width: 1px;
}

.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--widget-header-bg);
    border-bottom: 1px solid var(--widget-border);
    cursor: move;
}

.widget-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-header-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.widget-header i {
    color: var(--widget-text-color);
}

.widget-header span {
    color: var(--widget-text-color);
    font-weight: 600;
}

.widget-collapse-btn {
    background: transparent;
    border: none;
    color: var(--widget-text-color);
    width: 24px;
    height: 24px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.widget-collapse-btn:hover {
    background: var(--widget-btn-bg);
}

#todo-widget .widget-content {
    max-height: 300px;
    overflow-y: auto;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    padding: 16px;
    opacity: 1;
}

#todo-widget.collapsed .widget-content {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

#todo-widget.collapsed .widget-collapse-btn i {
    transform: rotate(-90deg);
}

.widget-collapse-btn i {
    transition: transform 0.3s ease;
}

.todo-count-badge {
    visibility: hidden;
    background: #ff6b6b;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

#todo-widget.collapsed .todo-count-badge {
    visibility: visible;
    opacity: 1;
    transform: scale(1);
}

.widget-add-btn {
    background: var(--widget-btn-bg);
    border: none;
    color: var(--widget-text-color);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.widget-add-btn:hover {
    background: var(--widget-btn-bg);
    opacity: 0.8;
}

.widget-content {
    padding: 16px;
}

#todo-list {
    max-height: 180px;
    overflow-y: auto;
    margin-bottom: 12px;
}

#todo-list::-webkit-scrollbar {
    width: 4px;
}

#todo-list::-webkit-scrollbar-thumb {
    background: var(--widget-input-border);
    border-radius: 2px;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--widget-border);
    transition: all 0.3s ease;
}

.todo-item:last-child {
    border-bottom: none;
}

.todo-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-color);
    cursor: pointer;
    flex-shrink: 0;
}

.todo-text {
    flex: 1;
    min-width: 0;
    color: var(--widget-text-color);
    font-size: 13px;
    transition: all 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.4;
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: var(--widget-text-secondary);
}

.todo-delete {
    background: none;
    border: none;
    color: var(--widget-text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    opacity: 0;
}

.todo-item:hover .todo-delete {
    opacity: 1;
}

.todo-delete:hover {
    background: rgba(255, 0, 0, 0.2);
    color: #ff6b6b;
}

.todo-input-container {
    display: flex;
}

#todo-input {
    flex: 1;
    padding: 10px 14px;
    background: var(--widget-input-bg);
    border: 1px solid var(--widget-input-border);
    border-radius: 10px;
    color: var(--widget-text-color);
    font-size: 13px;
    outline: none;
    transition: all 0.3s ease;
}

#todo-input::placeholder {
    color: var(--widget-text-secondary);
}

#todo-input:focus {
    border-color: var(--accent-color);
    background: var(--widget-input-bg);
}

/* ========== 天气组件样式 ========== */
#weather-widget {
    width: 180px;
}

.weather-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0 10px;
}

.weather-icon {
    font-size: 36px;
    color: var(--accent-color);
    line-height: 1;
    text-shadow: 0 2px 8px rgba(24, 122, 255, 0.3);
}

.weather-temp {
    font-size: 28px;
    font-weight: 300;
    color: var(--widget-text-color);
    letter-spacing: -1px;
}

.weather-desc {
    font-size: 12px;
    color: var(--widget-text-secondary);
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--widget-border);
}

.weather-location {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--widget-text-secondary);
}

.weather-location i {
    color: var(--accent-color);
    font-size: 10px;
}

#weather-widget.collapsed .widget-content {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

#weather-widget.collapsed .widget-collapse-btn i {
    transform: rotate(-90deg);
}

/* ========== 时钟日历组件样式 ========== */
#clock-widget {
    width: 180px;
}

.clock-time {
    font-size: 32px;
    font-weight: 200;
    color: var(--widget-text-color);
    text-align: center;
    letter-spacing: -1px;
    font-variant-numeric: tabular-nums;
    padding: 6px 0 2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.clock-date {
    font-size: 12px;
    color: var(--widget-text-secondary);
    text-align: center;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--widget-border);
}

#clock-widget.collapsed .widget-content {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

#clock-widget.collapsed .widget-collapse-btn i {
    transform: rotate(-90deg);
}

/* ========== 黑洞小组件样式 ========== */
#blackhole-widget {
    width: 300px;
}

#blackhole-canvas {
    display: block;
    width: 100%;
    height: 280px;
    border-radius: 8px;
    cursor: grab;
}

#blackhole-canvas:active {
    cursor: grabbing;
}

/* 屏幕扭曲模式覆盖层 */
#blackhole-screen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100000;
    cursor: grab;
}

#blackhole-screen-overlay:active {
    cursor: grabbing;
}

#blackhole-screen-info {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    z-index: 100001;
    pointer-events: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: screen-info-pulse 2s ease-in-out infinite;
}

#blackhole-screen-info i {
    color: var(--accent-color);
    margin-right: 4px;
}

@keyframes screen-info-pulse {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 1; }
}

#blackhole-widget.collapsed .widget-content {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

#blackhole-widget.collapsed .widget-collapse-btn i {
    transform: rotate(-90deg);
}

.login-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 340px;
    overflow: hidden;
    animation: loginBox 0.4s ease-out;
}

@keyframes loginBox {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.login-header {
    background: var(--accent-color);
    padding: 28px;
    text-align: center;
}

.kj-logo-login {
    font-size: 44px;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
}

.kj-logo-login .kj-logo-img {
    height: 44px;
    width: auto;
}

.login-header h2 {
    font-weight: 400;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
}

.login-content {
    padding: 32px 28px;
    text-align: center;
}

.user-avatar i {
    font-size: 56px;
    color: var(--accent-color);
    margin-bottom: 12px;
}

.login-content p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.login-content button {
    background: var(--accent-color);
    border: none;
    color: white;
    padding: 10px 48px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}

.login-content button:hover {
    background: var(--accent-hover);
}

.photos-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.photos-toolbar {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: var(--photos-toolbar-bg);
    border-bottom: 1px solid var(--window-border);
    flex-shrink: 0;
}

.photos-toolbar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--photos-toolbar-btn-bg);
    border: 1px solid var(--photos-toolbar-btn-border);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.15s;
}

.photos-toolbar-btn:hover {
    background: var(--photos-toolbar-btn-hover-bg);
}

.photos-toolbar-btn i {
    font-size: 12px;
}

.photos-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.photos-sidebar {
    width: 180px;
    background: var(--photos-sidebar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--window-border);
    padding: 12px 8px;
}

.photos-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-color);
    border-radius: 6px;
}

.photos-sidebar-item:hover {
    background: var(--photos-sidebar-hover-bg);
}

.photos-sidebar-item.active {
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
    color: var(--accent-color);
}

.photos-main {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: var(--photos-main-bg);
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.photo-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    border-radius: 8px;
    padding: 8px;
    transition: background 0.15s;
}

.photo-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}

.photo-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-color: #f0f0f0;
    margin-bottom: 8px;
}

.photo-placeholder {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    margin-bottom: 8px;
}

.photo-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s;
}

.photo-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.15s;
}

.photo-action-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.photo-action-btn.active {
    color: #ffc107;
    background: rgba(0, 0, 0, 0.6);
}

.photo-action-btn.delete:hover {
    background: rgba(255, 59, 48, 0.8);
}

.photo-name {
    font-size: 12px;
    color: var(--text-color);
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photos-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    gap: 12px;
}

.photos-empty i {
    font-size: 48px;
    opacity: 0.5;
}

.photos-empty span {
    font-size: 14px;
}

.photos-empty button {
    padding: 8px 20px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.15s;
}

.photos-empty button:hover {
    background: var(--accent-hover);
}

/* Minimal Mode */
#minimal-mode-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

#minimal-search-area {
    text-align: center;
    margin-top: -60px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#minimal-mode-container.visible #minimal-search-area {
    opacity: 1;
    transform: translateY(0);
}

#minimal-mode-container.visible {
    pointer-events: auto;
}

#minimal-greeting {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 24px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#minimal-search-box {
    position: relative;
    width: 560px;
    max-width: 85vw;
    margin: 0 auto;
}

.minimal-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--minimal-search-icon);
    font-size: 16px;
    z-index: 2;
}

.minimal-suggestions {
    position: absolute;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    max-width: 85vw;
    background: var(--minimal-suggestions-bg);
    border-radius: 12px;
    margin-top: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--minimal-suggestions-border);
    z-index: 1001;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.minimal-suggestions.show {
    max-height: 400px;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}



.minimal-suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s;
}

.minimal-suggestions.show .minimal-suggestion-item {
    opacity: 1;
    transform: translateY(0);
}

.minimal-suggestion-item:nth-child(1) { transition-delay: 0.05s; }
.minimal-suggestion-item:nth-child(2) { transition-delay: 0.1s; }
.minimal-suggestion-item:nth-child(3) { transition-delay: 0.15s; }
.minimal-suggestion-item:nth-child(4) { transition-delay: 0.2s; }
.minimal-suggestion-item:nth-child(5) { transition-delay: 0.25s; }
.minimal-suggestion-item:nth-child(6) { transition-delay: 0.3s; }

.minimal-suggestion-item:hover,
.minimal-suggestion-item.selected {
    background: color-mix(in srgb, var(--accent-color) 15%, transparent);
}

.minimal-suggestion-item i {
    color: var(--minimal-suggestion-icon);
    width: 20px;
}

.minimal-suggestion-item span {
    flex: 1;
    font-size: 14px;
    color: var(--minimal-suggestion-text);
    text-align: left;
}

#minimal-search-input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    border: 1px solid var(--minimal-search-border);
    border-radius: 12px;
    background: var(--minimal-search-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--minimal-search-text);
    font-size: 16px;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

#minimal-search-input:focus {
    background: var(--minimal-suggestions-bg);
    border-color: color-mix(in srgb, var(--accent-color) 60%, transparent);
    box-shadow: 0 4px 20px color-mix(in srgb, var(--accent-color) 20%, transparent), 0 2px 8px rgba(0, 0, 0, 0.08);
}

#minimal-search-input::placeholder {
    color: var(--minimal-search-icon);
    opacity: 0.8;
}

#minimal-bottom-bar {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 101;
    animation: bottomBarEnter 0.5s ease 0.3s forwards;
}

@keyframes bottomBarEnter {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

#minimal-exit-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--minimal-btn-border);
    border-radius: 10px;
    background: var(--minimal-btn-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--minimal-btn-text);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

#minimal-exit-btn:hover {
    background: #fff;
    border-color: rgba(255, 59, 48, 0.5);
    color: #ff3b30;
}

#minimal-settings-btn {
    width: 42px;
    height: 42px;
    border: 1px solid var(--minimal-btn-border);
    border-radius: 50%;
    background: var(--minimal-btn-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--minimal-btn-text);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

#minimal-settings-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-color);
    border-color: var(--accent-color);
}

#minimal-settings-panel {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 320px;
    max-width: calc(100vw - 40px);
    background: var(--minimal-panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    border: 1px solid var(--minimal-panel-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    z-index: 102;
    animation: dialogOpen 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

#minimal-settings-panel.hidden {
    display: none;
}

.minimal-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--minimal-panel-text);
    border-bottom: 1px solid var(--minimal-panel-divider);
}

.minimal-settings-header button {
    background: none;
    border: none;
    color: var(--minimal-panel-text-secondary);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    border-radius: 4px;
}

.minimal-settings-header button:hover {
    color: var(--minimal-panel-text);
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
}

.minimal-settings-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.minimal-settings-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--minimal-panel-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.minimal-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 13px;
    color: var(--minimal-panel-text);
}

.minimal-settings-row select {
    padding: 6px 12px;
    border: 1px solid var(--minimal-select-border);
    border-radius: 6px;
    background: var(--minimal-select-bg);
    color: var(--minimal-panel-text);
    font-size: 13px;
    cursor: pointer;
    outline: none;
}

.minimal-settings-row select:focus {
    border-color: color-mix(in srgb, var(--accent-color) 50%, transparent);
}

.minimal-settings-row.toggle-row {
    padding: 10px 0;
}

#minimal-pinned-apps {
    margin-top: 24px;
    padding: 16px;
    background: var(--minimal-panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    border: 1px solid var(--minimal-panel-border);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    max-width: 85vw;
    max-height: 200px;
    overflow-y: auto;
    box-sizing: border-box;
}

#minimal-pinned-apps.hidden {
    display: none;
}

.minimal-pinned-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--minimal-panel-text-secondary);
    margin-bottom: 12px;
    padding-left: 4px;
}

#minimal-pinned-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.minimal-pinned-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 72px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.minimal-pinned-app:hover {
    background: color-mix(in srgb, var(--accent-color) 18%, transparent);
}

.minimal-pinned-app-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 6px;
    color: white;
}

.minimal-pinned-app-name {
    font-size: 11px;
    color: #555;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    #minimal-search-box {
        width: 80vw;
        max-width: 320px;
    }

    #minimal-search-input {
        padding: 10px 16px 10px 38px;
        font-size: 14px;
        border-radius: 10px;
    }

    .minimal-search-icon {
        font-size: 14px;
        left: 12px;
    }

    #minimal-greeting {
        font-size: 24px;
    }
    
    #minimal-exit-btn span {
        display: none;
    }
    
    #minimal-exit-btn {
        padding: 10px;
        border-radius: 50%;
        width: 42px;
        height: 42px;
        justify-content: center;
    }
    
    #minimal-settings-panel {
        width: calc(100vw - 40px);
        right: 10px;
    }
}

/* Notification Popup —— 右下角通知（任务栏上方），不使用高斯模糊遮罩 */
#notification-popup {
    position: fixed;
    right: 16px;
    bottom: calc(var(--taskbar-height) + 16px);
    z-index: 10000;
    width: 360px;
    max-width: calc(100vw - 32px);
    pointer-events: none;
}

#notification-popup.hidden {
    display: none;
}

#notification-popup.hidden .notification-content {
    animation: notificationClose 0.2s ease-out forwards;
}

/* 取消全屏遮罩与高斯模糊：右下角通知不再遮挡整个桌面，仅弹窗本体可交互 */
.notification-overlay {
    display: none;
}

.notification-content {
    position: relative;
    width: 100%;
    background: var(--window-bg);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.15);
    overflow: hidden;
    pointer-events: auto;
    animation: notificationOpen 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes notificationOpen {
    0% {
        opacity: 0;
        transform: translateX(120%) translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
}

@keyframes notificationClose {
    0% {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(120%) translateY(8px);
    }
}

.notification-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.notification-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), #5a9cf5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.notification-title {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.notification-close {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    font-size: 14px;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.notification-body {
    padding: 20px;
    color: var(--text-color);
    font-size: 13px;
    line-height: 1.6;
}

.notification-body p {
    margin: 0 0 12px 0;
}

.notification-body p:last-child {
    margin-bottom: 0;
}

.notification-body ul {
    margin: 12px 0;
    padding-left: 20px;
}

.notification-body li {
    margin-bottom: 6px;
}

.notification-body li:last-child {
    margin-bottom: 0;
}

.notification-body strong {
    color: var(--text-color);
}

.notification-footer {
    display: flex;
    gap: 8px;
    padding: 0 20px 20px;
    justify-content: flex-end;
}

.notification-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.notification-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.notification-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.notification-btn-primary {
    background: var(--accent-color);
    color: white;
}

.notification-btn-primary:hover {
    background: #0a63d2;
}

/* ============ 公告中心（announcements.json） ============ */
.announcement-btn {
    position: relative;
}

.announcement-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff4d4f;
    border: 1.5px solid var(--window-bg, #1a1d26);
    box-sizing: content-box;
}

/* 公告中心弹窗容器：居中模态框 */
#announcement-popup {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

#announcement-popup.hidden {
    display: none;
}

.announcement-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    pointer-events: auto;
}

#announcement-popup.hidden .announcement-content {
    animation: notificationClose 0.2s ease-out forwards;
}

.announcement-content {
    position: relative;
    z-index: 10001;
    width: 520px;
    max-width: 90vw;
    max-height: 75vh;
    background: var(--window-bg);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    animation: notificationOpen 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.announcement-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.announcement-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), #5a9cf5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.announcement-title {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.announcement-close {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    font-size: 14px;
}

.announcement-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.announcement-list {
    overflow-y: auto;
    padding: 8px;
    max-height: calc(75vh - 70px);
}

.announcement-item {
    padding: 14px 14px;
    border-radius: 8px;
    margin-bottom: 6px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.15s;
}

.announcement-item:last-child {
    margin-bottom: 0;
}

.announcement-item.clickable {
    cursor: pointer;
}

.announcement-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

.announcement-item-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
}

.announcement-item-date {
    flex-shrink: 0;
    font-size: 11px;
    color: var(--accent-color);
    opacity: 0.85;
}

.announcement-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
}

.announcement-item-body {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.announcement-item-body p {
    margin: 0 0 8px 0;
}

.announcement-item-body p:last-child {
    margin-bottom: 0;
}

.announcement-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 60px 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.announcement-empty i {
    font-size: 36px;
    opacity: 0.4;
}

/* Photo Viewer Window */
.photo-viewer-window {
    min-width: 300px;
    min-height: 200px;
    background: rgba(26, 26, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.photo-viewer-window .window-titlebar {
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.photo-viewer-window .window-title {
    color: #ffffff;
}

.photo-viewer-window .window-icon i {
    color: #5a9cf5;
}

.photo-viewer-window .window-control {
    color: rgba(255, 255, 255, 0.7);
}

.photo-viewer-window .window-control:hover {
    color: #ffffff;
}

.photo-viewer-window .window-control.close {
    width: 46px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-viewer-window .window-control.close:hover {
    background: rgba(255, 59, 48, 0.8);
    color: #ffffff;
}

.photo-viewer-window .window-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(13, 13, 13, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
}

.photo-viewer-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.calendar-container {
    padding: 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    background: var(--calendar-bg, rgba(255, 255, 255, 0.4));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-shrink: 0;
    background: var(--calendar-header-bg, rgba(255, 255, 255, 0.6));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 16px;
    border-radius: 8px;
}

.calendar-nav {
    min-width: 32px;
    width: auto;
    padding: 0 10px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-color);
    font-size: 14px;
}

.calendar-nav:hover {
    background: var(--calendar-hover-bg, rgba(0, 0, 0, 0.05));
}

#calendar-month-year {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    border-radius: 4px;
    padding: 2px 8px;
    transition: background 0.15s, color 0.15s;
}

#calendar-month-year:hover {
    background: var(--calendar-hover-bg, rgba(0, 0, 0, 0.05));
}

#calendar-month-year.year-mode {
    background: var(--accent-color);
    color: #fff;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    flex-shrink: 0;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: 1fr;
    gap: 4px;
    flex: 1;
}

.calendar-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
}

.lunar-solar-day {
    font-size: 13px;
    line-height: 1.2;
}

.lunar-small {
    font-size: 10px;
    color: var(--text-secondary);
    line-height: 1.2;
}

.calendar-day:hover {
    background: var(--calendar-hover-bg, rgba(0, 0, 0, 0.05));
}

.calendar-day.today {
    background: var(--accent-color);
    color: white;
}

.calendar-day.today .lunar-small {
    color: rgba(255, 255, 255, 0.8);
}

.calendar-day.other-month {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* 日历月份滑动动画 */
.calendar-slide-wrap {
    overflow: hidden;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* 日历APP 年份选择器 */
.calendar-year-picker {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.calendar-year-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    background: var(--calendar-header-bg, rgba(255, 255, 255, 0.6));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.calendar-year-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
    gap: 8px;
    flex: 1;
}

.calendar-year-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    transition: background 0.15s, color 0.15s;
}

.calendar-year-cell:hover {
    background: var(--calendar-hover-bg, rgba(0, 0, 0, 0.06));
}

.calendar-year-cell.active {
    background: var(--accent-color);
    color: #fff;
}

/* 今天按钮 - 强调色描边 */
.calendar-today-wrap {
    margin-top: 12px;
    margin-bottom: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-today-btn {
    width: 100%;
    height: auto !important;
    border: 1.5px solid var(--accent-color) !important;
    color: var(--accent-color) !important;
    font-weight: 600;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.calendar-today-btn:hover {
    background: var(--accent-color) !important;
    color: #fff !important;
}

.calendar-events {
    margin-top: 20px;
    border-top: 1px solid var(--window-border);
    padding-top: 16px;
}

.calendar-events h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
}

.event-item {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--window-border);
}

.event-time {
    font-size: 12px;
    color: var(--accent-color);
    width: 50px;
}

.event-title {
    font-size: 13px;
    color: var(--text-color);
}

.music-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
    background: var(--music-container-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.music-album {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.album-art {
    width: 160px;
    height: 160px;
    background: linear-gradient(135deg, var(--accent-color), #87ceeb);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: white;
}

.music-info {
    text-align: center;
    margin-bottom: 16px;
}

.music-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
}

.music-artist {
    font-size: 13px;
    color: var(--text-secondary);
}

.music-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.music-time {
    font-size: 11px;
    color: var(--text-secondary);
    width: 40px;
}

.music-time.current {
    text-align: right;
}

.music-time.total {
    text-align: left;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: var(--music-progress-bg);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-color);
    transition: width 0.1s;
}

.music-controls {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}

.music-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-color);
    transition: background 0.15s;
}

.music-btn:hover {
    background: var(--music-btn-hover-bg);
}

.music-btn.play-btn {
    width: 56px;
    height: 56px;
    background: var(--accent-color);
    color: white;
    font-size: 22px;
}

.music-btn.play-btn:hover {
    background: var(--accent-hover);
}

.music-playlist {
    flex: 1;
    overflow-y: auto;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-color);
    border-radius: 6px;
}

.playlist-item:hover {
    background: var(--music-btn-hover-bg);
}

.playlist-item.active {
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
    color: var(--accent-color);
}

.playlist-item span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.playlist-remove-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.playlist-remove-btn:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.playlist-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 14px;
}

.playlist-empty i {
    font-size: 48px;
    opacity: 0.5;
}

.music-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.music-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: 1px solid var(--window-border);
    background: var(--window-bg);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-color);
    transition: all 0.2s;
}

.music-action-btn:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* ====== 记事本 ====== */
.notepad-app {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.notepad-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--window-border);
    background: var(--notepad-toolbar-bg, rgba(255, 255, 255, 0.3));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-shrink: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: thin;
}

.notepad-toolbar::-webkit-scrollbar { height: 6px; }
.notepad-toolbar::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 3px; }

.notepad-toolbar-group {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.notepad-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--window-border);
    background: var(--notepad-btn-bg, rgba(255, 255, 255, 0.5));
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-color);
    flex-shrink: 0;
    white-space: nowrap;
}

.notepad-btn:hover {
    background: var(--notepad-btn-hover-bg, rgba(255, 255, 255, 0.7));
}

.notepad-filename {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-secondary);
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

/* 侧边栏切换按钮：仅窄屏显示 */
.notepad-toggle-sidebar { display: none; }
.notepad-app.np-compact .notepad-toggle-sidebar { display: inline-flex; }
.notepad-app.np-compact .np-label { display: none; }
.notepad-app.np-compact .notepad-filename { max-width: 90px; }

/* 格式工具栏 */
.notepad-format-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    border-bottom: 1px solid var(--window-border);
    background: var(--notepad-toolbar-bg, rgba(255, 255, 255, 0.2));
    flex-shrink: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}
.notepad-format-toolbar::-webkit-scrollbar { height: 6px; }
.notepad-format-toolbar::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 3px; }

.np-fmt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 28px;
    padding: 0 6px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-color);
    flex-shrink: 0;
}
.np-fmt-btn:hover {
    background: var(--accent-color);
    color: white;
}
.np-fmt-sep {
    width: 1px;
    height: 18px;
    background: var(--window-border);
    margin: 0 4px;
    flex-shrink: 0;
}

/* 主区域：使用 flex 自动填充，避免 calc 误差导致的双滚动条 */
.notepad-main {
    display: flex;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

.notes-list-container {
    width: 200px;
    border-right: 1px solid var(--window-border);
    background: var(--notepad-sidebar-bg, rgba(255, 255, 255, 0.4));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow-y: auto;
    flex-shrink: 0;
}

.notes-list-header {
    padding: 12px;
    border-bottom: 1px solid var(--window-border);
    background: var(--notepad-header-bg, rgba(255, 255, 255, 0.3));
}

.notes-list-header h3 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-color);
}

.notes-list-empty {
    padding: 20px;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
}

.notes-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--window-border);
}

.notes-list-item-content {
    flex: 1;
    min-width: 0;
}

.notes-list-item:hover {
    background: var(--notepad-item-hover-bg, #f0f0f0);
}

.notes-list-delete-btn {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.15s;
    font-size: 12px;
}

.notes-list-item:hover .notes-list-delete-btn {
    opacity: 1;
}

.notes-list-delete-btn:hover {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

body.dark-mode .notes-list-delete-btn:hover {
    background: rgba(224, 127, 110, 0.2);
    color: #e07f6e;
}

.notes-list-filename {
    font-size: 12px;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notes-list-date {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* 窄屏：侧边栏变为抽屉 */
.notepad-app.np-compact .notes-list-container {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 20;
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.15);
    transform: translateX(-100%);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.notepad-app.np-compact.np-sidebar-open .notes-list-container {
    transform: translateX(0);
}

.notepad-content {
    flex: 1;
    display: flex;
    min-width: 0;
    min-height: 0;
    background: var(--notepad-content-bg, rgba(255, 255, 255, 0.95));
    overflow: hidden;
    position: relative;
}

.notepad-editor-wrap {
    flex: 1;
    display: flex;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
}

.notepad-content textarea {
    flex: 1;
    border: none;
    resize: none;
    padding: 16px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    outline: none;
    line-height: 1.5;
    background: transparent;
    color: var(--text-color);
    box-sizing: border-box;
    width: 100%;
    min-height: 0;
}

/* WYSIWYG 编辑器 */
.notepad-wysiwyg-wrap {
    flex: 1;
    display: flex;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
}

.notepad-wysiwyg {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 28px;
    outline: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-color);
    box-sizing: border-box;
    word-wrap: break-word;
}
.notepad-wysiwyg:empty::before {
    content: attr(data-placeholder);
    color: var(--text-secondary);
    opacity: 0.55;
    pointer-events: none;
}
.notepad-wysiwyg:focus { outline: none; }
.notepad-wysiwyg h1,
.notepad-wysiwyg h2,
.notepad-wysiwyg h3,
.notepad-wysiwyg h4,
.notepad-wysiwyg h5,
.notepad-wysiwyg h6 {
    margin: 16px 0 8px;
    font-weight: 600;
    line-height: 1.3;
}
.notepad-wysiwyg h1 { font-size: 24px; border-bottom: 2px solid var(--window-border); padding-bottom: 8px; }
.notepad-wysiwyg h2 { font-size: 20px; border-bottom: 1px solid var(--window-border); padding-bottom: 6px; }
.notepad-wysiwyg h3 { font-size: 17px; }
.notepad-wysiwyg h4 { font-size: 15px; }
.notepad-wysiwyg h5 { font-size: 14px; }
.notepad-wysiwyg h6 { font-size: 13px; color: var(--text-secondary); }
.notepad-wysiwyg p { margin: 8px 0; }
.notepad-wysiwyg ul,
.notepad-wysiwyg ol { margin: 8px 0; padding-left: 28px; }
.notepad-wysiwyg ul { list-style: disc; }
.notepad-wysiwyg ol { list-style: decimal; }
.notepad-wysiwyg li { margin: 4px 0; }
.notepad-wysiwyg blockquote {
    margin: 8px 0;
    padding: 8px 16px;
    border-left: 4px solid var(--accent-color);
    background: color-mix(in srgb, var(--accent-color) 5%, transparent);
    color: var(--text-secondary);
}
.notepad-wysiwyg pre {
    margin: 8px 0;
    padding: 12px 16px;
    background: #1e1e1e;
    color: #d4d4d4;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre;
}
.notepad-wysiwyg code {
    padding: 2px 6px;
    background: color-mix(in srgb, var(--accent-color) 12%, transparent);
    color: #c7254e;
    border-radius: 3px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.9em;
}
.notepad-wysiwyg pre code { padding: 0; background: transparent; color: inherit; }
.notepad-wysiwyg a { color: var(--accent-color); }
.notepad-wysiwyg img { max-width: 100%; border-radius: 4px; }
.notepad-wysiwyg hr { border: none; border-top: 1px solid var(--window-border); margin: 16px 0; }
.notepad-wysiwyg table.md-table {
    border-collapse: collapse;
    width: 100%;
    margin: 8px 0;
    font-size: 13px;
}
.notepad-wysiwyg table.md-table th,
.notepad-wysiwyg table.md-table td {
    border: 1px solid var(--window-border);
    padding: 6px 12px;
    min-width: 60px;
}
.notepad-wysiwyg table.md-table th {
    background: color-mix(in srgb, var(--accent-color) 12%, transparent);
    font-weight: 600;
    text-align: left;
}

.notepad-preview-wrap {
    flex: 1;
    display: flex;
    min-width: 0;
    min-height: 0;
    overflow: auto;
    background: var(--notepad-content-bg, rgba(255, 255, 255, 0.95));
    border-left: 1px solid var(--window-border);
}

.notepad-preview-wrap:only-child {
    border-left: none;
}

.notepad-preview {
    padding: 20px 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-color);
    width: 100%;
    box-sizing: border-box;
}

/* Markdown 元素样式 */
.notepad-preview .md-empty {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 40px 0;
}

.notepad-preview .md-h {
    margin: 16px 0 8px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
}

.notepad-preview .md-h1 { font-size: 24px; border-bottom: 2px solid #eee; padding-bottom: 8px; }
.notepad-preview .md-h2 { font-size: 20px; border-bottom: 1px solid #eee; padding-bottom: 6px; }
.notepad-preview .md-h3 { font-size: 17px; }
.notepad-preview .md-h4 { font-size: 15px; }
.notepad-preview .md-h5 { font-size: 14px; }
.notepad-preview .md-h6 { font-size: 13px; color: #666; }

.notepad-preview .md-p {
    margin: 8px 0;
}

.notepad-preview .md-hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 16px 0;
}

.notepad-preview .md-ul,
.notepad-preview .md-ol {
    margin: 8px 0;
    padding-left: 28px;
}

.notepad-preview .md-ul { list-style: disc; }
.notepad-preview .md-ol { list-style: decimal; }

.notepad-preview .md-ul li,
.notepad-preview .md-ol li {
    margin: 4px 0;
}

.notepad-preview .md-quote {
    margin: 8px 0;
    padding: 8px 16px;
    border-left: 4px solid var(--accent-color);
    background: color-mix(in srgb, var(--accent-color) 5%, transparent);
    color: #555;
}

.notepad-preview .md-quote p {
    margin: 4px 0;
}

.notepad-preview .md-pre {
    margin: 8px 0;
    padding: 12px 16px;
    background: #1e1e1e;
    color: #d4d4d4;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
}

.notepad-preview .md-code {
    font-family: 'Consolas', 'Courier New', monospace;
    white-space: pre;
}

.notepad-preview .md-inline-code {
    padding: 2px 6px;
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
    color: #c7254e;
    border-radius: 3px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.9em;
}

.notepad-preview .md-table {
    border-collapse: collapse;
    width: 100%;
    margin: 8px 0;
    font-size: 13px;
}

.notepad-preview .md-table th,
.notepad-preview .md-table td {
    border: 1px solid #ddd;
    padding: 6px 12px;
}

.notepad-preview .md-table th {
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
    font-weight: 600;
}

.notepad-preview .md-table tr:nth-child(even) td {
    background: rgba(0, 0, 0, 0.02);
}

.notepad-preview .md-link {
    color: var(--accent-color);
    text-decoration: none;
}

.notepad-preview .md-link:hover {
    text-decoration: underline;
}

.notepad-preview .md-img {
    max-width: 100%;
    border-radius: 4px;
    margin: 4px 0;
}

.notepad-preview strong {
    font-weight: 600;
    color: #1a1a1a;
}

.notepad-preview em {
    font-style: italic;
}

.notepad-preview del {
    color: #999;
}

.settings-container {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.settings-sidebar {
    width: 0;
    background: var(--settings-sidebar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--settings-sidebar-border);
    padding: 12px 0;
    overflow: hidden;
    flex-shrink: 0;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-sidebar.show {
    width: 200px;
}

/* 窄版汉堡菜单 - 当浏览器窗口宽度较小时自动收缩为图标模式 */
.settings-sidebar.show.narrow {
    width: 50px;
}

.settings-sidebar.show.narrow .sidebar-item {
    min-width: auto;
    padding: 10px 0;
    justify-content: center;
    gap: 0;
}

.settings-sidebar.show.narrow .sidebar-item span {
    display: none;
}

.settings-sidebar.show.narrow .sidebar-item i {
    margin: 0;
}

/* 桌面端默认隐藏汉堡按钮与抽屉遮罩（仅移动端使用） */
.header-hamburger {
    display: none;
}

.settings-sidebar-backdrop {
    display: none;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
    transition: background 0.15s;
    white-space: nowrap;
}

.sidebar-item:hover {
    background: var(--sidebar-item-hover-bg);
}

.sidebar-item.active {
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
    color: var(--accent-color);
}

.sidebar-item i {
    width: 20px;
    font-size: 16px;
    color: var(--accent-color);
}

.settings-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--settings-main-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    min-width: 0;
    overflow: hidden;
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--settings-header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--settings-header-border);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-back {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
}

.header-back:hover {
    background: rgba(0, 0, 0, 0.1);
}

.header-icon {
    font-size: 24px;
    color: var(--accent-color);
}

.header-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.header-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
}

.header-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    scrollbar-gutter: stable;
    min-height: 0;
}

.settings-home {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.home-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.home-logo {
    font-size: 64px;
    font-weight: 700;
    color: var(--accent-color);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.home-version {
    font-size: 16px;
    color: var(--text-secondary);
}

.home-btn {
    margin-left: auto;
    padding: 8px 20px;
    border: 1px solid var(--accent-color);
    background: white;
    color: var(--accent-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.home-btn:hover {
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
}

.home-stats {
    display: flex;
    gap: 16px;
}

.stat-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    margin-bottom: 12px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
}

.stat-btn {
    padding: 6px 16px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-color);
}

.stat-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.home-categories {
    display: flex;
    gap: 16px;
}

.category-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-card:hover {
    border-color: color-mix(in srgb, var(--accent-color) 30%, transparent);
}

.category-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    margin-bottom: 16px;
}

.category-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
}

.category-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.home-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-badge {
    font-size: 14px;
}

.footer-text {
    font-size: 13px;
    color: var(--text-secondary);
}

.settings-page {
    padding: 20px;
}

.page-section {
    background: var(--page-section-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--page-section-border);
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--info-item-border);
}

.info-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 圆形问号帮助按钮（含悬浮提示） */
.info-help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    cursor: help;
    margin-left: 6px;
    vertical-align: middle;
    position: relative;
    flex-shrink: 0;
}
.info-help-btn i {
    font-size: 9px;
    line-height: 1;
}
.info-help-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    left: auto;
    transform: none;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.5;
    width: max-content;
    max-width: 280px;
    white-space: normal;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.info-help-btn::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    right: 4px;
    left: auto;
    transform: none;
    border: 4px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.85);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1000;
}
.info-help-btn:hover::after,
.info-help-btn:hover::before {
    opacity: 1;
}

.info-value {
    font-size: 14px;
    color: var(--text-color);
    font-weight: 500;
}

.info-warning {
    margin-top: 16px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    font-size: 13px;
    color: #ef4444;
}

.about-section {
    text-align: center;
}

.about-section .about-logo {
    font-size: 64px;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 16px;
}

.info-row-custom {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.info-label-custom {
    font-size: 14px;
    color: var(--text-secondary);
}

.info-value-custom {
    font-size: 14px;
    color: var(--text-color);
    font-weight: 500;
}

.admin-status {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px;
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
    border-radius: 8px;
    color: var(--accent-color);
    font-size: 14px;
    font-weight: 500;
    border: none;
}

.admin-status i {
    color: var(--accent-color);
}

.oss-license-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.oss-license-item {
    padding: 14px;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--page-section-border);
}

.oss-license-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.oss-license-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.oss-license-type {
    font-size: 12px;
    padding: 4px 10px;
    background: color-mix(in srgb, var(--accent-color) 12%, transparent);
    color: var(--accent-color);
    border-radius: 12px;
    font-weight: 500;
}

.oss-license-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.5;
}

.oss-license-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.oss-license-link:hover {
    text-decoration: underline;
}

.oss-license-link i {
    font-size: 11px;
}

.danger-section {
    border: 1px solid rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.danger-title {
    color: #ef4444 !important;
}

.danger-desc {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 16px;
}

.danger-btn {
    border-color: #ef4444 !important;
    color: #ef4444 !important;
    background: white;
}

.danger-btn:hover {
    background: rgba(239, 68, 68, 0.1) !important;
}

.page-btn {
    padding: 10px 24px;
    border: 1px solid var(--accent-color);
    background: var(--card-bg);
    color: var(--accent-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.page-btn:hover {
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
}

.engine-presets {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.engine-preset-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(0,0,0,0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
}

.engine-preset-item:hover {
    background: rgba(0,0,0,0.1);
}

.engine-preset-item i {
    font-size: 18px;
}

.engine-preset-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.engine-preset-item span {
    font-size: 13px;
    color: var(--text-color);
    white-space: nowrap;
}

.select-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.select-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(0,0,0,0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.select-option:hover {
    background: rgba(0,0,0,0.1);
}

.select-option.selected {
    background: color-mix(in srgb, var(--accent-color) 15%, transparent);
}

.select-option i:first-child {
    font-size: 16px;
    color: var(--text-secondary);
    width: 20px;
    text-align: center;
}

.select-option span {
    flex: 1;
    font-size: 13px;
    color: var(--text-color);
}

.select-option .option-check {
    font-size: 12px;
    color: var(--accent-color);
    opacity: 0;
}

.select-option.selected .option-check {
    opacity: 1;
}

.app-manage-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-manage-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(0,0,0,0.05);
    border-radius: 8px;
    transition: background 0.15s;
}

.app-manage-item:hover {
    background: rgba(0,0,0,0.1);
}

.app-manage-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.app-manage-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-manage-icon i {
    color: white;
    font-size: 16px;
}

.app-manage-detail {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.app-manage-name {
    font-size: 13px;
    color: var(--text-color);
    font-weight: 500;
}

.app-manage-url {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.app-manage-delete {
    padding: 8px 12px;
    background: rgba(244, 67, 54, 0.1);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: #f44336;
    transition: background 0.15s;
}

.app-manage-delete:hover {
    background: rgba(244, 67, 54, 0.2);
}

.app-manage-delete i {
    font-size: 14px;
}

.app-manage-restore {
    padding: 8px 12px;
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: var(--accent-color);
    transition: background 0.15s;
}

.app-manage-restore:hover {
    background: color-mix(in srgb, var(--accent-color) 20%, transparent);
}

.app-manage-restore i {
    font-size: 14px;
}

.app-manage-item.deleted {
    opacity: 0.6;
}

.empty-tip {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-header .section-title {
    margin-bottom: 0;
}

.section-refresh-btn {
    padding: 6px 10px;
    background: rgba(0,0,0,0.05);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.15s;
}

.section-refresh-btn:hover {
    background: rgba(0,0,0,0.1);
    color: var(--text-color);
}

.section-refresh-btn i {
    font-size: 13px;
}

.view-toggle {
    display: flex;
    gap: 6px;
    align-items: center;
}

.view-btn {
    padding: 6px 10px;
    background: rgba(0,0,0,0.05);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.15s;
}

.view-btn:hover {
    background: rgba(0,0,0,0.1);
    color: var(--text-color);
}

.view-btn.active {
    background: color-mix(in srgb, var(--accent-color) 15%, transparent);
    color: var(--accent-color);
}

.view-btn i {
    font-size: 13px;
}

.app-manage-list.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.app-manage-list.grid .app-manage-item {
    flex-direction: column;
    padding: 16px 12px;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.app-manage-list.grid .app-manage-info {
    flex-direction: column;
    gap: 10px;
}

.app-manage-list.grid .app-manage-icon {
    width: 48px;
    height: 48px;
}

.app-manage-list.grid .app-manage-icon i {
    font-size: 22px;
}

.app-manage-list.grid .app-manage-detail {
    align-items: center;
}

.app-manage-list.grid .app-manage-name {
    font-size: 14px;
}

.app-manage-list.grid .app-manage-url {
    font-size: 11px;
    max-width: 100%;
}

.app-manage-list.grid .app-manage-delete,
.app-manage-list.grid .app-manage-restore {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 6px 8px;
}

.app-manage-list.grid .app-manage-item {
    position: relative;
}

.calculator-content {
    padding: 16px;
}

.calculator-display {
    background: var(--calculator-display-bg);
    padding: 16px 20px;
    text-align: right;
    font-size: 32px;
    font-weight: 300;
    border-radius: 8px;
    margin-bottom: 16px;
    font-family: 'Segoe UI', sans-serif;
    min-height: 56px;
    word-wrap: break-word;
    color: var(--text-color);
}

.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.calc-btn {
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.1s, transform 0.1s;
}

.calc-btn:hover {
    transform: scale(1.02);
}

.calc-btn:active {
    transform: scale(0.98);
}

.calc-btn.number {
    background: var(--calculator-number-bg);
    color: var(--text-color);
}

.calc-btn.number:hover {
    background: var(--calculator-number-hover-bg);
}

.calc-btn.operator {
    background: var(--calculator-operator-bg);
    color: var(--text-color);
}

.calc-btn.operator:hover {
    background: var(--calculator-operator-hover-bg);
}

.calc-btn.equals {
    background: var(--accent-color);
    color: white;
}

.calc-btn.equals:hover {
    background: var(--accent-hover);
}

.calc-btn.clear {
    background: var(--calculator-clear-bg);
    color: #dc2626;
}

.calc-btn.clear:hover {
    background: var(--calculator-clear-hover-bg);
}

.terminal-content {
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Cascadia Code', 'Consolas', monospace;
    padding: 16px;
    height: 100%;
}

.terminal-output {
    height: calc(100% - 36px);
    overflow-y: auto;
    margin-bottom: 12px;
}

.terminal-line {
    margin-bottom: 4px;
    font-size: 14px;
    line-height: 1.4;
}

.terminal-line.command {
    color: #569cd6;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.terminal-prompt {
    color: #4ec9b0;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #d4d4d4;
    font-family: inherit;
    font-size: 14px;
    outline: none;
}

/* 任务管理器样式 */
.taskmanager-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.taskmanager-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--window-border);
}

.taskmanager-stats {
    display: flex;
    gap: 24px;
}

.taskmanager-stats .stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.taskmanager-stats .stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.taskmanager-stats .stat-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
}

.stat-label-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-tooltip {
    position: relative;
    cursor: help;
    color: var(--text-secondary);
    font-size: 14px;
    transition: color 0.2s;
    z-index: 1;
}

.stat-tooltip:hover {
    color: var(--primary-color);
}

.stat-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    padding: 10px 14px;
    background: #1a1a1a;
    color: white;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 6px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    transform: translateX(-50%) translateY(6px);
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: #1a1a1a;
    margin-top: -6px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1001;
}

.stat-tooltip:hover::after,
.stat-tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

.taskmanager-refresh {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.taskmanager-refresh:hover {
    background: #1976d2;
}

.taskmanager-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
    background: rgba(33, 150, 243, 0.08);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.taskmanager-note i {
    color: #2196f3;
}

.taskmanager-list {
    flex: 1;
    overflow-y: auto;
}

.taskmanager-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--window-bg);
    border: 1px solid var(--window-border);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: background 0.2s;
}

.taskmanager-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.taskmanager-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.taskmanager-icon i {
    font-size: 18px;
}

.taskmanager-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.taskmanager-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.taskmanager-id {
    font-size: 12px;
    color: var(--text-secondary);
}

.taskmanager-memory {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 120px;
    flex-shrink: 0;
}

.taskmanager-memory-bar {
    height: 6px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.taskmanager-memory-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.taskmanager-memory-text {
    font-size: 11px;
    color: var(--text-secondary);
    font-family: 'Consolas', 'Monaco', monospace;
}

.taskmanager-end {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.taskmanager-end:hover {
    background: #b91c1c;
}

.taskmanager-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 12px;
    color: var(--text-secondary);
}

.taskmanager-empty i {
    font-size: 48px;
    opacity: 0.5;
}

.settings-section {
    margin-bottom: 24px;
}

.settings-section h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--window-border);
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}

.setting-item label {
    font-size: 14px;
    color: var(--text-secondary);
}

.setting-item span {
    font-size: 14px;
    color: var(--text-color);
}

.setting-item select,
.setting-item input[type="color"] {
    padding: 6px 10px;
    border: 1px solid var(--window-border);
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    background: white;
}

.setting-item input[type="color"] {
    width: 44px;
    height: 32px;
    padding: 2px;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-container input[type="range"] {
    width: 120px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    cursor: pointer;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s;
}

.slider-container input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.slider-container span {
    min-width: 40px;
    font-size: 13px;
    color: var(--text-color);
    text-align: right;
}

.about-content {
    padding: 32px;
    text-align: center;
}

.about-logo {
    font-size: 72px;
    margin-bottom: 16px;
}

.about-logo .kj-logo-large {
    font-size: 72px;
    font-weight: 600;
    color: var(--accent-color);
}

.kj-logo-about {
    height: 72px;
    width: auto;
}

body.dark-mode .kj-logo-about {
    filter: invert(1);
}

.about-system {
    text-align: left;
    padding: 20px;
}

.about-system .about-logo {
    text-align: center;
    margin-bottom: 16px;
}

.about-system h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--window-border);
}

.about-info {
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    padding: 6px 0;
    font-size: 13px;
}

.info-label {
    color: var(--text-secondary);
    min-width: 140px;
}

.info-value {
    color: var(--text-color);
}

.info-warning {
    color: #e81123;
    font-size: 12px;
    padding: 8px 0;
    margin-top: 8px;
}

.about-versions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.version-item {
    padding: 6px 12px;
    background: var(--about-version-bg);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-color);
    cursor: pointer;
}

.version-item:hover {
    background: var(--about-version-hover-bg);
    text-decoration: underline;
}

/* 新功能轮播图 */
.feature-carousel {
    margin: 20px 0;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--carousel-bg);
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    padding: 16px;
    box-sizing: border-box;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-date {
    font-size: 11px;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 4px;
}

.carousel-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 6px;
}

.carousel-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    flex: 1;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--accent-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background: white;
}

.carousel-prev {
    left: 8px;
}

.carousel-next {
    right: 8px;
}

.carousel-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.carousel-dot.active {
    background: var(--accent-color);
    width: 18px;
    border-radius: 3px;
}

/* 轮播图插画样式 */
.carousel-illustration {
    width: 100%;
    height: 140px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* 居中吸附插画 */
.illustration-snap {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.snap-screen {
    position: relative;
    width: 160px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.snap-line {
    position: absolute;
    background: var(--accent-color);
    opacity: 0.8;
}

.snap-line-h {
    width: 100%;
    height: 1px;
    top: 50%;
    left: 0;
}

.snap-line-v {
    width: 1px;
    height: 100%;
    left: 50%;
    top: 0;
}

.snap-widget {
    position: absolute;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: var(--accent-color);
    font-size: 18px;
}

.snap-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 净边模式插画 */
.illustration-borderless {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.borderless-compare {
    display: flex;
    align-items: center;
    gap: 12px;
}

.borderless-widget {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    width: 80px;
}

.borderless-with {
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.borderless-without {
    border: none;
}

.borderless-titlebar {
    background: #f0f0f0;
    padding: 4px 6px;
    display: flex;
    gap: 3px;
}

.borderless-titlebar span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ccc;
}

.borderless-body {
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #333;
    font-size: 11px;
}

.borderless-body i {
    font-size: 20px;
    color: var(--accent-color);
}

.borderless-arrow {
    color: white;
    font-size: 20px;
}

/* 黑洞插画 */
.illustration-blackhole {
    background: radial-gradient(circle at center, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.blackhole-svg {
    width: 100%;
    height: 100%;
}

/* 搜索栏插画 */
.illustration-search {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.search-bar-illus {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 36px;
    background: white;
    border-radius: 18px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    gap: 8px;
}

.search-icon-illus {
    color: var(--accent-color);
    font-size: 16px;
}

.search-text-illus {
    flex: 1;
    font-size: 12px;
    color: #666;
}

.search-btn-illus {
    width: 24px;
    height: 24px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
}

.search-arrow-down {
    position: absolute;
    top: 65px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 16px;
    opacity: 0.8;
}

.search-result-illus {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.search-result-illus i {
    color: var(--accent-color);
}

/* 错误处理插画 */
.illustration-error {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
}

.error-overlay-illus {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-card-illus {
    background: white;
    border-radius: 8px;
    padding: 16px;
    width: 160px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.error-icon-illus {
    width: 32px;
    height: 32px;
    background: #f45c43;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    color: white;
    font-size: 16px;
}

.error-title-illus {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.error-msg-illus {
    font-size: 10px;
    color: #999;
    margin-bottom: 12px;
    font-family: monospace;
}

.error-btns-illus {
    display: flex;
    gap: 6px;
}

.error-btn-illus {
    flex: 1;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.btn-clear {
    background: var(--accent-color);
    color: white;
}

.btn-reload {
    background: #f0f0f0;
    color: #666;
}

/* 第三方插件插画 */
.illustration-plugins {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.plugin-illus-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.plugin-illus-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.plugin-illus-icon.primary {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.plugin-illus-plus {
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
}

/* 自动隐藏任务栏插画 */
.illustration-autohide {
    background: linear-gradient(135deg, #2c3e50 0%, #4ca1af 100%);
    position: relative;
    overflow: hidden;
}

.autohide-desktop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.autohide-taskbar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 28px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    padding: 0 8px;
    gap: 6px;
    animation: taskbarHide 3s ease-in-out infinite;
}

@keyframes taskbarHide {
    0%, 40% { transform: translateY(0); }
    60%, 100% { transform: translateY(100%); }
}

.autohide-taskbar-item {
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 9px;
}

.autohide-cursor {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: cursorMove 3s ease-in-out infinite;
}

@keyframes cursorMove {
    0%, 40% { bottom: 6px; }
    60%, 100% { bottom: -20px; }
}

.autohide-cursor i {
    color: white;
    font-size: 14px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

/* 小组件置顶置底插画 */
.illustration-zorder {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.zorder-container {
    position: relative;
    width: 140px;
    height: 100px;
}

.zorder-widget {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.zorder-widget.back {
    background: rgba(255, 255, 255, 0.3);
    left: 10px;
    top: 25px;
    font-size: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.zorder-widget.front {
    background: white;
    color: #f5576c;
    left: 55px;
    top: 10px;
    font-weight: 600;
}

.zorder-arrow {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 20px;
    animation: zorderPulse 2s ease-in-out infinite;
}

@keyframes zorderPulse {
    0%, 100% { opacity: 0.6; transform: translateY(-50%) scale(1); }
    50% { opacity: 1; transform: translateY(-50%) scale(1.2); }
}

/* 云同步插画 */
.illustration-cloudsync {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    position: relative;
}

.cloudsync-cloud {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 32px;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2));
}

.cloudsync-arrows {
    position: absolute;
    top: 52px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
}

.cloudsync-arrow {
    width: 24px;
    height: 24px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    border: 1px solid rgba(255,255,255,0.3);
}

.cloudsync-arrow.up { animation: cloudsyncUp 2s ease-in-out infinite; }
.cloudsync-arrow.down { animation: cloudsyncDown 2s ease-in-out infinite; }

@keyframes cloudsyncUp {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(-6px); opacity: 1; }
}

@keyframes cloudsyncDown {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(6px); opacity: 1; }
}

.cloudsync-devices {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 30px;
    color: white;
    font-size: 22px;
}

.cloudsync-device {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* 插件社区插画 */
.illustration-community {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.community-store {
    background: rgba(255,255,255,0.95);
    border-radius: 8px;
    width: 150px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.community-header {
    background: var(--accent-color);
    color: white;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.community-items {
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.community-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    background: rgba(0,0,0,0.04);
    border-radius: 5px;
    font-size: 10px;
    color: #555;
}

.community-item i:first-child {
    color: var(--accent-color);
    font-size: 12px;
}

.community-item span {
    flex: 1;
}

.community-dl {
    color: #00d68f;
    font-size: 10px;
}

.community-offline {
    padding: 5px 10px;
    background: rgba(0,0,0,0.06);
    font-size: 9px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
}

/* 书签功能插画 */
.illustration-bookmarks {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
}

.bookmark-bar-illus {
    background: rgba(255,255,255,0.95);
    border-radius: 8px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    width: 160px;
}

.bookmark-star {
    color: #ffc107;
    font-size: 14px;
}

.bookmark-items-illus {
    display: flex;
    gap: 6px;
    flex: 1;
}

.bookmark-item-illus {
    width: 22px;
    height: 22px;
    background: rgba(0,0,0,0.06);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #666;
}

.bookmark-sync-btn {
    width: 24px;
    height: 24px;
    background: var(--accent-color);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    animation: bookmarkSync 2s ease-in-out infinite;
}

@keyframes bookmarkSync {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.bookmark-warning {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    font-size: 9px;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 手表表盘插画 */
.illustration-watch {
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 0%, #24243e 100%);
}

.watch-face-illus {
    position: relative;
    width: 70px;
    height: 85px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.watch-band-illus {
    width: 40px;
    height: 18px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
}

.watch-band-illus.top { border-radius: 6px 6px 0 0; border-bottom: none; }
.watch-band-illus.bottom { border-radius: 0 0 6px 6px; border-top: none; }

.watch-screen-illus {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    box-shadow: 0 0 20px rgba(24,122,255,0.2);
}

.watch-time-illus {
    color: white;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
}

.watch-date-illus {
    color: rgba(255,255,255,0.5);
    font-size: 8px;
}

.watch-icons-illus {
    display: flex;
    gap: 6px;
    margin-top: 2px;
    font-size: 8px;
}

.watch-icons-illus .fa-heart { color: #ff4458; }
.watch-icons-illus .fa-battery-three-quarters { color: #00d68f; }

/* 插件加载加速插画 */
.illustration-fastload {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.fastload-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.fastload-plugin {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.25);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    border: 1px solid rgba(255,255,255,0.3);
}

.fastload-bolt {
    position: absolute;
    top: -2px;
    right: 30px;
    color: #ffd700;
    font-size: 20px;
    animation: fastloadBolt 1s ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(255,215,0,0.6));
}

@keyframes fastloadBolt {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

.fastload-bar {
    width: 120px;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    overflow: hidden;
}

.fastload-progress {
    height: 100%;
    background: white;
    border-radius: 3px;
    animation: fastloadProgress 1.5s ease-in-out infinite;
}

@keyframes fastloadProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

.fastload-label {
    color: white;
    font-size: 10px;
    font-weight: 600;
}

/* =========================================================
   2026年7月31日 新功能轮播图插画
   ========================================================= */

/* 桌面图标新建文件夹插画：图标拖入文件夹的合并示意 */
.illustration-desktop-folder {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}
.folder-illus-container {
    display: flex;
    align-items: center;
    gap: 10px;
}
/* 左侧：被拖动的源图标 */
.folder-illus-source {
    display: flex;
    gap: 6px;
    animation: folderDragSource 2s ease-in-out infinite;
}
@keyframes folderDragSource {
    0%, 100% { transform: translateX(0); opacity: 1; }
    50% { transform: translateX(8px); opacity: 0.6; }
}
.folder-illus-mini {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.25);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    border: 1px solid rgba(255,255,255,0.35);
}
/* 中间：拖动方向箭头 */
.folder-illus-arrow {
    color: rgba(255,255,255,0.7);
    font-size: 16px;
    animation: folderArrow 1.5s ease-in-out infinite;
}
@keyframes folderArrow {
    0%, 100% { transform: translateX(0); opacity: 0.5; }
    50% { transform: translateX(4px); opacity: 1; }
}
/* 右侧：目标文件夹 */
.folder-illus-target {
    position: relative;
}
.folder-illus-icon {
    width: 56px;
    height: 48px;
    background: rgba(255,255,255,0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 26px;
    border: 1px solid rgba(255,255,255,0.4);
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.folder-illus-icon::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 6px;
    width: 24px;
    height: 9px;
    background: rgba(255,255,255,0.3);
    border-radius: 4px 4px 0 0;
    border: 1px solid rgba(255,255,255,0.4);
    border-bottom: none;
}
/* 文件夹右上角数量徽标 */
.folder-illus-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: white;
    color: #4facfe;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    animation: folderBadge 2s ease-in-out infinite;
}
@keyframes folderBadge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

/* 起始页模式插画 */
.illustration-startpage {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
}
.startpage-illus-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 80%;
}
.startpage-illus-search {
    width: 100%;
    height: 28px;
    background: rgba(255,255,255,0.35);
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    color: white;
    font-size: 11px;
    border: 1px solid rgba(255,255,255,0.4);
    box-sizing: border-box;
}
.startpage-illus-search i { font-size: 10px; }
.startpage-illus-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.startpage-illus-icon {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.25);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    border: 1px solid rgba(255,255,255,0.3);
}

/* 重构App文件插画 */
.illustration-refactor {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}
.refactor-illus-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.refactor-illus-file {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.25);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    border: 1px solid rgba(255,255,255,0.3);
}
.refactor-illus-bolt {
    position: absolute;
    top: -4px;
    right: 32px;
    color: #ffd700;
    font-size: 20px;
    animation: refactorBolt 1s ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(255,215,0,0.6));
}
@keyframes refactorBolt {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}
.refactor-illus-bar {
    width: 120px;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    overflow: hidden;
}
.refactor-illus-progress {
    height: 100%;
    background: white;
    border-radius: 3px;
    animation: refactorProgress 1.5s ease-in-out infinite;
}
@keyframes refactorProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}
.refactor-illus-label {
    color: white;
    font-size: 10px;
    font-weight: 600;
}

/* MCP功能插画 */
.illustration-mcp {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}
.mcp-illus-container {
    display: flex;
    align-items: center;
    gap: 8px;
}
.mcp-illus-kj, .mcp-illus-trae {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.25);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    border: 1px solid rgba(255,255,255,0.3);
}
.mcp-illus-trae { background: rgba(255,255,255,0.35); }
.mcp-illus-links {
    position: relative;
    width: 40px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mcp-illus-link-line {
    width: 100%;
    height: 2px;
    background: rgba(255,255,255,0.5);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}
.mcp-illus-link-line::before, .mcp-illus-link-line::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: white;
}
.mcp-illus-link-line::before { left: 0; }
.mcp-illus-link-line::after { right: 0; }
.mcp-illus-link-icon {
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f5576c;
    font-size: 10px;
    z-index: 1;
    animation: mcpPulse 1.5s ease-in-out infinite;
}
@keyframes mcpPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* 动态壁纸插画 */
.illustration-dynamic-wallpaper {
    background: linear-gradient(135deg, #ee9ca7 0%, #ffdde1 100%);
}
.wallpaper-illus-container {
    position: relative;
    width: 100px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.4);
}
.wallpaper-illus-preview {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
    animation: wallpaperShift 4s ease infinite;
}
@keyframes wallpaperShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.wallpaper-illus-particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255,255,255,0.7);
    border-radius: 50%;
    animation: wallpaperParticle 3s ease-in-out infinite;
}
.wallpaper-illus-particles span:nth-child(1) { top: 10px; left: 15px; animation-delay: 0s; }
.wallpaper-illus-particles span:nth-child(2) { top: 30px; left: 50px; animation-delay: 0.5s; }
.wallpaper-illus-particles span:nth-child(3) { top: 15px; left: 75px; animation-delay: 1s; }
.wallpaper-illus-particles span:nth-child(4) { top: 40px; left: 30px; animation-delay: 1.5s; }
@keyframes wallpaperParticle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

/* 移动端拖放插画：长按拖拽小组件的触控示意 */
.illustration-mobile-drag {
    background: linear-gradient(135deg, #4facfe 0%, #00c6fb 100%);
}
.mobile-drag-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
}
.mobile-drag-phone {
    width: 60px;
    height: 104px;
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.45);
    padding: 6px 5px;
    box-sizing: border-box;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}
.mobile-drag-screen {
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.18);
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
    box-sizing: border-box;
}
.mobile-drag-widget {
    width: 100%;
    height: 22px;
    background: rgba(255,255,255,0.32);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 11px;
    border: 1px solid rgba(255,255,255,0.3);
}
/* 中间被拖拽的 widget：向上抬起并跟随手势移动 */
.mobile-drag-widget.alt {
    background: rgba(255,255,255,0.55);
    box-shadow: 0 6px 14px rgba(0,0,0,0.3);
    animation: mobileDragWidget 2s ease-in-out infinite;
    z-index: 2;
}
@keyframes mobileDragWidget {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(10px, -4px) scale(1.08); }
}
/* 手势图标：在手机右侧，做点击/拖动动作 */
.mobile-drag-hand {
    color: white;
    font-size: 26px;
    animation: mobileHand 2s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
@keyframes mobileHand {
    0%, 100% { transform: translate(6px, 0); opacity: 0.8; }
    50% { transform: translate(-4px, -2px); opacity: 1; }
}
/* 长按触发的涟漪效果 */
.mobile-drag-ripple {
    position: absolute;
    top: 50%;
    left: 30px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.6);
    transform: translate(-50%, -50%);
    animation: mobileRipple 2s ease-out infinite;
    pointer-events: none;
}
@keyframes mobileRipple {
    0% { width: 20px; height: 20px; opacity: 1; }
    100% { width: 50px; height: 50px; opacity: 0; }
}

/* 记事本Markdown插画 */
.illustration-markdown {
    background: linear-gradient(135deg, #2c3e50 0%, #4ca1af 100%);
}
.markdown-illus-container {
    display: flex;
    align-items: center;
    gap: 14px;
}
.markdown-illus-notepad {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.25);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    border: 1px solid rgba(255,255,255,0.3);
}
.markdown-illus-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: 'Courier New', monospace;
    font-size: 10px;
}
.markdown-illus-content span {
    color: rgba(255,255,255,0.9);
    padding: 2px 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    border-left: 2px solid rgba(255,255,255,0.4);
}
.md-h { font-weight: 700; }
.md-b { font-weight: 600; }

/* MCP纠错日志插画 */
.illustration-mcp-log {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
}
.mcp-log-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.mcp-log-panel {
    width: 130px;
    background: rgba(0,0,0,0.25);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.2);
}
.mcp-log-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: rgba(0,0,0,0.2);
    color: rgba(255,255,255,0.9);
    font-size: 9px;
    font-weight: 600;
}
.mcp-log-body {
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mcp-log-line {
    height: 5px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    animation: mcpLogLine 2s ease-in-out infinite;
}
.mcp-log-line:nth-child(2) { animation-delay: 0.3s; }
.mcp-log-line.short { width: 60%; }
@keyframes mcpLogLine {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.9; }
}
.mcp-log-copy {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
    color: white;
    font-size: 10px;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.35);
    animation: mcpLogCopy 2s ease-in-out infinite;
}
@keyframes mcpLogCopy {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.resolution-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.resolution-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.page-btn.primary-btn {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: none;
    padding: 10px 20px;
    gap: 8px;
}

.page-btn.primary-btn:hover {
    background: var(--btn-primary-hover);
}

.page-btn.secondary-btn {
    background: var(--btn-secondary-bg);
    border: 1px solid var(--btn-secondary-border);
    color: var(--btn-secondary-text);
    padding: 10px 16px;
    gap: 6px;
}

.page-btn.secondary-btn:hover {
    background: var(--btn-secondary-hover);
}

.version-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
}

.version-modal-overlay {
    display: none;
}

.version-modal-content {
    position: relative;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: windowOpen 0.2s ease-out;
    cursor: default;
}

.version-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--window-header-bg);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.version-modal-header h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.version-modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.version-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.version-modal-body {
    padding: 16px;
    max-height: calc(80vh - 56px);
    overflow-y: auto;
    flex: 1;
}

.version-date {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.version-modal-body h3 {
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.version-changes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.change-item {
    display: flex;
    gap: 8px;
    font-size: 13px;
    color: var(--text-color);
}

.change-number {
    color: var(--accent-color);
    font-weight: 600;
    flex-shrink: 0;
}

.change-text {
    line-height: 1.5;
}

.info-btn {
    margin-top: 12px;
    padding: 8px 16px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

body.dark-mode .version-modal-content {
    background: var(--card-bg);
    border: 1px solid var(--window-border);
}

body.dark-mode .version-modal-header {
    border-bottom: 1px solid var(--window-border);
}

body.dark-mode .version-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.info-btn:hover {
    background: var(--accent-hover);
}

.about-content h2 {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 8px;
    color: var(--text-color);
}

.about-content .version {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 20px;
}

.about-content .description {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 14px;
}

#system-notification {
    position: fixed;
    bottom: 70px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100000;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
    min-width: 280px;
}

#system-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification-icon {
    width: 40px;
    height: 40px;
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 18px;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 2px;
}

.notification-message {
    font-size: 12px;
    color: var(--text-secondary);
}

.app-explorer .window-content {
    display: flex;
    overflow: hidden;
    padding: 0;
}

.explorer-container {
    display: flex;
    height: 100%;
    width: 100%;
}

.explorer-container .explorer-sidebar {
    width: 180px;
    flex-shrink: 0;
    background: var(--explorer-sidebar-bg, rgba(255, 255, 255, 0.5));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--window-border);
    padding: 8px;
    overflow-y: auto;
}

.explorer-container .explorer-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-color);
    border-radius: 6px;
}

.explorer-container .explorer-sidebar-item:hover {
    background: var(--explorer-hover-bg, rgba(0, 0, 0, 0.05));
}

.explorer-container .explorer-sidebar-item.explorer-sidebar-hidden {
    display: none;
}

.explorer-container .explorer-sidebar.explorer-sidebar-hidden {
    display: none;
}

.explorer-container .explorer-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--explorer-main-bg, rgba(255, 255, 255, 0.95));
}

.explorer-container .explorer-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--window-border);
    background: var(--explorer-toolbar-bg, rgba(255, 255, 255, 0.6));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.explorer-container .explorer-nav-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
}

.explorer-container .explorer-nav-btn:hover {
    background: var(--explorer-hover-bg, rgba(0, 0, 0, 0.05));
    color: var(--text-color);
}

.explorer-container .explorer-path {
    margin-left: 8px;
    font-size: 13px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.explorer-container .explorer-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 16px;
    align-content: start;
}

.explorer-container .explorer-file {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.explorer-container .explorer-file:hover {
    background: rgba(0, 0, 0, 0.05);
}

.explorer-container .explorer-file i {
    font-size: 48px;
    margin-bottom: 8px;
}

.explorer-container .explorer-file span {
    font-size: 12px;
    text-align: center;
    word-wrap: break-word;
    color: var(--text-color);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.toast-notification {
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%) translateY(calc(100% + 70px));
    background: rgba(30, 30, 30, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-notification .toast-icon {
    width: 28px;
    height: 28px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.toast-notification .toast-message {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.wallpaper-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.wallpaper-option {
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

.wallpaper-option .wallpaper-preview {
    overflow: hidden;
    border-radius: 6px 6px 0 0;
}

.wallpaper-option-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.wallpaper-option-tooltip::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.85);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 100;
}

.wallpaper-option-tooltip:hover::after,
.wallpaper-option-tooltip:hover::before {
    opacity: 1;
}

.wallpaper-option:hover {
    border-color: color-mix(in srgb, var(--accent-color) 50%, transparent);
    transform: scale(1.05);
}

.wallpaper-option.active {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-color) 30%, transparent);
}

.wallpaper-preview {
    aspect-ratio: 1;
    width: 100%;
    max-width: 120px;
    margin: 0 auto;
}

.wallpaper-name {
    padding: 6px 4px;
    text-align: center;
    font-size: 12px;
    color: var(--text-color);
    background: white;
    border-radius: 0 0 6px 6px;
}

.wallpaper-default {
    background: repeating-linear-gradient(135deg, transparent, transparent 10px, rgba(24, 122, 255, 0.1) 10px, rgba(24, 122, 255, 0.1) 20px), linear-gradient(180deg, #f5f9ff 0%, #e8f4ff 100%);
}

/* 深色模式选择器 */
.dark-mode-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.dark-mode-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 14px 10px;
    border-radius: 12px;
    border: 2px solid var(--window-border);
    transition: all 0.2s ease;
    background: var(--card-bg);
}

.dark-mode-option:hover {
    border-color: color-mix(in srgb, var(--accent-color) 50%, transparent);
    transform: scale(1.03);
}

.dark-mode-option.active {
    border-color: var(--accent-color);
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
}

.dark-mode-preview {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.dark-mode-preview.light-preview {
    background: #fef3c7;
    color: #f59e0b;
}

.dark-mode-preview.dark-preview {
    background: #1e293b;
    color: #94a3b8;
}

.dark-mode-preview.system-preview {
    background: var(--card-bg);
    color: var(--accent-color);
    border: 2px solid var(--window-border);
}

.dark-mode-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
}

/* 小组件编辑器弹窗 */
.widget-editor-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
}

.widget-editor-modal {
    background: var(--window-bg);
    border: 1px solid var(--window-border);
    border-radius: 12px;
    width: 500px;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.widget-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--window-border);
}

.widget-editor-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text-color);
}

.widget-editor-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.widget-editor-close:hover {
    background: var(--card-bg);
    color: var(--text-color);
}

.widget-editor-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.widget-editor-field {
    margin-bottom: 16px;
}

.widget-editor-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.widget-editor-field input[type="text"],
.widget-editor-field input[type="number"],
.widget-editor-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 13px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.widget-editor-field input[type="text"]:focus,
.widget-editor-field input[type="number"]:focus,
.widget-editor-field textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.widget-editor-field textarea {
    resize: vertical;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
}

.widget-type-options {
    display: flex;
    gap: 12px;
}

.widget-type-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 12px;
    border: 2px solid var(--window-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--card-bg);
}

.widget-type-option:hover {
    border-color: color-mix(in srgb, var(--accent-color) 50%, transparent);
    transform: scale(1.02);
}

.widget-type-option.active {
    border-color: var(--accent-color);
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
}

.widget-type-option i {
    font-size: 24px;
    color: var(--accent-color);
}

.widget-type-option span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
}

.widget-size-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-size-inputs input {
    flex: 1;
}

.widget-size-inputs span {
    color: var(--text-secondary);
    font-weight: 600;
}

.widget-editor-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--window-border);
}

.widget-editor-btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.widget-editor-btn.cancel {
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--window-border);
}

.widget-editor-btn.cancel:hover {
    background: var(--card-hover-bg);
}

.widget-editor-btn.primary {
    background: var(--accent-color);
    color: white;
}

.widget-editor-btn.primary:hover {
    opacity: 0.9;
}

.plugin-type-options {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.plugin-type-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 6px;
    border: 2px solid var(--window-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--card-bg);
    text-align: center;
}

.plugin-type-option:hover {
    border-color: color-mix(in srgb, var(--accent-color) 50%, transparent);
}

.plugin-type-option.active {
    border-color: var(--accent-color);
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
}

.plugin-type-option i {
    font-size: 22px;
    color: var(--accent-color);
}

.plugin-type-option span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-color);
}

.plugin-code-field textarea {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    tab-size: 2;
}

.plugin-output-window {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.plugin-output-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: var(--titlebar-bg, rgba(255, 255, 255, 0.6));
    border-bottom: 1px solid var(--window-border);
    flex-shrink: 0;
}

.plugin-output-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.plugin-output-label i {
    color: var(--accent-color);
}

.plugin-copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    font-size: 12px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.plugin-copy-btn:hover {
    opacity: 0.9;
}

.plugin-output-content {
    flex: 1;
    overflow: auto;
}

.widget .plugin-output-toolbar {
    padding: 6px 12px;
}

.widget .plugin-copy-btn {
    padding: 4px 10px;
    font-size: 11px;
}

/* 插件列表 */
.plugin-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.plugin-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--window-border);
    transition: all 0.2s;
}

.plugin-card:hover {
    border-color: color-mix(in srgb, var(--accent-color) 30%, transparent);
}

.plugin-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.plugin-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--accent-color) 15%, transparent);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.plugin-detail {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.plugin-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
}

.plugin-type-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-secondary);
}

.plugin-type-tag i {
    font-size: 11px;
}

.plugin-version {
    font-size: 11px;
    color: var(--text-secondary);
}

.plugin-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.plugin-action-btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--window-border);
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.plugin-action-btn:hover {
    background: var(--card-hover-bg);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.plugin-action-btn.primary {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.plugin-action-btn.primary:hover {
    opacity: 0.9;
}

.plugin-action-btn.danger:hover {
    color: #ff4d4f;
    border-color: #ff4d4f;
    background: rgba(255, 77, 79, 0.1);
}

/* 图标风格选择器 */
.icon-style-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.accent-color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.accent-color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.accent-color-option:hover {
    transform: scale(1.05);
    background: rgba(0, 0, 0, 0.04);
}

.accent-color-option.active {
    border-color: var(--accent-color);
    background: rgba(0, 0, 0, 0.04);
}

.accent-color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.accent-color-swatch.custom-swatch {
    background: conic-gradient(from 0deg, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000);
}

.accent-color-option span {
    font-size: 12px;
    color: var(--text-color);
}

/* ===== 主题预设 ===== */
.theme-preset-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.theme-preset-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 78px;
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease, transform 0.15s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.theme-preset-card i {
    font-size: 22px;
}

.theme-preset-card span {
    font-size: 12px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.theme-preset-card:hover {
    border-color: rgba(255, 255, 255, 0.7);
    transform: translateY(-1px);
}

.theme-preset-card.active {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--accent-color), 0 4px 12px rgba(0, 0, 0, 0.25);
}

.theme-preset-card .theme-preset-del {
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 11px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    text-shadow: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.theme-preset-card.custom:hover .theme-preset-del {
    opacity: 1;
}

.theme-preset-card .theme-preset-del:hover {
    background: #e81123;
}

/* ===== 主题编辑器 ===== */
.theme-editor-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.theme-editor-panel {
    width: 460px;
    max-width: 92vw;
    max-height: 88vh;
    overflow-y: auto;
    background: var(--card-bg, #fff);
    border: 1px solid var(--window-border);
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
    color: var(--text-color);
}

.theme-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 600;
    border-bottom: 1px solid var(--window-border);
}

.theme-editor-close {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
}

.theme-editor-close:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-color);
}

.theme-editor-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.theme-editor-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.theme-editor-field label {
    font-size: 12px;
    color: var(--text-secondary);
}

.theme-editor-field input[type="text"],
.theme-editor-field select {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--window-border);
    background: var(--input-bg, #fff);
    color: var(--text-color);
    font-size: 13px;
    outline: none;
}

.theme-editor-field input[type="color"] {
    width: 100%;
    height: 34px;
    border: 1px solid var(--window-border);
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    padding: 2px;
}

.theme-editor-accent-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.theme-editor-accent {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.theme-editor-accent.selected {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--accent-color), 0 1px 4px rgba(0, 0, 0, 0.2);
}

.theme-editor-mode-row {
    display: flex;
    gap: 8px;
}

.theme-editor-mode {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 0;
    border-radius: 8px;
    border: 1px solid var(--window-border);
    cursor: pointer;
    font-size: 12px;
    color: var(--text-secondary);
}

.theme-editor-mode.active {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
}

.theme-editor-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 18px;
    border-top: 1px solid var(--window-border);
}

body.dark-mode .theme-editor-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .theme-editor-field input[type="text"],
body.dark-mode .theme-editor-field select {
    background: var(--input-bg, #2a2a2e);
    border-color: var(--window-border);
}

.accent-picker-popup {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
}

.accent-picker-popup.visible {
    display: flex;
}

.accent-picker-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.accent-picker-panel {
    position: relative;
    background: var(--window-bg, #fff);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 300px;
    z-index: 1;
    overflow: hidden;
}

.accent-picker-sv {
    width: 100%;
    height: 180px;
    border-radius: 10px;
    position: relative;
    cursor: crosshair;
    overflow: hidden;
    background: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(210, 100%, 50%));
}

.accent-picker-sv-cursor {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.accent-picker-hue-bar {
    width: 100%;
    height: 14px;
    margin-top: 16px;
    border-radius: 7px;
    position: relative;
    cursor: pointer;
    background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
}

.accent-picker-hue-cursor {
    position: absolute;
    top: 50%;
    width: 6px;
    height: 20px;
    border-radius: 3px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.accent-picker-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.accent-picker-preview {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.accent-picker-hex {
    flex: 1;
    min-width: 0;
    padding: 7px 8px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: var(--input-bg, #fff);
    color: var(--text-color, #333);
    font-size: 13px;
    font-family: monospace;
    outline: none;
    text-transform: lowercase;
}

.accent-picker-hex:focus {
    border-color: var(--accent-color);
}

.accent-picker-btn {
    padding: 7px 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-color, #333);
    transition: background 0.2s;
    flex-shrink: 0;
}

.accent-picker-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.accent-picker-btn.primary {
    background: var(--accent-color);
    color: #fff;
}

.accent-picker-btn.primary:hover {
    background: var(--accent-hover);
}

.icon-style-option {
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s ease;
    background: var(--card-bg, #fff);
}

.icon-style-option:hover {
    border-color: color-mix(in srgb, var(--accent-color) 50%, transparent);
    transform: scale(1.02);
}

.icon-style-option.active {
    border-color: var(--accent-color);
}

.widget-layer-option {
    padding: 12px;
    border: 2px solid var(--window-border);
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    flex: 1;
    transition: all 0.2s ease;
    background: var(--card-bg);
}

.widget-layer-option:hover {
    border-color: color-mix(in srgb, var(--accent-color) 50%, transparent);
    transform: scale(1.02);
}

.widget-layer-option.active {
    border-color: var(--accent-color);
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
}

.widget-layer-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-color);
}

.widget-layer-desc {
    font-size: 11px;
    color: var(--text-secondary);
}

.widgets-setting-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px 0;
}

.widgets-setting-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.section-header .section-title {
    margin-bottom: 0;
}

.settings-btn.small {
    padding: 6px 12px;
    font-size: 12px;
}

.custom-widget-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.custom-widget-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--window-border);
    transition: all 0.2s;
}

.custom-widget-item:hover {
    border-color: color-mix(in srgb, var(--accent-color) 30%, transparent);
}

.custom-widget-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-widget-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--accent-color) 15%, transparent);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.custom-widget-detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.custom-widget-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.custom-widget-type {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.custom-widget-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-widget-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--window-border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.2s;
}

.custom-widget-btn:hover {
    background: var(--card-hover-bg);
    color: var(--text-color);
    border-color: var(--accent-color);
}

.custom-widget-btn.delete:hover {
    color: #ff4d4f;
    border-color: #ff4d4f;
    background: rgba(255, 77, 79, 0.1);
}

.empty-tip {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
    font-size: 13px;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px dashed var(--window-border);
}

.icon-style-preview {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #f5f9ff 0%, #e8f4ff 100%);
}

.icon-style-demo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
}

.icon-style-preview.icon-style-borderless .icon-style-demo {
    background: transparent;
    color: var(--accent-color);
    font-size: 32px;
}

.icon-style-preview.icon-style-liquid .icon-style-demo {
    background: color-mix(in srgb, var(--accent-color) 50%, transparent);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1), inset 0 1px 1px rgba(255,255,255,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
}

.icon-style-preview.icon-style-liquid .icon-style-demo i {
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(255,255,255,0.4), 0 0 8px rgba(255,255,255,0.2);
    filter: drop-shadow(0 0 1px rgba(255,255,255,0.3));
    opacity: 0.95;
}

.icon-style-preview.icon-style-skeuomorphic .icon-style-demo {
    background: linear-gradient(145deg, #4a9eff, #0066cc);
    box-shadow: 2px 2px 5px rgba(0,0,0,0.35), inset 1px 1px 2px rgba(255,255,255,0.4), inset -1px -1px 2px rgba(0,0,0,0.2);
    border: 1px solid rgba(0,0,0,0.15);
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}

.icon-style-preview.icon-style-skeuomorphic .icon-style-demo i {
    text-shadow: 0 1px 2px rgba(0,0,0,0.5), 0 -1px 1px rgba(255,255,255,0.3);
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.4));
}

.icon-style-name {
    padding: 10px;
    text-align: center;
    font-size: 13px;
    color: var(--text-color);
    background: white;
}

.wallpaper-win11 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

.wallpaper-nature {
    background: url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=400&h=200&fit=crop') center/cover;
}

.wallpaper-dark {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.wallpaper-gradientRadial {
    background: radial-gradient(at 18% 22%, rgba(24,122,255,0.30) 0%, transparent 45%), radial-gradient(at 82% 18%, rgba(124,170,255,0.28) 0%, transparent 50%), radial-gradient(at 75% 82%, rgba(24,122,255,0.22) 0%, transparent 50%), radial-gradient(at 22% 78%, rgba(180,210,255,0.32) 0%, transparent 48%), linear-gradient(135deg, #f7faff 0%, #e6effb 100%);
}

.wallpaper-chevron {
    background: linear-gradient(115deg, transparent 35%, rgba(24,122,255,0.14) 48%, rgba(124,170,255,0.10) 56%, transparent 70%), linear-gradient(115deg, transparent 55%, rgba(180,210,255,0.18) 65%, transparent 82%), linear-gradient(180deg, #fafcff 0%, #e8f0fc 100%);
}

.wallpaper-diamond {
    background: linear-gradient(135deg, rgba(24,122,255,0.06) 25%, transparent 25%) -50px 0, linear-gradient(225deg, rgba(24,122,255,0.06) 25%, transparent 25%) -50px 0, linear-gradient(315deg, rgba(24,122,255,0.06) 25%, transparent 25%), linear-gradient(45deg, rgba(24,122,255,0.06) 25%, transparent 25%), radial-gradient(at 50% 50%, rgba(124,170,255,0.22), transparent 65%), linear-gradient(180deg, #fafcff 0%, #eef4fc 100%);
    background-size: 80px 80px, 80px 80px, 80px 80px, 80px 80px, 100% 100%, 100% 100%;
}

.wallpaper-grid {
    background: linear-gradient(rgba(24,122,255,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(24,122,255,0.06) 1px, transparent 1px), radial-gradient(at 50% 30%, rgba(124,170,255,0.20), transparent 60%), linear-gradient(180deg, #fafcff 0%, #eef4fc 100%);
    background-size: 32px 32px, 32px 32px, 100% 100%, 100% 100%;
}

.wallpaper-wave {
    background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(124,170,255,0.30), transparent 70%), radial-gradient(ellipse 80% 50% at 50% 100%, rgba(24,122,255,0.25), transparent 70%), linear-gradient(180deg, #1a2b4a 0%, #2a4470 50%, #1f3560 100%);
}

.wallpaper-dots {
    background: radial-gradient(rgba(180,210,255,0.28) 1px, transparent 1px), radial-gradient(at 30% 30%, rgba(24,122,255,0.20), transparent 55%), radial-gradient(at 70% 70%, rgba(124,170,255,0.16), transparent 55%), linear-gradient(180deg, #1c1c2e 0%, #2a2a45 100%);
    background-size: 32px 32px, 100% 100%, 100% 100%, 100% 100%;
}

/* ========== 应用社区公告栏 ========== */
#appstore-root .appstore-announcements {
    padding: 0 20px;
    background: var(--card-bg, #fff);
    border-bottom: 1px solid var(--window-border, rgba(0,0,0,.08));
    display: flex;
    flex-direction: column;
}

#appstore-root .appstore-announcements:empty {
    display: none;
    padding: 0;
    border: none;
}

#appstore-root .appstore-announcement {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    font-size: 13px;
    line-height: 1.5;
    animation: appstoreAnnSlideDown 0.3s ease;
}

#appstore-root .appstore-announcement + .appstore-announcement {
    border-top: 1px solid var(--window-border, rgba(0,0,0,.06));
}

#appstore-root .appstore-announcement.has-link {
    cursor: pointer;
    border-radius: 6px;
    padding-left: 8px;
    padding-right: 8px;
    margin-left: -8px;
    margin-right: -8px;
    transition: background 0.15s;
}

#appstore-root .appstore-announcement.has-link:hover {
    background: rgba(0,0,0,.04);
}

#appstore-root .announcement-link-arrow {
    margin-left: 6px;
    font-size: 10px;
    opacity: 0.5;
    transition: opacity 0.15s, transform 0.15s;
}

#appstore-root .appstore-announcement.has-link:hover .announcement-link-arrow {
    opacity: 1;
    transform: translateX(2px);
}

#appstore-root .appstore-announcement-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border-radius: 50%;
}

#appstore-root .appstore-announcement.type-info .appstore-announcement-icon {
    color: var(--accent-color, #187aff);
    background: rgba(24, 122, 255, 0.12);
}

#appstore-root .appstore-announcement.type-warning .appstore-announcement-icon {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
}

#appstore-root .appstore-announcement.type-success .appstore-announcement-icon {
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
}

#appstore-root .appstore-announcement.type-error .appstore-announcement-icon {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

#appstore-root .appstore-announcement-text {
    flex: 1;
    color: var(--text-color);
    min-width: 0;
    line-height: 1.5;
    word-break: break-word;
}

@keyframes appstoreAnnSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    #appstore-root .appstore-announcements {
        padding: 0 12px;
    }
    #appstore-root .appstore-announcement {
        padding: 8px 0;
        font-size: 12px;
        gap: 8px;
    }
    #appstore-root .appstore-announcement-icon {
        width: 18px;
        height: 18px;
        font-size: 11px;
    }
}

.wallpaper-zigzag {
    background: repeating-radial-gradient(circle at 50% 50%, transparent 0, transparent 14px, rgba(180,210,255,0.07) 14px, rgba(180,210,255,0.07) 15px), radial-gradient(at 50% 50%, rgba(124,170,255,0.30), transparent 60%), linear-gradient(180deg, #1e2a45 0%, #2d3e5f 100%);
}

.wallpaper-radiate {
    background: repeating-conic-gradient(from 0deg at 50% 50%, transparent 0deg, rgba(124,170,255,0.13) 8deg, transparent 16deg, transparent 30deg), radial-gradient(at 50% 50%, rgba(124,170,255,0.28), transparent 55%), linear-gradient(180deg, #1a2b4a 0%, #2a4470 100%);
}

.wallpaper-bubbles {
    background: radial-gradient(circle at 18% 22%, rgba(24,122,255,0.22) 0%, transparent 8%), radial-gradient(circle at 62% 18%, rgba(124,170,255,0.26) 0%, transparent 7%), radial-gradient(circle at 35% 48%, rgba(180,210,255,0.30) 0%, transparent 9%), radial-gradient(circle at 78% 52%, rgba(24,122,255,0.20) 0%, transparent 7%), radial-gradient(circle at 22% 78%, rgba(124,170,255,0.24) 0%, transparent 8%), radial-gradient(circle at 68% 82%, rgba(180,210,255,0.28) 0%, transparent 9%), radial-gradient(circle at 50% 30%, rgba(24,122,255,0.18) 0%, transparent 5%), radial-gradient(circle at 88% 28%, rgba(124,170,255,0.20) 0%, transparent 6%), linear-gradient(180deg, #f7faff 0%, #e6effb 100%);
}

/* ========== MCP 开发助手通知 ========== */
.mcp-sync-notification {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--window-border, rgba(0,0,0,.08));
    border-left: 4px solid var(--accent-color, #187aff);
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 420px;
}

.mcp-sync-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.mcp-sync-notification > i:first-child {
    font-size: 24px;
    color: var(--accent-color, #187aff);
    flex-shrink: 0;
}

.mcp-sync-notification span {
    flex: 1;
    font-size: 13px;
    color: var(--text-color);
    line-height: 1.4;
}

.mcp-sync-btn {
    padding: 8px 16px;
    background: var(--accent-color, #187aff);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s, background 0.15s;
}

.mcp-sync-btn:hover {
    transform: scale(1.05);
    background: color-mix(in srgb, var(--accent-color, #187aff) 85%, #000);
}

.mcp-sync-close {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-secondary, rgba(0,0,0,.4));
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}

.mcp-sync-close:hover {
    background: rgba(0,0,0,.06);
}

/* 自动导入倒计时通知样式 */
.mcp-sync-countdown {
    font-size: 11px !important;
    color: var(--accent-color, #187aff) !important;
    background: rgba(24,122,255,.1);
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
    flex: 0 0 auto !important;
    font-weight: 600;
}

.mcp-sync-cancel {
    padding: 6px 12px;
    background: transparent;
    color: var(--text-secondary, rgba(0,0,0,.5));
    border: 1px solid var(--window-border, rgba(0,0,0,.1));
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.15s;
}

.mcp-sync-cancel:hover {
    color: #ff6b6b;
    border-color: #ff6b6b;
    background: rgba(255,107,107,.08);
}

/* ========== MCP 设置页面样式 ========== */
.mcp-settings-page {
    padding: 20px;
}

.mcp-settings-hero {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent-color) 10%, transparent), color-mix(in srgb, var(--accent-color) 3%, transparent));
    border-radius: 16px;
    margin-bottom: 24px;
    border: 1px solid color-mix(in srgb, var(--accent-color) 15%, transparent);
}

.mcp-settings-hero i {
    font-size: 48px;
    color: var(--accent-color);
    margin-bottom: 12px;
    display: block;
}

.mcp-settings-hero h2 {
    font-size: 20px;
    color: var(--text-color);
    margin-bottom: 8px;
}

.mcp-settings-hero p {
    font-size: 13px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

.mcp-settings-section {
    background: var(--card-bg, #fff);
    border: 1px solid var(--window-border, rgba(0,0,0,.08));
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.mcp-settings-section h3 {
    font-size: 15px;
    color: var(--text-color);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mcp-settings-section h3 i {
    color: var(--accent-color);
}

.mcp-config-block {
    background: var(--bg-color, #f5f5f5);
    border: 1px solid var(--window-border, rgba(0,0,0,.08));
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    position: relative;
}

.mcp-config-block h4 {
    font-size: 13px;
    color: var(--text-color);
    margin-bottom: 10px;
}

.mcp-config-code {
    background: #1e1e2e;
    color: #cdd6f4;
    border-radius: 8px;
    padding: 14px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    position: relative;
}

.mcp-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 6px 12px;
    background: rgba(255,255,255,.1);
    color: #cdd6f4;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.15s;
}

.mcp-copy-btn:hover {
    background: rgba(255,255,255,.2);
}

/* MCP 活动时间线 */
.mcp-activity-timeline {
    max-height: 280px;
    overflow-y: auto;
    padding: 4px 0;
}

.mcp-activity-empty {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 14px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.6;
}

.mcp-activity-empty i {
    font-size: 18px;
    opacity: 0.5;
    flex-shrink: 0;
}

.mcp-activity-empty.mcp-activity-warn i {
    color: #f59e0b;
    opacity: 0.8;
}

.mcp-activity-item {
    display: flex;
    gap: 12px;
    padding: 10px 14px;
    position: relative;
    border-radius: 8px;
    transition: background 0.15s;
}

.mcp-activity-item:hover {
    background: var(--hover-bg, rgba(0,0,0,.04));
}

.mcp-activity-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 27px;
    top: 34px;
    bottom: -6px;
    width: 2px;
    background: var(--window-border, rgba(0,0,0,.08));
}

.mcp-activity-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    z-index: 1;
}

.mcp-activity-item.create .mcp-activity-dot {
    background: color-mix(in srgb, #10b981 15%, transparent);
    color: #10b981;
}

.mcp-activity-item.update .mcp-activity-dot {
    background: color-mix(in srgb, var(--accent-color) 15%, transparent);
    color: var(--accent-color);
}

.mcp-activity-item.delete .mcp-activity-dot {
    background: color-mix(in srgb, #ef4444 15%, transparent);
    color: #ef4444;
}

.mcp-activity-item.sync .mcp-activity-dot {
    background: color-mix(in srgb, #f59e0b 15%, transparent);
    color: #f59e0b;
}

.mcp-activity-body {
    flex: 1;
    min-width: 0;
    padding-top: 3px;
}

.mcp-activity-msg {
    font-size: 13px;
    color: var(--text-color);
    line-height: 1.5;
    word-break: break-word;
}

.mcp-activity-time {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 3px;
}

.mcp-action-btn {
    padding: 10px 20px;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.mcp-action-btn:hover {
    background: var(--btn-primary-hover);
}

.mcp-action-btn.secondary {
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
    border: 1px solid var(--btn-secondary-border);
}

.mcp-action-btn.secondary:hover {
    background: var(--btn-secondary-hover);
}

.mcp-step-list {
    list-style: none;
    padding: 0;
}

.mcp-step-list li {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--window-border, rgba(0,0,0,.06));
    font-size: 13px;
    color: var(--text-color);
    line-height: 1.6;
}

.mcp-step-list li:last-child {
    border-bottom: none;
}

.mcp-step-num {
    width: 24px;
    height: 24px;
    background: var(--accent-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.mcp-tool-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.mcp-tool-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg-color, #f5f5f5);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-color);
}

.mcp-tool-item i {
    color: var(--accent-color);
    font-size: 14px;
}

@media (max-width: 768px) {
    .mcp-sync-notification {
        left: 12px;
        right: 12px;
        bottom: 70px;
        max-width: none;
    }
    .mcp-activity-timeline {
        max-height: 220px;
    }
    .mcp-tool-list {
        grid-template-columns: 1fr;
    }
}

.wallpaper-haloRings {
    background: repeating-radial-gradient(circle at 32% 38%, transparent 0, transparent 8px, rgba(124,170,255,0.12) 9px, transparent 10px), repeating-radial-gradient(circle at 68% 62%, transparent 0, transparent 10px, rgba(24,122,255,0.12) 11px, transparent 12px), radial-gradient(at 50% 50%, rgba(124,170,255,0.22), transparent 60%), linear-gradient(180deg, #1a2b4a 0%, #2a4470 100%);
}

.custom-wallpaper {
    gap: 12px;
    align-items: center;
}

.wallpaper-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    background: var(--input-bg);
    color: var(--text-color);
}

.wallpaper-input:focus {
    border-color: var(--accent-color);
}

.wallpaper-url-row {
    min-width: 0;
}

.wallpaper-url-row .page-btn {
    white-space: nowrap;
    flex-shrink: 0;
}

.toggle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.toggle-label {
    flex: 1;
}

.toggle-title {
    font-size: 14px;
    color: var(--text-color);
    font-weight: 500;
}

.toggle-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--accent-color);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* Bing 壁纸自动强调色开关容器 */
.bing-auto-accent-toggle {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(24, 122, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(24, 122, 255, 0.1);
}

.custom-colors {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.color-picker-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-label {
    font-size: 14px;
    color: var(--text-color);
}

.color-picker {
    width: 40px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    padding: 2px;
    background: white;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

.exhibition-container {
    height: 100%;
    overflow-y: auto;
    background: linear-gradient(180deg, #f8f9ff 0%, #e8eeff 100%);
    padding: 20px;
}

.exhibition-header {
    text-align: center;
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.exhibition-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 6px;
}

.exhibition-header p {
    font-size: 13px;
    color: #666;
}

.exhibition-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.exhibition-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.exhibition-card.hidden-card {
    display: none;
}

.exhibition-card:hover {
    border-color: color-mix(in srgb, var(--accent-color) 30%, transparent);
}

.exhibition-card.current {
    border: 2px solid var(--accent-color);
    box-shadow: 0 4px 24px color-mix(in srgb, var(--accent-color) 20%, transparent);
}

.card-image {
    height: 120px;
    position: relative;
    overflow: hidden;
}

.card-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 6px;
}

.version-badge {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.type-badge {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.type-badge.current-badge {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
}

.card-content {
    padding: 16px;
}

.card-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.exhibition-card.current .card-content h3 {
    color: var(--accent-color);
}

.card-content p {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

@media screen and (max-width: 768px) {
    .window {
        min-width: 280px !important;
        min-height: 200px !important;
        font-size: 12px;
    }

    .window-titlebar {
        padding: 6px 10px;
        font-size: 12px;
    }

    .window-body {
        padding: 10px;
    }

    #search-widget {
        max-width: 90%;
    }

    .search-container {
        padding: 6px 12px;
        border-radius: 20px;
    }

    .search-icon {
        font-size: 12px;
        margin-right: 6px;
    }

    #search-input {
        font-size: 16px;
    }

    .search-btn {
        width: 28px;
        height: 28px;
    }

    .widget {
        width: 180px;
        border-radius: 12px;
    }

    .widget-header {
        padding: 8px 12px;
        font-size: 12px;
    }

    .widget-content {
        padding: 10px;
    }

    #todo-list {
        max-height: 180px;
        overflow-y: auto;
    }

    .todo-item {
        padding: 8px 0;
        gap: 8px;
    }

    .todo-checkbox {
        width: 14px;
        height: 14px;
        flex-shrink: 0;
    }

    .todo-text {
        font-size: 12px;
        min-width: 0;
        word-break: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        line-height: 1.4;
    }

    .todo-delete {
        padding: 2px;
        flex-shrink: 0;
    }

    #todo-input {
        padding: 8px 10px;
        font-size: 12px;
    }

    #todo-widget .widget-content {
        max-height: 220px;
        overflow-y: auto;
        padding: 12px;
    }

    #taskbar.ppt-taskbar {
        min-width: 0;
        max-width: 92%;
        width: 92%;
        bottom: 16px;
        padding: 4px 8px;
        border-radius: 10px;
    }

    #taskbar.ppt-taskbar #taskbar-apps {
        flex: 1 1 auto;
        min-width: 0;
        margin: 0 4px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        scroll-behavior: smooth;
    }

    #taskbar.ppt-taskbar #taskbar-apps::-webkit-scrollbar {
        display: none;
    }

    #taskbar.ppt-taskbar #start-btn {
        width: 36px;
        height: 32px;
        flex-shrink: 0;
    }

    #taskbar.ppt-taskbar #system-tray {
        margin-left: 0;
        flex-shrink: 0;
    }

    #taskbar.ppt-taskbar .taskbar-app {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }

    /* 移动端普通任务栏：图标区域支持左右拖动滚动，避免溢出屏幕 */
    #taskbar:not(.ppt-taskbar) {
        padding: 0 4px;
    }

    #taskbar:not(.ppt-taskbar) #taskbar-apps {
        flex: 1 1 auto;
        min-width: 0;
        margin: 0 4px;
        padding-left: 4px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        scroll-behavior: smooth;
    }

    #taskbar:not(.ppt-taskbar) #taskbar-apps::-webkit-scrollbar {
        display: none;
    }

    #taskbar:not(.ppt-taskbar) #start-btn,
    #taskbar:not(.ppt-taskbar) .taskbar-bookmarks-btn,
    #taskbar:not(.ppt-taskbar) .taskbar-workspaces-btn,
    #taskbar:not(.ppt-taskbar) #system-tray {
        flex-shrink: 0;
    }

    #taskbar:not(.ppt-taskbar) #start-btn {
        width: 40px;
        height: 40px;
    }

    #taskbar:not(.ppt-taskbar) #start-btn .kj-logo-img {
        height: 20px;
    }

    #taskbar:not(.ppt-taskbar) .taskbar-app {
        width: 40px;
        height: 40px;
        font-size: 18px;
        flex-shrink: 0;
    }

    #taskbar:not(.ppt-taskbar) .taskbar-app.active::after {
        width: 16px;
    }

    #taskbar:not(.ppt-taskbar) #system-tray {
        gap: 2px;
    }

    #taskbar:not(.ppt-taskbar) #system-tray .system-control {
        width: 32px;
        height: 40px;
        font-size: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #taskbar:not(.ppt-taskbar) #clock {
        font-size: 11px;
        padding: 4px 6px;
        line-height: 1.3;
    }

    /* 记事本移动端适配 */
    .notepad-main {
        flex-direction: column;
    }

    .notes-list-container {
        width: 100%;
        max-height: 120px;
        border-right: none;
        border-bottom: 1px solid var(--window-border);
    }

    .notepad-content {
        flex: 1;
        min-height: 0;
    }

    .notepad-toolbar {
        flex-wrap: wrap;
        gap: 4px;
        padding: 6px 8px;
    }

    .notepad-btn {
        padding: 5px 8px;
        font-size: 11px;
    }

    /* 设置页通用移动端适配 - 防止元素溢出屏幕 */
    .settings-content {
        padding: 16px 12px;
        overflow-x: hidden;
    }

    .settings-content * {
        box-sizing: border-box;
        max-width: 100%;
    }

    .setting-item {
        flex-wrap: wrap;
        gap: 8px;
    }

    .setting-item > label,
    .setting-item > span {
        min-width: 0;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .setting-item select,
    .setting-item input[type="text"],
    .setting-item input[type="number"],
    .setting-item input[type="url"],
    .setting-item input[type="email"],
    .setting-item input[type="password"],
    .color-picker,
    .wallpaper-input {
        max-width: 100%;
        min-width: 0;
    }

    .slider-container {
        flex-wrap: wrap;
        gap: 6px;
    }

    .slider-container input[type="range"] {
        width: 100%;
        min-width: 0;
        flex: 1 1 100%;
    }

    .settings-section {
        min-width: 0;
        overflow: hidden;
    }

    .page-section {
        padding: 12px;
        overflow-x: hidden;
    }

    .page-section h3,
    .settings-section h3 {
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .settings-btn,
    .page-btn {
        max-width: 100%;
        padding: 8px 12px;
        font-size: 12px;
        white-space: normal;
        word-break: break-word;
    }

    .settings-option-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    .settings-option-label {
        min-width: 0;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .storage-item {
        flex-wrap: wrap;
    }

    .storage-key {
        min-width: 0;
        flex: 1 1 100%;
        max-width: 100%;
    }

    .storage-value {
        min-width: 0;
        flex: 1 1 auto;
    }

    .storage-actions {
        flex-shrink: 0;
    }

    .storage-tabs {
        flex-wrap: wrap;
        gap: 4px;
    }

    .storage-tab {
        padding: 6px 10px;
        font-size: 12px;
    }

    .home-header {
        flex-wrap: wrap;
    }

    .home-stats {
        flex-wrap: wrap;
    }

    .wallpaper-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .theme-options {
        flex-wrap: wrap;
    }

    .header-left {
        min-width: 0;
        flex: 1;
    }

    .header-title {
        font-size: 15px;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    input[type="text"],
    input[type="number"],
    input[type="url"],
    input[type="email"],
    input[type="password"],
    textarea,
    select {
        max-width: 100%;
        min-width: 0;
    }
}

.code-editor {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    border: 1px solid var(--window-border);
    border-radius: 6px;
    background: var(--window-bg);
    color: var(--text-color);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

.code-editor:focus {
    border-color: var(--accent-color);
}

.storage-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--window-border);
    padding-bottom: 8px;
}

.storage-tab {
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.storage-tab:hover {
    background: var(--window-hover);
}

.storage-tab.active {
    background: var(--accent-color);
    color: white;
}

.storage-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 4px;
}

.storage-list::-webkit-scrollbar {
    width: 6px;
}

.storage-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.storage-list::-webkit-scrollbar-track {
    background: transparent;
}

.storage-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: var(--window-hover);
    border-radius: 8px;
    border: 1px solid var(--window-border);
}

.storage-key {
    flex: 0 0 auto;
    min-width: 120px;
    max-width: 180px;
    font-weight: 500;
    font-size: 13px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.storage-value {
    flex: 1;
    font-size: 12px;
    color: var(--text-secondary);
    overflow-wrap: anywhere;
    word-break: break-all;
    white-space: pre-wrap;
    max-height: 80px;
    overflow-y: auto;
    line-height: 1.4;
}

.storage-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    padding-top: 2px;
}

.storage-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
    color: var(--accent-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.storage-btn:hover {
    background: color-mix(in srgb, var(--accent-color) 20%, transparent);
}

.storage-btn.danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.storage-btn.danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

.empty-tip {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

#generic-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
}

#generic-dialog.hidden {
    display: none;
}

#generic-dialog.hidden .dialog-content {
    animation: dialogClose 0.2s ease-out forwards;
}

#generic-dialog .dialog-body p {
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.5;
}

#generic-dialog-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--window-border);
    border-radius: 8px;
    background: var(--window-bg);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#generic-dialog-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color) 15%, transparent);
}

#generic-dialog-input.hidden {
    display: none;
}

/* Custom Checkbox Styles */
.settings-option-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}

.settings-option-label {
    font-size: 14px;
    color: var(--text-color);
}

.custom-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
}

.custom-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-checkbox {
    display: inline-block;
    height: 20px;
    width: 20px;
    background-color: var(--window-bg);
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.custom-checkbox-label:hover .custom-checkbox {
    border-color: var(--accent-color);
    background-color: color-mix(in srgb, var(--accent-color) 5%, transparent);
}

.custom-checkbox-label input[type="checkbox"]:checked ~ .custom-checkbox {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.custom-checkbox::after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox-label input[type="checkbox"]:checked ~ .custom-checkbox::after {
    display: block;
}

.custom-checkbox-label input[type="checkbox"]:focus ~ .custom-checkbox {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color) 15%, transparent);
}

#immersive-music-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 50%, #90caf9 100%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    animation: fadeInSimple 0.3s ease;
    overflow: hidden;
    transition: background 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInSimple {
    from { opacity: 0; }
    to { opacity: 1; }
}

.immersive-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
}

.immersive-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.immersive-logo i {
    color: #187aff;
    font-size: 28px;
}

.immersive-close {
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.immersive-close:hover {
    background: rgba(255, 255, 255, 1);
    color: #333;
    transform: scale(1.05);
}

.immersive-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 20px 100px;
    overflow-y: auto;
}

.immersive-album-art {
    position: relative;
}

.album-cover {
    width: 280px;
    height: 280px;
    background: linear-gradient(135deg, #64b5f6, #42a5f5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 60px rgba(24, 122, 255, 0.3);
    position: relative;
    z-index: 2;
    transition: background 0.8s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.album-cover.playing {
    animation: rotate 8s linear infinite, pulse 3s ease-in-out infinite;
}

.album-cover:not(.playing) {
    animation: pulse 3s ease-in-out infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.album-cover.playing {
    animation-name: rotate, pulse;
}

.album-cover::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 50%;
    z-index: 3;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.album-cover::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    z-index: 4;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.album-cover i {
    font-size: 80px;
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 5;
    animation: none !important;
}

.album-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(24, 122, 255, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
}

.immersive-info {
    text-align: center;
}

.immersive-info h2 {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.immersive-info p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.immersive-progress {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 500px;
}

.progress-time {
    font-size: 14px;
    color: #555;
    min-width: 50px;
    text-align: center;
}

.progress-time:last-of-type {
    text-align: right;
}

.progress-bar-large {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 4px;
    position: relative;
    overflow: visible;
    cursor: pointer;
    transition: height 0.2s;
}

.progress-bar-large:hover {
    height: 12px;
}

.progress-fill-large {
    height: 100%;
    background: linear-gradient(90deg, #187aff, #64b5f6);
    border-radius: 4px;
    transition: width 0.1s;
}

.progress-thumb {
    display: none;
}

.immersive-controls {
    display: flex;
    align-items: center;
    gap: 25px;
}

.immersive-btn {
    width: 56px;
    height: 56px;
    border: none;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    color: #333;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.immersive-btn:hover {
    background: white;
    transform: scale(1.1);
}

.immersive-btn.play-btn {
    width: 76px;
    height: 76px;
    background: linear-gradient(135deg, #187aff, #42a5f5);
    color: white;
    font-size: 30px;
}

.immersive-btn.play-btn:hover {
    transform: scale(1.15);
}

.immersive-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 30px;
    backdrop-filter: blur(20px);
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.tab-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    border: none;
    background: transparent;
    border-radius: 30px;
    cursor: pointer;
    font-size: 15px;
    color: #666;
    transition: all 0.2s;
}

.tab-item:hover {
    background: rgba(255, 255, 255, 0.6);
    color: #333;
}

.tab-item.active {
    background: white;
    color: #187aff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tab-item.center-tab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #187aff, #42a5f5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    position: relative;
}

.tab-item.center-tab::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 50%;
    z-index: 1;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
}

.tab-item.center-tab::after {
    content: '';
    position: absolute;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.tab-item.center-tab i {
    position: relative;
    z-index: 3;
}

.tab-item.center-tab.active {
    box-shadow: 0 8px 25px rgba(24, 122, 255, 0.4);
}

.immersive-tab-content {
    width: 100%;
    max-width: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: slideUp 0.3s ease;
    width: 100%;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-panel h3 {
    font-size: 20px;
    color: #333;
    margin: 0 0 20px 0;
    text-align: center;
}

.song-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.song-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.song-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(5px);
}

.song-cover {
    width: 55px;
    height: 55px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.song-cover i {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.8);
}

.song-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.song-info {
    flex: 1;
    min-width: 0;
}

.song-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-duration {
    font-size: 12px;
    color: #888;
}

.player-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
}

.player-album {
    width: 280px;
    height: 280px;
    background: linear-gradient(135deg, #64b5f6, #42a5f5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 40px color-mix(in srgb, var(--accent-color) 25%, transparent);
    position: relative;
}

.player-album::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 50%;
    z-index: 2;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.player-album::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    z-index: 3;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.player-cover i {
    font-size: 80px;
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 4;
}

.player-info {
    text-align: center;
}

.player-info h3 {
    font-size: 22px;
    color: #333;
    margin: 0 0 5px 0;
}

.player-info p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.player-btn {
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: #333;
    transition: all 0.2s;
}

.player-btn:hover {
    background: white;
    transform: scale(1.05);
}

.player-btn.play-btn-lg {
    width: 68px;
    height: 68px;
    background: linear-gradient(135deg, var(--accent-color), #42a5f5);
    color: white;
    font-size: 26px;
}

.player-btn.play-btn-lg:hover {
    transform: scale(1.1);
}

.playlist-empty-immersive {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 40px;
    color: #888;
}

.playlist-empty-immersive i {
    font-size: 50px;
}

.playlist-empty-immersive span {
    font-size: 16px;
}

.immersive-playlist-container {
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.immersive-playlist-container::-webkit-scrollbar {
    width: 6px;
}

.immersive-playlist-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.immersive-playlist-container::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--accent-color) 50%, transparent);
    border-radius: 3px;
}

.immersive-playlist-container::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--accent-color) 70%, transparent);
}

#immersive-playlist {
    width: 100%;
}

.immersive-playlist-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 10px;
}

.immersive-playlist-item:hover {
    background: rgba(255, 255, 255, 0.8);
}

.immersive-playlist-item.active {
    background: linear-gradient(135deg, rgba(24, 122, 255, 0.2), rgba(66, 165, 245, 0.2));
    border-left: 3px solid #187aff;
}

.immersive-playlist-cover {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #64b5f6, #42a5f5);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.immersive-playlist-cover i {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
}

.immersive-playlist-info {
    flex: 1;
    min-width: 0;
}

.immersive-playlist-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.immersive-playlist-duration {
    font-size: 12px;
    color: #888;
}

.music-btn.immersive-btn {
    background: transparent;
    color: var(--text-color);
}

.music-btn.immersive-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* ============================================
   Mockup 组件重构样式
   ============================================ */

/* 应用图标颜色类 */
.mockup-icon-blue {
    background: var(--accent-color);
}

.mockup-icon-windows-blue {
    background: #0078d4;
}

.mockup-icon-pink {
    background: #e91e63;
}

.mockup-icon-purple {
    background: #9c27b0;
}

.mockup-icon-green {
    background: #107c10;
}

.mockup-icon-dark {
    background: #1a1a1a;
}

.mockup-icon-gray {
    background: #666666;
}

.mockup-icon-google-blue {
    background: #4285f4;
}

.mockup-icon-red {
    background: #ff0000;
}

.mockup-icon-github-dark {
    background: #333;
}

.mockup-icon-bilibili-pink {
    background: #fb7299;
}

/* 窗口定位 */
.mockup-window-terminal {
    left: 60px;
    top: 70px;
}

.mockup-window-calculator {
    left: 90px;
    top: 100px;
}

/* 图标颜色 */
.mockup-icon-text-windows-blue {
    color: #0078d4;
}

.mockup-icon-text-dark {
    color: #1a1a1a;
}

.mockup-icon-text-green {
    color: #107c10;
}

/* 内容区域背景 */
.mockup-content-terminal {
    background: #1a1a1a;
}

.mockup-splash-terminal {
    background: #ffffff;
}

.mockup-splash-icon-terminal {
    background: #1a1a1a;
}

.mockup-splash-icon-calculator {
    background: #107c10;
}

/* 终端样式 */
.mockup-app-content .terminal-content {
    font-family: 'Consolas', monospace;
    font-size: 14px;
    color: #fff;
    text-align: left;
    width: 100%;
    padding: 10px;
    background: #1a1a1a;
}

.mockup-app-content .terminal-text {
    color: #fff;
}

.mockup-app-content .terminal-copyright {
    color: #fff;
    margin-top: 4px;
}

.mockup-app-content .terminal-cursor {
    margin-top: 16px;
    color: #dcdcaa;
}

.mockup-app-content .cursor-blink {
    animation: blink 1s infinite;
}

/* 计算器样式 */
.mockup-app-content .calculator-wrapper {
    width: 100%;
    max-width: 200px;
}

.mockup-app-content .calculator-display {
    background: #f0f0f0;
    padding: 12px 16px;
    text-align: right;
    font-size: 28px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-family: 'Segoe UI', sans-serif;
}

.mockup-app-content .calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.mockup-app-content .calculator-button {
    padding: 12px;
    background: #f5f5f5;
    border-radius: 6px;
    text-align: center;
    font-size: 16px;
}

.mockup-app-content .calculator-button.operator {
    background: #0078d4;
    color: white;
}

/* 布局样式 */
.taskbar-apps-container {
    display: flex;
    align-items: center;
    gap: 4px;
}

.mockup-taskbar-icon {
    position: relative;
}

.mockup-block-desc-center {
    margin: 0 auto;
}

.mockup-section-light {
    background: var(--light);
}

.footer-beian-text {
    text-align: center;
    width: 100%;
}
}

/* ===== 首次使用引导教程（KJ 窗口样式） ===== */
.guide-window .window-content {
    padding: 0;
    overflow: hidden;
}

.guide-window-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #ffffff;
}

.guide-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 0 0;
}

.guide-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d0d0d0;
    transition: all 0.3s ease;
}

.guide-dot.active {
    background: var(--accent-color);
    width: 24px;
    border-radius: 4px;
}

.guide-dot.completed {
    background: color-mix(in srgb, var(--accent-color) 50%, #d0d0d0);
}

.guide-content {
    padding: 24px 32px 8px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.guide-icon-wrap {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #fff;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.guide-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.guide-desc {
    font-size: 15px;
    line-height: 1.7;
    color: #555;
    margin-bottom: 16px;
}

.guide-tips {
    width: 100%;
    background: #f5f7fa;
    border-radius: 10px;
    padding: 14px 16px;
    text-align: left;
}

.guide-tip-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 8px;
}

.guide-tip-item:last-child {
    margin-bottom: 0;
}

.guide-tip-item i {
    color: var(--accent-color);
    font-size: 12px;
    margin-top: 4px;
    flex-shrink: 0;
}

.guide-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px 20px;
    flex-shrink: 0;
}

.guide-footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.guide-btn {
    padding: 9px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.guide-btn-skip {
    background: transparent;
    color: #999;
}

.guide-btn-skip:hover {
    color: #666;
    background: #f0f0f0;
}

.guide-btn-prev {
    background: #f0f0f0;
    color: #555;
}

.guide-btn-prev:hover {
    background: #e4e4e4;
}

.guide-btn-next {
    background: var(--accent-color);
    color: #fff;
}

.guide-btn-next:hover {
    background: var(--accent-hover);
}

.guide-btn.hidden {
    display: none;
}

/* 功能引导窗口内容滚动优化（tips 列表较长时可滚动） */
.feature-guide-content {
    padding: 20px 28px 8px !important;
}

.feature-guide-window .guide-tips {
    max-height: 260px;
    overflow-y: auto;
}

.feature-guide-window .guide-content {
    padding-bottom: 4px;
}

/* 深色模式 - 引导教程窗口 */
body.dark-mode .guide-window-body {
    background: #2a2a2e;
}

body.dark-mode .guide-title {
    color: #e0e0e0;
}

body.dark-mode .guide-desc {
    color: #b0b0b0;
}

body.dark-mode .guide-tips {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .guide-tip-item {
    color: #a0a0a0;
}

body.dark-mode .guide-tip-item:last-child {
    margin-bottom: 0;
}

body.dark-mode .guide-btn-skip {
    color: #888;
}

body.dark-mode .guide-btn-skip:hover {
    color: #ccc;
    background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .guide-btn-prev {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
}

body.dark-mode .guide-btn-prev:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ========== 深色模式补充样式 ========== */

body.dark-mode .engine-preset-item {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .engine-preset-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode #custom-engine-url {
    background: var(--card-bg);
    color: var(--text-color);
}

body.dark-mode #custom-engine-url::placeholder {
    color: var(--text-secondary);
}

body.dark-mode .setting-item select,
body.dark-mode .setting-item input[type="color"] {
    background: var(--card-bg);
    color: var(--text-color);
}

body.dark-mode .color-picker {
    background: #2a2a2e;
}

body.dark-mode .bing-auto-accent-toggle {
    background: rgba(24, 122, 255, 0.1);
    border-color: rgba(24, 122, 255, 0.2);
}

body.dark-mode .stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .category-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .category-card:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .home-footer {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 记事本深色模式 */
body.dark-mode .notepad-toolbar {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .notepad-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .notepad-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

body.dark-mode .notes-list-container {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .notes-list-header {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .notes-list-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .notepad-content {
    background: rgba(32, 32, 36, 0.95);
}

body.dark-mode .notepad-content textarea {
    color: #e0e0e0;
}

body.dark-mode .notepad-preview-wrap {
    background: rgba(32, 32, 36, 0.95);
}

body.dark-mode .notepad-preview {
    color: #e0e0e0;
}

body.dark-mode .notepad-preview .md-h1,
body.dark-mode .notepad-preview .md-h2 {
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .notepad-preview .md-h6 {
    color: #999;
}

body.dark-mode .notepad-preview .md-hr {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .notepad-preview .md-code {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

body.dark-mode .notepad-preview .md-pre {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .notepad-preview .md-pre code {
    color: #e0e0e0;
}

body.dark-mode .notepad-preview .md-blockquote {
    border-left-color: rgba(255, 255, 255, 0.2);
    color: #999;
}

body.dark-mode .notepad-preview .md-table th,
body.dark-mode .notepad-preview .md-table td {
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .notepad-preview .md-a {
    color: var(--accent-color);
}

body.dark-mode .notepad-format-toolbar {
    background: rgba(255, 255, 255, 0.03);
}

body.dark-mode .notepad-wysiwyg-wrap {
    background: rgba(32, 32, 36, 0.95);
}

body.dark-mode .notepad-wysiwyg {
    color: #e0e0e0;
}

body.dark-mode .notepad-wysiwyg h1,
body.dark-mode .notepad-wysiwyg h2 {
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .notepad-wysiwyg h6 {
    color: #999;
}

body.dark-mode .notepad-wysiwyg hr {
    border-top-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .notepad-wysiwyg code {
    background: rgba(255, 255, 255, 0.12);
    color: #ffb86c;
}

body.dark-mode .notepad-wysiwyg pre {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.dark-mode .notepad-wysiwyg blockquote {
    border-left-color: rgba(255, 255, 255, 0.25);
    color: #bbb;
}

body.dark-mode .notepad-wysiwyg table.md-table th,
body.dark-mode .notepad-wysiwyg table.md-table td {
    border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .notepad-toggle-sidebar {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .wallpaper-option {
    border: 2px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .wallpaper-option:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .wallpaper-option.active {
    border-color: var(--accent-color);
}

body.dark-mode .wallpaper-name {
    background: rgba(32, 32, 36, 0.8);
    color: var(--text-color);
}

body.dark-mode .accent-color-option {
    border: 2px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .accent-color-option:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

body.dark-mode .accent-color-option.active {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--accent-color);
}

body.dark-mode .icon-style-option {
    border: 2px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .icon-style-option:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .icon-style-option.active {
    border-color: var(--accent-color);
}

body.dark-mode .icon-style-preview {
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
}

body.dark-mode .icon-style-name {
    background: var(--card-bg);
}

body.dark-mode .slider-container input[type="range"] {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .slider-container input[type="range"]::-webkit-slider-thumb {
    background: var(--accent-color);
}

body.dark-mode .info-row-custom {
    border-bottom-color: var(--info-item-border);
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
}

body.dark-mode ::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

body.dark-mode .custom-checkbox {
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .custom-checkbox:checked {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

body.dark-mode .toggle-slider {
    background-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .toggle-slider:before {
    background-color: #e0e0e0;
}

/* 搜索栏深色模式 */
body.dark-mode .search-container {
    background: rgba(32, 32, 36, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode #search-widget-menu {
    background: rgba(32, 32, 36, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .search-icon {
    color: #999;
}

body.dark-mode #search-input {
    color: #e0e0e0;
}

body.dark-mode #search-input::placeholder {
    color: #666;
}

body.dark-mode .search-suggestions {
    background: rgba(32, 32, 36, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .search-suggestion-item {
    color: #e0e0e0;
}

body.dark-mode .search-suggestion-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .search-suggestion-item.selected {
    background: rgba(24, 122, 255, 0.2);
}

/* 设置首页深色模式 */
body.dark-mode .home-btn {
    background: var(--card-bg);
}

body.dark-mode .stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .stat-btn {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .stat-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

body.dark-mode .category-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .category-card:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .home-footer {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 记事本深色模式 */
body.dark-mode .notepad-toolbar {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .notepad-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .notepad-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

body.dark-mode .notes-list-container {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .notes-list-header {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .notes-list-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .notepad-content {
    background: rgba(32, 32, 36, 0.95);
}

body.dark-mode .notepad-content textarea {
    color: #e0e0e0;
}

body.dark-mode .notepad-preview-wrap {
    background: rgba(32, 32, 36, 0.95);
}

body.dark-mode .notepad-preview {
    color: #e0e0e0;
}

body.dark-mode .notepad-preview .md-h1,
body.dark-mode .notepad-preview .md-h2 {
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .notepad-preview .md-h6 {
    color: #999;
}

body.dark-mode .notepad-preview .md-hr {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .notepad-preview .md-code {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

body.dark-mode .notepad-preview .md-pre {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .notepad-preview .md-pre code {
    color: #e0e0e0;
}

body.dark-mode .notepad-preview .md-blockquote {
    border-left-color: rgba(255, 255, 255, 0.2);
    color: #999;
}

body.dark-mode .notepad-preview .md-table th,
body.dark-mode .notepad-preview .md-table td {
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .notepad-preview .md-a {
    color: var(--accent-color);
}