/* ============================================================
   Minecraft OS - 样式表
   包含：全局变量、主题、桌面、窗口、任务栏、菜单、动画、游戏
   ============================================================ */

/* --- Monocraft 像素字体（Minecraft 风格，SIL 开源） --- */
@font-face {
    font-family: 'Monocraft';
    src: url('https://cdn.jsdelivr.net/npm/monocraft@4.1/fonts/Monocraft.woff2') format('woff2');
    font-weight: normal; font-style: normal; font-display: swap;
}

/* --- 全局重置 --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --font-pixel: 'Monocraft', 'Press Start 2P', 'Courier New', monospace;
    --taskbar-h: 48px;
    --slot-size: 48px;
    --win-min-w: 320px;
    --win-min-h: 220px;
    --mc-shadow: 4px 4px 0 rgba(0,0,0,0.5);
    --mc-bevel-light: #c6c6c6;
    --mc-bevel-dark: #5d4e37;
    --mc-bevel-width: 3px;
    /* Minecraft 经典按钮配色 */
    --btn-bg: #8B8B8B;
    --btn-border-light: #FFFFFF;
    --btn-border-dark: #555555;
    --btn-text-color: #E0E0E0;
    --btn-shadow-dark: #2D2D2D;
    --btn-shadow-light: #FFFFFF;
    --btn-hover-bg: #6A6FA8;
    --btn-hover-light: #A0A8FF;
    --btn-hover-dark: #4A4F88;
    --btn-hover-text: #FFFFA0;
    /* 物品栏 */
    --slot-bg: #8B8B8B;
    --slot-border-light: #555555;
    --slot-border-light2: #C6C6C6;
    /* Minecraft 经典材质色 */
    --wood-light: #C49A5C;
    --wood-dark: #8B7355;
    --wood-mid: #A08050;
    --dirt: #8B7355;
    --dirt-dark: #5D4E37;
    --grass-top: #7CFC00;
    --grass-dark: #5DBF00;
    --stone: #828282;
    --stone-dark: #6E6E6E;
    --overlay-bg: rgba(0,0,0,0.65);
}

/* --- 主题变量 --- */
body[data-theme="overworld"] {
    --theme-bg1: #7CFC00; --theme-bg2: #5DBF00; --theme-bg3: #8B7355;
    --theme-accent: #7CFC00; --theme-sky: #87CEEB; --theme-dirt: #8B7355;
}
body[data-theme="nether"] {
    --theme-bg1: #6B1010; --theme-bg2: #4A0808; --theme-bg3: #2A0000;
    --theme-accent: #FF4500; --theme-sky: #2A0000; --theme-dirt: #4A1010;
}
body[data-theme="end"] {
    --theme-bg1: #0D0025; --theme-bg2: #080018; --theme-bg3: #030008;
    --theme-accent: #B44AFF; --theme-sky: #050010; --theme-dirt: #1A0033;
}

body {
    font-family: var(--font-pixel);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    user-select: none;
    cursor: default;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    -webkit-font-smoothing: none;
    font-size: 10px;
    color: #fff;
}

