/* ══════════════════════════════════════════════════════════
   12あKa@被告人杯糕_ · 自介页样式（博客层）
   窗口 / 任务栏 / 开始菜单等 XP 外壳见 css/winxp.css
   ══════════════════════════════════════════════════════════ */

/* ---------- 像素字体（Fusion Pixel Font，OFL 授权） ----------
   ⚠️ 站主 m02318 第 5 条推翻了自己第 2 批的决定：**正文改回像素体**（像素体才有千禧年博客味），
   但 XP 外壳（标题栏 / 任务栏 / 开始菜单 / 按钮 / 6 个 XP 应用）继续用 Tahoma。
   于是：--font-body 首位是 'Pixel'（正文），--font-ui 仍是 Tahoma（外壳），两边各管一摊。
   像素字体只有 12px 及整数倍才清晰，所以正文里的字号一律吸附 12px / 24px（站主原文要求）。
   三份 woff2 按 unicode-range 分片：汉字 / 假名 / 拉丁，中日英三语全覆盖。 */
@font-face {
  font-family: 'Pixel';
  src: url('../assets/fonts/fusion-12px-zh_hans.woff2') format('woff2');
  font-weight: normal; font-style: normal; font-display: swap;
  unicode-range: U+4E00-9FFF, U+3000-303F, U+FF00-FFEF, U+2018-201F, U+2026;
}
@font-face {
  font-family: 'Pixel';
  src: url('../assets/fonts/fusion-12px-ja.woff2') format('woff2');
  font-weight: normal; font-style: normal; font-display: swap;
  unicode-range: U+3040-309F, U+30A0-30FF, U+31F0-31FF;
}
@font-face {
  font-family: 'Pixel';
  src: url('../assets/fonts/fusion-12px-latin.woff2') format('woff2');
  font-weight: normal; font-style: normal; font-display: swap;
  unicode-range: U+0020-007F, U+00A0-024F, U+2000-206F, U+2070-209F, U+20A0-20CF, U+2100-214F, U+2190-21FF, U+2500-25FF, U+2600-26FF, U+2700-27BF;
}

/* ---------- 变量 ----------
   配色**照抄开源工程 winXP-master**（Luna 默认主题那套）：
   米色面 #ece9d8 / 任务窗格标题蓝 #1c68ff / 窗格文字深海军蓝 #0c327d /
   浅蓝渐变 #a8bcff / 控件边框灰 #b9b9b9 / 选中蓝 #316ac5 / 内容区白 #fff。
   （来源：src/WinXP/apps/MyComputer/index.js 的样式块。）
   2024 改版前的粉色调已全部退役，不要再往这里加 --hotpink。 */
:root {
  --ink: #000;               /* 正文 */
  --dark: #0c327d;           /* 强调文字（XP 任务窗格文字色） */
  --accent: #0c327d;         /* 标题 / 主按钮文字 */
  --accent2: #2f6ac4;        /* 链接 / 次级强调（XP 窗格标题蓝 #1c68ff 降了一档饱和，站主嫌太艳） */
  --accent-soft: #a8bcff;    /* 浅蓝：编号、气泡、选中 */
  --accent-bg: #ece9d8;      /* XP 米色面 */
  --line: #b9b9b9;           /* XP 控件边框灰 */
  --sel: #316ac5;            /* XP 选中蓝 */
  /* 字体（站主 m02318 第 5 条：正文回像素体、XP 外壳保留 Tahoma）
     --font-body 给页面正文：'Pixel'（Fusion Pixel，12px 点阵）打头，缺字才落到系统中文字体；
     --font-ui 给 XP 外壳与 6 个 XP 应用（拉丁字符优先 Tahoma —— 原版 XP 就是 Tahoma，最还原）。 */
  --font-body: 'Pixel', 'Noto Sans SC', 'Source Han Sans SC', 'Source Han Sans CN', 'Microsoft YaHei', 'PingFang SC', Tahoma, system-ui, sans-serif;
  --font-ui: Tahoma, 'Noto Sans SC', 'Source Han Sans SC', 'Microsoft YaHei', 'PingFang SC', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background: url('../assets/background/windows.jpg') center / cover fixed no-repeat, #ece9d8;
}

