/* 全局样式 */
:root {
    /* 颜色系统 - 浅色模式 */
    --bg-primary: #f3f3f3;
    --bg-secondary: rgba(255, 255, 255, 0.7);
    --bg-tertiary: rgba(255, 255, 255, 0.5);
    --text-primary: #1f1f1f;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --accent: #0078d4;
    --accent-hover: #106ebe;
    --accent-rgb: 0, 120, 212;
    --accent-soft: rgba(0, 120, 212, 0.16);
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.18);
    
    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    /* 模糊 */
    --blur-sm: 8px;
    --blur-md: 12px;
    --blur-lg: 16px;
    
    /* 过渡 */
    --transition-fast: 0.15s ease-out;
    --transition-normal: 0.2s ease-out;
    --transition-slow: 0.3s ease-out;
    --transition-spring: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 深色模式 */
.dark-mode {
    --bg-primary: #202020;
    --bg-secondary: rgba(32, 32, 32, 0.7);
    --bg-tertiary: rgba(32, 32, 32, 0.5);
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-tertiary: #808080;
    --accent: #60cdff;
    --accent-hover: #4db8e8;
    --accent-rgb: 96, 205, 255;
    --accent-soft: rgba(96, 205, 255, 0.18);
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.45);
}

/* 深色模式下所有Symbol图标变白色 */
.dark-mode img[src*="Symbol_icon/stroke/"],
.dark-mode img[src*="Symbol_icon/fill/"],
.dark-mode img[src*="Symbol_icon/weather/"] {
    filter: brightness(0) invert(1);
}

/* 深色模式下已经激活的控制中心瓷贴图标不重复应用 */
.dark-mode .control-tile[data-active="true"] .tile-icon {
    filter: brightness(0) invert(1);
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 全局禁用右键菜单 */
body {
    -webkit-touch-callout: none;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
    outline: none;
}

input {
    font-family: inherit;
    outline: none;
}

.hidden {
    display: none !important;
}

.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* 壁纸容器 */
.lock-wallpaper,
.login-wallpaper,
.desktop-wallpaper {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ============ 开机屏幕 ============ */
#boot-screen {
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.boot-content {
    text-align: center;
    background: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.boot-logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.boot-logo {
    width: 120px;
    height: 120px;
}

/* 加载圆环 */
.boot-loading-ring {
    width: 45px;
    height: 45px;
}

.boot-loading-ring svg {
    width: 100%;
    height: 100%;
    animation: boot-ring-spin 1.2s linear infinite;
}

.boot-first-hint {
    min-height: 24px;
    margin-top: -24px;
    opacity: 0;
    font-size: 15px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.86);
    letter-spacing: 0.3px;
    transition: opacity 0.45s ease;
    pointer-events: none;
}

.boot-first-hint.show {
    opacity: 1;
}

.boot-first-hint.switching {
    opacity: 0;
}

.boot-ring-arc {
    stroke-dasharray: 22 66;
    stroke-dashoffset: 0;
    transform-origin: center;
}

@keyframes boot-ring-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============ 关机/重启/注销 覆盖层 ============ */
#power-overlay {
    z-index: 10000;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(0px);
    transition: backdrop-filter 0.5s ease, background 0.5s ease;
    pointer-events: none;
    opacity: 0;
}

/* ============ 全局：文件拖拽到窗口提示（蓝色动态边框） ============ */
#file-drag-overlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease, visibility 0s linear 0.12s;

    /* 光晕布局：稍微内缩一圈，形成更粗的可见边框 */
    --file-drag-inset: 10px;
    --file-drag-radius: 22px;

    /* 多色级蓝色光晕（浅色模式） */
    --file-drag-blue-deep: rgba(0, 64, 160, 0.55);
    --file-drag-blue-mid: rgba(var(--accent-rgb, 0, 120, 212), 0.55);
    --file-drag-blue-light: rgba(120, 220, 255, 0.85);
}

#file-drag-overlay.show {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.12s ease;
}

#file-drag-overlay .file-drag-overlay-svg {
    /* 彻底禁用 SVG 边框，确保不出现任何线条 */
    display: none !important;
}

/* 纯光晕：在网页四周显示动态蓝色光晕（无描边、无线条） */
#file-drag-overlay .file-drag-overlay-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

#file-drag-overlay .file-drag-overlay-glow::before,
#file-drag-overlay .file-drag-overlay-glow::after {
    content: "";
    position: absolute;
    inset: var(--file-drag-inset);
    border-radius: var(--file-drag-radius);
    pointer-events: none;
}

#file-drag-overlay .file-drag-overlay-glow::before {
    /* 内层：一圈清晰的粗亮边 + 柔和外扩光，更接近 mac 的厚描边效果 */
    background: none;
    border-radius: var(--file-drag-radius);
    box-shadow:
        /* 实际“粗边”的主体（有一定扩散） */
        0 0 0 3px rgba(120, 220, 255, 0.98),
        /* 紧贴粗边的一层蓝色发光 */
        0 0 20px 10px rgba(var(--accent-rgb, 0, 120, 212), 0.82),
        /* 更远一点的柔光，增强存在感 */
        0 0 40px 20px rgba(0, 64, 160, 0.65);
    opacity: 0.96;
    filter: blur(2.2px) saturate(1.18);
    animation: fileDragAuraPulseInner 1.4s ease-in-out infinite;
}

#file-drag-overlay .file-drag-overlay-glow::after {
    /* 外层：柔和的环境光，略比内圈更大，避免整屏泛蓝 */
    inset: calc(var(--file-drag-inset) - 4px);
    border-radius: calc(var(--file-drag-radius) + 10px);
    background: none;
    box-shadow:
        0 0 60px 26px rgba(var(--accent-rgb, 0, 120, 212), 0.36),
        0 0 90px 34px rgba(120, 220, 255, 0.32);
    opacity: 0.6;
    filter: blur(10px) saturate(1.08);
    animation: fileDragAuraPulseOuter 2s ease-in-out infinite;
}

@keyframes fileDragAuraPulseInner {
    0% { opacity: 0.55; transform: scale(0.998); filter: blur(4px) saturate(1.05); }
    50% { opacity: 0.9; transform: scale(1.002); filter: blur(3px) saturate(1.18); }
    100% { opacity: 0.55; transform: scale(0.998); filter: blur(4px) saturate(1.05); }
}

@keyframes fileDragAuraPulseOuter {
    0% { opacity: 0.32; transform: scale(0.996); filter: blur(10px) saturate(1.02); }
    50% { opacity: 0.55; transform: scale(1.004); filter: blur(8px) saturate(1.1); }
    100% { opacity: 0.32; transform: scale(0.996); filter: blur(10px) saturate(1.02); }
}

#file-drag-overlay .file-drag-overlay-rect-base {
    fill: none;
    stroke: var(--accent);
    opacity: 0.22;
    stroke-width: 4;
}

#file-drag-overlay .file-drag-overlay-rect-glow-outer {
    fill: none;
    stroke: var(--file-drag-blue-deep);
    opacity: 0.55;
    stroke-width: 28;
    filter: blur(12px);
    animation: fileDragGlow 1.2s ease-in-out infinite;
}

#file-drag-overlay .file-drag-overlay-rect-glow-mid {
    fill: none;
    stroke: var(--file-drag-blue-mid);
    opacity: 0.58;
    stroke-width: 18;
    filter: blur(8px);
    animation: fileDragGlow 1.1s ease-in-out infinite;
}

#file-drag-overlay .file-drag-overlay-rect-glow-inner {
    fill: none;
    stroke: var(--file-drag-blue-light);
    opacity: 0.55;
    stroke-width: 10;
    filter: blur(4px);
    animation: fileDragGlow 1.0s ease-in-out infinite;
}

#file-drag-overlay .file-drag-overlay-rect {
    fill: none;
    stroke: var(--file-drag-blue-light);
    opacity: 0.95;
    stroke-width: 4;
    stroke-linecap: round;
    /* 实线边框，不再使用虚线动画 */
    animation: fileDragGlow 1.1s ease-in-out infinite;
    filter:
        drop-shadow(0 0 10px rgba(var(--accent-rgb, 0, 120, 212), 0.30))
        drop-shadow(0 0 22px rgba(var(--accent-rgb, 0, 120, 212), 0.20))
        drop-shadow(0 0 40px rgba(0, 64, 160, 0.12));
}

.dark-mode #file-drag-overlay {
    /* 多色级蓝色光晕（深色模式更偏青蓝） */
    --file-drag-blue-deep: rgba(0, 90, 200, 0.40);
    --file-drag-blue-mid: rgba(0, 170, 255, 0.45);
    --file-drag-blue-light: rgba(120, 220, 255, 0.90);
}

.dark-mode #file-drag-overlay .file-drag-overlay-rect {
    filter:
        drop-shadow(0 0 12px rgba(120, 220, 255, 0.26))
        drop-shadow(0 0 26px rgba(0, 170, 255, 0.18))
        drop-shadow(0 0 46px rgba(0, 90, 200, 0.10));
}

#power-overlay:not(.hidden) {
    display: flex !important;
    pointer-events: auto;
    opacity: 1;
}

#power-overlay.phase-blur {
    backdrop-filter: blur(30px);
    background: rgba(255, 255, 255, 0.25);
}

.dark-mode #power-overlay.phase-blur {
    background: rgba(0, 0, 0, 0.35);
}