/* --- 像素字体文本 --- */
.mc-text { font-family: var(--font-pixel); color: #fff; text-shadow: 2px 2px #3f3f3f; line-height: 1.8; }
.mc-text-sm { font-family: var(--font-pixel); font-size: 8px; color: #aaa; text-shadow: 1px 1px #222; }

/* --- 启动画面 --- */
#boot-screen {
    position: fixed; inset: 0; z-index: 99999;
    background: #6b4f10;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.8s;
}
#boot-screen.fade-out { opacity: 0; pointer-events: none; }
#boot-dirt {
    position: absolute; inset: 0;
    background:
        repeating-conic-gradient(#8b6914 0% 25%, #7a5a10 0% 50%) 0 0 / 8px 8px;
    opacity: 0.7;
}
#boot-text {
    position: relative; z-index: 2; text-align: center;
}
.boot-title {
    font-size: 28px; color: #fff;
    text-shadow: 3px 3px #3f3f3f, 4px 4px #000;
    margin-bottom: 20px; letter-spacing: 2px;
}
.boot-sub { font-size: 10px; color: #ccc; text-shadow: 2px 2px #333; margin-bottom: 16px; }
.boot-bar { width: 300px; margin: 0 auto; }

/* --- Minecraft 风格按钮（inset box-shadow 打造 3D 凸起效果） --- */
.mc-btn {
    font-family: var(--font-pixel);
    font-size: 10px;
    background: var(--btn-bg);
    border: 3px solid;
    border-color: var(--btn-border-light) var(--btn-border-dark) var(--btn-border-dark) var(--btn-border-light);
    box-shadow: inset -2px -2px 0 var(--btn-shadow-dark), inset 2px 2px 0 var(--btn-shadow-light);
    color: var(--btn-text-color);
    text-shadow: 2px 2px var(--btn-shadow-dark);
    padding: 8px 14px;
    cursor: pointer;
    outline: none;
    transition: none;
    display: inline-flex; align-items: center; gap: 8px;
    white-space: nowrap;
    line-height: 1.6;
}
.mc-btn:hover {
    background: var(--btn-hover-bg);
    border-color: var(--btn-hover-light) var(--btn-hover-dark) var(--btn-hover-dark) var(--btn-hover-light);
    box-shadow: inset -2px -2px 0 var(--btn-hover-dark), inset 2px 2px 0 var(--btn-hover-light);
    color: var(--btn-hover-text);
}
.mc-btn:active {
    transform: translate(1px, 1px);
    border-color: var(--btn-border-dark) var(--btn-border-light) var(--btn-border-light) var(--btn-border-dark);
    box-shadow: inset 2px 2px 0 var(--btn-shadow-dark), inset -2px -2px 0 var(--btn-shadow-light);
}
.mc-btn.danger { color: #ff6666; }
.mc-btn.danger:hover { color: #ff4444; background: #8a2a2a; }
.mc-btn-sm { padding: 4px 8px; font-size: 8px; }

/* --- 进度条 --- */
.mc-progress-bar {
    width: 100%; height: 12px;
    background: #222; border: 2px solid;
    border-color: #555 #111 #111 #555;
    overflow: hidden;
}
.mc-progress-bar > div {
    height: 100%; width: 0%;
    background: linear-gradient(to bottom, #5d9b3a, #4a8c2a);
    transition: width 0.1s linear;
}

/* --- 物品栏格子（核心 UI 元素） --- */
.mc-slot {
    width: var(--slot-size); height: var(--slot-size);
    background: var(--slot-bg);
    border: 3px solid;
    border-color: var(--slot-border-light) var(--slot-border-light2) var(--slot-border-light2) var(--slot-border-light);
    display: flex; align-items: center; justify-content: center;
    position: relative;
    image-rendering: pixelated;
    flex-shrink: 0;
}
.mc-slot-sm { width: 36px; height: 36px; }
.mc-slot-lg { width: 64px; height: 64px; }

/* --- 桌面 --- */
#desktop {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: calc(100% - var(--taskbar-h));
    z-index: 0;
    overflow: hidden;
    /* 默认纹理，会被主题覆盖 */
    background:
        repeating-conic-gradient(var(--theme-bg1) 0% 25%, var(--theme-bg2) 0% 50%) 0 0 / 8px 8px;
}
/* 主世界：草方块效果（参考 MC 配色） */
body[data-theme="overworld"] #desktop {
    background:
        linear-gradient(180deg,
            var(--grass-top) 0%, var(--grass-dark) 40%,
            var(--dirt) 41%, var(--dirt-dark) 100%
        ),
        repeating-conic-gradient(var(--grass-top) 0% 25%, var(--grass-dark) 0% 50%) 0 0 / 8px 8px;
    background-blend-mode: normal;
}
/* 主世界像素纹理叠加（模拟草方块噪点） */
body[data-theme="overworld"] #desktop::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(circle at 2px 2px, rgba(0,0,0,0.06) 1px, transparent 1px),
        radial-gradient(circle at 10px 6px, rgba(255,255,255,0.08) 1px, transparent 1px),
        radial-gradient(circle at 6px 14px, rgba(0,0,0,0.04) 1px, transparent 1px),
        radial-gradient(circle at 14px 10px, rgba(125,252,0,0.05) 1px, transparent 1px);
    background-size: 16px 16px;
}
/* 下界：岩浆纹理 */
body[data-theme="nether"] #desktop {
    background:
        repeating-conic-gradient(#5a1515 0% 25%, #3d0a0a 0% 50%) 0 0 / 10px 10px;
}
body[data-theme="nether"] #desktop::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(circle at 5px 5px, rgba(255,80,0,0.08) 2px, transparent 2px),
        radial-gradient(circle at 15px 12px, rgba(255,40,0,0.06) 2px, transparent 2px);
    background-size: 20px 20px;
}
/* 末地：星空 */
body[data-theme="end"] #desktop {
    background: radial-gradient(ellipse at 50% 50%, #0d0025 0%, #030008 100%);
}
body[data-theme="end"] #desktop::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(1px 1px at 10% 20%, #fff 50%, transparent 50%),
        radial-gradient(1px 1px at 30% 60%, #c06fff 50%, transparent 50%),
        radial-gradient(1px 1px at 50% 10%, #fff 50%, transparent 50%),
        radial-gradient(1px 1px at 70% 80%, #c06fff 50%, transparent 50%),
        radial-gradient(1px 1px at 90% 30%, #fff 50%, transparent 50%),
        radial-gradient(1px 1px at 15% 85%, #fff 50%, transparent 50%),
        radial-gradient(1px 1px at 60% 45%, #c06fff 50%, transparent 50%),
        radial-gradient(1px 1px at 85% 65%, #fff 50%, transparent 50%),
        radial-gradient(1.5px 1.5px at 40% 35%, #fff 50%, transparent 50%),
        radial-gradient(1px 1px at 25% 48%, #fff 50%, transparent 50%);
    background-size: 200px 200px;
    animation: twinkle 4s ease-in-out infinite alternate;
}
@keyframes twinkle { 0% { opacity: 0.6; } 100% { opacity: 1; } }

/* 壁纸模式：覆盖主题背景，隐藏纹理叠加层 */
#desktop[data-wallpaper] {
    background: var(--desktop-wallpaper, none) center/cover no-repeat !important;
}
#desktop[data-wallpaper]::after {
    display: none !important;
}

/* --- 桌面图标（物品栏风格网格，支持拖拽吸附） --- */
#desktop-icons {
    position: relative; z-index: 1;
    width: 100%; height: 100%;
    /* 不使用 CSS Grid，改用 JS 绝对定位实现网格吸附 */
}
.desktop-icon {
    position: absolute;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    width: 80px; height: 90px;
    cursor: pointer; padding: 4px;
    border: 2px solid transparent;
    border-radius: 2px;
    transition: none;
    user-select: none;
    z-index: 1;
}
.desktop-icon:hover { border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.08); }
.desktop-icon.selected { border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.15); z-index: 2; }
.desktop-icon.dragging { opacity: 0.6; z-index: 3; }
.desktop-icon-label {
    font-family: var(--font-pixel); font-size: 7px; color: #fff;
    text-shadow: 1px 1px 2px #000, -1px -1px 2px #000, 1px -1px 2px #000, -1px 1px 2px #000;
    text-align: center; line-height: 1.4; max-width: 76px;
    word-break: break-all;
}

/* --- 窗口层 --- */
#windows-layer {
    position: fixed; inset: 0;
    bottom: var(--taskbar-h);
    z-index: 10; pointer-events: none;
}
#windows-layer > * { pointer-events: auto; }

/* --- Minecraft 风格窗口（工作台风格边框） --- */
.mc-window {
    position: absolute;
    min-width: var(--win-min-w); min-height: var(--win-min-h);
    display: flex; flex-direction: column;
    background: #C6C6C6;
    border: 4px solid;
    border-color: #FFFFFF var(--mc-bevel-dark) var(--mc-bevel-dark) #FFFFFF;
    box-shadow: inset -3px -3px 0 #8B8B8B, inset 3px 3px 0 #FFFFFF, 4px 4px 0 rgba(0,0,0,0.5);
    animation: windowOpen 0.15s ease-out;
    resize: both;
    overflow: hidden;
}
.mc-window.closing {
    animation: windowClose 0.12s ease-in forwards;
}
.mc-window.minimized { display: none !important; }
.mc-window.maximized {
    left: 0 !important; top: 0 !important;
    width: 100% !important; height: 100% !important;
    resize: none;
}
.mc-window.focused .mc-titlebar { filter: brightness(1.1); }
.mc-window:not(.focused) .mc-titlebar { filter: brightness(0.7); }

@keyframes windowOpen {
    0% { transform: scale(0.7); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes windowClose {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.7); opacity: 0; }
}

/* 窗口标题栏 */
.mc-titlebar {
    background: linear-gradient(to bottom, var(--wood-light), var(--wood-mid));
    border-bottom: 3px solid;
    border-color: #d4a85c var(--wood-dark) var(--wood-dark) #d4a85c;
    height: 36px; min-height: 36px;
    display: flex; align-items: center;
    padding: 0 4px 0 8px;
    cursor: grab;
    gap: 6px;
}
.mc-titlebar:active { cursor: grabbing; }
.mc-titlebar-icon { width: 24px; height: 24px; flex-shrink: 0; }
.mc-titlebar-text {
    flex: 1; font-family: var(--font-pixel); font-size: 9px;
    color: #fff; text-shadow: 1px 1px #333;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 窗口控制按钮 */
.mc-win-controls { display: flex; gap: 2px; }
.mc-win-btn {
    width: 28px; height: 28px;
    border: 2px solid;
    border-color: var(--btn-border-light) var(--btn-border-dark) var(--btn-border-dark) var(--btn-border-light);
    background: var(--btn-bg);
    cursor: pointer; font-size: 14px; color: var(--btn-text-color);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-pixel);
    line-height: 1; padding: 0;
}
.mc-win-btn:hover { background: var(--btn-hover-bg); color: var(--btn-hover-text); }
.mc-win-btn:active { transform: translate(1px, 1px); }
.mc-win-btn.btn-close:hover { background: #aa3333; color: #fff; }

/* 窗口内容区域 */
.mc-window-body {
    flex: 1; overflow: auto;
    background:
        repeating-conic-gradient(var(--stone) 0% 25%, var(--stone-dark) 0% 50%) 0 0 / 6px 6px;
    border: 3px solid;
    border-color: var(--mc-bevel-light) var(--mc-bevel-dark) var(--mc-bevel-dark) var(--mc-bevel-light);
    position: relative;
}
.mc-window-content {
    padding: 12px; height: 100%; overflow: auto;
}

/* --- 任务栏（物品栏 Hotbar 风格） --- */
#taskbar {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: var(--taskbar-h);
    background: #5D4E37;
    border-top: 3px solid #8B7355;
    box-shadow: inset 0 2px 0 #A08B6E, inset 0 -2px 0 #3D2E1F;
    display: flex; align-items: center;
    z-index: 9000;
    padding: 0 6px;
    gap: 3px;
}
/* 任务栏木纹纹理 */
#taskbar::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background:
        repeating-linear-gradient(90deg, transparent 0px, transparent 30px, rgba(139,115,85,0.15) 30px, rgba(139,115,85,0.15) 31px),
        repeating-conic-gradient(rgba(255,255,255,0.02) 0% 25%, transparent 0% 50%) 0 0 / 6px 6px;
}

.taskbar-start {
    height: 40px; padding: 0 10px; gap: 6px; flex-shrink: 0;
    font-size: 9px;
}
.taskbar-start svg { flex-shrink: 0; }

#taskbar-apps {
    flex: 1; display: flex; align-items: center;
    gap: 2px; overflow-x: auto; padding: 0 4px;
}
.taskbar-app-btn {
    height: 36px; padding: 0 8px; gap: 4px;
    font-size: 7px; max-width: 160px;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
    flex-shrink: 0;
}
.taskbar-app-btn.active {
    background: #5a6b8a;
    border-color: var(--btn-hover-light) var(--btn-hover-dark) var(--btn-hover-dark) var(--btn-hover-light);
    color: var(--btn-hover-text);
}

