/* =========================================================
 * 玄爻宅 · 补充样式
 * 只作用于「窗口内部的内容」和新增的两个小部件（气泡、漫游条）。
 * 不修改 98.css 的 .title-bar / .window / button / .taskbar 规则，
 * 以保证整体外观与 demo.html 完全一致。
 * ========================================================= */

/* ---------- 98 风格的链接按钮（用于 <a> 伪装成 button） ---------- */
.w98btn{display:inline-flex;align-items:center;justify-content:center;min-height:23px;min-width:60px;
  padding:0 12px;background:silver;color:#000;text-decoration:none;font-size:11px;
  font-family:"Pixelated MS Sans Serif",Arial,"MS Sans Serif",Tahoma,sans-serif;
  box-shadow:inset -1px -1px #0a0a0a,inset 1px 1px #fff,inset -2px -2px grey,inset 2px 2px #dfdfdf;
  cursor:pointer;white-space:nowrap}
.w98btn:active{box-shadow:inset -1px -1px #fff,inset 1px 1px #0a0a0a,inset -2px -2px #dfdfdf,inset 2px 2px grey}

/* ---------- 截图匣（IE 窗口内嵌发布页） ---------- */
.jtu-addr{flex:1;background:#fff;padding:2px 4px;font-size:12px;overflow:hidden;white-space:nowrap;
  text-overflow:ellipsis;user-select:text;
  box-shadow:inset -1px -1px #fff,inset 1px 1px #808080,inset -2px -2px #dfdfdf,inset 2px 2px #0a0a0a}
.jtu-box{flex:1;overflow:hidden;background:#fff;
  box-shadow:inset -1px -1px #fff,inset 1px 1px #808080,inset -2px -2px #dfdfdf,inset 2px 2px #0a0a0a}
.jtu-frame{width:100%;height:100%;border:0;display:block;background:#fff}

/* ---------- 备案信息（网站底部） ---------- */
#beian{position:fixed;left:0;right:0;bottom:33px;min-height:22px;z-index:5;
  display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:2px 16px;padding:0 12px;
  font-size:11px;line-height:1.35;color:#eaf4ff;
  text-shadow:0 0 2px rgba(0,0,0,.9),1px 1px 0 rgba(0,0,0,.75);
  pointer-events:none;user-select:text}
#beian .beian-note{font-size:10px;color:#e2edf8;opacity:.92;letter-spacing:.5px}
/* 右侧一层很淡的暗色渐变，保证在任何壁纸上都看得清 */
#beian::before{content:"";position:absolute;right:0;top:-2px;bottom:-2px;width:520px;z-index:-1;
  background:linear-gradient(90deg,rgba(0,0,0,0),rgba(0,0,0,.30));pointer-events:none}
#beian a{display:inline-flex;align-items:center;gap:3px;color:inherit;text-decoration:none;
  pointer-events:auto;cursor:pointer;text-shadow:inherit}
#beian a:hover{text-decoration:underline;color:#fff}
/* 公安备案：备案图标在前，编号在右 */
#beian a.gongan{gap:2px}
#beian a.gongan img{display:block;height:20px;width:auto;image-rendering:auto;flex:none}
body.runner-on #beian{bottom:105px}

/* ---------- DOS 加载画面 ---------- */
#dosboot{position:fixed;inset:0;z-index:9150;display:none;background:#000;color:#c0c0c0;
  padding:22px 26px;overflow:hidden;cursor:default;
  font:14px/1.42 "Fixedsys","Courier New",SimSun,"宋体",monospace;white-space:pre;user-select:none}
#dosboot .dosout{white-space:pre}
#dosboot .doscursor{display:inline-block;color:#c0c0c0;animation:doscursor 1s steps(1) infinite}
@keyframes doscursor{50%{opacity:0}}
#dosboot .dosbar{margin-top:2px}
#dosboot .dostip{position:absolute;right:22px;bottom:16px;color:#5a5a5a;font-size:12px;letter-spacing:1px}

/* ---------- 开始菜单子菜单 ---------- */
#startmenu li.sub{position:relative;cursor:default}
#startmenu li.sub::after{content:"▸";margin-left:auto;font-size:10px;line-height:1}
#startmenu li.sub:hover::after{color:#fff}
#startmenu li.sep{padding:0;height:0;margin:4px 2px;border-top:1px solid #808080;border-bottom:1px solid #fff;pointer-events:none}
#startmenu li.sep:hover{background:none}
#startmenu .submenu{display:none;position:absolute;left:100%;top:-4px;margin:0;padding:2px 0;width:186px;
  background:#c0c0c0;border:1px solid #000;box-shadow:2px 2px 0 #000;z-index:6001}