#power-overlay.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.power-overlay-card {
    position: relative;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(24px) saturate(150%);
    border-radius: 16px;
    padding: 28px 40px;
    min-width: 260px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.4);
    opacity: 0;
    transform: scale(0.92) translateY(8px);
    transition: opacity 0.4s ease 0.3s, transform 0.4s ease 0.3s;
}

#power-overlay.phase-card .power-overlay-card {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.dark-mode .power-overlay-card {
    background: rgba(40, 40, 40, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.power-overlay-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
}

.dark-mode .power-overlay-title {
    color: var(--accent);
}

.power-overlay-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.power-loading-ring {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.power-overlay-text {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ============ 锁屏 ============ */
#lock-screen {
    z-index: 900;
}

.lock-wallpaper {
    background-image: url('../Theme/Picture/Fluent-1.png');
    /* 正常锁屏状态下不模糊 */
    filter: none;
    transition: transform 600ms cubic-bezier(0.22, 0.61, 0.36, 1), 
                filter 600ms cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform, filter;
}

.lock-time-container {
    position: absolute;
    top: 80px;
    left: 60px;
    color: white;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    transition: transform 600ms cubic-bezier(0.22, 0.61, 0.36, 1),
                opacity 600ms cubic-bezier(0.22, 0.61, 0.36, 1),
                filter 600ms cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform, opacity, filter;
}

.lock-time {
    font-size: 96px;
    font-weight: 300;
    line-height: 1;
    margin-bottom: 8px;
}

.lock-date {
    font-size: 24px;
    font-weight: 400;
    opacity: 0.95;
}

.lock-notifications {
    position: absolute;
    top: 250px;
    left: 60px;
    z-index: 7;
    display: flex;
    width: min(420px, calc(100vw - 120px));
    max-height: calc(100vh - 390px);
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    pointer-events: auto;
}

.lock-notification-item {
    padding: 16px 18px;
    color: #ffffff;
    background: rgba(24, 24, 28, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
}

.lock-notification-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.lock-notification-title { font-size: 15px; font-weight: 600; }
.lock-notification-time { margin-top: 3px; font-size: 12px; opacity: 0.72; }
.lock-notification-message { margin-top: 10px; font-size: 14px; line-height: 1.45; }

.lock-notification-close {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.lock-notification-close:hover { background: rgba(255, 255, 255, 0.22); }
.lock-notification-close img { width: 14px; height: 14px; filter: brightness(0) invert(1); }

.lock-hint {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 18px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 600ms cubic-bezier(0.22, 0.61, 0.36, 1),
                opacity 600ms cubic-bezier(0.22, 0.61, 0.36, 1),
                filter 600ms cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform, opacity, filter;
}

/* 锁屏小组件图层：与时间/提示文字一样参与锁屏↔登录的景深模糊过渡 */
#lock-widgets-layer {
    transition: transform 600ms cubic-bezier(0.22, 0.61, 0.36, 1),
                opacity 600ms cubic-bezier(0.22, 0.61, 0.36, 1),
                filter 600ms cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform, opacity, filter;
}

/* ============ 登录屏幕 ============ */
#login-screen {
    z-index: 950; /* 高于锁屏，但只用于显示密码卡片 */
    /* 登录界面透明，让锁屏壁纸透过来 */
    background: transparent;
    pointer-events: auto; /* 接收点击事件，点击空白区域返回锁屏 */
}

.login-wallpaper {
    /* 不显示自己的壁纸，让锁屏壁纸透过来 */
    background-image: none !important;
    pointer-events: none; /* 让点击穿透到 login-screen */
    transition: filter 520ms cubic-bezier(0.22, 0.61, 0.36, 1),
                opacity 520ms cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: filter, opacity;
}

.login-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    background: var(--bg-secondary);
    backdrop-filter: blur(var(--blur-lg)) saturate(150%);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    min-width: 360px;
    box-shadow: var(--shadow-xl);
    text-align: center;
    border: 1px solid var(--border-color);
    pointer-events: auto; /* 恢复密码卡片的点击事件 */
}

/* 登录卡片弹入动画（与壁纸模糊同步：600ms） */
body.animations-enabled .login-card.show {
    animation: loginCardShow 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes loginCardShow {
    0% {
        opacity: 0;
        transform: translate(-50%, calc(-50% + 40px)) scale(0.92);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* 登录卡片退出动画 */
.login-card.exit {
    animation: loginCardExit 0.35s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

@keyframes loginCardExit {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, calc(-50% + 60px)) scale(0.88);
    }
}

.login-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.login-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-username {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}

.login-email {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.login-pin-container {
    position: relative;
    margin-bottom: 12px;
}

.login-pin-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    font-size: 16px;
    text-align: center;
    letter-spacing: 4px;
    color: var(--text-primary);
    transition: border-color var(--transition-fast);
}

.dark-mode .login-pin-input {
    color: #ffffff;
}

.login-pin-input::placeholder {
    color: var(--text-secondary);
}

.login-pin-input:focus {
    border-color: var(--accent);
}

.login-pin-input.error {
    border-color: #d13438;
}

/* Hide browser-native password reveal/clear controls to avoid duplicate eye icon */
.login-pin-input::-ms-reveal,
.login-pin-input::-ms-clear {
    display: none;
    width: 0;
    height: 0;
}

.pin-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 0;
    overflow: hidden;
}

/* 全局按钮高光会给 .button-glow-target 写入 position:relative，
   会覆盖上方绝对定位，导致图标跳到输入框左下角 */
body.button-glow-enabled .pin-toggle.button-glow-target {
    position: absolute;
}

.pin-toggle img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%);
    display: block;
}

.login-error {
    color: #d13438;
    font-size: 13px;
    margin-bottom: 8px;
}

.login-security-link {
    color: var(--accent);
    font-size: 13px;
    margin-bottom: 24px;
    cursor: pointer;
    text-decoration: underline;
}

.login-submit {
    width: 100%;
    padding: 12px 24px;
    background: var(--accent);
    color: white;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    transition: background var(--transition-fast);
}

.login-submit:hover {
    background: var(--accent-hover);
}

/* ============ 桌面 ============ */
#desktop-screen {
    z-index: 100;
}

.desktop-wallpaper {
    position: absolute;
    inset: 0;
    background-image: url('../Theme/Picture/Fluent-2.png');
    transform: scale(1);
    filter: none;
    transition: filter 500ms cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 500ms cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: filter, transform;
}

/* Keep the browser's composition backing surface dark during boot and
   fullscreen/viewport changes, so a transient unpainted frame cannot flash. */
html,
#app {
    background: #1a1a1a;
}

.desktop-wallpaper-fade-layer {
    z-index: 0;
    opacity: 0;
    pointer-events: none;
    will-change: opacity, filter, transform;
}

.desktop-icons {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 80px;
    display: grid;
    grid-template-rows: repeat(6, 90px); /* 固定6行 */
    grid-auto-columns: 90px; /* 自动列宽 */
    grid-auto-flow: column; /* 垂直排列，先填充列，满6个后自动创建新列 */
    gap: 12px;
    align-content: start;
    padding: 10px;
    overflow-x: auto; /* 当列数过多时可以横向滚动 */
    overflow-y: hidden;
    /* 容器本身不拦截鼠标事件，让下层的小组件可以交互；图标自身恢复事件 */
    pointer-events: none;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 90px; /* 固定宽度 */
    height: 90px; /* 固定高度，保持正方形 */
    padding: 8px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
    position: relative;
    pointer-events: auto; /* 容器已关闭事件，图标自身恢复 */
    -webkit-tap-highlight-color: transparent;
}

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

.desktop-icon.selected {
    background: rgba(255, 255, 255, 0.15);
    outline: none;
    box-shadow: none;
}

.desktop-icon:focus,
.desktop-icon:focus-visible,
.desktop-icon:active {
    outline: none;
    box-shadow: none;
}

.desktop-icon img {
    width: 44px;
    height: 44px;
    margin-bottom: 6px;
    pointer-events: none;
    flex-shrink: 0; /* 防止图标被压缩 */
}

.desktop-icon img.desktop-icon-image-preview {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.08);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.22);
}

.desktop-icon span {
    font-size: 12px;
    color: white;
    text-align: center;
    word-break: break-word;
    line-height: 1.2;
    max-height: 28px; /* 限制文字高度，最多显示2行 */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 最多显示2行 */
    line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: text-shadow 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), 0 0 4px rgba(0, 0, 0, 0.35);
}

