/* Windows 11 风格 CSS */
@import url('https://fonts.googleapis.com/css2?family=Segoe+UI:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --win11-accent: #0078d4;
    --win11-accent-light: #60cdff;
    --win11-bg: #f3f3f3;
    --win11-dark-bg: #202020;
    --win11-taskbar-bg: rgba(243, 243, 243, 0.7);
    --win11-window-bg: rgba(255, 255, 255, 0.85);
    --win11-border: rgba(0, 0, 0, 0.1);
    --win11-text: #1a1a1a;
    --win11-text-secondary: #5d5d5d;
    --win11-hover: rgba(0, 0, 0, 0.05);
    --win11-active: rgba(0, 0, 0, 0.1);
    --win11-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
    --win11-radius: 8px;
    --win11-radius-lg: 12px;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow: hidden;
    height: 100vh;
    background: #1e1e1e;
    user-select: none;
}

/* 桌面壁纸 */
.win11-desktop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 48px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #1e3c72 100%);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.win11-desktop::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(99, 179, 237, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(129, 140, 248, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

/* 桌面图标区域 */
.desktop-icons {
    position: absolute;
    top: 24px;
    left: 24px;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    max-height: calc(100% - 48px);
    gap: 12px;
    align-content: flex-start;
}

/* 桌面图标 */
.desktop-icon {
    width: 86px;
    height: 100px;
    padding: 12px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.desktop-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

.desktop-icon.selected {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.desktop-icon .icon-image {
    width: 52px;
    height: 52px;
    min-height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    flex-shrink: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.desktop-icon .icon-image i {
    font-size: 28px;
    color: #fff;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.desktop-icon .icon-image img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 12px;
}

.desktop-icon .icon-label {
    font-size: 12px;
    color: #fff;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    max-width: 100%;
    height: 32px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
    word-break: break-word;
}

/* 桌面分隔符 */
.desktop-icon.desktop-separator {
    width: 100%;
    max-width: 200px;
    padding: 4px 8px;
    margin: 8px 0;
    cursor: default;
    background: transparent;
}

.desktop-icon.desktop-separator:hover {
    background: transparent;
}

.desktop-separator .separator-line {
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    margin-bottom: 4px;
}

.desktop-separator .separator-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Windows 任务栏 - 传统风格，开始按钮在左侧 */
.win11-taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: rgba(243, 243, 243, 0.85);
    backdrop-filter: blur(30px) saturate(125%);
    -webkit-backdrop-filter: blur(30px) saturate(125%);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 8px;
    z-index: 9999;
}

.taskbar-left {
    display: none;
}

.taskbar-center {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 4px;
}

.taskbar-right {
    position: absolute;
    right: 0;
    display: flex;
    align-items: center;
    height: 100%;
}

/* 开始按钮 */
.start-btn {
    width: 44px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--win11-radius);
    cursor: pointer;
    transition: background 0.1s ease;
    margin-right: 2px;
}

.start-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.start-btn:active {
    background: rgba(0, 0, 0, 0.08);
}

.start-btn i {
    font-size: 20px;
    color: var(--win11-accent);
}

.start-btn img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* 搜索框 */
.search-btn {
    width: 44px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--win11-radius);
    cursor: pointer;
    transition: background 0.1s ease;
    margin-right: 2px;
}

.search-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.search-btn i {
    font-size: 18px;
    color: var(--win11-text);
}

/* 任务栏图标 */
.taskbar-item {
    width: 44px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--win11-radius);
    cursor: pointer;
    transition: background 0.1s ease;
    position: relative;
    margin: 0 1px;
}

.taskbar-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.taskbar-item:active {
    background: rgba(0, 0, 0, 0.08);
}

.taskbar-item.active {
    background: rgba(0, 0, 0, 0.06);
}

.taskbar-item.active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 3px;
    background: var(--win11-accent);
    border-radius: 2px;
}

.taskbar-item.has-window::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 3px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 2px;
}

.taskbar-item.active.has-window::after {
    width: 16px;
    background: var(--win11-accent);
}

