        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
        }
        
        body {
            background-color: #000;
            color: #fff;
            overflow: hidden;
            height: 100vh;
            position: relative;
            transition: background-color 0.3s;
        }

        /* 新增：深色/浅色模式切换 */
        body.light-mode {
            background-color: #f5f5f7;
            color: #333;
        }
        
        /* 桌面背景 */
        .desktop {
            background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                        url('https://images.unsplash.com/photo-1517336714731-489689fd1ca8?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80') no-repeat center center;
            background-size: cover;
            width: 100%;
            height: 100%;
            position: relative;
            transition: background 0.3s;
        }

        /* 新增：浅色模式桌面背景 */
        body.light-mode .desktop {
            background: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)), 
                        url('https://images.unsplash.com/photo-1517336714731-489689fd1ca8?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80') no-repeat center center;
        }
        
        /* 菜单栏 */
        .menu-bar {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 28px;
            background-color: rgba(30, 30, 30, 0.8);
            backdrop-filter: blur(10px);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 20px;
            font-size: 14px;
            z-index: 100;
            transition: background-color 0.3s;
        }

        /* 新增：浅色模式菜单栏 */
        body.light-mode .menu-bar {
            background-color: rgba(245, 245, 247, 0.8);
            color: #333;
        }
        
        .apple-menu, .app-menu, .status-menu {
            display: flex;
            align-items: center;
        }
        
        .menu-item {
            margin-right: 20px;
            cursor: pointer;
            opacity: 0.9;
            transition: opacity 0.2s;
        }
        
        .menu-item:hover {
            opacity: 1;
        }
        
        .apple-logo {
            font-weight: bold;
            font-size: 18px;
            margin-right: 25px;
        }
        
        /* 桌面图标 */
        .desktop-icons {
            padding: 40px 20px;
            display: flex;
            flex-direction: column;
            flex-wrap: wrap;
            height: calc(100% - 120px);
            width: 120px;
        }
        
        .desktop-icon {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 80px;
            padding: 10px;
            margin-bottom: 20px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .desktop-icon:hover {
            background-color: rgba(255, 255, 255, 0.1);
        }

        /* 新增：浅色模式桌面图标hover */
        body.light-mode .desktop-icon:hover {
            background-color: rgba(0, 0, 0, 0.1);
        }
        
        .desktop-icon.selected {
            background-color: rgba(255, 255, 255, 0.15);
        }

        /* 新增：浅色模式选中图标 */
        body.light-mode .desktop-icon.selected {
            background-color: rgba(0, 0, 0, 0.15);
        }
        
        .icon-img {
            width: 60px;
            height: 60px;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 36px;
        }
        
        .icon-label {
            font-size: 13px;
            text-align: center;
            color: #fff;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
            transition: color 0.3s, text-shadow 0.3s;
        }

        /* 新增：浅色模式图标文字 */
        body.light-mode .icon-label {
            color: #333;
            text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
        }
        
        /* 应用窗口 - 关键修改：移除active控制display，改为直接控制display:block/none */
        .window {
            position: absolute;
            background-color: rgba(245, 245, 247, 0.95);
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            overflow: hidden;
            z-index: 10;
            min-width: 400px;
            min-height: 300px;
            color: #333;
            display: none;
            /* 动画期间启用 GPU 合成，缩放/淡出更顺滑 */
            will-change: transform, opacity, filter;
            backface-visibility: hidden;
            transform-origin: center center;
        }

        /* 最大化 / 还原时的尺寸过渡：只在动画期间挂上，避免影响拖动与缩放 */
        .window.window-resizing {
            transition:
                left 0.34s cubic-bezier(0.32, 0.72, 0, 1),
                top 0.34s cubic-bezier(0.32, 0.72, 0, 1),
                width 0.34s cubic-bezier(0.32, 0.72, 0, 1),
                height 0.34s cubic-bezier(0.32, 0.72, 0, 1),
                border-radius 0.34s cubic-bezier(0.32, 0.72, 0, 1);
            will-change: left, top, width, height;
        }

        /* 全屏时收紧圆角，更接近 macOS 全屏的观感 */
        .window.is-maximized {
            border-radius: 0;
        }

        /* 动画播放期间禁止拖动，避免手势与动效互相打架 */
        .window.is-animating .window-header {
            cursor: default;
        }

        /* 关闭 / 最小化时窗口被"吸"向目标点时的拖影层次 */
        .window.is-animating {
            pointer-events: none;
        }
        
        .window-header {
            background-color: rgba(245, 245, 247, 0.9);
            padding: 12px 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid #e0e0e0;
            cursor: move;
        }
        
        .window-controls {
            display: flex;
            gap: 10px;
        }
        
        .control-btn {
            position: relative;
            width: 14px;
            height: 14px;
            border-radius: 50%;
            cursor: pointer;
            transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
        }
        
        /* 鼠标进入红绿灯区域时，按钮上浮现符号（macOS 同款交互） */
        .control-btn::after {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            line-height: 1;
            color: rgba(0, 0, 0, 0.55);
            opacity: 0;
            transform: scale(0.6);
            transition: opacity 0.15s ease, transform 0.15s ease;
            pointer-events: none;
        }
        
        .control-btn.close::after { content: '\2715'; font-size: 8px; }
        .control-btn.minimize::after { content: '\2212'; font-size: 12px; }
        .control-btn.maximize::after { content: '\2922'; font-size: 9px; }
        
        .window-controls:hover .control-btn::after {
            opacity: 1;
            transform: scale(1);
        }
        
        .control-btn:hover {
            transform: scale(1.18);
            filter: brightness(1.06);
            box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22);
        }
        
        /* 按下时轻微回弹，给出明确的点击反馈 */
        .control-btn:active {
            transform: scale(0.86);
            filter: brightness(0.92);
        }
        
        .close {
            background-color: #ff5f57;
        }
        
        .minimize {
            background-color: #febc2e;
        }
        
        .maximize {
            background-color: #28c840;
        }
        
        .window-title {
            font-weight: 500;
            font-size: 14px;
            color: #333;
        }
        
        .window-content {
            padding: 20px;
            height: calc(100% - 50px);
            overflow: auto;
        }
        
        /* Dock栏 */
        .dock {
            position: absolute;
            bottom: 10px;
            left: 50%;
            transform: translateX(-50%);
            height: 70px;
            background-color: rgba(40, 40, 40, 0.6);
            backdrop-filter: blur(20px);
            border-radius: 18px;
            display: flex;
            align-items: flex-end;
            padding: 0 15px;
            z-index: 50;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
            transition: background-color 0.3s;
        }

        /* 新增：浅色模式Dock栏 */
        body.light-mode .dock {
            background-color: rgba(245, 245, 247, 0.6);
        }
        
        .dock-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 8px 5px;
            margin: 0 3px;
            cursor: pointer;
            transition: all 0.2s;
            position: relative;
            bottom: 0;
        }
        
        .dock-item:hover {
            transform: scale(1.2);
            bottom: 10px;
        }

        /* 点 Dock 图标收起窗口后，鼠标通常还停在图标上：
           此时冻结悬停放大，等鼠标移开再重新放上去才恢复放大 */
        .dock-item.dock-hover-lock:hover {
            transform: none;
            bottom: 0;
        }
        
        /* Dock 图标弹跳：窗口被"吸入"Dock 时的反馈动画 */
        @keyframes dockBounce {
            0% {
                transform: scale(1) translateY(0);
            }
            30% {
                transform: scale(1.32) translateY(-12px);
            }
            55% {
                transform: scale(1.06) translateY(4px);
            }
            75% {
                transform: scale(1.16) translateY(-4px);
            }
            100% {
                transform: scale(1) translateY(0);
            }
        }
        
        .dock-item.dock-bounce {
            animation: dockBounce 0.62s cubic-bezier(0.33, 1, 0.68, 1);
            transform-origin: center bottom;
            z-index: 60;
        }
        
        .dock-item.active {
            transform: scale(1.15);
            bottom: 8px;
        }
        
        .dock-icon {
            width: 52px;
            height: 52px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            border-radius: 10px;
            transition: all 0.2s;
        }
        
        .dock-separator {
            width: 1px;
            height: 50px;
            background-color: rgba(255, 255, 255, 0.2);
            margin: 0 5px;
            transition: background-color 0.3s;
        }

        /* 新增：浅色模式分隔符 */
        body.light-mode .dock-separator {
            background-color: rgba(0, 0, 0, 0.2);
        }
        
        /* 此电脑窗口内容 */
        .finder-content {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
            gap: 20px;
        }
        
        .finder-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            cursor: pointer;
            padding: 10px;
            border-radius: 8px;
            transition: background-color 0.2s;
        }
        
        .finder-item:hover {
            background-color: rgba(0, 0, 0, 0.05);
        }
        
        /* 浏览器样式 */
        .safari-content {
            height: 100%;
        }
        
        .safari-url-bar {
            display: flex;
            align-items: center;
            background-color: #f0f0f0;
            padding: 8px 12px;
            border-radius: 8px;
            margin-bottom: 20px;
        }
        
        .safari-url-input {
            flex-grow: 1;
            border: none;
            background: transparent;
            padding: 5px 10px;
            font-size: 14px;
        }
        
        .safari-url-input:focus {
            outline: none;
        }
        
        .webpage {
            background-color: white;
            border-radius: 8px;
            height: 200px;
            padding: 20px;
            overflow: auto;
        }
        
        /* 系统设置样式 */
        .settings-content {
            display: flex;
            height: 100%;
        }
        
        .settings-sidebar {
            width: 200px;
            border-right: 1px solid #e0e0e0;
            padding-right: 20px;
        }
        
        .settings-sidebar-item {
            padding: 12px 15px;
            border-radius: 8px;
            cursor: pointer;
            margin-bottom: 5px;
            font-size: 14px;
        }
        
        .settings-sidebar-item.active {
            background-color: #e0e0e0;
            font-weight: 500;
        }
        
        .settings-main {
            flex-grow: 1;
            padding-left: 20px;
        }
        
        .settings-section {
            margin-bottom: 25px;
        }
        
        .settings-section h3 {
            margin-bottom: 15px;
            font-weight: 500;
        }
        
        .toggle-switch {
            position: relative;
            display: inline-block;
            width: 52px;
            height: 30px;
        }
        
        .toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        
        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: .4s;
            border-radius: 34px;
        }
        
        .slider:before {
            position: absolute;
            content: "";
            height: 22px;
            width: 22px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }
        
        input:checked + .slider {
            background-color: #007aff;
        }
        
        input:checked + .slider:before {
            transform: translateX(22px);
        }
        
        /* 时间显示 */
        .time-display {
            font-size: 13px;
            font-weight: 400;
        }
        
        /* 关键修改：移除active控制display，改为z-index控制层级 */
        .window.active {
            z-index: 20;
        }
        
        /* 响应式调整 */
        @media (max-width: 1200px) {
            .desktop-icons {
                width: 100px;
            }
            
            .window {
                min-width: 350px;
                min-height: 250px;
            }
        }
        
        /* 启动画面 */
        .launch-screen {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: #000;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 1000;
            transition: opacity 0.5s;
        }
        
        .apple-logo-large {
            font-size: 80px;
            margin-bottom: 30px;
            color: #fff;
        }
        
        .progress-bar {
            width: 300px;
            height: 4px;
            background-color: rgba(255, 255, 255, 0.2);
            border-radius: 2px;
            overflow: hidden;
        }
        
        .progress {
            height: 100%;
            background-color: #fff;
            width: 0%;
            transition: width 0.3s ease; /* 修改：进度条更平滑 */
        }
        
        .hidden {
            display: none;
        }

        /* 新增：高亮颜色变量（默认蓝色） */
        :root {
            --highlight-color: #007AFF;
        }

        /* 新增：选中颜色块样式 */
        .color-block.selected {
            border: 2px solid #333;
        }

        /* 新增：备忘录/消息/邮件/音乐/废纸篓窗口样式 */
        .notes-content, .messages-content, .mail-content, .music-content, .trash-content {
            display: flex;
            flex-direction: column;
            gap: 15px;
            height: 100%;
        }

        .note-item, .message-item, .mail-item {
            padding: 12px;
            border-radius: 8px;
            background-color: rgba(0, 0, 0, 0.03);
            cursor: pointer;
            transition: background-color 0.2s;
        }

        .note-item:hover, .message-item:hover, .mail-item:hover {
            background-color: rgba(0, 0, 0, 0.08);
        }

        .note-item h4, .message-item h4, .mail-item h4 {
            font-size: 14px;
            margin-bottom: 4px;
            color: var(--highlight-color);
        }

        .note-item p, .message-item p, .mail-item p {
            font-size: 13px;
            color: #666;
        }

        .music-player {
            display: flex;
            flex-direction: column;
            gap: 20px;
            align-items: center;
            padding: 20px 0;
        }

        .music-cover {
            width: 180px;
            height: 180px;
            border-radius: 12px;
            background-color: var(--highlight-color);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 60px;
            color: white;
        }

        .music-controls {
            display: flex;
            gap: 20px;
            align-items: center;
        }

        .music-control-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: var(--highlight-color);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: transform 0.2s;
        }

        .music-control-btn:hover {
            transform: scale(1.1);
        }

        .trash-content {
            align-items: center;
            justify-content: center;
            gap: 30px;
        }

        .trash-icon-big {
            font-size: 80px;
            color: #6D6D70;
        }

        .trash-empty-btn {
            padding: 10px 20px;
            border-radius: 8px;
            background-color: var(--highlight-color);
            color: white;
            border: none;
            cursor: pointer;
            font-size: 14px;
            transition: background-color 0.2s;
        }

        .trash-empty-btn:hover {
            background-color: #0066cc;
        }

        /* 新增：音乐播放器完善样式 */
        .song-info {
            text-align: center;
            width: 100%;
        }

        .song-info h3 {
            font-size: 18px;
            margin-bottom: 5px;
            color: #333;
        }

        .song-info p {
            font-size: 14px;
            color: #666;
            margin-bottom: 15px;
        }

        .time-info {
            display: flex;
            justify-content: space-between;
            width: 100%;
            font-size: 12px;
            color: #666;
            margin-top: 5px;
        }

        .volume-control input[type="range"] {
            -webkit-appearance: none;
            width: 100%;
            height: 6px;
            border-radius: 3px;
            background: #e0e0e0;
            outline: none;
        }

        .volume-control input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: var(--highlight-color);
            cursor: pointer;
        }

        .playlist-items {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .playlist-item {
            display: flex;
            align-items: center;
            padding: 10px 12px;
            border-radius: 8px;
            background-color: rgba(0, 0, 0, 0.03);
            cursor: pointer;
            transition: background-color 0.2s;
        }

        .playlist-item:hover {
            background-color: rgba(0, 0, 0, 0.08);
        }

        .playlist-item.active {
            background-color: rgba(0, 122, 255, 0.1);
            border-left: 3px solid var(--highlight-color);
        }

        .playlist-item-icon {
            margin-right: 12px;
            color: var(--highlight-color);
            font-size: 16px;
        }

        .playlist-item-info {
            flex-grow: 1;
        }

        .playlist-item-title {
            font-size: 14px;
            color: #333;
            margin-bottom: 2px;
        }

        .playlist-item-artist {
            font-size: 12px;
            color: #666;
        }

        .playlist-item-duration {
            font-size: 12px;
            color: #999;
        }

        /* 新增：游戏相关样式 */
        .game-info {
            padding: 15px;
            background-color: rgba(0, 0, 0, 0.03);
            border-radius: 8px;
            min-width: 150px;
        }

        .game-info h3 {
            margin-bottom: 5px;
            color: var(--highlight-color);
        }

        .game-info p {
            font-size: 14px;
            color: #666;
        }

        .game-controls {
            display: flex;
            gap: 10px;
        }

        .memory-card {
            transition: transform 0.3s, background-color 0.3s;
        }

        .memory-card:hover {
            transform: scale(1.05);
        }

        .wallpaper-thumbnail {
            cursor: pointer;
            transition: all 0.2s;
            border: 3px solid transparent;
        }

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

        .wallpaper-thumbnail.selected {
            border-color: var(--highlight-color);
        }

        .game-icon {
            transition: transform 0.2s;
        }

        .game-icon:hover {
            transform: scale(1.1);
        }