/* 亮色壁纸时添加阴影效果 */
.desktop-icons.light-wallpaper .desktop-icon img {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.desktop-icons.light-wallpaper .desktop-icon span {
    color: #333;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.9), 0 0 16px rgba(255, 255, 255, 0.7), 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* 暗色壁纸时的样式 */
.desktop-icons.dark-wallpaper .desktop-icon span {
    color: white;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.desktop-icons.dark-wallpaper .desktop-icon img {
    filter: none;
}

/* 修复中的 App 在所有启动入口保持统一的禁用视觉。 */
.desktop-icon.repairing,
.taskbar-app.repairing,
.start-app.repairing,
.start-all-app-row.repairing {
    opacity: 0.4 !important;
    filter: grayscale(100%) !important;
    pointer-events: none !important;
    cursor: default !important;
}

/* 禁用图标的浏览器原生拖拽，避免与指针拖拽（固定到桌面）冲突 */
.taskbar-app img,
.start-app img,
.start-all-app-row img {
    -webkit-user-drag: none;
    user-select: none;
}

/* 任务栏图标拖拽到桌面时的幽灵图标 */
.taskbar-drag-ghost {
    position: fixed;
    z-index: 12000;
    width: 52px;
    height: 52px;
    margin: -26px 0 0 -26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--bg-secondary);
    backdrop-filter: blur(var(--blur-lg)) saturate(150%);
    -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(150%);
    box-shadow: var(--shadow-lg);
    opacity: 0.95;
    transform: scale(0.9);
    transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.taskbar-drag-ghost.droppable {
    transform: scale(1.08);
}

.taskbar-drag-ghost img {
    width: 32px;
    height: 32px;
    pointer-events: none;
}

/* Desktop/files native drag snapshots reuse the Start-menu ghost geometry,
   with a solid material so the wallpaper cannot leak into the capture. */
.taskbar-drag-ghost.desktop-native-drag-ghost {
    background: #f7f7f7;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.dark-mode .taskbar-drag-ghost.desktop-native-drag-ghost {
    background: #2b2b2b;
}

.desktop-native-drag-ghost span {
    position: absolute;
    right: -5px;
    bottom: -5px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border: 2px solid #f7f7f7;
    border-radius: 999px;
    background: var(--accent, #0078d4);
    color: var(--accent-contrast, #fff);
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    box-sizing: border-box;
}

.dark-mode .desktop-native-drag-ghost span {
    border-color: #2b2b2b;
}

/* ============ 右键菜单 ============ */
.context-menu {
    position: fixed;
    background: var(--bg-secondary);
    backdrop-filter: blur(var(--blur-lg)) saturate(150%);
    border-radius: var(--radius-md);
    padding: 6px;
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    z-index: 10000;
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.context-menu-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.dark-mode .context-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.context-menu-item img {
    width: 16px;
    height: 16px;
}

.context-menu-item.disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: not-allowed;
}

.context-menu-item.disabled:hover {
    background: transparent;
}

.context-menu-separator {
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
}

/* ============ 任务栏 ============ */
/* 任务栏层级，低于面板但高于窗口 - Taskbar z-index, below panels but above windows */
.taskbar {
    position: fixed;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    backdrop-filter: blur(var(--blur-lg)) saturate(150%);
    padding: 8px 12px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    z-index: 10000;
}

/* 任务栏显示动画 - 从下方弹入（非线性平滑） */
body.animations-enabled .taskbar {
    transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1), 
                opacity 0.35s ease-out;
}

/* 任务栏隐藏动画 - 向下滑出（非线性平滑） */
body.animations-enabled .taskbar.hiding {
    transition: transform 0.45s cubic-bezier(0.55, 0.055, 0.675, 0.19), 
                opacity 0.3s ease-in;
}

body.animations-enabled .taskbar.auto-hide-active {
    transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.35s ease-out;
}

body.animations-enabled .taskbar.auto-hide-active.hiding {
    transition: transform 0.45s cubic-bezier(0.55, 0.055, 0.675, 0.19),
                opacity 0.3s ease-in;
}

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

@keyframes taskbarPeekPop {
    0% {
        transform: translateX(-50%) translateY(calc(100% + 30px));
        opacity: 0;
    }
    62% {
        transform: translateX(-50%) translateY(-5px);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

body.animations-enabled .taskbar.auto-hide-active.peek-pop {
    animation: taskbarPeekPop 0.52s cubic-bezier(0.2, 1.2, 0.2, 1) both;
}

.taskbar-left,
.taskbar-center,
.taskbar-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 任务栏扩充弹簧动画 */
body.animations-enabled .taskbar-center {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.taskbar-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast), transform var(--transition-fast);
    position: relative;
}

.taskbar-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.05);
}

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

.taskbar-btn:active {
    transform: scale(0.95);
}

.taskbar-btn img {
    width: 24px;
    height: 24px;
}

.taskbar-btn .icon-stroke {
    display: block;
}

.taskbar-btn .icon-fill {
    display: none;
}

.taskbar-btn.active .icon-stroke {
    display: none;
}

.taskbar-btn.active .icon-fill {
    display: block;
}

.taskbar-app {
    position: relative;
}

.taskbar-app img {
    position: relative;
    z-index: 2;
}

.taskbar-app::before {
    content: '';
    position: absolute;
    inset: 4px 8px auto 8px;
    height: 8px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(var(--accent-rgb, 0, 120, 212), 0.28) 0%, rgba(var(--accent-rgb, 0, 120, 212), 0.12) 55%, rgba(var(--accent-rgb, 0, 120, 212), 0) 100%);
    filter: blur(6px);
    opacity: 0;
    transition: opacity var(--transition-fast), transform var(--transition-fast), bottom var(--transition-fast);
    pointer-events: none;
    z-index: 0;
}

.taskbar-app::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -4px;
    transform: translateX(-50%);
    background: var(--accent);
    border-radius: 999px;
    opacity: 0;
    transition: opacity var(--transition-fast), width var(--transition-fast), height var(--transition-fast), bottom var(--transition-fast);
    pointer-events: none;
    z-index: 1;
}

.taskbar-app.running::before,
.taskbar-app.taskbar-app-minimized::before {
    opacity: 1;
    transform: translateY(2px);
}

.taskbar-app.taskbar-app-active::before {
    opacity: 1;
    transform: translateY(0);
    background: radial-gradient(circle, rgba(var(--accent-rgb, 0, 120, 212), 0.34) 0%, rgba(var(--accent-rgb, 0, 120, 212), 0.18) 55%, rgba(var(--accent-rgb, 0, 120, 212), 0) 100%);
}

.taskbar-app.taskbar-indicator-sync::before {
    transition:
        opacity var(--taskbar-indicator-duration, var(--transition-fast)) var(--taskbar-indicator-ease, ease),
        transform var(--taskbar-indicator-duration, var(--transition-fast)) var(--taskbar-indicator-ease, ease),
        background var(--taskbar-indicator-duration, var(--transition-fast)) var(--taskbar-indicator-ease, ease);
}

.taskbar-app.running::after,
.taskbar-app.taskbar-app-minimized::after {
    width: 4px;
    height: 4px;
    opacity: 1;
    z-index: 2;
}

.taskbar-app.taskbar-app-active::after {
    width: 16px;
    height: 3px;
    bottom: -3px;
    opacity: 1;
    z-index: 2;
}

.taskbar-app.taskbar-indicator-sync::after {
    transition:
        opacity var(--taskbar-indicator-duration, var(--transition-fast)) var(--taskbar-indicator-ease, ease),
        width var(--taskbar-indicator-duration, var(--transition-fast)) var(--taskbar-indicator-ease, ease),
        height var(--taskbar-indicator-duration, var(--transition-fast)) var(--taskbar-indicator-ease, ease),
        bottom var(--taskbar-indicator-duration, var(--transition-fast)) var(--taskbar-indicator-ease, ease),
        background var(--taskbar-indicator-duration, var(--transition-fast)) var(--taskbar-indicator-ease, ease);
}

.taskbar-app.taskbar-app-dock-hit:not(.taskbar-indicator-sync)::after {
    opacity: 0;
}

body.button-glow-enabled .taskbar-app::after {
    bottom: -5px;
}

body.button-glow-enabled .taskbar-app.button-glow-target {
    overflow: hidden;
}

body.button-glow-enabled .taskbar-app > .button-edge-glow,
body.button-glow-enabled .taskbar-app > .button-glow-ripple {
    z-index: 1;
}

body.button-glow-enabled .taskbar-app > .button-edge-glow {
    width: 54px;
    height: 54px;
    filter: blur(5px);
}

body.button-glow-enabled .taskbar-app.running:not(.taskbar-app-active)::after,
body.button-glow-enabled .taskbar-app.taskbar-app-minimized::after {
    bottom: 3px;
}

body.button-glow-enabled .taskbar-app.taskbar-app-active::after {
    bottom: 3px;
}

body.button-glow-enabled .taskbar-app.running:not(.taskbar-app-active)::after,
body.button-glow-disabled .taskbar-app.running:not(.taskbar-app-active)::after,
body.button-glow-enabled .taskbar-app.taskbar-app-minimized::after,
body.button-glow-disabled .taskbar-app.taskbar-app-minimized::after {
    opacity: 1;
    background: rgba(var(--accent-rgb, 0, 120, 212), 0.5);
}

.taskbar-app.taskbar-app-active.running::after {
    opacity: 1;
    background: var(--accent);
}

.taskbar-window-preview {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 5000;
    width: max-content;
    max-width: calc(100vw - 16px);
    padding: 6px;
    border-radius: 14px;
    background: rgba(248, 248, 248, 0.82);
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(var(--fluent-material-blur-light, 20px)) saturate(160%);
    -webkit-backdrop-filter: blur(var(--fluent-material-blur-light, 20px)) saturate(160%);
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    transform-origin: bottom center;
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
}

.taskbar-window-preview.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.dark-mode .taskbar-window-preview {
    background: rgba(34, 34, 34, 0.84);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.46);
}

.taskbar-window-preview-titlebar {
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 0 5px 2px;
    color: var(--text-primary);
}

.taskbar-window-preview-title {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
}

.taskbar-window-preview-title img {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.taskbar-window-preview-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 228px;
}

.taskbar-window-preview-close {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
}

.taskbar-window-preview-close img {
    width: 14px;
    height: 14px;
    pointer-events: none;
}

.dark-mode .taskbar-window-preview-close img {
    filter: invert(1);
}

.taskbar-window-preview-close:hover {
    background: rgba(232, 17, 35, 0.88);
    color: #fff;
}

.taskbar-window-preview-close:hover img {
    filter: invert(1);
}