.taskbar-item i {
    font-size: 20px;
    color: var(--win11-text);
}

.taskbar-item img {
    width: 24px;
    height: 24px;
}

/* 任务栏应用容器 */
.taskbar-apps {
    display: flex;
    align-items: center;
    height: 100%;
}

/* 系统托盘 */
.system-tray {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 8px;
    border-radius: var(--win11-radius);
    margin-right: 4px;
    cursor: pointer;
}

.system-tray:hover {
    background: rgba(0, 0, 0, 0.05);
}

.tray-icons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tray-icons i {
    font-size: 14px;
    color: var(--win11-text);
    padding: 4px;
}

/* 时钟区域 */
.clock-area {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    padding: 4px 12px;
    border-radius: var(--win11-radius);
    cursor: pointer;
    height: 40px;
    min-width: 76px;
}

.clock-area:hover {
    background: rgba(0, 0, 0, 0.05);
}

.clock-time {
    font-size: 12px;
    color: var(--win11-text);
    line-height: 1.2;
}

.clock-date {
    font-size: 12px;
    color: var(--win11-text);
    line-height: 1.2;
}

/* 显示桌面按钮 */
.show-desktop-btn {
    width: 6px;
    height: 100%;
    cursor: pointer;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.show-desktop-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* 开始菜单 */
.start-menu {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    width: 640px;
    height: 520px;
    max-height: calc(100vh - 100px);
    background: rgba(243, 243, 243, 0.85);
    backdrop-filter: blur(30px) saturate(125%);
    -webkit-backdrop-filter: blur(30px) saturate(125%);
    border-radius: var(--win11-radius-lg);
    box-shadow: var(--win11-shadow);
    border: 1px solid rgba(255, 255, 255, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.start-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

/* 搜索框 */
.start-search {
    padding: 36px 40px 20px;
}

.start-search-input {
    width: 100%;
    height: 36px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 0 16px 0 40px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.start-search-input:focus {
    background: #fff;
    border-color: var(--win11-accent);
    box-shadow: 0 0 0 1px var(--win11-accent);
}

.start-search-wrapper {
    position: relative;
}

.start-search-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--win11-text-secondary);
    font-size: 14px;
}

/* 固定的应用 */
.pinned-apps {
    padding: 30px 20px;
    flex: 1;
    overflow-y: auto;
}

.pinned-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.pinned-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--win11-text);
}

.pinned-header .all-apps-btn {
    font-size: 12px;
    color: var(--win11-text);
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pinned-header .all-apps-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.pinned-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
}

.pinned-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    border-radius: var(--win11-radius);
    cursor: pointer;
    transition: background 0.1s ease;
}

.pinned-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.pinned-item:active {
    background: rgba(0, 0, 0, 0.08);
}

.pinned-item .item-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.pinned-item .item-icon i {
    font-size: 28px;
    color: var(--win11-accent);
}

.pinned-item .item-icon img {
    width: 36px;
    height: 36px;
}

.pinned-item .item-name {
    font-size: 12px;
    color: var(--win11-text);
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 用户和电源按钮 */
.start-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.user-info {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: var(--win11-radius);
    cursor: pointer;
}

.user-info:hover {
    background: rgba(0, 0, 0, 0.05);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--win11-accent), var(--win11-accent-light));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.user-avatar i {
    color: #fff;
    font-size: 16px;
}

.user-name {
    font-size: 13px;
    color: var(--win11-text);
}

.power-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--win11-radius);
    cursor: pointer;
}

.power-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.power-btn i {
    font-size: 16px;
    color: var(--win11-text);
}

/* 窗口容器 */
.windows-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 48px;
    pointer-events: none;
    z-index: 100;
}

/* Windows 11 窗口样式 */
.win11-window {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--win11-radius-lg);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    min-width: 400px;
    min-height: 300px;
    pointer-events: auto;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.win11-window.focused {
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(0, 0, 0, 0.08);
}

