/* ========== HERN OS - 娑叉€佺幓鐠冧富棰?(Apple鍚屾) ========== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --menubar-height: 28px;
    --titlebar-height: 38px;
    --window-radius: 16px;
    /* === 全液态玻璃 v2.0 === */
    --glass-blur: 14px;
    --glass-blur-strong: 22px;
    --glass-saturate: 250%;
    --glass-brightness: 1.1;
    --glass-bg: rgba(255,255,255,0.07);
    --glass-border: rgba(255,255,255,0.08);
    --glass-border-strong: rgba(255,255,255,0.14);
    /* Shadow system */
    --shadow-window: 0 12px 48px rgba(0,0,0,0.42), 0 4px 16px rgba(0,0,0,0.22);
    --shadow-window-focused: 0 20px 64px rgba(0,0,0,0.48), 0 6px 20px rgba(0,0,0,0.28);
    --shadow-dock: 0 2px 12px rgba(0,0,0,0.30), 0 8px 40px rgba(0,0,0,0.45);
    --transition-smooth: 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-spring: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    user-select: none;
    -webkit-user-select: none;
    /* iOS 26 vibrant gradient 鈥?glass needs a colorful backdrop to shine */
    background: linear-gradient(165deg,
        #0d1b3e 0%,
        #162447 20%,
        #1a3a5c 40%,
        #1a1a4e 55%,
        #251745 70%,
        #0f1a2e 100%);
}

/* ========== 鍏ㄥ眬娑叉€佺幓鐠冭〃闈?========== */
/* 鐜荤拑琛ㄩ潰閫氱敤 mixin 閫氳繃 CSS 绫诲疄鐜?*/
.glass-surface {
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)) brightness(var(--glass-brightness));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)) brightness(var(--glass-brightness));
}

.glass-surface-strong {
    backdrop-filter: blur(var(--glass-blur-strong)) saturate(var(--glass-saturate)) brightness(var(--glass-brightness));
    -webkit-backdrop-filter: blur(var(--glass-blur-strong)) saturate(var(--glass-saturate)) brightness(var(--glass-brightness));
}

/* ========== 鍙抽敭鑿滃崟 (娑叉€佺幓鐠? ========== */
.context-menu {
    position: fixed;
    z-index: 99999;
    background: rgba(28, 28, 44, 0.55);
    backdrop-filter: blur(18px) saturate(220%) brightness(1.06);
    -webkit-backdrop-filter: blur(18px) saturate(220%) brightness(1.06);
    border-radius: 10px;
    padding: 4px 0;
    min-width: 170px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.48), 0 2px 8px rgba(0,0,0,0.16);
    border: 0.5px solid rgba(255,255,255,0.12);
    border-top-color: rgba(255,255,255,0.22);
    display: none;
    font-size: 13px;
    color: #fff;
    overflow: hidden;
}
.context-menu .menu-item {
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.15s;
}
.context-menu .menu-item:hover {
    background: rgba(0, 122, 255, 0.65);
    backdrop-filter: blur(10px);
}
.context-menu .menu-item.danger {
    color: #FF5F57;
}
.context-menu .menu-item.danger:hover {
    background: rgba(255, 60, 48, 0.65);
}
.context-menu .menu-separator {
    height: 0.5px;
    background: rgba(255,255,255,0.1);
    margin: 4px 0;
}

/* ========== 妗岄潰 ========== */
/* ========== 粒子背景 ========== */
#loginParticles {
    position: fixed;
    inset: 0;
    z-index: 999998;
    pointer-events: none;
}

/* ========== 桌面右键菜单 ========== */
#desktopMenu {
    position: fixed;
    z-index: 99999;
}

#desktop {
    position: fixed;
    top: var(--menubar-height);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse 60% 50% at 25% 15%,
            rgba(100,140,255,0.18) 0%,
            transparent 60%),
        radial-gradient(ellipse 40% 35% at 70% 60%,
            rgba(180,80,220,0.10) 0%,
            transparent 55%),
        radial-gradient(ellipse 50% 40% at 80% 25%,
            rgba(255,140,60,0.07) 0%,
            transparent 55%),
        linear-gradient(170deg,
            #0a1628 0%,
            #0f1f3d 25%,
            #162850 50%,
            #121a3a 75%,
            #0c1830 100%);
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 2px;
    padding: 20px;
}

/* ========== 妗岄潰鍥炬爣 ========== */
.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 100px;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
    padding: 8px;
}
.desktop-icon:hover {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 0 0 0.5px rgba(255,255,255,0.18), 0 4px 16px rgba(0,0,0,0.2);
    transform: scale(1.03);
}
.desktop-icon-img {
    font-size: 44px;
    line-height: 1;
    margin-bottom: 5px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}
.desktop-icon span {
    color: #fff;
    font-size: 12px;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0,0,0,0.7);
    word-break: break-all;
}

/* ========== 椤堕儴鑿滃崟鏍?(鑻规灉娑叉€佺幓鐠? ========== */
#menubar {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--menubar-height);
    background: rgba(28, 28, 46, 0.45);
    backdrop-filter: blur(var(--glass-blur-strong)) saturate(var(--glass-saturate)) brightness(var(--glass-brightness));
    -webkit-backdrop-filter: blur(var(--glass-blur-strong)) saturate(var(--glass-saturate)) brightness(var(--glass-brightness));
    z-index: 9999;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 12px; font-size: 13px; color: #fff;
    box-shadow: 0 1px 0 rgba(255,255,255,0.12), 0 4px 24px rgba(0,0,0,0.4);
    border-bottom: 0.5px solid var(--glass-border);
}
.menubar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.apple-logo {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M78 52c-1-10 6-18 10-22-4-6-10-8-16-8-7 0-14 4-18 4s-10-4-17-4c-8 0-16 5-21 13-8 13-2 33 6 44 4 6 9 12 15 12s9-4 16-4 10 4 17 4 11-5 15-12c3-4 5-8 7-12-1-1-13-6-14-15zM64 20c3-4 6-10 5-16-5 0-12 4-16 8-4 4-7 10-6 16 6 0 13-3 17-8z" fill="white"/></svg>') center/contain no-repeat;
    opacity: 0.85;
    cursor: pointer;
    border-radius: 4px;
    padding: 2px;
    transition: all 0.15s;
}
.apple-logo:hover {
    background-color: rgba(255,255,255,0.12);
    opacity: 1;
}