.taskbar-window-preview-frame {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: var(--bg-primary);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.22);
}

.dark-mode .taskbar-window-preview-frame {
    border-color: rgba(255, 255, 255, 0.1);
}

.taskbar-window-preview-clone,
.taskbar-window-preview-clone * {
    pointer-events: none !important;
}

.taskbar-window-preview-clone {
    animation: none !important;
}

.taskbar-window-preview-clone .window-resize-handle,
.taskbar-window-preview-clone .window-snap-layout-menu {
    display: none !important;
}
.taskbar-notification {
    width: auto !important;
    padding: 0 12px !important;
}

.notification-time-container {
    text-align: center;
}

.notification-time {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}

.notification-date {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.2;
}

/* ============ 开始菜单 ============ */
/* 开始菜单在任务栏上方 - Start menu above taskbar */
.start-menu {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translate(-50%, 0);
    width: 600px;
    overflow: hidden;
    background: var(--bg-secondary);
    backdrop-filter: blur(var(--blur-lg)) saturate(150%);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    z-index: 10200;
    transform-origin: center bottom;
}

.start-search {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    border: 2px solid transparent;
    transition: border-color var(--transition-fast);
}

.start-search:focus-within {
    border-color: var(--accent);
}

.start-search img {
    width: 20px;
    height: 20px;
}

.start-search input {
    flex: 1;
    border: none;
    background: none;
    font-size: 14px;
    color: var(--text-primary);
}

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

.start-apps-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

/* 开始菜单分区 */
.start-section {
    margin-bottom: 20px;
    transition: opacity 220ms cubic-bezier(0.22, 0.61, 0.36, 1),
        transform 220ms cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: opacity, transform;
}

.start-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 0 4px;
}

.start-section-header span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.start-section-link {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.start-section-link:hover {
    background: rgba(0, 0, 0, 0.05);
}

.dark-mode .start-section-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.start-section-link img {
    width: 14px;
    height: 14px;
    opacity: 0.9;
}

.start-apps-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.start-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.start-app:hover {
    background: rgba(0, 0, 0, 0.05);
}

.dark-mode .start-app:hover {
    background: rgba(255, 255, 255, 0.1);
}

.start-app img {
    width: 36px;
    height: 36px;
}

.start-app span {
    font-size: 12px;
    text-align: center;
    line-height: 1.2;
}

.start-empty {
    grid-column: 1 / -1;
    padding: 22px 8px;
    color: var(--text-tertiary);
    font-size: 13px;
    text-align: center;
}

.start-all-apps-view,
.start-search-results-view {
    margin-bottom: 20px;
    overflow: hidden;
    opacity: 0;
    transform: translateX(22px);
    transition: opacity 220ms cubic-bezier(0.22, 0.61, 0.36, 1),
        transform 220ms cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: opacity, transform;
}

.start-menu.start-all-apps-mode .start-all-apps-view,
.start-menu.start-search-mode .start-search-results-view {
    position: absolute;
    left: 24px;
    right: 24px;
    top: 94px;
    margin-bottom: 0;
    opacity: 1;
    transform: translateX(0);
}

.start-menu.start-search-mode .start-search-results-view {
    top: 114px;
}

.start-menu.start-all-apps-mode .start-section,
.start-menu.start-search-mode .start-section {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-22px);
}

.start-menu.start-returning-home .start-all-apps-view,
.start-menu.start-returning-home .start-search-results-view {
    position: absolute;
    left: 24px;
    right: 24px;
    top: 94px;
    margin-bottom: 0;
    pointer-events: none;
}

.start-menu.start-all-apps-mode .start-footer {
    display: none;
}

.start-all-apps-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 24px;
    margin-bottom: 4px;
    padding: 0 4px;
}

.start-all-apps-header > span {
    font-size: 14px;
    font-weight: 600;
    line-height: 24px;
    color: var(--text-primary);
}

.start-all-apps-back {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 4px 8px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.start-all-apps-back:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-primary);
}

.dark-mode .start-all-apps-back:hover {
    background: rgba(255, 255, 255, 0.1);
}

.start-all-apps-back img {
    width: 14px;
    height: 14px;
}

.start-all-apps-list {
    height: var(--start-apps-list-height, 388px);
    overflow-y: auto;
    padding-right: 4px;
    padding-bottom: 72px;
    overscroll-behavior: contain;
    scrollbar-width: none;
    scrollbar-color: transparent transparent;
}

.start-search-results-view .start-all-apps-list {
    height: min(388px, max(260px, calc(100vh - 220px)));
}

.start-all-apps-list::-webkit-scrollbar {
    width: 0;
}

.start-all-apps-list.fluent-scrollbar-active {
    scrollbar-width: thin;
    scrollbar-color: var(--text-tertiary) transparent;
}

.start-all-apps-list.fluent-scrollbar-active::-webkit-scrollbar {
    width: 6px;
}

.start-all-apps-list::-webkit-scrollbar-track {
    background: transparent;
}

.start-all-apps-list::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: 3px;
}

.recent-item-icon,
.recent-item > img {
    width: 22px !important;
    height: 22px !important;
    flex-shrink: 0;
}

.start-all-apps-list > .start-app-group:first-child {
    padding-top: 4px;
}

.recent-item-thumb {
    object-fit: cover;
    border-radius: 6px;
}

.start-app-group {
    padding: 10px 8px 6px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.start-all-app-row {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    min-height: 42px;
    padding: 7px 10px;
}

.start-all-app-row img {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.start-all-app-row span {
    min-width: 0;
    overflow: hidden;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.start-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.start-user:hover {
    background: rgba(0, 0, 0, 0.05);
}

.dark-mode .start-user:hover {
    background: rgba(255, 255, 255, 0.1);
}

.start-user img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.start-user span {
    font-size: 14px;
    font-weight: 500;
}

.start-power-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.start-power-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.dark-mode .start-power-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.start-power-btn img {
    width: 20px;
    height: 20px;
}

/* ============ 电源菜单 ============ */
/* 电源菜单在任务栏上方 - Power menu above taskbar */
.power-menu {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: var(--bg-secondary);
    backdrop-filter: blur(var(--blur-lg)) saturate(150%);
    border-radius: var(--radius-md);
    padding: 6px;
    min-width: 180px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    z-index: 10200;
}

.power-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.power-menu-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.dark-mode .power-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.power-menu-item img {
    width: 18px;
    height: 18px;
}

/* ============ 控制中心 ============ */
/* 控制中心在任务栏上方 - Control center above taskbar */
.control-center {
    position: fixed;
    /* 不设置默认bottom，由JS动态计算 */
    width: 380px;
    background: var(--bg-secondary);
    backdrop-filter: blur(var(--blur-lg)) saturate(150%);
    border-radius: var(--radius-xl);
    padding: 20px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    z-index: 10200;
}

.control-center-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.control-tile {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.control-tile:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: scale(1.02);
}

.dark-mode .control-tile:hover {
    background: rgba(255, 255, 255, 0.12);
}

.control-tile[data-active="true"] {
    background: var(--accent);
    color: white;
}

.control-tile[data-active="true"] .tile-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.control-tile-large {
    display: flex;
    gap: 12px;
}

.control-tile .tile-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 8px;
}

.control-tile-large .tile-icon {
    margin-bottom: 0;
    flex-shrink: 0;
}

.control-tile .tile-icon.icon-stroke {
    display: block;
}

.control-tile .tile-icon.icon-fill {
    display: none;
}

.control-tile[data-active="true"] .tile-icon.icon-stroke {
    display: none !important;
}

.control-tile[data-active="true"] .tile-icon.icon-fill {
    display: block !important;
}

/* 激活状态的图标使用白色 */
.control-tile[data-active="true"] .tile-icon {
    filter: brightness(0) invert(1);
}

/* 蓝牙图标容器 */
.tile-icon-container {
    position: relative;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-right: 0; /* Flex gap 处理间距 */
}

.tile-icon-container img {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease;
}

/* 蓝牙状态切换 */
#bluetooth-tile .bluetooth-icon-off {
    opacity: 1;
}

#bluetooth-tile .bluetooth-icon-on {
    opacity: 0;
}

#bluetooth-tile[data-active="true"] .bluetooth-icon-off {
    opacity: 0 !important;
}

#bluetooth-tile[data-active="true"] .bluetooth-icon-on {
    opacity: 1 !important;
    filter: brightness(0) invert(1);
}


/* 隐藏类优先级 */
.tile-icon.hidden {
    display: none !important;
}

.tile-label {
    flex: 1;
}

.tile-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.tile-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

.control-slider {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
}

.control-slider:last-child {
    margin-bottom: 0;
}

.control-slider img {
    width: 20px;
    height: 20px;
}

.control-slider input[type="range"] {
    flex: 1;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.control-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.control-slider input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-sm);
}

.control-slider span {
    font-size: 13px;
    font-weight: 600;
    min-width: 32px;
    text-align: right;
}

/* ============ 通知中心 ============ */
/* 通知中心在任务栏上方 - Notification center above taskbar */
.notification-center {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100%;
    background: var(--bg-secondary);
    backdrop-filter: blur(var(--blur-lg)) saturate(150%);
    box-shadow: var(--shadow-xl);
    border-left: 1px solid var(--border-color);
    z-index: 10200;
    display: flex;
    flex-direction: column;
}

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

.notification-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.notification-clear {
    font-size: 13px;
    color: var(--accent);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.notification-clear:hover {
    background: rgba(0, 0, 0, 0.05);
}

.dark-mode .notification-clear:hover {
    background: rgba(255, 255, 255, 0.1);
}

.notification-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.notification-item {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    position: relative;
    border: 1px solid var(--border-color);
}

.notification-item-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    margin-bottom: 8px;
}

