/* ============================================================
 * 《白石岭没有下线》 — css/xp.css
 * Windows XP 风格（PHASE 00 启动页 + PHASE 01 桌面页）
 * 桌面壁纸 / 桌面图标 / XP窗口 / 任务栏 / 开始菜单 / 快速启动
 * ============================================================ */

/* ---------- 基础重置 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: "SimSun", "宋体", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    background: #3a6ea5;
    -webkit-user-select: none;
    user-select: none;
}

/* ---------- 屏幕容器 ---------- */
[data-screen-root] {
    display: none;
    position: absolute;
    inset: 0;
}

[data-screen-root].active {
    display: block;
}

/* ============================================================
 * 启动页（boot）
 * ============================================================ */
#boot-screen {
    background: radial-gradient(ellipse at center, #7db8e8 0%, #2f6aa8 60%, #1a4a7a 100%);
    display: none;
    align-items: center;
    justify-content: center;
}

#boot-screen.active {
    display: flex;
}

.boot-box {
    text-align: center;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
    max-width: 640px;
    padding: 20px;
}

.boot-title {
    font-size: 40px;
    font-weight: bold;
    letter-spacing: 4px;
    margin-bottom: 12px;
    color: #fff;
    text-shadow: 2px 2px 0 #0a2f55;
}

.boot-subtitle {
    font-size: 16px;
    color: #d8ecff;
    margin-bottom: 32px;
    letter-spacing: 1px;
}