/* 寮€濮嬫寜閽?*/
.start-btn {
    font-size: 14px;
    cursor: pointer;
    padding: 0 6px;
    margin-left: 4px;
    border-radius: 3px;
    line-height: 20px;
    transition: background 0.1s;
    color: #ccc;
}
.start-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

/* ========== 开始菜单 (v2.0 增强) ========== */
.start-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 260px;
    top: var(--menubar-height);
    z-index: 9997;
    background: rgba(18, 18, 36, 0.55);
    backdrop-filter: blur(22px) saturate(200%) brightness(1.08);
    -webkit-backdrop-filter: blur(22px) saturate(200%) brightness(1.08);
    border-right: 0.5px solid rgba(255,255,255,0.1);
    box-shadow: 8px 0 56px rgba(0,0,0,0.6), 2px 0 12px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    padding: 8px 0;
    font-size: 13px;
    color: #fff;
    animation: slideInLeft 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
    overflow-y: auto;
}
@keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0.6; }
    to { transform: translateX(0); opacity: 1; }
}
.start-menu::-webkit-scrollbar { width: 4px; }
.start-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

/* ========== 系统菜单 (v2.0 增强) ========== */
.system-menu {
    position: fixed;
    top: var(--menubar-height);
    left: 6px;
    z-index: 99999;
    background: rgba(22, 22, 40, 0.50);
    backdrop-filter: blur(18px) saturate(220%) brightness(1.06);
    -webkit-backdrop-filter: blur(18px) saturate(220%) brightness(1.06);
    border-radius: 0 0 10px 10px;
    padding: 4px 0;
    min-width: 200px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.50), 0 2px 8px rgba(0,0,0,0.16);
    border: 0.5px solid rgba(255,255,255,0.10);
    border-top: none;
    border-top-color: rgba(255,255,255,0.18);
    display: none;
    font-size: 13px;
    color: #fff;
}
.system-menu .menu-item {
    padding: 9px 16px;
    cursor: pointer;
    transition: background 0.12s;
}
.system-menu .menu-item:hover {
    background: rgba(0, 122, 255, 0.55);
    backdrop-filter: blur(8px);
}
.system-menu .menu-item.danger {
    color: #FF5F57;
}
.system-menu .menu-item.danger:hover {
    background: rgba(255, 60, 48, 0.8);
}
.system-menu .menu-separator {
    height: 0.5px;
    background: rgba(255,255,255,0.12);
    margin: 4px 0;
}
.menu-app-name {
    font-weight: 600;
    letter-spacing: 0.3px;
}
.menubar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    opacity: 0.9;
}

/* ========== Dock 鏍?(鑻规灉鍚屾娑叉€佺幓鐠? ========== */
#dock {
    position: fixed;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9998;
    display: flex;
    align-items: flex-end;
    /* 搴曞眰鐜鍏?*/
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5));
}
/* ===== DOCK 鈥?iOS 26 Liquid Glass ===== */
.dock-bg {
    position: absolute;
    inset: 0;
    /* Nearly invisible glass body */
    background:
        radial-gradient(ellipse 100% 80% at 50% 30%,
            rgba(255,255,255,0.06) 0%,
            transparent 70%),
        rgba(255, 255, 255, 0.015);
    /* iOS 26 vibrancy: light blur + heavy saturation boost */
    backdrop-filter: blur(14px) saturate(240%) brightness(1.08) contrast(1.02);
    -webkit-backdrop-filter: blur(14px) saturate(240%) brightness(1.08) contrast(1.02);
    border-radius: 20px;
    /* Glass edge — visible thickness */
    border: 0.8px solid rgba(255,255,255,0.08);
    border-top-color: rgba(255,255,255,0.58);
    border-bottom-color: rgba(0,0,0,0.12);
    border-left-color: rgba(255,255,255,0.26);
    border-right-color: rgba(0,0,0,0.06);
    box-shadow:
        /* Outer shadow — float above background */
        0 2px 12px rgba(0,0,0,0.32),
        0 12px 48px rgba(0,0,0,0.44),
        /* Inner glow ring */
        inset 0 0 4px rgba(255,255,255,0.04),
        /* Top rim — 3px bright: light enters from above */
        inset 0 3px 5px rgba(255,255,255,0.48),
        /* Bottom rim — 2px dark: exit shadow */
        inset 0 -2px 5px rgba(0,0,0,0.16),
        /* Left rim — 2px bright */
        inset 2px 0 4px rgba(255,255,255,0.18),
        /* Right rim — 2px dark */
        inset -2px 0 4px rgba(0,0,0,0.10);
    overflow: hidden;
}
/* Subtle surface specular oval — the "liquid" sheen, wider for thick glass */
.dock-bg::before {
    content: '';
    position: absolute;
    width: 65%; height: 110%;
    top: -65%; left: 17%;
    background: radial-gradient(ellipse at 50% 65%,
        rgba(255,255,255,0.18) 0%,
        rgba(255,255,255,0.04) 40%,
        transparent 65%);
    pointer-events: none;
    filter: blur(5px);
    mix-blend-mode: screen;
    z-index: 1;
}
/* Hairline top specular edge */
.dock-bg::after {
    content: '';
    position: absolute;
    top: 0; left: 6px; right: 6px;
    height: 0.5px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255,255,255,0.24) 15%,
        rgba(255,255,255,0.76) 45%,
        rgba(255,255,255,0.90) 50%,
        rgba(255,255,255,0.76) 55%,
        rgba(255,255,255,0.24) 85%,
        transparent 100%);
    z-index: 2;
    pointer-events: none;
}
.dock-items {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    padding: 10px 14px;
}
.dock-item {
    position: relative;
    width: 48px;
    height: 48px;
    cursor: pointer;
    border-radius: 13px;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}
.dock-item:hover {
    /* 鑻规灉鏍囧織鎬ф斁澶ф晥鏋?*/
    transform: scale(1.32) translateY(-10px);
    /* hover鏃跺浘鏍囧懆鍥村井鍏?*/
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 25px rgba(255,255,255,0.08);
}
.dock-item img {
    width: 42px;
    height: 42px;
    pointer-events: none;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.35));
    transition: filter 0.3s;
}
.dock-item:hover img {
    filter: drop-shadow(0 6px 14px rgba(0,0,0,0.5));
}
.dock-tooltip {
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 35, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    color: #fff;
    font-size: 11px;
    padding: 5px 12px;
    border-radius: 5px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    border: 0.5px solid rgba(255,255,255,0.12);
    border-top-color: rgba(255,255,255,0.2);
}
.dock-item:hover .dock-tooltip {
    opacity: 1;
}
/* 杩愯涓寚绀虹偣 */
.dock-item.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255,255,255,0.5);
}
.dock-item.active.minimized-app::after {
    background: rgba(255,255,255,0.3);
    box-shadow: none;
    width: 4px;
    height: 4px;
    bottom: -4px;
}