.win11-window.maximized {
    border-radius: 0;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* 窗口标题栏 */
.window-titlebar {
    height: 32px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    background: transparent;
    flex-shrink: 0;
    cursor: default;
}

.window-titlebar.dragging {
    cursor: move;
}

.window-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

.window-icon i {
    font-size: 14px;
    color: var(--win11-accent);
}

.window-icon img {
    width: 16px;
    height: 16px;
}

.window-title {
    flex: 1;
    font-size: 12px;
    color: var(--win11-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.window-controls {
    display: flex;
    align-items: center;
    height: 100%;
}

.window-control-btn {
    width: 46px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.1s ease;
}

.window-control-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.window-control-btn.refresh,
.window-control-btn.external {
    width: 36px;
}

.window-control-btn.refresh:hover {
    background: rgba(76, 175, 80, 0.1);
}

.window-control-btn.refresh:hover i {
    color: #4caf50;
}

.window-control-btn.external:hover {
    background: rgba(0, 120, 212, 0.1);
}

.window-control-btn.external:hover i {
    color: var(--win11-accent);
}

.window-control-btn.close:hover {
    background: #c42b1c;
}

.window-control-btn.close:hover i {
    color: #fff;
}

.window-control-btn i {
    font-size: 10px;
    color: var(--win11-text);
}

/* 窗口内容 */
.window-content {
    flex: 1;
    background: #fff;
    overflow: hidden;
    position: relative;
}

/* 窗口内加载遮罩：减少 iframe 白屏感知 */
.window-loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    z-index: 2;
}

.window-loading-overlay.hide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.window-loading-spinner {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(0, 0, 0, 0.12);
    border-top-color: var(--win11-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.window-loading-text {
    margin-top: 12px;
    font-size: 13px;
    color: var(--win11-text-secondary);
    display: none; /* 默认只显示圆圈转圈，减少干扰 */
}

/* 加载时间过长时再显示提示文案 */
.window-loading-overlay.slow .window-loading-text {
    display: block;
}

.window-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* iframe加载失败提示 */
.iframe-load-error {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    padding: 40px;
    text-align: center;
}

.iframe-load-error .error-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(255, 107, 107, 0.3);
}

.iframe-load-error .error-icon i {
    font-size: 36px;
    color: #fff;
}

.iframe-load-error .error-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 12px;
}

.iframe-load-error .error-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 28px;
    max-width: 320px;
    line-height: 1.6;
}

.iframe-load-error .error-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.iframe-load-error .error-btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    color: #667eea;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.iframe-load-error .error-btn:hover {
    transform: translateY(-2px);
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.iframe-load-error .error-btn:active {
    transform: translateY(0);
}

.iframe-load-error .error-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.iframe-load-error .error-btn-primary:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    border-color: transparent;
}

.iframe-load-error .error-btn i {
    font-size: 14px;
}

/* 调整大小手柄 */
.resize-handle {
    position: absolute;
    background: transparent;
}

.resize-handle.n {
    top: 0;
    left: 8px;
    right: 8px;
    height: 4px;
    cursor: n-resize;
}

.resize-handle.s {
    bottom: 0;
    left: 8px;
    right: 8px;
    height: 4px;
    cursor: s-resize;
}

.resize-handle.e {
    right: 0;
    top: 8px;
    bottom: 8px;
    width: 4px;
    cursor: e-resize;
}

.resize-handle.w {
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 4px;
    cursor: w-resize;
}

.resize-handle.ne {
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    cursor: ne-resize;
}

.resize-handle.nw {
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    cursor: nw-resize;
}

.resize-handle.se {
    bottom: 0;
    right: 0;
    width: 8px;
    height: 8px;
    cursor: se-resize;
}

.resize-handle.sw {
    bottom: 0;
    left: 0;
    width: 8px;
    height: 8px;
    cursor: sw-resize;
}