/* 轻纱提亮，保证内容可读 */
body::before {
  content: '';
  position: fixed; inset: 0;
  background: rgba(255, 255, 255, .14);
  pointer-events: none;
  z-index: 0;
}

img { max-width: 100%; }

a { color: inherit; text-decoration: none; }

/* ---------- 背景星星字符画 ---------- */
.star-field {
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none; overflow: hidden;
}
.star-art {
  position: absolute; margin: 0;
  /* 星星是 ASCII 字符画，必须等宽字体，别跟着 --font-body 变 */
  font-family: 'Consolas', 'Courier New', monospace;
  color: #ffffff;
  text-shadow:
    0 0 6px rgba(255, 255, 255, .95),
    0 0 14px rgba(255, 255, 255, .8),
    0 0 28px rgba(255, 255, 255, .55);
  line-height: 1.12;
  opacity: 0;
  animation: starLife 2.4s ease-in-out forwards;
  user-select: none;
}
@keyframes starLife {
  0% { opacity: 0; transform: scale(.85); }
  18% { opacity: .95; transform: scale(1); }
  78% { opacity: .8; }
  100% { opacity: 0; transform: scale(1.08); }
}

/* ---------- 语言切换（由 i18n.js 挪进任务栏托盘，做成 XP 语言栏） ---------- */
.lang-drop { position: relative; z-index: 95; display: inline-flex; align-items: center; }
.lang-toggle {
  font-family: inherit; font-size: 11px; font-weight: bold; line-height: 1;
  color: #fff; background: transparent;
  border: 1px solid transparent; border-radius: 2px;
  padding: 3px 5px; cursor: pointer;
}
.lang-toggle:hover { background: rgba(255, 255, 255, .28); border-color: rgba(255, 255, 255, .55); }
.lang-menu {
  position: absolute; bottom: calc(100% + 6px); right: 0;
  background: #fff; min-width: 112px;
  border: 2px solid; border-color: #fff var(--line) var(--line) #fff;
  border-radius: 6px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .16);
  overflow: hidden;
}
.lang-menu[hidden] { display: none; }
.lang-opt {
  display: block; width: 100%; padding: 8px 14px; text-align: left;
  font-family: inherit; font-size: 14px; color: var(--ink);
  background: #fff; border: none; border-bottom: 1px dashed #b9b9b9; cursor: pointer;
}
.lang-opt:last-child { border-bottom: none; }
.lang-opt:hover { background: var(--accent-bg); }
.lang-opt.active { background: #a8bcff; color: var(--accent); font-weight: bold; }

/* ---------- 页面骨架 ----------
   z-index 层级（改之前先读这段）：
   star-field 1 → desktop 6 → duck 85（桌面玩具，压在任务栏下面、盖在所有窗口上面）
   → .page 76（页面与页面内窗口）→ #winLayer 80（浮动窗口）
   → taskbar 90 → startmenu 92 → lang-drop 95（任务栏托盘内）
   → power-mask 119 → welcome 120 → xp-msg 125 → powerdlg 130 → bsod 140
   任务栏永远盖住玩具鸭，玩具鸭永远盖住窗口。 */
.page {
  position: relative; z-index: 76;
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 10px 40px;
  height: calc(100vh - 30px);   /* 任务栏 30px */
  overflow: hidden;             /* 主页面整页不滚动，窗口内部自己滚 */
  display: flex;
  flex-direction: column;
}

/* ---------- 分隔线 ---------- */
.divider {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  text-align: center;
  font-size: 12px; color: #ffffff; letter-spacing: 3px;
  padding: 2px 0;
  text-shadow: none;
}
.divider > span { flex: none; }

/* ---------- 双栏布局 ----------
   主区：第一行「委托相关事宜 + 资源配布」并排，第二行「留言板」整行
   侧栏：上「自介」撑满剩余高度，下「个人博客」入口窗（内容高度）—— 站主 m00575 定的位置 */
.blog-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;   /* 站主 m02125 第 3 条：自介窗宽一点，名字才不被挤压 */
  gap: 12px;
  flex: 1;
  min-height: 0;
  align-items: stretch;
  margin-top: 2px;
}
.main-col {
  grid-column: 1;   /* 主栏在左（宽），与 HTML 里 aside 的先后顺序无关 */
  grid-row: 1;      /* 必须显式指定行，否则自动排布会把主栏挤到第二行 */
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
}
.main-col > #commissionEntry { grid-column: 1; grid-row: 1; }
.main-col > #resourcesEntry  { grid-column: 2; grid-row: 1; }
.main-col > #guestbook       { grid-column: 1 / -1; grid-row: 2; min-height: 0; }
.side-col {
  grid-column: 2;   /* 侧栏在右（380px） */
  grid-row: 1;
  display: flex; flex-direction: column; gap: 12px; min-height: 0;
}
.side-col > #profile   { flex: 1; min-height: 0; }
.side-col > #blogEntry { flex: none; }   /* 入口窗按内容高度；不能让它也 100%（两个窗都撑满会溢出） */
/* 窗口撑满各自的格子，内容区自己出滚动条（侧栏那个博客入口窗是内容高度，不算在内） */
.main-col > .win { height: 100%; min-height: 0; }
/* 窗口内容 = 正文 → 用像素体（.win 本身是 XP 外壳、用 --font-ui；
   6 个 XP 应用的窗口挂在 #winLayer 里，不受这条影响，仍是 Tahoma） */