.notification-item-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.notification-item-time {
    font-size: 11px;
    color: var(--text-tertiary);
}

.notification-item-close {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background var(--transition-fast);
    flex-shrink: 0;
}

.notification-item-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.dark-mode .notification-item-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.notification-item-close img {
    width: 12px;
    height: 12px;
}

.notification-item-content {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.notification-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
}

.notification-empty img {
    width: 64px;
    height: 64px;
    opacity: 0.3;
    margin-bottom: 16px;
}

.notification-empty p {
    font-size: 14px;
}

/* ============ 窗口系统 ============ */
.window {
    position: absolute;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 400px;
    min-height: 300px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
    /* 不使用 will-change/translateZ 强制分层:backdrop-filter 本身已强制分层,
       多余的持久合成层会让 Chromium 在页面静止时走 render surface 缓存路径,
       在非整数 DPR 下于模糊层边缘产生黑线。 */
}

/* 窗口调整大小的手柄 */
.window-resize-handle {
    position: absolute;
    z-index: 200;
    touch-action: none;
}

.window-resize-handle.resize-top {
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    cursor: ns-resize;
}

.window-resize-handle.resize-bottom {
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    cursor: ns-resize;
}

.window-resize-handle.resize-left {
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    cursor: ew-resize;
}

.window-resize-handle.resize-right {
    top: 0;
    right: 0;
    bottom: 0;
    width: 4px;
    cursor: ew-resize;
}

.window-resize-handle.resize-top-left {
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    cursor: nwse-resize;
}

.window-resize-handle.resize-top-right {
    top: 0;
    right: 0;
    width: 12px;
    height: 12px;
    cursor: nesw-resize;
}

.window-resize-handle.resize-bottom-left {
    bottom: 0;
    left: 0;
    width: 12px;
    height: 12px;
    cursor: nesw-resize;
}

.window-resize-handle.resize-bottom-right {
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    cursor: nwse-resize;
}

/* 窗口调整时禁用过渡 */
.window.resizing {
    transition: none;
}

/* 窗口背景 - 模糊模式 */
.window-blur-enabled .window {
    background: var(--bg-secondary);
    backdrop-filter: blur(var(--blur-lg)) saturate(150%);
    -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(150%);
}

/* 窗口背景 - 纯色模式 */
.window-blur-disabled .window {
    background: var(--bg-primary);
}

.window-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    cursor: move;
    user-select: none;
    touch-action: none;
}

.window-title-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.window-icon {
    width: 20px;
    height: 20px;
}

.window-title {
    font-size: 14px;
    font-weight: 600;
}

.window.window-inactive {
    filter: saturate(0.78);
    transition: filter 180ms ease;
}

.window-controls {
    display: flex;
    gap: 8px;
    position: relative;
}

.window-control-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
    touch-action: manipulation;
}

.window-control-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.dark-mode .window-control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.window-control-btn.close:hover {
    background: #d13438;
    color: white;
}

.window-control-btn img {
    width: 16px;
    height: 16px;
}

.window-snap-layout-menu {
    --snap-shell: rgba(255, 255, 255, 0.9);
    --snap-border: rgba(0, 0, 0, 0.12);
    --snap-empty: rgba(15, 23, 42, 0.08);
    --snap-fill: rgba(var(--accent-rgb, 0, 120, 212), 0.42);
    position: absolute;
    top: 50px;
    right: 52px;
    width: 252px;
    padding: 9px;
    border-radius: 12px;
    border: 1px solid var(--snap-border);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(20px) saturate(170%);
    -webkit-backdrop-filter: blur(20px) saturate(170%);
    background: var(--snap-shell);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    opacity: 0;
    transform: translateY(-8px) scale(0.93);
    transform-origin: top right;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1.18);
    z-index: 45;
}

.dark-mode .window-snap-layout-menu {
    --snap-shell: rgba(34, 37, 43, 0.88);
    --snap-border: rgba(255, 255, 255, 0.15);
    --snap-empty: rgba(255, 255, 255, 0.07);
    --snap-fill: rgba(var(--accent-rgb, 0, 120, 212), 0.52);
}

.window-snap-layout-menu.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.snap-layout-btn {
    height: 44px;
    border-radius: 9px;
    border: 1px solid transparent;
    padding: 0;
    background: transparent;
    transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.snap-layout-btn.is-large {
    height: 56px;
}

.snap-layout-btn:hover {
    border-color: rgba(var(--accent-rgb, 0, 120, 212), 0.38);
    background: rgba(var(--accent-rgb, 0, 120, 212), 0.12);
    transform: translateY(-1px);
}

.dark-mode .snap-layout-btn:hover {
    border-color: rgba(var(--accent-rgb, 144, 202, 249), 0.52);
    background: rgba(var(--accent-rgb, 144, 202, 249), 0.16);
}

.snap-layout-mini {
    position: relative;
    display: block;
    width: calc(100% - 10px);
    height: calc(100% - 10px);
    margin: 5px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.14);
    background: var(--snap-empty);
    overflow: hidden;
}

.dark-mode .snap-layout-mini {
    border-color: rgba(255, 255, 255, 0.18);
}

.snap-layout-mini::before {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 4px;
    background: var(--snap-fill);
}

.preview-left-half::before {
    clip-path: inset(0 50% 0 0);
}

.preview-right-half::before {
    clip-path: inset(0 0 0 50%);
}

.preview-left-two-thirds::before {
    clip-path: inset(0 34% 0 0);
}

.preview-right-two-thirds::before {
    clip-path: inset(0 0 0 34%);
}

.preview-top-left::before {
    clip-path: inset(0 50% 50% 0);
}

.preview-top-right::before {
    clip-path: inset(0 0 50% 50%);
}

.preview-bottom-left::before {
    clip-path: inset(50% 50% 0 0);
}

.preview-bottom-right::before {
    clip-path: inset(50% 0 0 50%);
}

.window.snapping {
    transition: all 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.window-edge-snap-hint {
    position: fixed;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 9500;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.12));
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.55);
    opacity: 0;
    transform: scale(0.93);
    transform-origin: center center;
    transition:
        left 260ms cubic-bezier(0.2, 0.9, 0.26, 1),
        top 260ms cubic-bezier(0.2, 0.9, 0.26, 1),
        width 280ms cubic-bezier(0.2, 0.9, 0.26, 1),
        height 280ms cubic-bezier(0.2, 0.9, 0.26, 1),
        opacity 170ms ease,
        transform 420ms cubic-bezier(0.16, 1, 0.3, 1.22);
}

.dark-mode .window-edge-snap-hint {
    border-color: rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, rgba(34, 39, 46, 0.44), rgba(34, 39, 46, 0.2));
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.window-edge-snap-hint.show {
    opacity: 1;
    transform: scale(1);
}

.window-edge-snap-hint-core {
    position: absolute;
    inset: 10px;
    border-radius: 14px;
    border: 1px solid rgba(var(--accent-rgb, 0, 120, 212), 0.45);
    background: rgba(var(--accent-rgb, 0, 120, 212), 0.09);
}

.dark-mode .window-edge-snap-hint-core {
    border-color: rgba(var(--accent-rgb, 144, 202, 249), 0.5);
    background: rgba(var(--accent-rgb, 144, 202, 249), 0.12);
}

.window-content {
    flex: 1;
    overflow: auto;
    background: var(--bg-primary);
    position: relative;
}

/* 统一窗口内容区滚动条为通知中心风格 */
.window-content::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.window-content::-webkit-scrollbar-track {
    background: transparent;
}
.window-content::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: 3px;
}
.window-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}
.window-content {
    scrollbar-width: thin;
    scrollbar-color: var(--text-tertiary) transparent;
}

.window.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
}

@media (pointer: coarse) {
    .window-resize-handle.resize-top,
    .window-resize-handle.resize-bottom {
        height: 10px;
    }

    .window-resize-handle.resize-left,
    .window-resize-handle.resize-right {
        width: 10px;
    }

    .window-resize-handle.resize-top-left,
    .window-resize-handle.resize-top-right,
    .window-resize-handle.resize-bottom-left,
    .window-resize-handle.resize-bottom-right {
        width: 22px;
        height: 22px;
    }
}

.window.minimizing,
.window.restoring {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.window.closing {
    animation: windowClose 0.25s cubic-bezier(0.4, 0, 1, 1) forwards;
}

/* 全局窗口模式切换 */
body.window-blur-enabled .window {
    background: var(--bg-secondary);
    backdrop-filter: blur(var(--blur-lg)) saturate(150%);
    -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(150%);
}

body.window-blur-disabled .window {
    background: var(--bg-primary);
    backdrop-filter: none;
}

body.window-blur-disabled .window-content {
    background: var(--bg-primary);
}

body.window-blur-disabled .window-titlebar {
    background: var(--bg-secondary);
}

/* ============ 模糊禁用时的半透明替代方案 ============ */
.blur-disabled .taskbar {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.9);
}

.dark-mode.blur-disabled .taskbar {
    background: rgba(32, 32, 32, 0.9);
}

.blur-disabled .start-menu {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.95);
}

.dark-mode.blur-disabled .start-menu {
    background: rgba(32, 32, 32, 0.95);
}

.blur-disabled .power-menu {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.95);
}

.dark-mode.blur-disabled .power-menu {
    background: rgba(32, 32, 32, 0.95);
}