#startmenu li.sub:hover>.submenu,#startmenu .submenu.open{display:block}
#startmenu .submenu li{padding:4px 10px 4px 6px;white-space:nowrap}
#startmenu .submenu li::after{content:none}

/* ---------- 托盘音量 ---------- */
#spk{position:relative;display:inline-flex;line-height:0;cursor:default;padding:1px}
#spk img{display:block}
#spk.mute::after{content:"";position:absolute;left:1px;top:7px;width:16px;height:2px;background:#c00;
  transform:rotate(-45deg);transform-origin:center}

/* ---------- 桌面右键菜单 ---------- */
#ctxmenu{display:none;position:absolute;z-index:7000;background:#c0c0c0;padding:2px;min-width:158px;
  box-shadow:inset -1px -1px #0a0a0a,inset 1px 1px #fff,inset -2px -2px #808080,inset 2px 2px #dfdfdf}
#ctxmenu .mi{position:relative;padding:3px 22px 3px 20px;font-size:12px;color:#000;white-space:nowrap;cursor:default}
#ctxmenu .mi:hover{background:#000080;color:#fff}
#ctxmenu .mi.sep{padding:0;margin:3px 2px;border-top:1px solid #808080;border-bottom:1px solid #fff}
#ctxmenu .mi.sep:hover{background:none}
#ctxmenu .mi.arrow::after{content:"▸";position:absolute;right:5px;top:3px}
#ctxmenu .sub{display:none;position:absolute;left:100%;top:-3px;background:#c0c0c0;padding:2px;min-width:112px;
  box-shadow:inset -1px -1px #0a0a0a,inset 1px 1px #fff,inset -2px -2px #808080,inset 2px 2px #dfdfdf}
#ctxmenu .mi:hover>.sub{display:block}