.main-col .win-body, .side-col .win-body { font-family: var(--font-body); }

/* ---------- 通用小元素 ---------- */
.bio-title {
  font-size: 12px; font-weight: bold; color: var(--accent);
  margin-bottom: 6px;
}
.mini { font-size: 12px; color: #767676; font-weight: normal; }

/* 统一按钮样式（站主要求：所有按钮都长成留言板发送按钮那样） */
.btn {
  font-family: inherit;
  font-size: 12px;
  padding: 5px 18px;
  border-radius: 3px;
  cursor: pointer;
  color: #143a7a;
  background: linear-gradient(180deg, #fdfdfd, #dfe4ee);
  border: 1px solid #9aa7c0;
}
.btn:hover { filter: brightness(1.04); }
.btn:active { filter: brightness(.94); }
.btn-go { display: inline-block; }

.note-box {
  margin-top: 12px; padding: 10px 12px;
  background: #fff;
  border: 1px dashed #b9b9b9;
  border-radius: 6px;
  font-size: 12px; color: #000;
}
.note-box b { color: #0c327d; }

code {
  font-family: inherit;
  background: var(--accent-bg); color: #0c327d;
  padding: 0 4px; border-radius: 3px; font-size: .9em;
}

/* ---------- 自我介绍（侧栏；一屏内塞下，头图从底端裁） ---------- */
.profile-body { display: flex; flex-direction: column; gap: 11px; }

.profile-banner {
  position: relative;
  height: 118px;
  margin: -12px -12px 0;
  border-radius: 4px 4px 0 0;
  background-image: url('../assets/background/cute.jpg');
  background-size: 100% auto;
  background-position: center top;
  background-repeat: no-repeat;
  margin-bottom: 2px;
}

.profile-top { display: flex; flex-direction: row; align-items: center; text-align: left; gap: 13px; }
.avatar-frame {
  position: relative; flex: none;
  width: 80px; height: 80px;
  margin-top: -34px; margin-left: 6px;
  padding: 5px; background: #fff;
  border: 3px solid; border-color: #fff var(--line) var(--line) #fff;
  border-radius: 50%;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .15), inset 0 0 0 2px var(--accent-bg);
}
.avatar { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }

.profile-id { min-width: 0; flex: 1; }
.cn {
  font-size: 24px; line-height: 1.3; font-weight: bold;
  color: var(--accent);
  /* 站主 m00628：名字太小，调大。像素字体只有 12px 及其整数倍清晰，所以取 24px；
     24px 下一行放得下（名字 12 字约 220px，可用宽度约 250px），所以不换行。 */
  white-space: nowrap;
}

.bio-card, .links-card {
  background: #fff;
  border: 2px solid; border-color: #fff var(--line) var(--line) #fff;
  border-radius: 6px; padding: 10px 12px;
}
.bio { font-size: 12px; color: var(--dark); }

/* 外链按钮（一行一条；邮箱悬停显示地址） */
.social-grid { display: flex; flex-direction: column; gap: 6px; }
.social {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px; border-radius: 6px;
  border: 2px solid; border-color: #fff var(--line) var(--line) #fff;
  background: #fff;
  transition: transform .12s, box-shadow .12s;
  cursor: pointer;
}
.social:hover { transform: translateX(3px); box-shadow: 2px 2px 0 rgba(0, 0, 0, .16); }
.social-ico { width: 24px; height: 24px; flex: none; display: flex; align-items: center; justify-content: center; }
.social-ico img { width: 22px; height: 22px; object-fit: contain; }
.social-label { font-size: 12px; color: var(--dark); font-weight: bold; }
.social-tip {
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  background: #fff; color: var(--accent);
  font-size: 12px; padding: 3px 10px; border-radius: 6px;
  border: 1.5px solid var(--accent-soft);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .16);
  white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity .15s;
  z-index: 10;
}
.social-mail:hover .social-tip, .social-mail:focus .social-tip { opacity: 1; }

/* ---------- 主页上的跳转入口 ---------- */
.entry-text { font-size: 12px; color: var(--dark); margin-bottom: 9px; line-height: 1.5; }

/* ---------- 留言板（主区第二行）；版式细节见 css/winxp.css 的评论区一节 ---------- */
.gb-send { align-self: flex-end; }
.gb-hint { line-height: 1.5; }

/* ---------- 委托页：状态 / 流程 / 联系方式 ---------- */
.cm-open { font-size: 24px; font-weight: bold; color: #4c7a34; letter-spacing: .5px; }
.cm-status-note { font-size: 12px; color: var(--dark); }

/* 委托流程：站主 m02125 第 4 条 —— 不要「一个步骤一个盒子」的模块化排版，就是四行普通文字 */
.cm-steps { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.cm-steps li { font-size: 12px; line-height: 1.7; }
.cm-steps b { color: var(--accent); margin-right: 4px; }
.cm-steps span { color: var(--dark); }

.cm-contact { display: grid; grid-template-columns: 1fr; gap: 6px; }

/* ---------- 彩蛋·玩具鸭（固定右下角，站在任务栏上沿；层级低于窗口 ----------） */
.duck {
  position: fixed; right: 6px; bottom: 18px; z-index: 85;
  background: transparent; border: none; cursor: pointer; padding: 0;
}
.duck-img {
  display: block; width: 300px; height: auto;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .3));
}
.duck.squish .duck-img { animation: squish .6s cubic-bezier(.4, .1, .25, 1) forwards; }
@keyframes squish {
  0%   { transform: scale(1, 1); }
  30%  { transform: scale(1.1, .76); }
  62%  { transform: scale(.96, 1.06); }
  100% { transform: scale(1, 1); }
}

/* ---------- 崩坏故障（彩蛋）：RGB 分离 + 撕裂扫描线 + 快速频闪 + 逐元素闪烁 ----------
   站主 m02125 第 1 条：**窗口不要扭来扭去** → 去掉了整页的 skew/位移抖动（原 glitchShake），
   故障感靠扫描线、频闪、RGB 鬼影和逐元素反相来撑。 */
body.glitching .page *,
body.glitching .taskbar * {
  text-shadow: 3px 0 rgba(214, 60, 92, .42), -3px 0 rgba(90, 190, 220, .42) !important;
  animation: glitchHue .26s steps(3) infinite;
}
body.glitching .page img, body.glitching .taskbar img {
  filter: saturate(2.1) contrast(1.5) hue-rotate(24deg);
}
@keyframes glitchHue {
  0%   { filter: none; }
  50%  { filter: invert(1) hue-rotate(90deg); }
  100% { filter: none; }
}
.glitch-overlay {
  position: fixed; inset: -14%; z-index: 96; pointer-events: none;
  mix-blend-mode: screen;
  background:
    repeating-linear-gradient(0deg, rgba(255, 0, 90, .28) 0 3px, rgba(0, 220, 255, .28) 3px 6px, transparent 6px 9px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .12) 0 2px, transparent 2px 5px),
    repeating-linear-gradient(0deg, transparent 0 18px, rgba(255, 255, 255, .5) 18px 25px, transparent 25px 60px);
  animation: glitchShift .07s steps(3) infinite, glitchStrobe .34s steps(2) infinite;
}
@keyframes glitchShift {
  0%   { background-position: 0 0, 0 0, 0 0; }
  100% { background-position: 14px 0, -11px 0, 0 46px; }
}
@keyframes glitchStrobe { 0%, 100% { opacity: .9; } 50% { opacity: .3; } }
.glitch-flash {
  position: fixed; inset: 0; z-index: 97; pointer-events: none;
  background: #fff; opacity: 0;
  animation: flash .14s steps(2) infinite;
}
@keyframes flash { 0%, 49% { opacity: 0; } 50%, 100% { opacity: .34; } }

