/* 桌面样式文件 - desktop.css */

/* 桌面区域 */
.desktop {
    position: relative;
    width: 100vw;
    height: calc(100vh - 40px);
    overflow: hidden;
    background: url('../assets/images/zhuombg.jpg') center/cover no-repeat;
    display: none; /* 默认隐藏桌面，等登录后显示 */
    user-select: none; 
}

/* 桌面图标 */
.desktop-icon {
    position: absolute;
    width: 75px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: default;
    padding: 2px;
    text-align: center;
    color: white;
    margin-bottom: 20px;
    font-family: var(--win98-font);
}


.icon-image {
    width: 32px;
    height: 32px;
    margin-bottom: 4px;
}

/* 图标文字样式 */
.icon-text {
    font-size: 11px;
    line-height: 1.2;
    padding: 0 2px;
    margin-top: 2px;
    text-shadow: none; 
    background: transparent;
    border: 1px dotted transparent;
}

/* 选中状态：经典的蓝底白字 */
.desktop-icon:active .icon-text,
.desktop-icon.selected .icon-text {
    background-color: #000080;
    color: white;
    border: 1px dotted #ffff00;
}

/* 任務欄 */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #c0c0c0;
    border-top: 2px solid #fff; 
    height: 40px;
    display: none; 
    align-items: center;
    padding: 3px 4px;
    gap: 3px;
    z-index: 1000;
}

/* 开始按钮 */
.start-button {
    background: #c0c0c0;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    border-right: 2px solid #404040;
    border-bottom: 2px solid #404040;
    box-shadow: 
        inset 1px 1px 0px #dfdfdf,
        inset -1px -1px 0px #808080;
    
    padding: 0 12px;
    font-size: 13px;
    font-family: var(--win98-font);
    font-weight: bold;
    color: #000;
    cursor: default;
    line-height: 30px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 4px;
}

.start-button:active, .start-button.active {
    border-top: 2px solid #404040;
    border-left: 2px solid #404040;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    box-shadow: 
        inset 1px 1px 0px #808080,
        inset -1px -1px 0px #dfdfdf;
}

/* 任务栏项目 */
.taskbar-item {
    background: #c0c0c0;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    border-right: 2px solid #404040;
    border-bottom: 2px solid #404040;
    box-shadow: 
        inset 1px 1px 0px #dfdfdf,
        inset -1px -1px 0px #808080;
    
    padding: 0 12px;
    line-height: 30px;
    font-size: 13px;
    font-family: var(--win98-font);
    cursor: default;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 140px;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
}

.taskbar-item.active {
    background: #c0c0c0;
    border-top: 2px solid #404040;
    border-left: 2px solid #404040;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    box-shadow: 
        inset 1px 1px 0px #808080,
        inset -1px -1px 0px #dfdfdf;
}

/* 任务栏时钟 (兼容 taskbar-clock 和 clock 类名) */
.taskbar-clock, .clock {
    margin-left: auto;
    background: #c0c0c0;
    border-top: 1px solid #808080;
    border-left: 1px solid #808080;
    border-right: 1px solid #fff;
    border-bottom: 1px solid #fff;
    
    padding: 3px 12px;
    font-size: 13px;
    font-family: var(--win98-font);
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
}

/* 開始選單 */
.start-menu {
    position: fixed;
    bottom: 40px;
    left: 2px;
    background: #c0c0c0;
    border-top: 1px solid #fff;
    border-left: 1px solid #fff;
    border-right: 1px solid #000;
    border-bottom: 1px solid #000;
    box-shadow:
        inset 1px 1px 0px #dfdfdf,
        inset -1px -1px 0px #808080;
    
    min-width: 180px;
    z-index: 999;
    display: none;
    padding: 2px;
    display: flex;
}

.start-menu-sidebar {
    width: 24px;
    background: #808080;
    color: #c0c0c0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 10px;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-weight: bold;
    font-size: 14px;
    font-family: "Arial Black", var(--win98-font);
}

.start-menu-content {
    flex: 1;
    padding-left: 2px;
}

.start-menu-item {
    padding: 4px 12px;
    cursor: default;
    font-size: 11px;
    font-family: var(--win98-font);
    display: flex;
    align-items: center;
    gap: 8px;
    color: #000;
}

.start-menu-item:hover {
    background: #000080;
    color: white;
}

.start-menu-separator {
    height: 1px;
    background: #fff;
    border-top: 1px solid #808080;
    margin: 4px 2px;
}

/* 刷新動畫 */
@keyframes refresh-flash {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.desktop.refreshing {
    animation: refresh-flash 0.3s ease-in-out;
}

/* BSOD Blue Screen of Death */
.bsod-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0000AA;
    color: #FFFFFF;
    font-family: 'Courier New', monospace;
    z-index: 999999;
    padding: 10vh 10vw;
    box-sizing: border-box;
    cursor: none;
    font-size: 24px;
    line-height: 1.5;
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: left;
}

.bsod-content {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.bsod-title {
    background-color: #AAAAAA;
    color: #0000AA;
    padding: 2px 8px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 40px;
    text-align: center;
}

.bsod-text {
    margin-bottom: 20px;
}

.bsod-list {
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.bsod-list li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.bsod-list li:before {
    content: "*";
    position: absolute;
    left: 0;
}

.bsod-center {
    text-align: center;
    margin-top: 50px;
    animation: bsod-blink 1s infinite step-end;
}

@keyframes bsod-blink {
    50% { opacity: 0; }
}