/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0078d4;
    display: flex;
    flex-direction: column;
    height: 100vh;
    transition: background-color 0.3s ease;
}

body.dark-mode {
    background-color: #121212;
}

/* 黑夜模式切换按钮 */
.dark-mode-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    color: white;
    font-size: 24px;
    z-index: 1001;
}

/* 桌面样式 */
#desktop {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.desktop-icon {
    width: 80px;
    text-align: center;
    cursor: pointer;
    color: white;
    transition: transform 0.2s ease;
}

.desktop-icon:hover {
    transform: scale(1.1);
}

.desktop-icon i {
    font-size: 48px;
    margin-bottom: 5px;
}

/* 任务栏样式 */
#taskbar {
    background-color: rgba(32, 32, 32, 0.9);
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: white;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
    position: relative;
    transition: background-color 0.3s ease;
}

#taskbar.dark-mode {
    background-color: rgba(0, 0, 0, 0.9);
}

.start-button {
    cursor: pointer;
    font-weight: bold;
    margin-right: 10px;
    display: flex;
    align-items: center;
}

.start-button i {
    margin-right: 5px;
}

.start-menu {
    position: absolute;
    bottom: 40px;
    left: 0;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    display: none;
    min-width: 200px;
    z-index: 1000;
    color: #333;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.start-menu.dark-mode {
    background-color: #222;
    color: white;
}

.menu-item {
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.menu-item:hover {
    background-color: #f0f0f0;
}

.menu-item.dark-mode:hover {
    background-color: #333;
}

.start-menu hr {
    margin: 0;
    border: 0;
    border-top: 1px solid #ccc;
    transition: border-color 0.3s ease;
}

.start-menu.dark-mode hr {
    border-top: 1px solid #444;
}

.taskbar-icon {
    margin: 0 5px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.taskbar-icon.active {
    opacity: 1;
}

.taskbar-icon i {
    font-size: 24px;
}

.system-tray {
    margin-left: auto;
}

.system-tray i {
    font-size: 16px;
    margin: 0 5px;
}

/* 窗口样式 */
.window {
    position: absolute;
    width: 400px;
    height: 300px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    display: none;
    z-index: 1;
    transition: background-color 0.3s ease;
}

.window.minimized {
    display: none;
}

.window.maximized {
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    border-radius: 0;
    z-index: 2;
}

.window-header {
    background-color: #f0f0f0;
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    user-select: none;
    transition: background-color 0.3s ease;
}

.window-header.dark-mode {
    background-color: #333;
}

.window-title {
    font-weight: bold;
}

.window-controls span {
    display: inline-block;
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.window-controls span:hover {
    background-color: #e0e0e0;
}

.window-controls.dark-mode span:hover {
    background-color: #444;
}

.close-button:hover {
    background-color: #ff6347 !important;
    color: white;
}

.window-content {
    padding: 10px;
    flex: 1;
    overflow-y: auto;
}

.window-content textarea {
    width: 100%;
    height: 100%;
    border: none;
    resize: none;
    font-family: inherit;
    font-size: inherit;
}

.window-resize-handle {
    position: absolute;
    width: 15px;
    height: 15px;
    background-color: transparent;
    z-index: 2;
}

.resize-handle-bottom-right {
    bottom: 0;
    right: 0;
    cursor: nwse-resize;
}