/* ---------- XP 风格按钮 ---------- */
.xp-button {
    font-family: inherit;
    font-size: 15px;
    color: #000;
    padding: 6px 28px;
    cursor: pointer;
    border: 1px solid #003c74;
    background: linear-gradient(180deg, #ffffff 0%, #ecebe5 45%, #d8d0c4 55%, #f1ede4 100%);
    border-radius: 3px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

.xp-button:hover {
    background: linear-gradient(180deg, #ffffff 0%, #fffce8 45%, #ffe8a0 55%, #fff3c8 100%);
}

.xp-button:active {
    transform: translateY(1px);
}

.boot-hint {
    margin-top: 24px;
    font-size: 12px;
    color: #9cc4e8;
}

/* ============================================================
 * 桌面页（PHASE 01）— pages/desktop/index.html
 * ============================================================ */
.xp-desktop {
    position: fixed;
    inset: 0;
    overflow: hidden;
    background: #3a6ea5;
}

/* ---------- 桌面壁纸（IMG_001 白石岭村全景，JS 注入） ---------- */
.xp-wallpaper {
    position: absolute;
    inset: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

/* ---------- 桌面图标 ---------- */
.desktop-icons {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 14px;
    height: calc(100% - 60px);
    z-index: 10;
}

.desktop-icon {
    width: 76px;
    padding: 6px 2px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: default;
    border: 1px solid transparent;
    border-radius: 2px;
}

/* 悬停：轻微高亮（border 变化，符合动画纪律） */
.desktop-icon:hover {
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(62, 122, 200, 0.35);
}

/* 选中 */
.desktop-icon.selected {
    border: 1px solid rgba(255, 255, 255, 0.75);
    background: rgba(62, 122, 200, 0.55);
}

.icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-label {
    color: #fff;
    font-size: 12px;
    text-align: center;
    line-height: 1.3;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
    word-break: break-all;
}

/* ---------- 纯CSS图标（不新增图片资源） ---------- */
/* 我的电脑：显示器 */
.icon-computer {
    position: relative;
    width: 34px;
    height: 26px;
    background: linear-gradient(180deg, #e8f4ff, #9cc6ea);
    border: 2px solid #2a5a8a;
    border-radius: 2px;
}
.icon-computer::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    transform: translateX(-50%);
    width: 10px;
    height: 5px;
    border: 2px solid #2a5a8a;
    border-top: none;
    border-radius: 0 0 2px 2px;
}
.icon-computer::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 14px;
    background: linear-gradient(135deg, #ffffff, #8fb8dd);
    border: 1px solid #6d94b5;
}

/* 我的文档：文件夹 */
.icon-documents {
    position: relative;
    width: 38px;
    height: 30px;
    background: linear-gradient(180deg, #ffd75e, #e8a80c);
    border: 1px solid #a8760a;
    border-radius: 3px 3px 2px 2px;
}
.icon-documents::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 0;
    width: 16px;
    height: 7px;
    background: #ffe27a;
    border: 1px solid #a8760a;
    border-bottom: none;
    border-radius: 3px 3px 0 0;
}
.icon-documents::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 6px;
    width: 24px;
    height: 2px;
    background: rgba(168, 118, 10, 0.45);
    box-shadow: 0 4px 0 rgba(168, 118, 10, 0.3), 0 8px 0 rgba(168, 118, 10, 0.2);
}

/* QQ：企鹅色块+文字 */
.icon-qq {
    width: 34px;
    height: 34px;
    background: radial-gradient(circle at 50% 32%, #6cd4ff, #0a7fd0 70%);
    border: 1px solid #06639f;
    border-radius: 50% 50% 46% 46%;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    font-style: italic;
    line-height: 34px;
    text-align: center;
    text-shadow: 1px 1px 1px rgba(0, 40, 80, 0.8);
    letter-spacing: -1px;
}

/* 白石岭村在线：网页旗帜 */
.icon-website {
    position: relative;
    width: 32px;
    height: 32px;
    background: linear-gradient(180deg, #8fd0ff, #2f7fd0);
    border: 2px solid #1c5488;
    border-radius: 50%;
}
.icon-website::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 6px;
    width: 22px;
    height: 14px;
    background: linear-gradient(180deg, #ff6a5a, #d03424);
    border: 1px solid #7a1c12;
    border-radius: 1px;
}
.icon-website::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 4px;
    width: 12px;
    height: 12px;
    border: 2px solid #ffd75e;
    border-radius: 50%;
}

/* 回收站：垃圾桶 */
.icon-recycle {
    position: relative;
    width: 30px;
    height: 28px;
    background: linear-gradient(180deg, #f4f6f8, #c9d2da);
    border: 1px solid #7e8c98;
    border-radius: 1px 1px 3px 3px;
}
.icon-recycle::before {
    content: "";
    position: absolute;
    top: -4px;
    left: -2px;
    width: 32px;
    height: 6px;
    background: #dbe3ea;
    border: 1px solid #7e8c98;
    border-radius: 2px;
}
.icon-recycle::after {
    content: "";
    position: absolute;
    top: -2px;
    left: 12px;
    width: 4px;
    height: 3px;
    background: #7e8c98;
}

/* ============================================================
 * XP 窗口（占位窗口）
 * ============================================================ */
.xp-window {
    position: absolute;
    min-width: 320px;
    min-height: 200px;
    background: #ece9d8;
    border: 1px solid #0a246a;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.45);
    z-index: 50;
    display: flex;
    flex-direction: column;
}

.window-titlebar {
    height: 28px;
    display: flex;
    align-items: center;
    padding: 0 4px 0 8px;
    background: linear-gradient(180deg, #5d86d8 0%, #2a5cba 6%, #1e4fae 92%, #17479c 100%);
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    text-shadow: 1px 1px 1px rgba(0, 0, 40, 0.7);
}

.window-title {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}

.window-close {
    width: 21px;
    height: 21px;
    border: 1px solid #fff;
    background: linear-gradient(180deg, #f2a0a0, #d0342c);
    color: #fff;
    font-size: 12px;
    line-height: 19px;
    text-align: center;
    cursor: pointer;
    border-radius: 2px;
}
.window-close:hover {
    background: linear-gradient(180deg, #ffc0b8, #e05048);
}

.window-body {
    flex: 1;
    padding: 12px;
    background: #fff;
    font-size: 13px;
    color: #000;
    line-height: 1.6;
    overflow: auto;
}

/* ============================================================
 * 任务栏
 * ============================================================ */
.taskbar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 30px;
    display: flex;
    align-items: center;
    background: linear-gradient(180deg, #316ac5 0%, #245edb 8%, #1f4fc4 40%, #19409c 88%, #123277 100%);
    border-top: 1px solid #0a2f55;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
    z-index: 100;
}

/* ---------- 开始按钮（悬停变色） ---------- */
.start-button {
    display: flex;
    align-items: center;
    height: 24px;
    margin-left: 4px;
    padding: 0 12px 0 6px;
    font-family: inherit;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    border: none;
    border-radius: 0 8px 8px 0;
    background: linear-gradient(180deg, #6ec254 0%, #3d9a3a 45%, #2f8a2d 55%, #53b547 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 1px 2px rgba(0,0,0,0.4);
    text-shadow: 1px 1px 1px rgba(0, 60, 0, 0.7);
}

.start-button:hover {
    filter: brightness(1.15);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 0 6px rgba(120, 220, 120, 0.6);
}

.start-button:active {
    transform: translateY(1px);
}

/* ---------- 快速启动区 ---------- */
.quick-launch {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 10px;
    padding: 0 4px;
    border-right: 1px solid rgba(0,0,0,0.35);
    border-left: 1px solid rgba(0,0,0,0.35);
    height: 24px;
}

.ql-item {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    position: relative;
}
.ql-item:hover {
    border: 1px solid rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.12);
}

/* 快速启动图标（复用 CSS 图标，缩小） */
.ql-item .icon {
    width: 20px;
    height: 20px;
    transform: scale(0.62);
    transform-origin: center;
}

/* ---------- 系统托盘 ---------- */
.taskbar-tray {
    margin-left: auto;
    margin-right: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 22px;
    padding: 0 10px;
    background: linear-gradient(180deg, #1295e8 0%, #0f8ce0 40%, #0a78c8 100%);
    border-radius: 3px;
    color: #fff;
    font-size: 12px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}

/* ============================================================
 * 开始菜单
 * ============================================================ */
.start-menu {
    position: absolute;
    left: 2px;
    bottom: 32px;
    width: 190px;
    background: linear-gradient(135deg, #3a6ea5 0%, #2c5a8c 40%, #1e4670 100%);
    border: 1px solid #0a2f55;
    border-radius: 8px 8px 4px 4px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    z-index: 120;
    display: none;
    padding: 6px 0;
    color: #fff;
}

.start-menu.open {
    display: block;
}

.start-menu .menu-title {
    padding: 4px 14px 8px;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 4px;
}

.start-menu .menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    font-size: 13px;
    cursor: pointer;
}
.start-menu .menu-item:hover {
    background: rgba(90, 150, 220, 0.55);
}
.start-menu .menu-item .icon {
    width: 22px;
    height: 22px;
    transform: scale(0.7);
    transform-origin: center;
}
.start-menu .menu-sep {
    height: 1px;
    background: rgba(255,255,255,0.15);
    margin: 4px 8px;
}

/* ---------- 降级友好 ---------- */
@media (prefers-reduced-motion: reduce) {
    .start-button:active {
        transform: none;
    }
}