#system-tray {
    display: flex; align-items: center; gap: 8px;
    padding: 0 8px; flex-shrink: 0;
    font-size: 9px; color: #ddd;
    text-shadow: 1px 1px #222;
}
.tray-btn {
    background: none; border: 2px solid transparent;
    cursor: pointer; padding: 4px; color: #ddd;
    display: flex; align-items: center;
}
.tray-btn:hover { border-color: #888; background: rgba(255,255,255,0.1); }

/* --- 菜单（开始菜单 / 右键菜单） --- */
.mc-menu {
    position: fixed; z-index: 9500;
    background: rgba(0,0,0,0.85);
    border: 3px solid;
    border-color: #555 #111 #111 #555;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.5);
    min-width: 220px;
    animation: menuOpen 0.1s ease-out;
}
.mc-menu.hidden { display: none; }
@keyframes menuOpen {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.menu-title {
    font-family: var(--font-pixel); font-size: 14px;
    color: #fff; text-shadow: 2px 2px #3f3f3f;
    text-align: center; padding: 16px 12px 12px;
    background: linear-gradient(to bottom, rgba(93,155,58,0.3), transparent);
    border-bottom: 2px solid rgba(255,255,255,0.1);
}
.menu-scroll {
    padding: 6px; display: flex; flex-direction: column; gap: 2px;
    max-height: 70vh; overflow-y: auto;
}
.menu-btn {
    width: 100%; justify-content: flex-start;
    font-size: 9px; text-shadow: 1px 1px #333;
}
.menu-divider {
    height: 2px; background: rgba(255,255,255,0.1);
    margin: 4px 8px;
}
.menu-danger:hover { background: #8a2a2a !important; color: #ff6666 !important; }

/* --- 关机画面 --- */
#shutdown-overlay {
    position: fixed; inset: 0; z-index: 99998;
    background: #111;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column;
}
#shutdown-overlay.hidden { display: none; }
#shutdown-box { text-align: center; }
#shutdown-text { font-size: 14px; margin-bottom: 16px; }
#shutdown-progress { transition: width 0.3s; }
#shutdown-percent { margin-top: 8px; }
#shutdown-overlay.complete #shutdown-text { font-size: 10px; }

/* ============================================================
   各应用窗口内容样式
   ============================================================ */

/* --- 文件网格（我的电脑 / 存档） --- */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 80px);
    gap: 12px; padding: 8px;
}
.file-item {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 8px 4px; cursor: pointer; border-radius: 2px;
    border: 2px solid transparent;
}
.file-item:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
.file-item-name {
    font-size: 7px; color: #fff; text-align: center;
    text-shadow: 1px 1px #222; line-height: 1.4; max-width: 72px;
    word-break: break-all;
}