/* 搜索面板 */
.search-panel {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    width: 640px;
    height: 560px;
    max-height: calc(100vh - 100px);
    background: rgba(243, 243, 243, 0.95);
    backdrop-filter: blur(30px) saturate(125%);
    -webkit-backdrop-filter: blur(30px) saturate(125%);
    border-radius: var(--win11-radius-lg);
    box-shadow: var(--win11-shadow);
    border: 1px solid rgba(255, 255, 255, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
    z-index: 10000;
    overflow: hidden;
}

.search-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

.search-panel-content {
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.search-panel-input {
    width: 100%;
    height: 42px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 22px;
    padding: 0 20px 0 46px;
    font-size: 14px;
    outline: none;
    margin-bottom: 20px;
}

.search-panel-input:focus {
    border-color: var(--win11-accent);
    box-shadow: 0 0 0 1px var(--win11-accent);
}

.search-panel-wrapper {
    position: relative;
}

.search-panel-wrapper i {
    position: absolute;
    left: 18px;
    top: 13px;
    color: var(--win11-text-secondary);
    font-size: 14px;
}

.search-results {
    flex: 1;
    overflow-y: auto;
}

.search-category {
    margin-bottom: 16px;
}

.search-category h4 {
    font-size: 12px;
    color: var(--win11-text-secondary);
    margin-bottom: 8px;
    padding: 0 4px;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--win11-radius);
    cursor: pointer;
    transition: background 0.1s ease;
}

.search-result-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.search-result-item .result-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    background: rgba(0, 120, 212, 0.1);
    border-radius: 6px;
}

.search-result-item .result-icon i {
    font-size: 16px;
    color: var(--win11-accent);
}

.search-result-item .result-name {
    font-size: 13px;
    color: var(--win11-text);
}

/* 右键菜单 */
.context-menu {
    position: fixed;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--win11-radius-lg);
    box-shadow: var(--win11-shadow);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 4px;
    min-width: 200px;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transition: all 0.15s ease;
}

.context-menu.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.context-menu-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.1s ease;
}

.context-menu-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.context-menu-item i {
    width: 20px;
    margin-right: 12px;
    font-size: 14px;
    color: var(--win11-text-secondary);
}

.context-menu-item span {
    font-size: 13px;
    color: var(--win11-text);
}

.context-menu-separator {
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    margin: 4px 8px;
}

/* 通知中心按钮 */
.notification-btn {
    width: 24px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--win11-radius);
    cursor: pointer;
    margin-right: 8px;
}

.notification-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.notification-btn i {
    font-size: 14px;
    color: var(--win11-text);
}

/* 加载遮罩 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #1e3c72;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    transition: opacity 0.5s ease;
}

.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    margin-top: 20px;
    color: #fff;
    font-size: 14px;
}

/* 窗口预览 */
.window-preview {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--win11-radius);
    box-shadow: var(--win11-shadow);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.15s ease;
    pointer-events: none;
}

.taskbar-item:hover .window-preview {
    opacity: 1;
    visibility: visible;
}

.window-preview-content {
    width: 200px;
    height: 120px;
    background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
}

.window-preview-title {
    font-size: 12px;
    color: var(--win11-text);
    margin-top: 8px;
    text-align: center;
}

/* 用户中心按钮 */
.user-center-btn {
    width: 44px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--win11-radius);
    cursor: pointer;
    transition: background 0.1s ease;
    margin-right: 2px;
}

.user-center-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.user-center-btn i {
    font-size: 18px;
    color: var(--win11-text);
}

.user-center-btn.logged-in i {
    color: var(--win11-accent);
}

/* 小组件按钮 */
.widgets-btn {
    width: 44px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--win11-radius);
    cursor: pointer;
    transition: background 0.1s ease;
}

.widgets-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.widgets-btn i {
    font-size: 18px;
    color: var(--win11-text);
}

/* 聊天按钮 */
.chat-btn {
    width: 44px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--win11-radius);
    cursor: pointer;
    transition: background 0.1s ease;
    margin-right: 4px;
}

.chat-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.chat-btn i {
    font-size: 18px;
    color: #6264d8;
}

/* 登录注册弹窗 */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.auth-modal.show {
    opacity: 1;
    visibility: visible;
}