/* ===== WINDOW SYSTEM - TRUE LIQUID GLASS ===== */
/* ===== WINDOW 鈥?iOS 26 Liquid Glass ===== */
.window {
    position: absolute;
    min-width: 320px;
    min-height: 220px;
    /* Near-invisible glass body 鈥?98% transparent */
    background:
        radial-gradient(ellipse 70% 40% at 40% 5%,
            rgba(255,255,255,0.08) 0%,
            transparent 55%),
        rgba(255, 255, 255, 0.012);
    /* iOS 26 vibrancy: extremely light blur, high saturation, slight brightening */
    backdrop-filter: blur(14px) saturate(240%) brightness(1.08) contrast(1.02);
    -webkit-backdrop-filter: blur(14px) saturate(240%) brightness(1.08) contrast(1.02);
    border-radius: var(--window-radius);
    /* Depth through shadow + thick glass rim lighting */
    box-shadow:
        /* Deep outer shadow — glass floats above background */
        0 18px 60px rgba(0,0,0,0.46),
        0 8px 24px rgba(0,0,0,0.28),
        0 2px 8px rgba(0,0,0,0.16),
        /* Inner glow ring — light trapped inside thick glass */
        inset 0 0 6px rgba(255,255,255,0.04),
        /* Top rim — 3px bright: light enters glass from above */
        inset 0 3px 6px rgba(255,255,255,0.42),
        /* Bottom rim — 3px dark: light exits, shadow side */
        inset 0 -3px 6px rgba(0,0,0,0.16),
        /* Left rim — 2px bright: side light catch */
        inset 2px 0 4px rgba(255,255,255,0.18),
        /* Right rim — 2px dark: shadow side */
        inset -2px 0 4px rgba(0,0,0,0.10);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 100;
    transition: box-shadow 0.35s, transform 0.3s;
    /* Glass edge — 1px visible thickness */
    border: 1px solid rgba(255,255,255,0.08);
    border-top-color: rgba(255,255,255,0.55);
    border-bottom-color: rgba(0,0,0,0.12);
    border-left-color: rgba(255,255,255,0.24);
    border-right-color: rgba(0,0,0,0.06);
}
/* Liquid surface specular 鈥?barely perceptible bright patch */
.window::before {
    content: '';
    position: absolute;
    width: 50%; height: 35%;
    top: -5%; left: 20%;
    background: radial-gradient(ellipse at 45% 60%,
        rgba(255,255,255,0.10) 0%,
        rgba(255,255,255,0.02) 40%,
        transparent 62%);
    pointer-events: none;
    z-index: 1;
    filter: blur(12px);
    mix-blend-mode: screen;
}
/* Top edge specular hairline 鈥?signature glass identity */
.window::after {
    content: '';
    position: absolute;
    top: 0; left: 8px; right: 8px;
    height: 0.5px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255,255,255,0.16) 15%,
        rgba(255,255,255,0.70) 44%,
        rgba(255,255,255,0.85) 50%,
        rgba(255,255,255,0.70) 56%,
        rgba(255,255,255,0.16) 85%,
        transparent 100%);
    z-index: 6;
    pointer-events: none;
}
.window.focused {
    z-index: 200;
    box-shadow:
        0 26px 72px rgba(0,0,0,0.52),
        0 10px 30px rgba(0,0,0,0.32),
        0 3px 12px rgba(0,0,0,0.20),
        inset 0 0 6px rgba(255,255,255,0.06),
        inset 0 3px 6px rgba(255,255,255,0.55),
        inset 0 -3px 6px rgba(0,0,0,0.20),
        inset 2px 0 4px rgba(255,255,255,0.25),
        inset -2px 0 4px rgba(0,0,0,0.12);
    border-top-color: rgba(255,255,255,0.65);
}
.window.focused::after {
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255,255,255,0.22) 15%,
        rgba(255,255,255,0.90) 45%,
        rgba(255,255,255,1)    50%,
        rgba(255,255,255,0.90) 55%,
        rgba(255,255,255,0.22) 85%,
        transparent 100%);
}
.window.maximized {
    top: var(--menubar-height) !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
}
.window.maximized::before,
.window.maximized::after {
    display: none;
}
.window.minimized {
    transform: translateY(100vh) scale(0.5) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.window.minimizing {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 鏍囬鏍?(娑叉€佺幓鐠?鈥?姣旂獥鍙ｇ◢涓嶉€? */
/* ===== TITLEBAR 鈥?iOS 26 translucent ===== */
.window-titlebar {
    height: var(--titlebar-height);
    background: rgba(240, 240, 245, 0.10);
    backdrop-filter: blur(12px) saturate(220%) brightness(1.04);
    -webkit-backdrop-filter: blur(12px) saturate(220%) brightness(1.04);
    display: flex;
    align-items: center;
    padding: 0 14px;
    cursor: default;
    flex-shrink: 0;
    border-bottom: 0.5px solid rgba(0,0,0,0.04);
    position: relative;
    z-index: 2;
}
/* 鏍囬鏍忛《閮ㄩ珮鍏?*/
.window-titlebar::before {
    content: '';
    position: absolute;
    top: 0; left: 12px; right: 12px;
    height: 0.5px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}
.window-titlebar .traffic-lights {
    display: flex;
    gap: 9px;
    margin-right: 12px;
}
.traffic-light {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    box-shadow: 0 0 0 0.5px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.3);
}
.traffic-light:hover {
    filter: brightness(0.85);
    transform: scale(1.1);
}
.traffic-light.close { background: #FF5F57; }
.traffic-light.minimize { background: #FFBD2E; }
.traffic-light.maximize { background: #28CA41; }

.traffic-light::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.15s;
}
.traffic-light:hover::after { opacity: 1; }
.traffic-light.close:hover::after {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12"><line x1="3" y1="3" x2="9" y2="9" stroke="%234a0000" stroke-width="1.2"/><line x1="9" y1="3" x2="3" y2="9" stroke="%234a0000" stroke-width="1.2"/></svg>') center/8px no-repeat;
}
.traffic-light.minimize:hover::after {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12"><line x1="2" y1="6" x2="10" y2="6" stroke="%23995500" stroke-width="1.2"/></svg>') center/8px no-repeat;
}
.traffic-light.maximize:hover::after {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12"><rect x="2" y="2" width="8" height="8" rx="1" fill="none" stroke="%23005500" stroke-width="1.2"/></svg>') center/8px no-repeat;
}

.window-title {
    flex: 1;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

/* 窗口内容区 · 液态玻璃 */
.window-content {
    flex: 1;
    overflow: auto;
    padding: 18px;
    color: #fff;
    font-size: 13px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: relative;
    z-index: 1;
    border-radius: 0 0 var(--window-radius) var(--window-radius);
}
/* 玻璃滚动条 */
.window-content::-webkit-scrollbar { width: 5px; }
.window-content::-webkit-scrollbar-track { background: transparent; }
.window-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
.window-content::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* 全局玻璃滚动条 */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }

/* ========== 液态玻璃过渡动画 ========== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
    -webkit-backdrop-filter: none !important;
    border-color: rgba(255,255,255,0.12) !important;
}
body.glass-off .dock-bg::after,
body.glass-off .dock-bg::before {
    display: none;
}
body.glass-off .window {
    background: rgba(245, 245, 250, 0.92) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-color: rgba(0,0,0,0.1) !important;
}
body.glass-off .window::before,
body.glass-off .window::after {
    display: none;
}
body.glass-off .window-titlebar {
    background: rgba(235, 235, 240, 0.9) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
body.glass-off .start-menu {
    background: rgba(30, 30, 45, 0.95) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
body.glass-off .system-menu,
body.glass-off .context-menu {
    background: rgba(35, 35, 50, 0.95) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
body.glass-off .desktop-icon:hover {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}

/* 鎭㈠琚垹鐨?start menu 鏍峰紡 */
.start-menu-header {
    padding: 8px 16px 12px;
    font-weight: 600;
    font-size: 14px;
    color: #999;
    border-bottom: 0.5px solid rgba(255,255,255,0.06);
    margin-bottom: 6px;
}
.start-menu-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    padding: 6px 16px 4px;
}
.start-menu-item {
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.1s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.start-menu-item:hover {
    background: rgba(0, 122, 255, 0.7);
}
.start-menu-item.danger {
    color: #FF5F57;
}
.start-menu-item.danger:hover {
    background: rgba(255, 60, 48, 0.7);
}
.start-menu-separator {
    height: 0.5px;
    background: rgba(255,255,255,0.08);
    margin: 6px 12px;
}
.start-wlan-item {
    justify-content: space-between;
    cursor: pointer;
}
.wlan-switch {
    width: 36px;
    height: 20px;
    border-radius: 10px;
    background: #34C759;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}
.wlan-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 18px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: left 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.wlan-switch.off {
    background: #666;
}
.wlan-switch.off::after {
    left: 2px;
}

/* 绐楀彛璋冩暣澶у皬鎵嬫焺 */
.resize-handle {
    position: absolute;
    z-index: 10;
}
.resize-n  { top: -4px; left: 8px; right: 8px; height: 8px; cursor: n-resize; }
.resize-s  { bottom: -4px; left: 8px; right: 8px; height: 8px; cursor: s-resize; }
.resize-e  { right: -4px; top: 8px; bottom: 8px; width: 8px; cursor: e-resize; }
.resize-w  { left: -4px; top: 8px; bottom: 8px; width: 8px; cursor: w-resize; }
.resize-ne { top: -4px; right: -4px; width: 12px; height: 12px; cursor: ne-resize; }
.resize-nw { top: -4px; left: -4px; width: 12px; height: 12px; cursor: nw-resize; }
.resize-se { bottom: -4px; right: -4px; width: 12px; height: 12px; cursor: se-resize; }
.resize-sw { bottom: -4px; left: -4px; width: 12px; height: 12px; cursor: sw-resize; }

/* ========== 搴旂敤鍐呭鏍峰紡 ========== */
.app-section {
    margin-bottom: 20px;
}
.app-section h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 0.5px solid rgba(0,0,0,0.1);
}
.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}
.setting-row label {
    font-size: 13px;
    color: #333;
}
.setting-row input[type="range"] {
    width: 120px;
}
.setting-row select {
    padding: 4px 8px;
    border-radius: 4px;
    border: 0.5px solid rgba(0,0,0,0.15);
    background: rgba(255,255,255,0.6);
    font-size: 12px;
}

/* 搴旂敤鍟嗗簵鏍峰紡 */
.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}
.store-card {
    background: rgba(255,255,255,0.5);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    border: 0.5px solid rgba(0,0,0,0.06);
}
.store-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.store-card-icon {
    font-size: 36px;
    margin-bottom: 8px;
}
.store-card-name {
    font-size: 12px;
    font-weight: 600;
    color: #333;
}
.store-card-desc {
    font-size: 10px;
    color: #888;
    margin-top: 4px;
}
.store-card-btn {
    margin-top: 10px;
    padding: 5px 16px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}
.store-card-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 14px rgba(102,126,234,0.4);
}

/* Button */
.btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: 0.5px solid rgba(255,255,255,0.2);
    background: rgba(102,126,234,0.2);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn:hover {
    background: rgba(102,126,234,0.4);
    border-color: rgba(255,255,255,0.3);
    box-shadow: 0 4px 16px rgba(102,126,234,0.3);
}

/* HIME 杈撳叆娉曟寚绀哄櫒 */
#himeIndicator {
    font-weight: 600;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.06);
    border: 0.5px solid rgba(255,255,255,0.1);
    transition: all 0.15s;
}
#himeIndicator:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.2);
}