/* XP 弹窗（彩蛋错误框 / XP.msg 提示框） */
.xp-dialog {
  position: fixed; top: 50%; left: 50%; z-index: 130;
  transform: translate(-50%, -50%);
  width: 300px;
  background: #ece9d8;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 0 0 1px #0831d9, 0 12px 30px rgba(0, 0, 0, .4);
  overflow: hidden;
  font-family: var(--font-ui);
}
.xp-dialog .dlg-body {
  padding: 18px 16px;
  display: flex; align-items: center; gap: 14px;
  font-size: 14px; color: #333;
}
.xp-dialog .dlg-ico { flex: none; font-size: 30px; line-height: 1; image-rendering: pixelated; }
.xp-dialog .dlg-btns {
  display: flex; justify-content: center; gap: 8px;
  padding: 0 16px 16px;
}
.xp-dialog.err-dialog { transform: none; width: 320px; }
.xp-dialog.featured-dialog { width: 360px; z-index: 135; }
.xp-dialog.featured-dialog .dlg-body { font-size: 17px; font-weight: bold; }
.xp-dialog.featured-dialog .dlg-ico { font-size: 34px; }
/* 站主 m00615/m00628：错误弹窗的 OK 按钮照 winXP-master 源码（ErrorBox/index.js）来 ——
   源码是 `width:80px;height:22px;border:1px solid black;box-shadow:inset -1px -1px 1px black`，
   按下 `inset 1px 1px 1px black` + 内容位移 1px，背景透明（露出对话框底色），11px 字。
   站主明确说「其他地方不用改」，所以 .pw-btn / .btn / .gb-send 那些 Luna 蓝按钮都不动。 */