/* --- 文件管理器 --- */
.fm-container {
    flex: 1; overflow: auto; display: flex; flex-direction: column;
}
.fm-breadcrumb {
    display: flex; align-items: center; gap: 2px;
    padding: 6px 10px;
    background: rgba(0,0,0,0.3);
    border-bottom: 2px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}
.fm-bc-link {
    font-family: var(--font-pixel); font-size: 8px; color: #7df;
    cursor: pointer; white-space: nowrap;
}
.fm-bc-link:hover { color: #fff; text-decoration: underline; }
.fm-bc-sep { font-size: 8px; color: #555; }
.fm-status {
    font-family: var(--font-pixel); font-size: 7px; color: #888;
    padding: 4px 10px;
    background: rgba(0,0,0,0.2);
    border-top: 2px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}
.fm-ctx-menu {
    position: fixed; z-index: 10000; min-width: 140px;
}
.fm-textarea {
    flex: 1; resize: none;
    font-family: var(--font-pixel); font-size: 9px;
    background: #1a1a1a; color: #ddd;
    border: 3px solid; border-color: #555 #222 #222 #555;
    padding: 8px; outline: none; line-height: 1.6;
}

/* --- 记事本 --- */
.notepad-wrap {
    display: flex; flex-direction: column; height: 100%;
}
.notepad-toolbar {
    display: flex; gap: 4px; padding: 6px 8px;
    background: rgba(0,0,0,0.3);
    border-bottom: 2px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}
.notepad-body {
    flex: 1; overflow: hidden;
}
.notepad-editor {
    width: 100%; height: 100%; border: none; border-radius: 0;
    font-size: 10px; line-height: 1.6;
}
.notepad-statusbar {
    display: flex; justify-content: space-between;
    font-family: var(--font-pixel); font-size: 7px; color: #888;
    padding: 4px 10px;
    background: rgba(0,0,0,0.2);
    border-top: 2px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}

/* --- 文件选择对话框 --- */
.fp-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(0,0,0,0.6);
    display: flex; align-items: center; justify-content: center;
}
.fp-dialog {
    background: #C6C6C6;
    border: 4px solid;
    border-color: #FFFFFF #5D4E37 #5D4E37 #FFFFFF;
    box-shadow: inset -3px -3px 0 #8B8B8B, inset 3px 3px 0 #FFFFFF, 4px 4px 0 rgba(0,0,0,0.5);
    width: 400px; max-height: 70vh;
    display: flex; flex-direction: column;
}
.fp-title {
    font-family: var(--font-pixel); font-size: 10px;
    padding: 8px 12px;
    background: #5D4E37; color: #fff;
    text-shadow: 2px 2px #222;
}
.fp-tree {
    max-height: 50vh; overflow-y: auto;
    padding: 6px; background: #C6C6C6;
    border: 3px solid;
    border-color: #5D4E37 #FFFFFF #FFFFFF #5D4E37;
}
.fp-item {
    display: flex; align-items: center; gap: 4px;
    padding: 3px 4px; cursor: pointer;
    font-family: var(--font-pixel); font-size: 8px; color: #222;
    white-space: nowrap;
}
.fp-item:hover { background: rgba(0,0,200,0.15); }
.fp-dir .fp-toggle { width: 14px; font-size: 7px; color: #555; flex-shrink: 0; }
.fp-icon { display: flex; align-items: center; flex-shrink: 0; }
.fp-name { overflow: hidden; text-overflow: ellipsis; }

/* --- 浏览器 --- */
.browser-toolbar {
    display: flex; align-items: center; gap: 4px;
    padding: 6px 8px;
    background: rgba(0,0,0,0.3);
    border-bottom: 2px solid rgba(255,255,255,0.1);
}
.browser-url {
    flex: 1; padding: 4px 8px;
    font-family: var(--font-pixel); font-size: 8px;
    background: #333; color: #ddd;
    border: 2px solid; border-color: #555 #222 #222 #555;
    outline: none;
}
.browser-url:focus { border-color: #5a6b8a; }
.browser-content {
    flex: 1; background: #222; overflow: auto; position: relative;
}
.browser-content iframe {
    width: 100%; height: 100%; border: none;
}
.browser-bookmarks {
    display: flex; gap: 4px; padding: 4px 8px;
    background: rgba(0,0,0,0.2);
    border-bottom: 2px solid rgba(255,255,255,0.05);
}
.bookmark-btn {
    font-size: 7px; padding: 3px 8px;
}

/* --- 设置 --- */
.settings-panel { padding: 16px; }
.settings-group {
    margin-bottom: 20px;
}
.settings-group h3 {
    font-size: 10px; color: #ffffa0;
    text-shadow: 1px 1px #555;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid rgba(255,255,255,0.1);
}
.settings-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 0; gap: 12px;
}
.settings-label { font-size: 8px; color: #ccc; }
.theme-options { display: flex; gap: 6px; }
.theme-opt {
    width: 48px; height: 48px; border: 3px solid #555;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 7px; color: #fff; text-shadow: 1px 1px #000;
}
.theme-opt:hover { border-color: #aaa; }
.theme-opt.active { border-color: #ffffa0; }
.theme-opt-overworld { background: linear-gradient(to bottom, #5d9b3a 50%, #8b6914 50%); }
.theme-opt-nether { background: linear-gradient(to bottom, #5a1515 50%, #1a0505 50%); }
.theme-opt-end { background: #0d0025; }

/* --- 壁纸选择网格 --- */
.wallpaper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    padding: 8px 0;
}
.wp-opt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    border: 3px solid #555;
    padding: 4px;
}
.wp-opt:hover { border-color: #aaa; }
.wp-opt.active { border-color: #ffffa0; box-shadow: 0 0 6px rgba(255,255,160,0.3); }
.wp-preview {
    width: 90px;
    height: 56px;
    overflow: hidden;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wp-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: auto;
}
.wp-preview-theme {
    font-size: 8px;
    color: #aaa;
    font-family: var(--font-pixel);
    background: linear-gradient(to bottom, #5d9b3a 50%, #8b6914 50%);
    width: 100%;
    height: 100%;
}
.wp-name {
    font-size: 7px;
    color: #ccc;
    text-shadow: 1px 1px #222;
    text-align: center;
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- 右键壁纸选择弹出面板 --- */
.wp-picker-overlay {
    position: fixed; inset: 0; z-index: 9600;
    background: rgba(0,0,0,0.35);
    display: flex; align-items: center; justify-content: center;
}
.wp-picker {
    background: #C6C6C6;
    border: 4px solid;
    border-color: #FFFFFF #5D4E37 #5D4E37 #FFFFFF;
    box-shadow: inset -3px -3px 0 #8B8B8B, inset 3px 3px 0 #FFFFFF, 4px 4px 0 rgba(0,0,0,0.5);
    padding: 0;
    width: 420px;
    max-height: 70vh;
    overflow: hidden;
}
.wp-picker-title {
    font-family: var(--font-pixel);
    font-size: 10px;
    padding: 8px 12px;
    background: linear-gradient(to bottom, var(--wood-light), var(--wood-mid));
    border-bottom: 3px solid;
    border-color: #d4a85c var(--wood-dark) var(--wood-dark) #d4a85c;
    color: #fff;
    text-shadow: 1px 1px #333;
}
.wp-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    padding: 10px;
    max-height: calc(70vh - 40px);
    overflow-y: auto;
}

/* Minecraft 风格开关 */
.mc-toggle {
    width: 48px; height: 24px;
    background: #555; border: 2px solid;
    border-color: #777 #333 #333 #777;
    cursor: pointer; position: relative;
    transition: background 0.15s;
}
.mc-toggle.on { background: #5d9b3a; }
.mc-toggle::after {
    content: ''; position: absolute;
    top: 2px; left: 2px;
    width: 18px; height: 18px;
    background: #ccc;
    border: 2px solid;
    border-color: #eee #888 #888 #eee;
    transition: left 0.15s;
}
.mc-toggle.on::after { left: 24px; }

/* --- 成就 --- */
.achievement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px; padding: 8px;
}
.achievement-card {
    display: flex; align-items: center; gap: 8px;
    padding: 8px; border: 2px solid #555;
    background: rgba(0,0,0,0.3);
}
.achievement-card.unlocked { border-color: #5d9b3a; background: rgba(93,155,58,0.1); }
.achievement-card.locked { opacity: 0.5; filter: grayscale(1); }
.achievement-icon { width: 36px; height: 36px; flex-shrink: 0; }
.achievement-info { flex: 1; }
.achievement-name { font-size: 8px; color: #ffffa0; margin-bottom: 4px; }
.achievement-desc { font-size: 7px; color: #aaa; line-height: 1.5; }

/* --- 小游戏列表 --- */
.games-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px; padding: 16px;
}
.game-card {
    background: rgba(0,0,0,0.3);
    border: 3px solid #555;
    padding: 16px; text-align: center;
    cursor: pointer;
    transition: border-color 0.1s;
}
.game-card:hover { border-color: #ffffa0; background: rgba(0,0,0,0.4); }
.game-card-icon { font-size: 28px; margin-bottom: 10px; }
.game-card-name { font-size: 9px; color: #fff; margin-bottom: 6px; text-shadow: 1px 1px #333; }
.game-card-desc { font-size: 7px; color: #aaa; line-height: 1.5; }

/* ============================================================
   挖矿游戏样式
   ============================================================ */
.mining-container { padding: 12px; height: 100%; display: flex; flex-direction: column; gap: 10px; }
.mining-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.mining-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    flex: 1;
}
.mining-block {
    aspect-ratio: 1; border: 2px solid;
    border-color: #555 #333 #333 #555;
    cursor: pointer;
    position: relative;
    image-rendering: pixelated;
    transition: filter 0.05s;
}
.mining-block:hover { filter: brightness(1.3); }
.mining-block.breaking { animation: blockShake 0.08s ease-in-out; }
.mining-block.broken {
    animation: blockBreak 0.2s ease-out forwards;
    pointer-events: none;
}
@keyframes blockShake {
    0%, 100% { transform: translate(0,0); }
    25% { transform: translate(-2px, 0); }
    75% { transform: translate(2px, 0); }
}
@keyframes blockBreak {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); }
    100% { transform: scale(0); opacity: 0; }
}
.mining-crack {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.3);
    pointer-events: none;
}
.mining-inventory {
    display: flex; gap: 4px; flex-wrap: wrap;
    padding: 8px; background: rgba(0,0,0,0.3);
    border: 2px solid #444;
}
.mining-inventory-label { font-size: 7px; color: #aaa; margin-bottom: 4px; width: 100%; }
.mining-inv-slot { position: relative; }
.mining-inv-count {
    position: absolute; bottom: 1px; right: 3px;
    font-size: 7px; color: #fff; text-shadow: 1px 1px #000;
    font-family: var(--font-pixel);
}

/* 方块颜色（MC 经典材质色） */
.block-stone { background: #828282; }
.block-dirt { background: #8B7355; }
.block-grass { background: linear-gradient(to bottom, #7CFC00 40%, #8B7355 40%); }
.block-coal { background: #828282; background-image: radial-gradient(circle at 30% 40%, #1a1a1a 3px, transparent 3px), radial-gradient(circle at 70% 60%, #222 3px, transparent 3px); }
.block-iron { background: #828282; background-image: radial-gradient(circle at 30% 40%, #D4A85C 3px, transparent 3px), radial-gradient(circle at 70% 60%, #C49A5C 3px, transparent 3px); }
.block-gold { background: #828282; background-image: radial-gradient(circle at 30% 40%, #FFD700 3px, transparent 3px), radial-gradient(circle at 70% 60%, #E8C200 3px, transparent 3px); }
.block-diamond { background: #828282; background-image: radial-gradient(circle at 30% 40%, #4AF 3px, transparent 3px), radial-gradient(circle at 70% 60%, #2DE 3px, transparent 3px); }
.block-oak { background: #8B7355; background-image: repeating-linear-gradient(90deg, transparent 0px, transparent 6px, #6B5335 6px, #6B5335 7px); }
.block-bedrock { background: #333; background-image: radial-gradient(circle at 20% 30%, #555 2px, transparent 2px), radial-gradient(circle at 60% 70%, #444 2px, transparent 2px), radial-gradient(circle at 80% 20%, #555 2px, transparent 2px); }
.block-planks { background: #C49A5C; background-image: repeating-linear-gradient(0deg, transparent 0px, transparent 8px, #A08050 8px, #A08050 9px); }
.block-cobble { background: #828282; background-image: radial-gradient(ellipse at 20% 30%, #8E8E8E 4px, transparent 4px), radial-gradient(ellipse at 70% 60%, #6E6E6E 5px, transparent 5px), radial-gradient(ellipse at 50% 80%, #8E8E8E 3px, transparent 3px); }
.block-air { background: transparent; border-color: transparent; cursor: default; }

/* ============================================================
   合成台游戏样式
   ============================================================ */
.crafting-container {
    padding: 16px; height: 100%;
    display: flex; flex-direction: column; gap: 12px;
}
.crafting-layout {
    display: flex; gap: 20px; align-items: flex-start; justify-content: center;
    flex-wrap: wrap; flex: 1;
}
.crafting-area { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.crafting-label { font-size: 8px; color: #aaa; text-shadow: 1px 1px #222; }
.crafting-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 2px; padding: 8px;
    background: #8b6914;
    border: 3px solid; border-color: #a07840 #5a3a10 #5a3a10 #a07840;
}
.crafting-slot {
    width: 48px; height: 48px;
    background: var(--slot-bg);
    border: 2px solid; border-color: #555 #aaa #aaa #555;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.crafting-slot:hover { filter: brightness(1.2); }
.crafting-slot.has-item { border-color: #5a6b8a; }

.crafting-arrow {
    font-size: 20px; color: #aaa;
    align-self: center; padding: 0 8px;
    text-shadow: 1px 1px #333;
}

.crafting-result-slot {
    width: 56px; height: 56px;
    background: var(--slot-bg);
    border: 3px solid; border-color: #5a6b8a #2a3a5a #2a3a5a #5a6b8a;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.crafting-result-slot.has-result {
    animation: resultGlow 1.5s ease-in-out infinite;
}
@keyframes resultGlow {
    0%, 100% { border-color: #5a6b8a #2a3a5a #2a3a5a #5a6b8a; }
    50% { border-color: #8a9bbc #4a5a7a #4a5a7a #8a9bbc; }
}
.crafting-result-count {
    position: absolute; bottom: 2px; right: 4px;
    font-size: 8px; color: #fff; text-shadow: 1px 1px #000;
    font-family: var(--font-pixel);
}

/* 合成材料库 */
.crafting-materials {
    padding: 10px; background: rgba(0,0,0,0.3);
    border: 2px solid #444;
    width: 100%;
}
.crafting-materials-label { font-size: 8px; color: #aaa; margin-bottom: 8px; }
.crafting-materials-grid {
    display: flex; gap: 4px; flex-wrap: wrap;
}
.crafting-mat-slot {
    width: 40px; height: 40px;
    background: var(--slot-bg);
    border: 2px solid; border-color: #555 #aaa #aaa #555;
    cursor: grab;
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.crafting-mat-slot:active { cursor: grabbing; }
.crafting-mat-slot.empty { opacity: 0.4; cursor: default; }

/* 拖拽样式 */
.dragging {
    position: fixed; z-index: 99999;
    pointer-events: none;
    width: 40px; height: 40px;
    opacity: 0.8;
    image-rendering: pixelated;
}

/* 合成配方书 */
.recipe-book {
    width: 100%; max-height: 200px; overflow-y: auto;
    background: rgba(0,0,0,0.2);
    border: 2px solid #444;
    padding: 8px;
}
.recipe-item {
    display: flex; align-items: center; gap: 8px;
    padding: 6px; border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 7px; color: #aaa;
}
.recipe-item:last-child { border-bottom: none; }
.recipe-result-name { color: #ffffa0; }

/* --- 关于对话框内容 --- */
.about-content {
    text-align: center; padding: 24px;
}
.about-logo { font-size: 32px; margin-bottom: 16px; }
.about-title { font-size: 16px; color: #ffffa0; margin-bottom: 8px; }
.about-ver { font-size: 8px; color: #888; margin-bottom: 20px; }
.about-desc { font-size: 8px; color: #aaa; line-height: 2; }

/* --- 通知提示 --- */
.mc-toast {
    position: fixed; top: 20px; right: 20px;
    z-index: 99990;
    background: rgba(0,0,0,0.85);
    border: 3px solid #5d9b3a;
    padding: 10px 16px;
    font-family: var(--font-pixel); font-size: 8px;
    color: #fff; text-shadow: 1px 1px #222;
    animation: toastIn 0.2s ease-out;
    max-width: 280px;
}
.mc-toast.out { animation: toastOut 0.2s ease-in forwards; }
@keyframes toastIn { 0% { transform: translateX(100%); opacity: 0; } 100% { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { 0% { transform: translateX(0); opacity: 1; } 100% { transform: translateX(100%); opacity: 0; } }

/* --- 内嵌网页备用 --- */
.iframe-fallback {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    height: 100%; gap: 12px; padding: 20px; text-align: center;
}
.iframe-fallback p { font-size: 9px; color: #aaa; }
.iframe-fallback a {
    color: #5a6b8a; text-decoration: underline;
    font-size: 9px; cursor: pointer;
}
.iframe-fallback a:hover { color: #ffffa0; }

/* --- 滚动条 Minecraft 风格 --- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #1a1a1a; border: 1px solid #333; }
::-webkit-scrollbar-thumb { background: #555; border: 2px solid; border-color: #777 #333 #333 #777; }
::-webkit-scrollbar-thumb:hover { background: #777; }
::-webkit-scrollbar-button { display: block; height: 10px; background: #444; border: 1px solid #333; }

/* --- 音量弹窗 --- */
.volume-popup {
    position: absolute; bottom: calc(var(--taskbar-h) + 8px); right: 8px;
    background: rgba(0,0,0,0.9); border: 3px solid #555;
    padding: 12px; z-index: 9600;
    width: 200px;
}
.volume-slider-row { display: flex; align-items: center; gap: 8px; }
.volume-slider-row span { font-size: 9px; color: #aaa; }
.volume-slider {
    flex: 1; -webkit-appearance: none; appearance: none;
    height: 8px; background: #333; border: 2px solid; border-color: #555 #222 #222 #555;
    outline: none; cursor: pointer;
}
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none; width: 14px; height: 20px;
    background: #888; border: 2px solid; border-color: #aaa #555 #555 #aaa;
    cursor: pointer;
}

/* --- 确认对话框 --- */
.mc-dialog-overlay {
    position: fixed; inset: 0; z-index: 99995;
    background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
}
.mc-dialog {
    background: #c6c6c6; border: 3px solid;
    border-color: #fff #555 #555 #fff;
    padding: 0; min-width: 320px;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.5);
}
.mc-dialog-titlebar {
    background: linear-gradient(to bottom, var(--wood-light), var(--wood-mid));
    border-bottom: 3px solid;
    border-color: #d4a85c var(--wood-dark) var(--wood-dark) #d4a85c;
    padding: 8px 12px;
    font-family: var(--font-pixel); font-size: 10px;
    color: #fff; text-shadow: 1px 1px #333;
}
.mc-dialog-body { padding: 16px; font-size: 9px; color: #3f3f3f; line-height: 1.8; }
.mc-dialog-buttons { display: flex; gap: 6px; justify-content: flex-end; padding: 8px 12px; }
.mc-dialog .mc-btn { font-size: 8px; }

/* ============================================================
   放置/点击生存游戏
   ============================================================ */
.idle-container { height: 100%; display: flex; flex-direction: column; }

/* 顶部信息栏 */
.game-header {
    display: flex; align-items: center; gap: 10px; padding: 6px 10px;
    background: rgba(0,0,0,0.4); border-bottom: 2px solid rgba(255,255,255,0.1);
    flex-wrap: wrap; flex-shrink: 0;
}
.game-age { font-family: var(--font-pixel); font-size: 10px; font-weight: bold; }

/* 标签页 */
.game-tabs {
    display: flex; gap: 2px; padding: 4px 6px;
    background: rgba(0,0,0,0.25); border-bottom: 2px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}
.game-tab-btn { font-size: 8px; padding: 4px 10px; }
.game-tab-btn.active {
    background: #5a6b8a;
    border-color: var(--btn-hover-light) var(--btn-hover-dark) var(--btn-hover-dark) var(--btn-hover-light);
    color: var(--btn-hover-text);
}

/* 内容区域 */
.game-content { flex: 1; overflow-y: auto; padding: 8px; }

/* === 采集页 - 资源节点 === */
.node-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 8px;
}
.node-card {
    position: relative; cursor: pointer;
    border: 3px solid; border-color: #555 #aaa #aaa #555;
    background: #8b6914; overflow: hidden;
    transition: filter 0.05s;
}
.node-card:hover:not(.node-locked) { filter: brightness(1.2); }
.node-card.node-hit { animation: nodeHit 0.1s ease-in-out; }
@keyframes nodeHit { 0%,100%{transform:scale(1)} 50%{transform:scale(0.95)} }
.node-block {
    width: 100%; height: 64px; position: relative;
}
.node-icon-wrap {
    position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
    pointer-events: none; z-index: 1;
}
.node-crack-bar {
    position: absolute; inset: 0; background: rgba(0,0,0,0.5);
    pointer-events: none; z-index: 2;
}
.node-lock-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0.6);
    z-index: 3; display: flex; align-items: center; justify-content: center;
    font-size: 24px;
}
.node-locked { opacity: 0.6; cursor: not-allowed; }
.node-info { padding: 6px 8px; }
.node-name { font-size: 9px; color: #fff; text-shadow: 1px 1px #222; margin-bottom: 4px; }
.node-hp-bar {
    height: 6px; background: #222; border: 1px solid #555; margin-bottom: 3px;
}
.node-hp-fill {
    height: 100%; background: linear-gradient(to bottom, #5d9b3a, #3a7a1a);
    transition: width 0.1s;
}
.node-stats { font-size: 7px; color: #aaa; }
.node-dmg { font-size: 7px; color: #5d9b3a; margin-top: 2px; }
.node-req { font-size: 7px; color: #f66; margin-top: 2px; }

/* === 合成页 === */
.craft-section { margin-bottom: 12px; }
.craft-section-title {
    font-size: 9px; color: #ffffa0; text-shadow: 1px 1px #555;
    margin-bottom: 6px; padding-bottom: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.craft-grid { display: flex; flex-direction: column; gap: 4px; }
.craft-card {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 8px; background: rgba(0,0,0,0.2);
    border: 2px solid #444;
}
.craft-card.craft-disabled { opacity: 0.5; }
.craft-icon { display: flex; align-items: center; flex-shrink: 0; gap: 2px; }
.craft-info { flex: 1; min-width: 0; }
.craft-name { font-size: 8px; color: #fff; margin-bottom: 2px; }
.craft-cost { font-size: 7px; color: #aaa; display: flex; flex-wrap: wrap; gap: 4px; }
.craft-req { font-size: 7px; color: #f66; margin-top: 2px; }
.cost-item { padding: 1px 3px; background: rgba(0,0,0,0.2); border-radius: 2px; }
.cost-lack { color: #f66; background: rgba(255,0,0,0.1); }
.craft-btn { flex-shrink: 0; font-size: 7px; padding: 3px 8px; }
.btn-disabled { opacity: 0.4; cursor: not-allowed; }

/* === 熔炼页 === */
.smelt-locked {
    text-align: center; padding: 40px 20px; color: #aaa;
    font-family: var(--font-pixel); font-size: 10px;
}
.smelt-queue { display: flex; flex-direction: column; gap: 6px; padding: 6px 0; }
.smelt-item {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 8px; background: rgba(0,0,0,0.2);
    border: 2px solid #444;
}
.smelt-bar { flex: 1; height: 8px; }
.smelt-progress {
    height: 100%; background: linear-gradient(to bottom, #f80, #f40);
    transition: width 0.3s;
}

/* === 升级页 === */
.upgrade-list { display: flex; flex-direction: column; gap: 8px; }
.upgrade-card {
    padding: 10px 12px; background: rgba(0,0,0,0.3);
    border: 2px solid #555;
}
.upgrade-card.upgrade-maxed { border-color: #5d9b3a; opacity: 0.7; }
.upgrade-name { font-size: 9px; color: #fff; margin-bottom: 4px; }
.upgrade-lv { font-size: 8px; color: #5d9b3a; margin-left: 8px; }
.upgrade-desc { font-size: 7px; color: #aaa; margin-bottom: 4px; }
.upgrade-cost { font-size: 7px; color: #ccc; margin-bottom: 6px; }
.upgrade-btn { font-size: 7px; }

/* === 背包页 === */
.bag-empty { text-align: center; padding: 40px 20px; color: #aaa; font-family: var(--font-pixel); font-size: 10px; }
.bag-grid {
    display: flex; flex-wrap: wrap; gap: 4px; padding: 8px;
}
.bag-slot {
    position: relative; width: 40px; height: 40px;
    background: var(--slot-bg);
    border: 2px solid; border-color: #555 #aaa #aaa #555;
    display: flex; align-items: center; justify-content: center;
}
.bag-equipped { border-color: #5d9b3a; box-shadow: 0 0 4px rgba(93,155,58,0.4); }
.bag-equip-badge {
    position: absolute; top: 1px; right: 2px;
    font-size: 6px; color: #5d9b3a; font-family: var(--font-pixel);
    font-weight: bold; text-shadow: 1px 1px #000;
}

/* ============================================================
   战斗系统
   ============================================================ */
.combat-arena {
    padding: 8px; border: 2px solid #444;
    background: rgba(0,0,0,0.3); margin-top: 8px;
}

.combat-mob-card {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 8px; background: rgba(0,0,0,0.2);
    border: 2px solid #444; cursor: pointer;
    transition: filter 0.1s;
}
.combat-mob-card:hover { filter: brightness(1.2); border-color: #888; }
.combat-mob-card.combat-mob-active {
    border-color: #f66; background: rgba(255,0,0,0.1);
    cursor: default;
}
.combat-mob-icon {
    width: 36px; height: 36px; border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.2);
}
.combat-mob-info { flex: 1; min-width: 0; }
.combat-mob-name { font-size: 9px; color: #fff; text-shadow: 1px 1px #222; margin-bottom: 2px; }

.combat-fighter {
    padding: 8px; margin-bottom: 6px;
    border: 2px solid #444; background: rgba(0,0,0,0.2);
}
.combat-fighter-label {
    font-size: 9px; font-weight: bold; margin-bottom: 4px;
}
.combat-hp-bar {
    height: 10px; background: #222; border: 2px solid;
    border-color: #555 #222 #222 #555; margin-bottom: 4px;
}
.combat-hp-fill {
    height: 100%; transition: width 0.2s;
}
.combat-hp-player { background: linear-gradient(to bottom, #5d9b3a, #3a7a1a); }
.combat-hp-mob { background: linear-gradient(to bottom, #d44, #a22); }
.combat-fighter-stats { font-size: 7px; color: #aaa; }

.combat-creeper-timer {
    font-size: 8px; color: #ff8800; margin-top: 4px;
    animation: creeperFlash 0.5s infinite;
}
@keyframes creeperFlash { 0%,100%{opacity:1} 50%{opacity:0.5} }

.combat-actions {
    display: flex; gap: 8px; margin: 8px 0;
}
.combat-btn-attack {
    background: #8a2a2a; border-color: #c55 #553 #553 #c55;
    color: #ffaaaa; font-size: 10px; padding: 6px 16px;
}
.combat-btn-attack:hover {
    background: #aa3333; color: #fff;
}

.combat-log {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 6px; max-height: 160px; overflow-y: auto;
}
.combat-log-line {
    font-size: 7px; padding: 2px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    line-height: 1.6;
}

/* ============================================================
   附魔系统
   ============================================================ */
.enchant-grid {
    display: flex; flex-direction: column; gap: 6px;
}
.enchant-card {
    padding: 10px 12px; background: rgba(60,30,120,0.2);
    border: 2px solid #5533aa;
}
.enchant-card.enchant-maxed {
    border-color: #8855dd; opacity: 0.7;
}
.enchant-name {
    font-size: 9px; color: #cc99ff; margin-bottom: 4px;
}
.enchant-desc {
    font-size: 7px; color: #aa88cc; margin-bottom: 4px;
}
.enchant-cost {
    font-size: 7px; color: #ccc; margin-bottom: 6px;
    display: flex; flex-wrap: wrap; gap: 4px;
}
.enchant-btn {
    color: #cc99ff;
}
.enchant-btn:hover {
    background: #6633aa;
    border-color: #8855dd #4422aa #4422aa #8855dd;
    color: #fff;
}

/* 新方块颜色 */
.block-lapis { background: #828282; background-image: radial-gradient(circle at 30% 40%, #2244AA 3px, transparent 3px), radial-gradient(circle at 70% 60%, #3355BB 3px, transparent 3px); }
.block-redstone-ore { background: #828282; background-image: radial-gradient(circle at 25% 35%, #FF0000 3px, transparent 3px), radial-gradient(circle at 65% 55%, #CC0000 2px, transparent 2px), radial-gradient(circle at 80% 80%, #FF2222 2px, transparent 2px); }