/* 涓€閿竻鐞嗘寜閽?*/
.menubar-kill-btn {
    cursor: pointer;
    padding: 0 4px;
    transition: transform 0.15s;
}
.menubar-kill-btn:hover {
    transform: scale(1.2);
}

/* 鐧诲綍鐣岄潰鍗＄墖 */
.login-avatar-card {
    width: 64px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    border-radius: 12px;
    padding: 8px 4px;
    transition: all 0.2s;
    border: 2px solid transparent;
}
.login-avatar-card:hover {
    background: rgba(255,255,255,0.06);
}
.login-avatar-card.selected {
    border-color: rgba(102,126,234,0.7);
    background: rgba(102,126,234,0.1);
    box-shadow: 0 0 16px rgba(102,126,234,0.2);
}
.login-avatar-img {
    font-size: 36px;
    margin-bottom: 4px;
}
.login-avatar-name {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    text-align: center;
}
.login-del-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255,60,48,0.8);
    color: #fff;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
    cursor: pointer;
    display: none;
}
.login-avatar-card:hover .login-del-btn {
    display: block;
}

/* 灞忎繚灞?*/
#screensaver {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: #000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
#screensaver.active {
    display: flex;
}
#screensaver canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.screensaver-time {
    position: relative;
    z-index: 1;
    font-size: 64px;
    font-weight: 200;
    color: rgba(255,255,255,0.8);
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.screensaver-hint {
    position: relative;
    z-index: 1;
    margin-top: 20px;
    font-size: 13px;
    color: rgba(255,255,255,0.3);
}
.start-menu-header {
    padding: 8px 16px 12px;
    font-weight: 600;
    font-size: 14px;
    color: #999;
    border-bottom: 0.5px solid rgba(255,255,255,0.06);
    margin-bottom: 6px;
}
.start-menu-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    padding: 6px 16px 4px;
}
.start-menu-item {
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.1s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.start-menu-item:hover {
    background: rgba(0, 122, 255, 0.7);
}
.start-menu-item.danger {
    color: #FF5F57;
}
.start-menu-item.danger:hover {
    background: rgba(255, 60, 48, 0.7);
}
.start-menu-separator {
    height: 0.5px;
    background: rgba(255,255,255,0.08);
    margin: 6px 12px;
}

/* WLAN 寮€鍏?*/
.start-wlan-item {
    justify-content: space-between;
    cursor: pointer;
}
.wlan-switch {
    width: 36px;
    height: 20px;
    border-radius: 10px;
    background: #34C759;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}
.wlan-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 18px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: left 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.wlan-switch.off {
    background: #666;
}
.wlan-switch.off::after {
    left: 2px;
}

/* ========== 娑叉€佺幓鐠冨叧闂ā寮?========== */
background: rgba(32, 32, 50, 0.94) !important;backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
background: rgba(38, 38, 52, 0.88) !important;background: rgba(40, 40, 55, 0.85) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-color: rgba(255,255,255,0.12) !important;
}
body.glass-off .dock-bg::after {
    display: none;
}
body.glass-off .window {
    background: rgba(245, 245, 250, 0.92) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-color: rgba(0,0,0,0.1) !important;
}
body.glass-off .window::before {
    display: none;
}
body.glass-off .window-titlebar {
    background: rgba(235, 235, 240, 0.9) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
body.glass-off .start-menu {
    background: rgba(30, 30, 45, 0.95) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
body.glass-off .system-menu,
body.glass-off .context-menu {
    background: rgba(35, 35, 50, 0.95) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
body.glass-off .desktop-icon:hover {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}


/* ========== 鎵嬫満妯″紡 ========== */
body.mobile-mode {
    --menubar-height: 0px;
}
body.mobile-mode #menubar {
    display: none !important;
}
body.mobile-mode #desktop {
    padding: 0 !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    top: 0 !important;
}
body.mobile-mode .desktop-icon {
    display: none !important;
}
body.mobile-mode #dock {
    display: none !important;
}
body.mobile-mode .desktop-widget {
    display: none !important;
}
body.mobile-mode #screensaver {
    display: none !important;
}
body.mobile-mode #systemMenu,
body.mobile-mode #startMenu {
    display: none !important;
}
body.mobile-mode .window {
    border-radius: 0 !important;
    top: 32px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: auto !important;
    height: auto !important;
}
/* 搴曢儴瀵艰埅瀹夊叏鍖?*/
#mobileNav {
    padding-bottom: max(4px, env(safe-area-inset-bottom)) !important;
}
#mobileSearchInput::placeholder {
    color: rgba(255,255,255,0.3);
}
/* 鎵嬫満鎼滅储缁撴灉 */
#mobileSearchResults {
    animation: slideUp 0.15s ease;
}
/* 鎵嬫満涓诲睆骞?*/
#mobileHome {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}
/* 鎵嬫満搴旂敤瀹瑰櫒 */
#mobileAppContainer {
    animation: slideUp 0.25s ease;
}