.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.auth-modal-content {
    position: relative;
    width: 400px;
    max-width: 90%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px) saturate(125%);
    -webkit-backdrop-filter: blur(30px) saturate(125%);
    border-radius: var(--win11-radius-lg);
    box-shadow: var(--win11-shadow);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.auth-modal.show .auth-modal-content {
    transform: scale(1) translateY(0);
}

.auth-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 0;
}

.auth-tabs {
    display: flex;
    gap: 24px;
}

.auth-tab {
    font-size: 16px;
    font-weight: 600;
    color: var(--win11-text-secondary);
    cursor: pointer;
    padding-bottom: 12px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.auth-tab:hover {
    color: var(--win11-text);
}

.auth-tab.active {
    color: var(--win11-accent);
    border-bottom-color: var(--win11-accent);
}

.auth-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--win11-radius);
    cursor: pointer;
    transition: background 0.1s ease;
}

.auth-close:hover {
    background: rgba(0, 0, 0, 0.05);
}

.auth-close i {
    font-size: 14px;
    color: var(--win11-text-secondary);
}

.auth-modal-body {
    padding: 24px;
}

.auth-form-group {
    margin-bottom: 16px;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-wrapper i {
    position: absolute;
    left: 14px;
    color: var(--win11-text-secondary);
    font-size: 14px;
}

.auth-input-wrapper input {
    width: 100%;
    height: 44px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--win11-radius);
    padding: 0 14px 0 42px;
    font-size: 14px;
    color: var(--win11-text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input-wrapper input:focus {
    border-color: var(--win11-accent);
    box-shadow: 0 0 0 1px var(--win11-accent);
}

.auth-input-wrapper input::placeholder {
    color: #999;
}

.auth-form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--win11-text);
}

.auth-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: var(--win11-accent);
}

.forgot-password {
    font-size: 13px;
    color: var(--win11-accent);
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}

.auth-submit-btn {
    width: 100%;
    height: 44px;
    background: var(--win11-accent);
    border: none;
    border-radius: var(--win11-radius);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.auth-submit-btn:hover {
    background: #006cbd;
}

.auth-submit-btn:active {
    transform: scale(0.98);
}

.auth-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.auth-error {
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(220, 38, 38, 0.1);
    border-radius: var(--win11-radius);
    color: #dc2626;
    font-size: 13px;
    display: none;
}

.auth-error.show {
    display: block;
}

/* 用户头像图片样式 */
.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar.has-image {
    background: transparent;
}

.user-avatar.has-image i {
    display: none;
}

/* 动画 */
@keyframes windowOpen {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.win11-window.opening {
    animation: windowOpen 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
}

/* 响应式 */
@media (max-width: 768px) {
    .start-menu {
        width: calc(100% - 20px);
        max-width: 640px;
    }
    
    .search-panel {
        width: calc(100% - 20px);
        max-width: 640px;
    }
    
    .pinned-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .recommended-grid {
        grid-template-columns: 1fr;
    }
}

/* 桌面图标美化样式 */
.desktop-icon:hover .icon-image {
    transform: scale(1.05);
}

.desktop-icon:active .icon-image {
    transform: scale(0.95);
}

/* 默认图标背景样式(无特定颜色时) */
.desktop-icon .icon-image:not([class*="icon-bg-"]) {
    background: linear-gradient(145deg, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255,255,255,0.2);
}

.desktop-icon:hover .icon-image:not([class*="icon-bg-"]) {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255,255,255,0.3);
}

/* 多彩图标背景 */
.icon-bg-blue {
    background: linear-gradient(135deg, #0078d4 0%, #00bcf2 100%) !important;
}

.icon-bg-orange {
    background: linear-gradient(135deg, #f97316 0%, #fbbf24 100%) !important;
}

.icon-bg-green {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%) !important;
}

.icon-bg-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%) !important;
}

.icon-bg-red {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%) !important;
}