/* ---------- 扫雷 ---------- */
.led{background:#000;color:#f00;font:bold 17px/18px "Courier New",monospace;letter-spacing:1px;
  padding:0 3px;min-width:38px;text-align:center;
  box-shadow:inset 1px 1px #808080,inset -1px -1px #fff}
.mine-grid{display:grid;gap:0;justify-content:center;background:#c0c0c0;padding:3px;
  box-shadow:inset 1px 1px #808080,inset -1px -1px #fff}
.mine-grid .cell{width:16px;height:16px;line-height:16px;text-align:center;font:bold 12px "MS Sans Serif",Tahoma,sans-serif;
  background:#c0c0c0;box-shadow:inset -1px -1px #808080,inset 1px 1px #fff;cursor:default;user-select:none;overflow:hidden}
.mine-grid .cell.open{box-shadow:inset 1px 1px #808080;background:#c0c0c0}

/* ---------- 关闭程序（任务管理器） ---------- */
.proc{cursor:default}
.proc:hover{background:#e8e8e8}

/* ---------- 右下角气泡（Win98 提示框） ---------- */
/* 底部留得比备案那一行高，气泡永远不会盖住备案号 */
#toast{position:absolute;right:8px;bottom:62px;display:flex;flex-direction:column;gap:6px;align-items:flex-end;z-index:6800}
body.runner-on #toast{bottom:134px}
.toast{background:#ffffe1;border:1px solid #000;padding:5px 8px;max-width:250px;font-size:12px;color:#000;
  box-shadow:2px 2px 0 rgba(0,0,0,.3);text-shadow:none;animation:xytoast .18s ease-out}
.toast b{display:block;margin-bottom:2px}
@keyframes xytoast{from{transform:translateY(6px);opacity:0}}

/* ---------- 登录框（年代选择） ---------- */
.era-grid{display:grid;grid-template-columns:68px 1fr;gap:7px 8px;align-items:center}
.era-grid label{white-space:nowrap}

/* ---------- 聊天室 ---------- */
.chatlog div{white-space:pre-wrap;word-break:break-all}
.chatlog .sys{color:#808080}
.chatlog .me{color:#000080}
.chatlog .jx{color:#800000;font-weight:bold}

/* ---------- MS-DOS ---------- */
.dos{background:#000;color:#c0c0c0;font:14px/1.35 "Fixedsys","Courier New",SimSun,monospace;
  padding:4px 6px;height:250px;overflow:auto;white-space:pre-wrap;user-select:text;cursor:text}
.dos>div{white-space:pre-wrap;word-break:break-all}
.dos .ci{display:flex;gap:0}
.dos input{flex:1;background:transparent !important;color:#c0c0c0 !important;border:0 !important;
  box-shadow:none !important;font:14px "Fixedsys","Courier New",SimSun,monospace !important;
  padding:0 !important;min-height:0 !important;height:18px !important;outline:0}

/* ---------- 漂流瓶 ---------- */
.beach{position:relative;height:110px;overflow:hidden;
  background:linear-gradient(#7ec8f5 0 55%,#2e86c1 55% 72%,#f3d9a4 72%)}
.beach .sun{position:absolute;right:26px;top:12px;width:22px;height:22px;background:#ffd23b;box-shadow:0 0 0 3px #ffe680}
.beach .wave{position:absolute;left:0;right:0;top:55%;height:5px;
  background:repeating-linear-gradient(90deg,#fff 0 8px,transparent 8px 16px);animation:xywave 2s linear infinite;opacity:.85}
.beach .bt{position:absolute;left:47%;top:58%;animation:xybob 1.8s ease-in-out infinite}
@keyframes xywave{to{background-position:16px 0}}
@keyframes xybob{50%{transform:translateY(-4px) rotate(-8deg)}}
.paper{background:#fffef0;padding:8px;line-height:1.7;user-select:text;white-space:pre-wrap;word-break:break-all;min-height:70px}
.paper.skin{background:#fdf1d6;font-family:KaiTi,"楷体",serif;font-size:14px}

/* ---------- 玄宝工坊缩略图 ---------- */
.thumbs{display:flex;flex-wrap:wrap;gap:6px;align-content:flex-start}
.thumb{width:100px;text-align:center;padding:4px;cursor:default}
.thumb>div{width:96px;height:74px;margin:0 auto;border:1px solid #808080;background-size:cover;
  background-position:center;image-rendering:pixelated}
.thumb span{display:inline-block;margin-top:2px;font-size:11px;color:#000;padding:0 2px;text-shadow:none}
.thumb.sel span{background:#000080;color:#fff}

/* ---------- 底部漫游条（默认隐藏） ---------- */
#runner{display:none;position:absolute;left:0;right:0;bottom:32px;height:72px;background:#c0c0c0;
  border-top:1px solid #fff;box-shadow:inset 0 -1px 0 #808080;z-index:5000;flex-direction:column;padding:2px;box-sizing:border-box}
#runner.on{display:flex}
#runner .rbar{height:16px;display:flex;align-items:center;gap:8px;font-size:11px;padding:0 2px;color:#000}
#runner .rbar .ttl{font-weight:bold}
#runner .rbar .help{color:#555}
#runner .prog{margin-left:auto;display:flex;align-items:center;gap:3px}
#runner .prog i{display:inline-block;width:5px;height:9px;background:#fff;box-shadow:inset 1px 1px #808080}
#runner .prog i.on{background:#000080}
#runner canvas{flex:1;width:100%;height:52px;display:block;image-rendering:pixelated;cursor:pointer;
  box-shadow:inset -1px -1px #fff,inset 1px 1px #808080;outline:0}

/* ---------- 皮肤：只做「时代差异」的轻量覆写 ---------- */
body.skin-me .title-bar{background:linear-gradient(90deg,#0a246a,#a6caf0)}
body.skin-me #taskbar{background:#c8cdd6}
body.skin-me #startmenu .side{background:linear-gradient(0deg,#0a246a,#a6caf0)}
body.skin-me #startmenu .side b:after{content:" Me"}

body.skin-xp .title-bar{background:linear-gradient(90deg,#0058ee,#3a93f0 60%,#4a9af5)}
body.skin-xp #taskbar{background:linear-gradient(#245edb,#3f8cf3 12%,#245edb)}
body.skin-xp #startmenu .side{background:linear-gradient(0deg,#1c5fd9,#5a9cf8)}
body.skin-xp #startmenu .side b:after{content:" XP"}
body.skin-xp #start{color:#fff;font-style:italic}

/* ---------- 移动端：不改变外观，只保证可用 ---------- */
@media (max-width:780px){
  .window{max-width:calc(100vw - 12px)}
  #icons{height:calc(100% - 44px)}
}