/* ===== LIQUID GLASS ANIMATIONS ===== */

/* Caustic blob drifts slowly across window surface - simulates light bending through glass */


@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
/* 鎵嬫満蹇嵎闈㈡澘 */
#mobileQuickPanel {
    animation: slideUp 0.2s ease;
}
/* 瑙﹀睆浼樺寲 */
body.mobile-mode button,
body.mobile-mode .btn {
    min-height: 36px;
    min-width: 36px;
}
body.mobile-mode input,
body.mobile-mode textarea {
    font-size: 16px !important; /* 闃叉iOS缂╂斁 */
}
/* 妯″紡閫夋嫨鎸夐挳 */
#modeSelector button {
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* 鐢ㄦ埛鍒囨崲鍒楄〃 */
#userSelectList .user-option {
    padding: 8px 14px;
    cursor: pointer;
    border-radius: 8px;
    margin: 3px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #fff;
    transition: background 0.15s;
}
#userSelectList .user-option:hover {
    background: rgba(102,126,234,0.35);
}
#userSelectList .user-option .user-avatar {
    font-size: 28px;
}
.tree-anim {
    animation: treeGrow 0.6s ease-out;
}

/* ========== 涓€閿竻鐞嗗悗鍙版寜閽?========== */
.menubar-kill-btn {
    font-size: 12px;
    cursor: pointer;
    padding: 1px 8px;
    border-radius: 10px;
    background: rgba(255,60,48,0.25);
    color: #FF5F57;
    transition: all 0.2s;
    margin-right: 8px;
    font-weight: 700;
}
.menubar-kill-btn:hover {
    background: rgba(255,60,48,0.5);
    color: #fff;
    box-shadow: 0 0 12px rgba(255,60,48,0.5);
}

/* ========== 锟街伙拷锟斤拷应式 ========== */
@media (min-width: 600px) {
    #mobileHome > div[style*="grid"] { grid-template-columns: repeat(5,1fr) !important; }
}
@media (min-width: 900px) {
    #mobileHome > div[style*="grid"] { grid-template-columns: repeat(6,1fr) !important; }
}
body.mobile-tablet #mobileHome {
    max-width: 600px; margin: 0 auto;
    left: 50% !important; transform: translateX(-50%);
}
body.mobile-tablet #mobileAppContainer {
    max-width: 520px; left: 50% !important; transform: translateX(-50%);
    border-radius: 16px; box-shadow: 0 10px 60px rgba(0,0,0,0.5);
    top: 16px; bottom: 16px;
}
body.mobile-tablet #mobileNav {
    max-width: 480px !important;
    left: 50% !important; transform: translateX(-50%) !important;
}