.icon-bg-pink {
    background: linear-gradient(135deg, #ec4899 0%, #f472b6 100%) !important;
}

.icon-bg-cyan {
    background: linear-gradient(135deg, #06b6d4 0%, #22d3ee 100%) !important;
}

.icon-bg-indigo {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%) !important;
}

.icon-bg-amber {
    background: linear-gradient(135deg, #f59e0b 0%, #fcd34d 100%) !important;
}

.icon-bg-teal {
    background: linear-gradient(135deg, #14b8a6 0%, #2dd4bf 100%) !important;
}

.icon-bg-gray {
    background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%) !important;
}

.icon-bg-rose {
    background: linear-gradient(135deg, #f43f5e 0%, #fb7185 100%) !important;
}

.icon-bg-sky {
    background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%) !important;
}

.icon-bg-lime {
    background: linear-gradient(135deg, #84cc16 0%, #a3e635 100%) !important;
}

.icon-bg-emerald {
    background: linear-gradient(135deg, #059669 0%, #34d399 100%) !important;
}

/* 有背景的图标颜色为白色 */
.desktop-icon .icon-image[class*="icon-bg-"] i {
    color: #fff !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* 特殊图标颜色 - 无背景时使用 */
.icon-explorer { color: #f9a825 !important; }
.icon-edge { color: #0078d4 !important; }
.icon-folder { color: #f9a825 !important; }
.icon-settings { color: #5d5d5d !important; }
.icon-store { color: #0078d4 !important; }
.icon-photos { color: #ff6f00 !important; }
.icon-mail { color: #0078d4 !important; }
.icon-calendar { color: #0078d4 !important; }
.icon-notepad { color: #0078d4 !important; }
.icon-terminal { color: #4d4d4d !important; }
.icon-calculator { color: #0078d4 !important; }
.icon-music { color: #e91e63 !important; }

/* Tooltip */
.taskbar-item[data-tooltip]:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(45, 45, 45, 0.95);
    color: #fff;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 10001;
}

/* 竖屏/窄屏响应式优化 */
@media (max-width: 576px) {
    .desktop-icons {
        top: 12px;
        left: 12px;
        gap: 6px;
    }
    
    .desktop-icon {
        width: 72px;
        height: 78px;
        padding: 8px 4px;
    }
    
    .desktop-icon .icon-image {
        width: 44px;
        height: 44px;
        min-height: 44px;
        border-radius: 10px;
        margin-bottom: 4px;
    }
    
    .desktop-icon .icon-image i {
        font-size: 22px;
    }
    
    .desktop-icon .icon-image img {
        width: 44px;
        height: 44px;
        border-radius: 10px;
    }
    
    .desktop-icon .icon-label {
        font-size: 11px;
        height: 26px;
        line-height: 1.2;
    }
    
    .desktop-icon.selected {
        border-width: 1px;
    }
    
    /* 分隔符优化 */
    .desktop-icon.desktop-separator {
        max-width: 160px;
        padding: 2px 6px;
        margin: 4px 0;
    }
    
    .desktop-separator .separator-label {
        font-size: 10px;
    }
}

/* 超窄屏优化 - 适用于更小的手机 */
@media (max-width: 400px) {
    .desktop-icons {
        top: 8px;
        left: 8px;
        gap: 4px;
    }
    
    .desktop-icon {
        width: 64px;
        height: 70px;
        padding: 6px 3px;
    }
    
    .desktop-icon .icon-image {
        width: 38px;
        height: 38px;
        min-height: 38px;
        border-radius: 8px;
        margin-bottom: 3px;
    }
    
    .desktop-icon .icon-image i {
        font-size: 20px;
    }
    
    .desktop-icon .icon-image img {
        width: 38px;
        height: 38px;
        border-radius: 8px;
    }
    
    .desktop-icon .icon-label {
        font-size: 10px;
        height: 22px;
    }
    
    .desktop-icon.desktop-separator {
        max-width: 140px;
        margin: 3px 0;
    }
}

/* ============================================
   设置菜单样式
   ============================================ */
.settings-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 320px;
    max-width: 90vw;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--win11-radius-lg);
    box-shadow: var(--win11-shadow), 0 0 0 1px rgba(0, 0, 0, 0.1);
    z-index: 10002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.settings-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.settings-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--win11-border);
}

.settings-menu-header span {
    font-size: 15px;
    font-weight: 600;
    color: var(--win11-text);
}

.settings-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--win11-radius);
    cursor: pointer;
    color: var(--win11-text-secondary);
    transition: all 0.15s ease;
}

.settings-close:hover {
    background: var(--win11-hover);
    color: var(--win11-text);
}

.settings-menu-body {
    padding: 16px 20px;
}

.settings-tip {
    font-size: 12px;
    color: var(--win11-text-secondary);
    margin-bottom: 16px;
}

.settings-widget-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-widget-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--win11-radius);
    cursor: pointer;
    transition: background 0.15s ease;
    border: 2px solid transparent;
}

.settings-widget-item:hover {
    background: var(--win11-hover);
}

.settings-widget-item:has(input:checked) {
    background: rgba(0, 120, 212, 0.1);
    border-color: var(--win11-accent);
}

.settings-widget-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.settings-widget-item .widget-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-widget-item .widget-icon i {
    font-size: 18px;
    color: #fff;
}

.settings-widget-item span {
    font-size: 14px;
    color: var(--win11-text);
    flex: 1;
}

/* ============================================
   右侧固定小组件 - 手机模拟器样式
   ============================================ */
.side-widget-panel {
    position: fixed;
    bottom: 100px;
    right: 60px; /* 向左偏移 */
    width: 340px;
    height: 620px;
    z-index: 50; /* 桌面层 */
    display: flex;
    flex-direction: column;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    pointer-events: none;
}

.side-widget-panel.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* 手机关闭按钮 */
.phone-close-btn {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.2s ease;
}

.phone-close-btn i {
    color: #fff;
    font-size: 14px;
}

.phone-close-btn:hover {
    background: #dc3545;
    border-color: #dc3545;
    transform: scale(1.1);
}

/* 手机拖动手柄 */
.phone-drag-handle {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 24px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    z-index: 100;
    transition: all 0.2s ease;
}

.phone-drag-handle i {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

.phone-drag-handle:hover {
    background: rgba(50, 50, 50, 0.9);
    border-color: rgba(255, 255, 255, 0.5);
}

.phone-drag-handle:active {
    cursor: grabbing;
}

/* 任务栏手机切换按钮 */
.phone-toggle-btn {
    width: 44px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--win11-radius);
    cursor: pointer;
    transition: background 0.15s ease;
    position: relative;
}

.phone-toggle-btn i {
    font-size: 18px;
    color: var(--win11-text);
}

.phone-toggle-btn:hover {
    background: var(--win11-hover);
}

.phone-toggle-btn.active {
    background: var(--win11-active);
}

.phone-toggle-btn.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 3px;
    background: var(--win11-accent);
    border-radius: 2px;
}

/* 手机外壳 - 窄边框 */
.phone-frame {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #2a2a2a 0%, #1a1a1a 50%, #0d0d0d 100%);
    border-radius: 32px;
    padding: 6px;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 8px 16px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* 手机边框反光 */
.phone-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

/* 手机右侧按钮 */
.phone-frame::after {
    content: '';
    position: absolute;
    right: -2px;
    top: 100px;
    width: 3px;
    height: 50px;
    background: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 50%, #1a1a1a 100%);
    border-radius: 0 2px 2px 0;
}

/* 手机屏幕容器 */
.phone-screen {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 28px;
    overflow: hidden;
}

/* 底部指示条 */
.phone-indicator {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    z-index: 10;
}

/* 不调整其他元素布局 */
body.has-side-widget .win11-desktop,
body.has-side-widget .win11-taskbar,
body.has-side-widget .windows-container {
    right: 0;
}

/* 隐藏原来的标题栏 */
.side-widget-header {
    display: none;
}

.side-widget-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    border-radius: 28px;
}

/* iframe样式 - 支持滚动但隐藏滚动条 */
.side-widget-content iframe {
    width: calc(100% + 20px); /* 加宽把滚动条推到右侧不可见区域 */
    height: 100%;
    border: none;
    background: #fff;
}

/* 移动端隐藏设置按钮（只在PC显示）*/
@media (max-width: 1024px) {
    #desktopSettings {
        display: none !important;
    }
}

/* 小屏幕PC调整手机大小 */
@media (min-width: 1025px) and (max-width: 1400px) {
    .side-widget-panel {
        width: 300px;
        height: 540px;
        right: 20px;
        bottom: 80px;
    }
    
    .phone-frame {
        border-radius: 28px;
        padding: 5px;
    }
    
    .phone-screen {
        border-radius: 24px;
    }
    
    .side-widget-content {
        border-radius: 24px;
    }
    
    .phone-indicator {
        width: 60px;
        height: 3px;
        bottom: 5px;
    }
}

/* 大屏幕调整 */
@media (min-width: 1600px) {
    .side-widget-panel {
        width: 380px;
        height: 720px;
        right: 40px;
        bottom: 120px;
    }
    
    .phone-frame {
        border-radius: 36px;
        padding: 8px;
    }
    
    .phone-screen {
        border-radius: 30px;
    }
    
    .side-widget-content {
        border-radius: 30px;
    }
    
    .phone-indicator {
        width: 100px;
        height: 5px;
        bottom: 8px;
    }
}

/* ============================================
   书签分类文件夹样式
   ============================================ */

/* 文件夹徽章 - 显示书签数量 */
.desktop-icon.bookmark-folder {
    position: relative;
}

.desktop-icon .folder-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    background: rgba(0, 120, 212, 0.9);
    border-radius: 9px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 书签文件夹弹出窗口 */
.bookmark-folder-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 420px;
    max-width: 90vw;
    max-height: 70vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px) saturate(125%);
    -webkit-backdrop-filter: blur(30px) saturate(125%);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.bookmark-folder-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.bookmark-folder-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.bookmark-folder-popup-header .folder-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bookmark-folder-popup-header .folder-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bookmark-folder-popup-header .folder-icon i {
    font-size: 18px;
    color: #fff;
}

.bookmark-folder-popup-header .folder-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--win11-text);
}

.bookmark-folder-popup-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--win11-radius);
    cursor: pointer;
    color: var(--win11-text-secondary);
    transition: all 0.15s ease;
}

.bookmark-folder-popup-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--win11-text);
}