.blur-disabled .control-center {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.95);
}

.dark-mode.blur-disabled .control-center {
    background: rgba(32, 32, 32, 0.95);
}

.blur-disabled .notification-center {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.95);
}

.dark-mode.blur-disabled .notification-center {
    background: rgba(32, 32, 32, 0.95);
}

.blur-disabled .context-menu {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.95);
}

.dark-mode.blur-disabled .context-menu {
    background: rgba(32, 32, 32, 0.95);
}

.blur-disabled .login-card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.95);
}

.dark-mode.blur-disabled .login-card {
    background: rgba(32, 32, 32, 0.95);
}

/* ============ 右键菜单 ============ */
.context-menu {
    position: fixed;
    background: var(--bg-secondary);
    backdrop-filter: blur(var(--blur-lg)) saturate(150%);
    border-radius: var(--radius-md);
    padding: 8px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    z-index: 10000;
    min-width: 200px;
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
    font-size: 14px;
}

.context-menu-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.dark-mode .context-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.context-menu-item img {
    width: 16px;
    height: 16px;
}

.blur-disabled .context-menu {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.95);
}

.dark-mode.blur-disabled .context-menu {
    background: rgba(32, 32, 32, 0.95);
}

/* ============ 任务视图 ============ */
.taskview {
    position: fixed;
    inset: 0;
    z-index: 9000; /* 低于窗口(9100)和任务栏(9000) */
    pointer-events: auto;
}
.taskview.hidden { display: none !important; }

/* 背景壁纸过渡效果已在基础样式中定义 */

/* 仅虚化桌面背景壁纸+放大效果，不虚化窗口和任务栏 */
body.in-taskview .desktop-wallpaper {
    filter: blur(20px) brightness(0.8);
    transform: scale(1.08);
}

/* 多任务视图下淡化隐藏桌面图标，退出时平滑出现 */
body.in-taskview .desktop-icons {
    filter: blur(14px) saturate(120%);
    opacity: .35;
    transition: filter 420ms cubic-bezier(0.22, 0.61, 0.36, 1), opacity 220ms cubic-bezier(0.22, 0.61, 0.36, 1);
    pointer-events: none;
}

/* 恢复时的过渡 */
body:not(.in-taskview) .desktop-icons {
    filter: none;
    opacity: 1;
    transition: filter 420ms cubic-bezier(0.22, 0.61, 0.36, 1), opacity 220ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* 多任务视图下桌面小组件层与图标同节奏进入景深模糊（实时过渡） */
body.in-taskview #desktop-widgets-layer {
    filter: blur(14px) saturate(120%);
    opacity: .35;
    pointer-events: none;
}

body.in-taskview #desktop-widgets-layer .fluent-widget {
    pointer-events: none;
}

#desktop-widgets-layer {
    transition: filter 420ms cubic-bezier(0.22, 0.61, 0.36, 1), opacity 220ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* 任务栏保持清晰可见 */
body.in-taskview .taskbar,
body.in-taskview .taskbar.hidden,
body.in-taskview .taskbar.hiding {
    opacity: 1;
    pointer-events: auto !important;
    filter: none !important;
    transform: translateX(-50%) !important;
}

/* 窗口在任务视图中保持清晰，仅位置和大小变化 */
.taskview-window-active {
    cursor: pointer;
    box-shadow: var(--shadow-xl) !important;
    filter: none !important;
    transform-origin: top left !important;
    will-change: transform;
}

body.in-taskview .window.taskview-window-active.taskview-window-frozen {
    filter: grayscale(1) saturate(0.16) brightness(0.78) contrast(0.86) !important;
    opacity: 0.72 !important;
}

body.in-taskview .window.taskview-window-active.taskview-window-frozen::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    border-radius: inherit;
    background: rgba(120, 120, 120, 0.22);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

body.dark-mode.in-taskview .window.taskview-window-active.taskview-window-frozen::after {
    background: rgba(24, 24, 24, 0.34);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

/* ============ 锁屏 → 登录过渡动画 ============ */
/* 锁屏壁纸放大+模糊（同时进行，双向过渡） */
body.lock-to-login .lock-wallpaper {
    transform: scale(1.08);
    filter: blur(18px) brightness(0.82);
}

/* 时间容器：景深虚化（保留可见的失焦轮廓，与壁纸模糊程度一致，双向过渡） */
body.lock-to-login .lock-time-container {
    transform: scale(0.96) translateY(-8px);
    opacity: 0.55;
    filter: blur(16px);
}

/* 底部提示文字：景深虚化（双向过渡） */
body.lock-to-login .lock-hint {
    transform: translateX(-50%) scale(0.96) translateY(8px);
    opacity: 0.45;
    filter: blur(12px);
}

/* 锁屏小组件：与时钟同节奏的景深虚化
   （轻微缩小 + 重度模糊 + 半透明，背景里仍能隐约看到小组件失焦后的色块轮廓；
   动画全部走 #lock-widgets-layer 上的 600ms 过渡，与时钟完全同步、双向可逆。
   父级 filter 会把子树整体栅格化后再模糊，子元素的 backdrop-filter
   也会一并被虚化，呈现统一的失焦效果。） */
body.lock-to-login #lock-widgets-layer,
body.view-login #lock-widgets-layer {
    transform: scale(0.96);
    opacity: 0.55;
    filter: blur(16px) brightness(0.92);
}

/* .fluent-widget 自带 pointer-events: auto，需在子级一并禁用 */
body.lock-to-login #lock-widgets-layer .fluent-widget,
body.view-login #lock-widgets-layer .fluent-widget {
    pointer-events: none;
}

/* 注意：移除 body.lock-to-login 后，所有元素会自动反向过渡回初始状态 */

/* ============ 登录 → 锁屏过渡动画（点击空白返回） ============ */
/* 返回锁屏时的平滑过渡（无弹跳，避免白边） */
body.login-to-lock .lock-wallpaper {
    transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
                filter 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

body.login-to-lock .lock-time-container {
    transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
                opacity 0.4s ease-out,
                filter 0.4s ease-out;
}

body.login-to-lock .lock-hint {
    transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
                opacity 0.4s ease-out,
                filter 0.4s ease-out;
}

body.login-to-lock #lock-widgets-layer {
    transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
                opacity 0.4s ease-out,
                filter 0.4s ease-out;
}

/* 密码卡片返回锁屏的退出动画 */
.login-card.exit-to-lock {
    animation: loginCardExitToLock 0.45s cubic-bezier(0.55, 0.055, 0.675, 0.19) forwards;
}

@keyframes loginCardExitToLock {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, calc(-50% + 50px)) scale(0.9);
    }
}