/* ========== 任务管理器样式 ========== */
.taskmgr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.taskmgr-table th {
    text-align: left;
    padding: 6px 10px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    color: #666;
    font-weight: 600;
}
.taskmgr-table td {
    padding: 6px 10px;
    border-bottom: 0.5px solid rgba(0,0,0,0.05);
}
.taskmgr-bar {
    height: 6px;
    border-radius: 3px;
    background: rgba(0,0,0,0.08);
    overflow: hidden;
    width: 100%;
}
.taskmgr-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s;
}

/* ========== 滚动条 - 苹果玻璃风格 ========== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
    border: 0.5px solid rgba(255,255,255,0.08);
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }

/* ========== 窗口动画 ========== */
@keyframes windowOpen {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.window.opening {
    animation: windowOpen 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* ========== 语音助手脉冲动画 ========== */
@keyframes vaPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(244,67,54,0.4); }
    50% { transform: scale(1.08); box-shadow: 0 0 40px rgba(244,67,54,0.7); }
}

/* ========== 商城动效 ========== */
@keyframes coinRain {
    0% { transform: translateY(-100px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}
@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}
@keyframes treeGrow {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}
.coin-particle {
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    font-size: 24px;
    animation: coinRain 1.5s ease-in forwards;
}

/* ========== 全局搜索 Spotlight ========== */
#spotlightOverlay {
    position: fixed; inset: 0; z-index: 100000;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 18vh;
}
.spotlight-card {
    background: rgba(30,30,45,0.9);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border-radius: 16px;
    width: 560px;
    max-width: 90vw;
    padding: 16px;
    border: 0.5px solid rgba(255,255,255,0.12);
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
#spotlightInput {
    width: 100%; padding: 12px 16px;
    border-radius: 10px; border: none;
    background: rgba(255,255,255,0.08);
    color: #fff; font-size: 18px;
    outline: none; box-sizing: border-box;
}
#spotlightInput::placeholder { color: rgba(255,255,255,0.3); }
#spotlightResults { margin-top: 8px; max-height: 360px; overflow-y: auto; }
.spotlight-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: 8px;
    cursor: pointer; color: #ccc; font-size: 13px;
    transition: background 0.1s;
}
.spotlight-item:hover, .spotlight-item.active {
    background: rgba(102,126,234,0.35); color: #fff;
}
.spotlight-item-icon { font-size: 20px; width: 28px; text-align: center; }
.spotlight-item-type { margin-left: auto; font-size: 10px; opacity: 0.4; }
.spotlight-empty { text-align: center; color: #666; padding: 20px; font-size: 13px; }

/* ========== 通知中心 ========== */
#notifyPanel {
    position: fixed; top: 36px; right: 10px; z-index: 99998;
    width: 340px; max-height: 480px;
    background: rgba(28,28,40,0.88);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 14px;
    border: 0.5px solid rgba(255,255,255,0.1);
    box-shadow: 0 16px 50px rgba(0,0,0,0.5);
    display: none; overflow: hidden;
}
.notify-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px; font-weight: 600; font-size: 14px; color: #fff;
    border-bottom: 0.5px solid rgba(255,255,255,0.08);
}
.notify-clear { background: none; border: none; color: #888; font-size: 11px; cursor: pointer; }
.notify-clear:hover { color: #F44336; }
#notifyList { overflow-y: auto; max-height: 400px; padding: 4px; }
.notify-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 12px; border-radius: 8px; margin: 3px 0;
    transition: background 0.15s; color: #ccc;
}
.notify-item:hover { background: rgba(255,255,255,0.05); }
.notify-item-icon { font-size: 24px; flex-shrink: 0; }
.notify-item-title { font-size: 12px; font-weight: 600; color: #fff; }
.notify-item-body { font-size: 11px; opacity: 0.7; margin-top: 2px; }
.notify-item-time { font-size: 9px; opacity: 0.4; margin-top: 2px; }
.notify-count {
    position: absolute; top: -4px; right: -6px;
    background: #F44336; color: #fff;
    font-size: 9px; width: 16px; height: 16px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

/* ========== 快捷操作面板 ========== */
#quickPanel {
    position: fixed; top: 36px; right: 10px; z-index: 99997;
    width: 280px;
    background: rgba(28,28,40,0.88);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 14px;
    border: 0.5px solid rgba(255,255,255,0.1);
    box-shadow: 0 16px 50px rgba(0,0,0,0.5);
    display: none; padding: 12px;
}
.qp-header { font-size: 13px; font-weight: 600; color: #aaa; margin-bottom: 10px; text-align: center; }
.qp-toggles { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.qp-toggle {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    width: 56px; padding: 8px; border-radius: 10px; cursor: pointer;
    transition: background 0.15s; color: #ccc; font-size: 10px;
}
.qp-toggle:hover { background: rgba(255,255,255,0.08); }
.qp-toggle span:first-child { font-size: 22px; }
.qp-switch {

/* ========== 霸天安全卫士动画 ========== */
@keyframes savPopupIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(244,67,54,0.5); }
    50% { box-shadow: 0 0 25px rgba(244,67,54,0.9), 0 0 50px rgba(244,67,54,0.4); }
}
@keyframes savSlideIn {
    from { transform: translateX(380px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes savSlideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(380px); opacity: 0; }
}

/* ================================================================
   HERN OS v2.0 — 新功能样式
   ================================================================ */

/* ---------- 聚光灯搜索 ---------- */
#spotlight {
    position: fixed; inset: 0; z-index: 999999;
    display: none; flex-direction: column; align-items: center;
    padding-top: 15vh;
}
.spotlight-mask {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.spotlight-box {
    position: relative; z-index: 1;
    width: 560px; max-width: 92vw;
    background: rgba(28,28,44,0.92);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-radius: 14px;
    border: 0.5px solid rgba(255,255,255,0.12);
    box-shadow: 0 24px 80px rgba(0,0,0,0.6);
    overflow: hidden;
    animation: spotIn 0.2s ease-out;
}
@keyframes spotIn { from { transform: translateY(-20px) scale(0.96); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
.spotlight-input-wrap {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px; border-bottom: 0.5px solid rgba(255,255,255,0.06);
}
#spotlightInput {
    flex: 1; background: none; border: none; outline: none;
    color: #fff; font-size: 18px; font-weight: 400;
}
#spotlightInput::placeholder { color: rgba(255,255,255,0.3); }
.spotlight-results { max-height: 360px; overflow-y: auto; }
.spotlight-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 18px; cursor: pointer; transition: background 0.1s;
}
.spotlight-item:hover, .spotlight-item.active { background: rgba(102,126,234,0.35); }
.spotlight-item-icon { font-size: 22px; width: 36px; text-align: center; }
.spotlight-item-info { flex: 1; }
.spotlight-item-name { font-size: 14px; color: #fff; font-weight: 500; }
.spotlight-item-desc { font-size: 11px; color: rgba(255,255,255,0.45); margin-top: 1px; }
.spotlight-item-hint { font-size: 11px; color: rgba(255,255,255,0.2); }
.spotlight-footer {
    display: flex; gap: 16px; padding: 8px 18px;
    font-size: 10px; color: rgba(255,255,255,0.2);
    border-top: 0.5px solid rgba(255,255,255,0.06);
}

/* ---------- 快捷键面板 ---------- */
#shortcutPanel {
    position: fixed; inset: 0; z-index: 999999;
    display: none; align-items: center; justify-content: center;
}
.shortcut-mask {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.5);
}
.shortcut-box {
    position: relative; z-index: 1;
    width: 420px; max-width: 90vw;
    background: rgba(28,28,44,0.92);
    backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
    border-radius: 14px; padding: 24px;
    border: 0.5px solid rgba(255,255,255,0.1);
    color: #fff; text-align: center;
}
.shortcut-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.shortcut-list { text-align: left; }
.shortcut-row {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 0; border-bottom: 0.5px solid rgba(255,255,255,0.05);
    font-size: 12px;
}
.shortcut-row kbd {
    background: rgba(255,255,255,0.1); border-radius: 4px;
    padding: 2px 7px; font-size: 11px; font-family: monospace;
    border: 0.5px solid rgba(255,255,255,0.15);
}
.shortcut-row span:last-child { margin-left: auto; color: rgba(255,255,255,0.5); }
.shortcut-desc { color: rgba(255,255,255,0.4); flex: 1; }

/* ---------- 快捷设置面板 ---------- */
#quickSettingsPanel {
    position: fixed; top: 36px; right: 10px; z-index: 99997;
    width: 260px; display: none;
    background: rgba(28,28,44,0.9);
    backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
    border-radius: 14px; padding: 14px;
    border: 0.5px solid rgba(255,255,255,0.1);
    box-shadow: 0 16px 50px rgba(0,0,0,0.5);
    color: #ccc; font-size: 11px;
}
.qs-title { font-size: 13px; font-weight: 600; color: #aaa; text-align: center; margin-bottom: 10px; }
.qs-row { display: flex; gap: 6px; flex-wrap: wrap; }
.qs-toggle {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    flex: 1; min-width: 52px; padding: 8px 4px; border-radius: 8px;
    cursor: pointer; transition: background 0.15s; font-size: 10px;
}
.qs-toggle:hover { background: rgba(255,255,255,0.08); }
.qs-toggle span:first-child { font-size: 18px; }
.qs-volume {
    display: flex; align-items: center; margin-top: 10px;
    padding-top: 10px; border-top: 0.5px solid rgba(255,255,255,0.06);
}

/* ---------- 桌面小组件（已禁用，与菜单栏重复） ---------- */
#desktopWidgets { display: none !important; }
.desk-widget {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-radius: 14px; padding: 14px 18px;
    border: 0.5px solid rgba(255,255,255,0.1);
    color: #fff; text-align: center;
    min-width: 100px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.dw-time { font-size: 28px; font-weight: 300; letter-spacing: 2px; }
.dw-date { font-size: 11px; color: rgba(255,255,255,0.6); margin-top: 2px; }
.weather-widget { display: flex; flex-direction: column; align-items: center; }
.dw-weather-icon { font-size: 28px; }
.dw-temp { font-size: 20px; font-weight: 500; }
.dw-weather-desc { font-size: 10px; color: rgba(255,255,255,0.55); }

/* ---------- 主题: 浅色模式 ---------- */
body.theme-light {
    background: linear-gradient(165deg, #e8ecf1 0%, #dce3ea 20%, #eef1f5 50%, #e2e6ed 80%, #d8dde5 100%);
}
body.theme-light #menubar { background: rgba(255,255,255,0.5); color: #333; }
body.theme-light #dock { background: rgba(255,255,255,0.4); }
body.theme-light .window-content { color: #333; }
body.theme-light .start-menu, body.theme-light .system-menu {
    background: rgba(255,255,255,0.85) !important; color: #333 !important;
}
body.theme-light .start-menu-item:hover { background: rgba(0,0,0,0.06); }
body.theme-light #desktopWidgets .desk-widget { background: rgba(255,255,255,0.4); color: #333; }
body.theme-light .spotlight-box { background: rgba(255,255,255,0.92); }
body.theme-light #spotlightInput { color: #333; }
body.theme-light .spotlight-item-name { color: #333; }
body.theme-light .shortcut-box, body.theme-light #quickSettingsPanel { background: rgba(255,255,255,0.9); color: #333; }

/* ---------- 剪贴板历史 ---------- */
#clipboardPanel {
    position: fixed; right: 20px; bottom: 80px; z-index: 99996;
    width: 300px; max-height: 300px; overflow-y: auto;
    background: rgba(28,28,44,0.92);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-radius: 12px; padding: 8px 0; display: none;
    border: 0.5px solid rgba(255,255,255,0.1);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    color: #ccc; font-size: 12px;
}
.clip-item {
    padding: 8px 14px; cursor: pointer; transition: background 0.1s;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.clip-item:hover { background: rgba(255,255,255,0.08); }

/* ---------- 截图工具 ---------- */
#screenshotOverlay {
    position: fixed; inset: 0; z-index: 999999; display: none;
    background: rgba(0,0,0,0.35); cursor: crosshair;
}
#screenshotBox {
    position: absolute; border: 2px dashed rgba(255,255,255,0.8);
    background: rgba(102,126,234,0.15); display: none;
}

/* ---------- 通知中心 ---------- */
#notifCenter {
    position: fixed; right: 0; top: var(--menubar-height); bottom: 0;
    width: 340px; z-index: 99995;
    background: rgba(22,22,42,0.92);
    backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
    border-left: 0.5px solid rgba(255,255,255,0.08);
    box-shadow: -8px 0 40px rgba(0,0,0,0.5);
    display: none; flex-direction: column;
    transform: translateX(100%); transition: transform 0.3s ease;
    color: #ccc; font-size: 12px;
}
#notifCenter.open { transform: translateX(0); }
.notif-header {
    padding: 14px 16px; border-bottom: 0.5px solid rgba(255,255,255,0.06);
    font-size: 14px; font-weight: 600; display: flex; justify-content: space-between;
}
.notif-list { flex: 1; overflow-y: auto; padding: 8px; }
.notif-item {
    padding: 10px 12px; border-radius: 10px; margin-bottom: 4px;
    background: rgba(255,255,255,0.04); transition: background 0.15s;
}
.notif-item:hover { background: rgba(255,255,255,0.08); }
.notif-time { font-size: 9px; color: rgba(255,255,255,0.25); }

/* ---------- 窗口缩略图预览 ---------- */
.dock-preview {
    position: fixed; bottom: 90px; z-index: 99998;
    background: rgba(28,28,44,0.9); border-radius: 10px;
    padding: 6px; display: none; pointer-events: none;
    border: 0.5px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    color: #fff; font-size: 10px; text-align: center;
    min-width: 120px;
}
.dock-preview canvas { border-radius: 6px; display: block; }

/* ================================================================
   STEAM 游戏中心 + 动效增强
   ================================================================ */

/* STEAM 标签动效 */
.steam-tab {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.steam-tab:hover { color: #fff !important; background: rgba(255,255,255,0.04); }

/* 游戏卡片悬浮 */
#steamGameCanvas { cursor: crosshair; border-radius: 4px; transition: filter 0.3s; }
#steamGameCanvas:active { filter: brightness(1.2); }

/* 全局毛玻璃升华 */
.window-panel, .start-menu, .system-menu, #quickSettingsPanel, #spotlight .spotlight-box {
    backdrop-filter: blur(var(--glass-blur-strong)) saturate(var(--glass-saturate)) brightness(var(--glass-brightness)) !important;
    -webkit-backdrop-filter: blur(var(--glass-blur-strong)) saturate(var(--glass-saturate)) brightness(var(--glass-brightness)) !important;
}

/* 按钮动效增强 */
.btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* 卡片悬浮动效 */
.store-card {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.store-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    background: rgba(255,255,255,0.1) !important;
}

/* Dock 图标弹跳 */
.dock-item {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}
.dock-item:hover {
    transform: scale(1.2) translateY(-4px);
}

/* 窗口开关动画 */
.window-panel {
    animation: windowOpen 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes windowOpen {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* 输入框玻璃 */
input[type="text"], input[type="password"], input[type="search"], textarea {
    transition: all 0.2s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
input:focus, textarea:focus {
    box-shadow: 0 0 0 2px rgba(102,126,234,0.3);
    border-color: rgba(102,126,234,0.5) !important;
}

/* 通知弹入 */
#notifCenter.open {
    animation: notifSlideIn 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes notifSlideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* 全局呼吸动画(按钮/卡片) */
@keyframes breathe {
    0%, 100% { box-shadow: 0 0 4px rgba(102,126,234,0.2); }
    50% { box-shadow: 0 0 16px rgba(102,126,234,0.5); }
}

/* ---------- 虚拟桌面指示器 ---------- */
#vdIndicator {
    position: fixed; top: 50%; right: 8px; z-index: 9998;
    display: flex; flex-direction: column; gap: 6px;
    transform: translateY(-50%);
    opacity: 0; transition: opacity 0.3s;
}
#vdIndicator:hover { opacity: 1; }
.vd-dot {
    width: 24px; height: 24px; border-radius: 6px;
    background: rgba(255,255,255,0.08); border: 0.5px solid rgba(255,255,255,0.15);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.4); font-size: 10px; cursor: pointer;
    transition: all 0.2s;
}
.vd-dot.active { background: rgba(102,126,234,0.5); border-color: rgba(102,126,234,0.8); color: #fff; }
.vd-dot:hover { background: rgba(255,255,255,0.15); }

/* ---------- 性能监控悬浮窗 ---------- */
#perfMonitor {
    position: fixed; top: 40px; right: 220px; z-index: 99990;
    background: rgba(18,18,36,0.8); backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 10px; padding: 8px 12px;
    border: 0.5px solid rgba(255,255,255,0.1);
    color: #aaa; font-family: monospace; font-size: 11px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    display: flex; cursor: move;
}
    width: 28px; height: 14px; border-radius: 7px; background: #555;
    position: relative; transition: background 0.2s;
}
.qp-switch::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 10px; height: 10px; border-radius: 50%; background: #fff;
    transition: left 0.2s;
}
.qp-switch.on { background: #34C759; }
.qp-switch.on::after { left: 16px; }

/* ========== 桌面小组件 ========== */
.widget-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 14px;
    padding: 16px 20px; color: #fff; text-align: center;
    border: 0.5px solid rgba(255,255,255,0.12);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}
.widget-card:hover { transform: translateY(-2px); }
.widget-time { font-size: 36px; font-weight: 200; letter-spacing: 2px; }
.widget-date { font-size: 11px; opacity: 0.7; margin-top: 4px; }

/* ========== HIME 输入法 ========== */
#himePopup { animation: himeFadeIn 0.12s ease; user-select: none; }
@keyframes himeFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
#himePopup span[onclick]:hover {
    background: rgba(102,126,234,0.5) !important;
}

/* ========== 亮色主题 ========== */
body.theme-light #desktop {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1080"><defs><linearGradient id="g" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:%23e3f2fd"/><stop offset="50%" style="stop-color:%23f5f5f5"/><stop offset="100%" style="stop-color:%23e8eaf6"/></linearGradient></defs><rect fill="url(%23g)" width="1920" height="1080"/></svg>') center/cover no-repeat !important;
}
body.theme-light #menubar { background: rgba(255,255,255,0.85) !important; color: #333 !important; }
body.theme-light .dock-bg { background: rgba(255,255,255,0.3) !important; border-color: rgba(0,0,0,0.08) !important; }
body.theme-light .desktop-icon span { color: #333; text-shadow: 0 1px 2px rgba(255,255,255,0.5); }
body.theme-light .start-menu, body.theme-light .system-menu { background: rgba(255,255,255,0.9) !important; color: #333 !important; }
body.theme-light .window { background: rgba(255,255,255,0.75) !important; }
body.theme-light .window-titlebar { background: rgba(245,245,250,0.85) !important; }

/* ========== WiFi面板 ========== */
#wifiPanel div[style*="cursor:pointer"]:hover { background: rgba(102,126,234,0.2) !important; }

/* ========== 夜间模式 ========== */
#nightOverlay { transition: opacity 0.3s; }