.bookmark-folder-popup-close:hover i {
    color: #dc3545;
}

.bookmark-folder-popup-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.bookmark-folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 8px;
}

.bookmark-folder-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
}

.bookmark-folder-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.bookmark-folder-item:active {
    background: rgba(0, 0, 0, 0.08);
}

.bookmark-folder-item .item-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bookmark-folder-item .item-icon i {
    font-size: 22px;
    color: #fff;
}

.bookmark-folder-item .item-icon img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: contain;
}

.bookmark-folder-item .item-title {
    font-size: 12px;
    color: var(--win11-text);
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
    height: 32px;
}

.bookmark-folder-item .item-tooltip {
    display: none;
}

/* 书签弹窗遮罩 */
.bookmark-folder-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.bookmark-folder-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 空文件夹提示 */
.bookmark-folder-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--win11-text-secondary);
}

.bookmark-folder-empty i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.bookmark-folder-empty p {
    font-size: 14px;
}

/* 移动端适配 */
@media (max-width: 480px) {
    .bookmark-folder-popup {
        width: 95vw;
        max-height: 80vh;
        border-radius: 16px;
    }
    
    .bookmark-folder-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .bookmark-folder-item {
        padding: 10px 6px;
    }
    
    .bookmark-folder-item .item-icon {
        width: 40px;
        height: 40px;
    }
    
    .bookmark-folder-item .item-icon i {
        font-size: 20px;
    }
}

/* 应用启动中提示 */
#appStartingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 48px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.2s ease;
}

#appStartingOverlay.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.starting-content {
    text-align: center;
    color: #fff;
}

.starting-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.starting-icon i {
    font-size: 36px;
    color: #fff;
}

.starting-title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.starting-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.starting-spinner {
    width: 32px;
    height: 32px;
    margin: 0 auto;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
