/* 桌面风格CSS */

/* 桌面容器 */
.desktop {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}



/* 原始任务栏样式 - 被macos-dock.css覆盖 */

.start-menu-button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2em;
    transition: background-color 0.2s;
}

.start-menu-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.taskbar-items {
    flex-grow: 1;
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.taskbar-item {
    padding: 0 10px;
    height: 36px;
    display: flex;
    align-items: center;
    margin-right: 5px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.taskbar-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.taskbar-item.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.system-tray {
    display: flex;
    align-items: center;
}

.time, .date {
    margin-left: 10px;
    font-size: 0.9em;
}

/* 桌面图标 */
.desktop-icons {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, 80px);
    grid-gap: 20px;
    z-index: 1;
}

.desktop-icon {
    width: 80px;
    height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.2s;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.desktop-icon i {
    font-size: 2em;
    margin-bottom: 5px;
}

.desktop-icon span {
    font-size: 0.8em;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

/* 窗口样式 */
.window {
    position: absolute;
    min-width: 400px;
    min-height: 300px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    resize: both;
    z-index: 10;
}

.window.active {
    z-index: 100;
}

.window-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    height: 36px;
    background-color: #f0f0f0;
    border-bottom: 1px solid #ddd;
    cursor: move;
}

.window-title {
    font-weight: bold;
    font-size: 0.9em;
}

.window-controls {
    display: flex;
}

.window-controls span {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s;
}

.window-controls span:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.window-controls .close:hover {
    background-color: #ff5252;
    color: white;
}

.window-content {
    flex-grow: 1;
    overflow: auto;
    position: relative;
}

/* 最大化窗口 */
.window.maximized {
    width: 100% !important;
    height: calc(100% - 40px) !important;
    top: 0 !important;
    left: 0 !important;
    border-radius: 0;
}

/* 最小化窗口 */
.window.minimized {
    display: none;
}

/* 开始菜单 */
.start-menu {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 300px;
    background-color: rgba(25, 25, 25, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.3);
    color: white;
    z-index: 1001;
    overflow: hidden;
}

.start-menu-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.user-name {
    font-weight: bold;
}

.start-menu-apps {
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 10px;
}

.start-menu-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.start-menu-app i {
    font-size: 1.5em;
    margin-bottom: 5px;
}

.start-menu-app span {
    font-size: 0.8em;
    text-align: center;
}

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

/* 响应式调整 */
@media (max-width: 768px) {
    .window {
        min-width: 300px;
    }
    
    .start-menu {
        width: 100%;
    }
    
    .start-menu-apps {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .desktop-icons {
        grid-template-columns: repeat(auto-fill, 70px);
        grid-gap: 15px;
    }
    
    .desktop-icon {
        width: 70px;
    }
}