/* ============ 登录 → 桌面过渡动画 ============ */
/* 密码卡片退出时，锁屏背景加深模糊（全屏实时动态模糊） */
body.login-to-desktop-blur .lock-wallpaper {
    filter: blur(35px) brightness(0.65);
    transition: filter 350ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

body.login-to-desktop-blur .lock-time-container,
body.login-to-desktop-blur .lock-hint,
body.login-to-desktop-blur #lock-widgets-layer {
    filter: blur(20px);
    opacity: 0.2;
    transition: filter 350ms cubic-bezier(0.22, 0.61, 0.36, 1),
                opacity 350ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* 密码卡片也参与实时模糊 */
body.login-to-desktop-blur .login-card {
    filter: blur(12px);
    transition: filter 350ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* 桌面初始模糊状态（与深度模糊一致，实现无缝淡化切换） + 景深放大 */
body.desktop-blur-in .desktop-wallpaper {
    filter: blur(35px) brightness(0.65);
    transform: scale(1.1);
}

body.desktop-blur-in .desktop-icons {
    filter: blur(18px);
    opacity: 0.3;
}

/* 桌面模糊渐变清晰 + 景深缩放（平滑过渡600ms） */
body.desktop-unblur .desktop-wallpaper {
    filter: none;
    transform: scale(1);
    transition: filter 600ms cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 600ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

body.desktop-unblur .desktop-icons {
    filter: none;
    opacity: 1;
    transition: filter 600ms cubic-bezier(0.22, 0.61, 0.36, 1),
                opacity 600ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

body.desktop-unblur #desktop-screen {
    transition: opacity 600ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

body.desktop-to-lock-blur .desktop-wallpaper {
    filter: blur(35px) brightness(0.65);
    transform: scale(1.1);
    transition: filter 350ms cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 350ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

body.desktop-to-lock-blur .desktop-icons {
    filter: blur(18px);
    opacity: 0.3;
    transition: filter 350ms cubic-bezier(0.22, 0.61, 0.36, 1),
                opacity 350ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

body.lock-blur-in .lock-wallpaper {
    filter: blur(35px) brightness(0.65);
    transform: scale(1.1);
}

body.lock-blur-in .lock-time-container,
body.lock-blur-in .lock-hint,
body.lock-blur-in #lock-widgets-layer {
    filter: blur(20px);
    opacity: 0.2;
}

body.lock-unblur .lock-wallpaper {
    filter: none;
    transform: scale(1);
    transition: filter 600ms cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 600ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

body.lock-unblur .lock-time-container,
body.lock-unblur .lock-hint,
body.lock-unblur #lock-widgets-layer {
    filter: none;
    opacity: 1;
    transition: filter 600ms cubic-bezier(0.22, 0.61, 0.36, 1),
                opacity 600ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ============ 窗口全屏时壁纸景深放大+非线性模糊效果 ============ */
/* 仅在开启模糊效果时生效 */
body:not(.blur-disabled).has-maximized-window .desktop-wallpaper {
    filter: blur(25px) brightness(0.85) saturate(1.2);
    transform: scale(1.1);
    transition: filter 500ms cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 深色模式下的效果 */
body.dark-mode:not(.blur-disabled).has-maximized-window .desktop-wallpaper {
    filter: blur(25px) brightness(0.7) saturate(1.1);
}

/* 还原时的平滑过渡 */
body:not(.blur-disabled):not(.has-maximized-window) .desktop-wallpaper {
    transition: filter 400ms cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 400ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ============ 响应式设计 ============ */
body.fullscreen-close-sync:not(.blur-disabled):not(.has-maximized-window) .desktop-wallpaper {
    filter: none;
    transform: scale(1);
    transition: filter 250ms cubic-bezier(0.4, 0, 1, 1),
                transform 250ms cubic-bezier(0.4, 0, 1, 1);
}

body.fullscreen-unmaximize-sync:not(.blur-disabled):not(.has-maximized-window) .desktop-wallpaper {
    filter: none;
    transform: scale(1);
    transition: filter 550ms cubic-bezier(0.36, 0, 0.66, -0.56),
                transform 550ms cubic-bezier(0.36, 0, 0.66, -0.56);
}

@media (max-width: 1024px) {
    .start-menu {
        width: 90%;
    }
    
    .control-center {
        width: 90%;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
    
    .notification-center {
        width: 100%;
    }
}

/* 仅背景虚化：任务视图时窗口与任务栏保持清晰 */
.in-taskview .window { filter: none !important; }
.in-taskview .taskbar { filter: none !important; }

/* ============================================================
   App Shop 应用商店样式
============================================================ */
.appshop {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    overflow: hidden;
}

/* 顶部搜索栏 */
.appshop-header {
    padding: 16px 24px;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.appshop-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 8px 16px;
    width: 100%;
    max-width: 500px;
    transition: all var(--transition-fast);
}

.appshop-search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb, 0, 120, 212), 0.15);
}

.appshop-search-icon {
    width: 18px;
    height: 18px;
    opacity: 0.5;
    flex-shrink: 0;
}

.appshop-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
}

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

/* 主内容区 */
.appshop-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* 精选区域 */
.appshop-featured {
    margin-bottom: 32px;
}

.appshop-featured-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 16px;
    min-height: 280px;
}

/* 主横幅 */
.appshop-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.appshop-banner:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.appshop-banner-content {
    color: white;
    z-index: 1;
}

.appshop-banner-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    margin-bottom: 16px;
}

.appshop-banner-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.appshop-banner-desc {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

.appshop-banner-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.appshop-banner-icon img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

/* 右侧精选卡片 */
.appshop-featured-cards {
    display: grid;
    grid-template-rows: 1fr auto auto;
    gap: 12px;
}

.appshop-featured-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.appshop-featured-card:hover {
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

.appshop-featured-card.large {
    grid-row: span 1;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    min-height: 120px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: none;
    color: white;
}

.appshop-featured-card.large .appshop-featured-card-icon {
    background: rgba(255, 255, 255, 0.2);
}

.appshop-featured-card.large .appshop-featured-card-icon img {
    border-radius: 10px;
}

.appshop-featured-card.large .appshop-featured-card-info h4,
.appshop-featured-card.large .appshop-featured-card-info span {
    color: white;
}

.appshop-featured-card-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.appshop-featured-card-icon img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.appshop-featured-card-info h4 {
    margin: 0 0 2px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.appshop-featured-card-info span {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 轮播指示器 */
.appshop-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
}

.appshop-carousel-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border-color);
    transition: all var(--transition-fast);
}

.appshop-carousel-dots .dot.active {
    width: 18px;
    border-radius: 3px;
    background: var(--accent);
}

/* 分类标签 */
.appshop-categories {
    margin-bottom: 24px;
}

.appshop-category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.appshop-category-tabs::-webkit-scrollbar {
    height: 4px;
}

.appshop-category-tabs::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.appshop-category-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-secondary);
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.appshop-category-tab img {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.appshop-category-tab:hover {
    background: var(--bg-tertiary);
}

.appshop-category-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.appshop-category-tab.active img {
    filter: brightness(0) invert(1);
    opacity: 1;
}

/* 应用网格 */
.appshop-apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.appshop-app-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.appshop-app-card:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.appshop-app-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.appshop-app-icon img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

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

.appshop-app-name {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.appshop-app-developer {
    margin: 0 0 6px 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.appshop-app-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: var(--text-tertiary);
}

.appshop-app-rating {
    display: flex;
    align-items: center;
    gap: 3px;
}

.appshop-app-rating img {
    width: 12px;
    height: 12px;
    filter: invert(70%) sepia(80%) saturate(600%) hue-rotate(5deg);
}

/* 旧版按钮样式（不含 fluent-btn 类时） */
.appshop-app-install:not(.fluent-btn) {
    padding: 8px 18px;
    background: var(--accent);
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.appshop-app-install:not(.fluent-btn):hover {
    background: var(--accent-hover);
    transform: scale(1.02);
}

.appshop-app-install:not(.fluent-btn).installed {
    background: #107c10;
}

.appshop-app-install:not(.fluent-btn).installed:hover {
    background: #0e6b0e;
}

/* FluentUI 按钮样式保留 flex-shrink */
.appshop-app-install.fluent-btn {
    flex-shrink: 0;
}

/* 空状态 */
.appshop-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    color: var(--text-secondary);
}

.appshop-empty img {
    width: 48px;
    height: 48px;
    opacity: 0.3;
    margin-bottom: 16px;
}

/* 深色模式适配 */
.dark-mode .appshop {
    background: var(--bg-primary);
}

.dark-mode .appshop-app-icon {
    background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
}

/* V2 模式适配 */
body.fluent-v2 .appshop-search,
body.fluent-v2 .appshop-app-card,
body.fluent-v2 .appshop-featured-card:not(.large) {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
}

body.fluent-v2.dark-mode .appshop-search,
body.fluent-v2.dark-mode .appshop-app-card,
body.fluent-v2.dark-mode .appshop-featured-card:not(.large) {
    background: rgba(255, 255, 255, 0.08);
}

body.fluent-v2 .appshop-category-tab {
    backdrop-filter: blur(10px);
}


/* ==================== PWA 应用样式 ==================== */

.pwa-app {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.pwa-iframe {
    flex: 1;
    width: 100%;
    border: none;
    background: white;
}

.pwa-frozen-surface {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    background:
        linear-gradient(135deg, rgba(248, 248, 248, 0.9), rgba(210, 214, 222, 0.9)),
        var(--bg-secondary);
    color: var(--text-secondary);
    z-index: 2;
    filter: grayscale(1);
}

.pwa-frozen-surface img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    opacity: 0.58;
}

.pwa-frozen-surface span {
    max-width: min(72%, 260px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
    opacity: 0.72;
}

body.dark-mode .pwa-frozen-surface {
    background:
        linear-gradient(135deg, rgba(52, 52, 56, 0.94), rgba(26, 28, 34, 0.94)),
        var(--bg-secondary);
    color: rgba(255, 255, 255, 0.74);
}

.pwa-content-frozen .pwa-frozen-surface {
    display: flex;
}

.window.window-frozen .window-content,
.pwa-content-frozen {
    pointer-events: none;
    user-select: none;
}

.window.window-frozen .pwa-iframe,
.pwa-content-frozen .pwa-iframe {
    display: none;
    pointer-events: none;
}

.start-menu.start-returning-home .start-search-results-view {
    top: 114px;
}

body.in-taskview .window.taskview-window-active .pwa-content-frozen .pwa-frozen-surface {
    display: none;
}

body.in-taskview .window.taskview-window-active .pwa-content-frozen .pwa-iframe {
    display: block;
    pointer-events: none;
}

/* ==================== App Shop 详情弹窗 ==================== */

.appshop-detail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.appshop-detail-overlay.show {
    opacity: 1;
}

.appshop-detail-modal {
    width: 420px;
    max-width: 90vw;
    max-height: 85vh;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    position: relative;
}

/* 详情卡片信息区域固定背景 - 不受外观切换影响 */
.appshop-detail-info {
    background: #1a1a1a !important;
}

/* 浅色模式下的详情卡片 */
body:not(.dark-mode) .appshop-detail-modal {
    background: #ffffff;
}

body:not(.dark-mode) .appshop-detail-info {
    background: #ffffff !important;
}

body:not(.dark-mode) .appshop-detail-app-info h3,
body:not(.dark-mode) .appshop-detail-desc p,
body:not(.dark-mode) .appshop-detail-meta-item .meta-value {
    color: #1a1a1a;
}

body:not(.dark-mode) .appshop-detail-app-info span,
body:not(.dark-mode) .appshop-detail-meta-item .meta-label {
    color: #666666;
}

.appshop-detail-overlay.show .appshop-detail-modal {
    transform: scale(1) translateY(0);
}

.appshop-detail-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s;
}

.appshop-detail-close:hover {
    background: rgba(0, 0, 0, 0.5);
}

.appshop-detail-close img {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);
}

.appshop-detail-header {
    height: 200px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.appshop-detail-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 40%, var(--theme-color) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, color-mix(in srgb, var(--theme-color) 70%, #ff6b6b) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, color-mix(in srgb, var(--theme-color) 50%, #4ecdc4) 0%, transparent 40%),
        linear-gradient(135deg, var(--theme-color) 0%, color-mix(in srgb, var(--theme-color) 60%, #000) 100%);
    animation: gradientShift 8s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(2deg);
    }
    50% {
        transform: scale(1.05) rotate(-1deg);
    }
    75% {
        transform: scale(1.15) rotate(1deg);
    }
}

.appshop-detail-icon-wrapper {
    position: relative;
    z-index: 2;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.appshop-detail-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
}

.appshop-detail-info {
    padding: 20px;
}

.appshop-detail-app-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.appshop-detail-small-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

.appshop-detail-app-info {
    flex: 1;
}

.appshop-detail-app-info h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.appshop-detail-app-info span {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 旧版详情按钮样式（不含 fluent-btn 类时） */
.appshop-detail-btn:not(.fluent-btn) {
    padding: 10px 28px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.appshop-detail-btn:not(.fluent-btn):hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.appshop-detail-btn:not(.fluent-btn).installed {
    color: #4cc764;
}

.appshop-detail-btn:not(.fluent-btn).installed:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* 浅色模式下的旧版按钮样式 */
body:not(.dark-mode) .appshop-detail-btn:not(.fluent-btn) {
    border-color: rgba(0, 0, 0, 0.15);
    background: rgba(0, 0, 0, 0.06);
}

body:not(.dark-mode) .appshop-detail-btn:not(.fluent-btn):hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

.appshop-detail-desc {
    padding: 16px 0;
}

.appshop-detail-desc p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.appshop-detail-link-note {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(64, 156, 255, 0.28);
    border-radius: 8px;
    background: rgba(64, 156, 255, 0.1);
    color: var(--accent);
    font-size: 13px;
    line-height: 1.45;
}

.appshop-detail-meta {
    display: flex;
    gap: 24px;
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
}

.appshop-detail-meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.appshop-detail-meta-item .meta-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.appshop-detail-meta-item .meta-label {
    font-size: 12px;
    color: var(--text-tertiary);
}

.appshop-detail-uninstall {
    width: 100%;
    padding: 10px;
    margin-top: 12px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: #d13438;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.appshop-detail-uninstall:hover {
    background: rgba(209, 52, 56, 0.1);
    border-color: #d13438;
}

/* Fluent V2 模式 - 增加背景模糊度 */
body.fluent-v2 .appshop-detail-overlay {
    backdrop-filter: blur(20px);
}

/* Fluent V2 胶囊按钮样式 - 与设置里的按钮一致 */
body.fluent-v2 .appshop-detail-btn {
    border-radius: 20px;
    padding: 10px 28px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
}

body.fluent-v2 .appshop-detail-btn.installed {
    background: #107c10;
}

body.fluent-v2 .appshop-detail-uninstall {
    border-radius: 20px;
    padding: 10px 0;
    font-weight: 500;
}

/* Fluent V2 应用列表卡片按钮 */
body.fluent-v2 .appshop-app-install {
    border-radius: 20px;
    padding: 8px 20px;
    font-weight: 600;
    font-size: 13px;
}

/* Fluent V2 应用卡片圆角 */
body.fluent-v2 .appshop-app-card {
    border-radius: 12px;
}

body.fluent-v2 .appshop-app-icon {
    border-radius: 12px;
}

body.fluent-v2 .appshop-featured-card {
    border-radius: 12px;
}

body.fluent-v2 .appshop-category-tab {
    border-radius: 20px;
}

body.fluent-v2 .appshop-category-tab.active {
    border-radius: 20px;
}

/* Fluent V2 搜索框圆角 */
body.fluent-v2 .appshop-search {
    border-radius: 20px;
}

body.fluent-v2 .appshop-search-input {
    border-radius: 20px;
}

/* Fluent V2 详情弹窗高斯模糊（与旧版一致） */
body.fluent-v2 .appshop-detail-overlay {
    backdrop-filter: blur(10px);
}

/* App Shop 按钮使用 FluentUI 样式 */
.appshop-app-install.fluent-btn,
.appshop-detail-btn.fluent-btn {
    padding: 8px 20px;
}

/* 新版外观浅色模式按钮颜色 */
body.fluent-v2:not(.dark-mode) .appshop-app-install.fluent-btn,
body.fluent-v2:not(.dark-mode) .appshop-detail-btn.fluent-btn {
    color: var(--accent);
}

body.fluent-v2:not(.dark-mode) .appshop-app-install.fluent-btn.installed,
body.fluent-v2:not(.dark-mode) .appshop-detail-btn.fluent-btn.installed {
    color: #1a8a3e;
}

/* 深色模式按钮颜色 */
.dark-mode .appshop-app-install.fluent-btn,
.dark-mode .appshop-detail-btn.fluent-btn {
    color: var(--accent);
}

.dark-mode .appshop-app-install.fluent-btn.installed,
.dark-mode .appshop-detail-btn.fluent-btn.installed {
    color: #4cc764;
}

/* 旧版外观按钮背景色 */
body:not(.fluent-v2) .appshop-app-install.fluent-btn,
body:not(.fluent-v2) .appshop-detail-btn.fluent-btn {
    background: rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    color: var(--accent);
}

body:not(.fluent-v2) .appshop-app-install.fluent-btn:hover,
body:not(.fluent-v2) .appshop-detail-btn.fluent-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

body:not(.fluent-v2) .appshop-app-install.fluent-btn.installed,
body:not(.fluent-v2) .appshop-detail-btn.fluent-btn.installed {
    color: #1a8a3e;
}

body:not(.fluent-v2).dark-mode .appshop-app-install.fluent-btn,
body:not(.fluent-v2).dark-mode .appshop-detail-btn.fluent-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
}

body:not(.fluent-v2).dark-mode .appshop-app-install.fluent-btn:hover,
body:not(.fluent-v2).dark-mode .appshop-detail-btn.fluent-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

body:not(.fluent-v2).dark-mode .appshop-app-install.fluent-btn.installed,
body:not(.fluent-v2).dark-mode .appshop-detail-btn.fluent-btn.installed {
    color: #4cc764;
}

/* 新版外观浅色模式分类标签选中状态 */
body.fluent-v2:not(.dark-mode) .appshop-category-tab.active {
    color: var(--accent-contrast, #ffffff);
    background: var(--accent);
    border-color: var(--accent);
}

body.fluent-v2:not(.dark-mode) .appshop-category-tab.active img {
    opacity: 1;
}
/* ============ Alt+C App Switcher ============ */
.app-switcher {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    pointer-events: auto;
}

.app-switcher.hidden {
    display: none !important;
}

.app-switcher-panel {
    max-width: min(1120px, calc(100vw - 48px));
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 18px;
    background: rgba(245, 248, 252, 0.72);
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
}

.dark-mode .app-switcher-panel {
    border-color: rgba(255, 255, 255, 0.13);
    background: rgba(32, 32, 32, 0.72);
    box-shadow: 0 24px 76px rgba(0, 0, 0, 0.54);
}

.app-switcher-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 248px;
    gap: 10px;
    max-width: calc(100vw - 76px);
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px;
    scrollbar-width: none;
}

.app-switcher-list::-webkit-scrollbar {
    display: none;
}

.app-switcher-item {
    width: 248px;
    height: 190px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    border: 2px solid transparent;
    border-radius: 12px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.app-switcher-item:hover {
    background: rgba(255, 255, 255, 0.58);
}

.app-switcher-item.selected {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 0 0 1px rgba(var(--accent-rgb, 0, 120, 212), 0.18), 0 12px 30px rgba(var(--accent-rgb, 0, 120, 212), 0.18);
    transform: translateY(-2px);
}

.dark-mode .app-switcher-item {
    background: rgba(255, 255, 255, 0.08);
}

.dark-mode .app-switcher-item:hover {
    background: rgba(255, 255, 255, 0.12);
}

.dark-mode .app-switcher-item.selected {
    background: rgba(255, 255, 255, 0.17);
    box-shadow: 0 0 0 1px rgba(96, 205, 255, 0.18), 0 14px 34px rgba(0, 0, 0, 0.42);
}

.app-switcher-preview {
    width: 100%;
    height: 138px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 9px;
    background: rgba(0, 0, 0, 0.08);
}

.dark-mode .app-switcher-preview {
    background: rgba(0, 0, 0, 0.28);
}

.app-switcher-preview-frame {
    position: relative;
    overflow: hidden;
    border-radius: 9px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
    background: var(--bg-primary);
}

.app-switcher-window-clone,
.app-switcher-window-clone * {
    pointer-events: none !important;
}

.app-switcher-window-clone .window-resize-handle,
.app-switcher-window-clone .window-snap-layout-menu {
    display: none !important;
}

.app-switcher-embed-placeholder {
    width: 100%;
    height: 100%;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(var(--accent-rgb, 0, 120, 212), 0.12), rgba(0, 0, 0, 0.04));
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
}

.dark-mode .app-switcher-embed-placeholder {
    background: linear-gradient(135deg, rgba(96, 205, 255, 0.16), rgba(255, 255, 255, 0.06));
}

.app-switcher-embed-placeholder img {
    width: 34px;
    height: 34px;
}

.app-switcher-label {
    min-width: 0;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 4px;
}

.app-switcher-label img {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.app-switcher-label span {
    min-width: 0;
    overflow: hidden;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .app-switcher {
        padding: 16px;
    }

    .app-switcher-panel {
        max-width: calc(100vw - 32px);
        padding: 10px;
    }

    .app-switcher-list {
        grid-auto-columns: 212px;
        max-width: calc(100vw - 52px);
    }

    .app-switcher-item {
        width: 212px;
        height: 168px;
    }

    .app-switcher-preview {
        height: 116px;
    }
}