.xp-dialog .dlg-btn {
  font-family: var(--font-ui); font-size: 11px;
  width: 80px; height: 22px; padding: 0; line-height: 20px;   /* 20 = 22 - 上下 1px 边框 */
  border: 1px solid #000; border-radius: 0;
  background: transparent;
  color: #000; text-align: center; cursor: pointer;
  box-shadow: inset -1px -1px 1px #000;
}
.xp-dialog .dlg-btn:active {
  box-shadow: inset 1px 1px 1px #000;
  padding: 1px 0 0 1px;      /* ＝源码里的 transform: translate(1px,1px)，只挪文字不挪边框 */
}

/* XP 蓝屏 */
.bsod {
  position: fixed; inset: 0; z-index: 140;
  background: #0000aa;
  color: #fff;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 15px; line-height: 1.5;
  padding: 40px 48px;
  white-space: pre-wrap;
  overflow: hidden;
}
.bsod .bsod-title { font-size: 20px; margin-bottom: 12px; }
.bsod .bsod-mem { position: absolute; left: 48px; bottom: 40px; right: 48px; }
.bsod .bsod-bar { height: 14px; background: #00007a; border: 1px solid #fff; margin-top: 6px; }
.bsod .bsod-fill { height: 100%; width: 0; background: #00a; }

/* ---------- 响应式 ---------- */
/* 窄屏放弃「一屏不滚」：页面允许纵向滚动，两栏自动堆叠 */
@media (max-width: 900px) {
  body { overflow-y: auto; }
  .page { height: auto; min-height: calc(100vh - 30px); overflow: visible; }
  .blog-cols { grid-template-columns: 1fr; }
  .main-col, .side-col { display: flex; flex-direction: column; gap: 12px; }
  .main-col > .win, .side-col > .win { height: auto; }
  .side-col .profile-top { flex-direction: row; text-align: left; align-items: center; }
  .side-col .avatar-frame { margin-top: -34px; width: 84px; height: 84px; }
  .side-col .cn { font-size: 24px; }
}
@media (max-width: 560px) {
  .duck-img { width: 190px; }
  .profile-banner { height: 140px; }
}
