/* ===== 回音国民小学 ARG · Windows XP「网络时光塔」套皮样式 ===== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Tahoma, "宋体", "SimSun", sans-serif;
  font-size: 12px;
  color: #000;
  /* XP 经典天蓝桌面 */
  background: linear-gradient(180deg, #1f4e9c 0%, #3a6ea5 45%, #6ea3df 100%);
  min-height: 100vh;
}

/* ---------- XP 窗口 ---------- */
.win {
  width: 100%;
  max-width: 100%;
  margin: 0;
  background: #ece9d8;
  border: 1px solid #0831d9;
  border-left: none; border-right: none; border-top: none;
  border-radius: 0;
  box-shadow: 0 0 0 1px #fff inset;
  overflow: hidden;
  min-height: 100vh;
  display: flex; flex-direction: column;
  padding-bottom: 34px;
}
.titlebar {
  height: 28px;
  display: flex;
  align-items: center;
  padding: 0 4px 0 6px;
  background: linear-gradient(180deg, #0058ee 0%, #3f8cf3 50%, #0050e8 100%);
  color: #fff;
  font-weight: bold;
  text-shadow: 1px 1px 1px rgba(0,0,0,.4);
}
.titlebar .ico { font-size: 14px; margin-right: 6px; }
.titlebar .ttl { flex: 1; font-size: 12px; letter-spacing: .5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tb-btns { display: flex; gap: 2px; }
.tb-btns button {
  width: 21px; height: 21px;
  border: 1px solid #fff;
  border-radius: 3px;
  background: linear-gradient(180deg, #4b9bf0, #1f5fd6);
  color: #fff; font-weight: bold; font-size: 12px; line-height: 1;
  cursor: default;
}
.tb-btns button.close { background: linear-gradient(180deg, #f08a7a, #d63a26); }
.tb-btns button:active { filter: brightness(.85); }

/* 菜单栏 */
.menubar {
  display: flex; flex-wrap: wrap; gap: 2px;
  padding: 2px 6px;
  background: #ece9d8;
  border-bottom: 1px solid #aca899;
}
.menubar span {
  padding: 2px 8px; cursor: default; border-radius: 2px;
}
.menubar span:hover { background: #316ac5; color: #fff; }

/* 工具栏（搜索 + 进度） */
.toolbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  padding: 5px 8px;
  background: linear-gradient(180deg, #f6f4ec, #e3dfd0);
  border-bottom: 1px solid #aca899;
}
.toolbar .tb-label { color: #333; white-space: nowrap; }
.tb-input {
  font-family: Tahoma, "SimSun", sans-serif; font-size: 12px;
  padding: 3px 6px; width: 240px; max-width: 100%; min-width: 0;
  border: 1px solid #7f9db9; border-radius: 2px;
  background: #fff;
}
.xp-btn {
  font-family: Tahoma, "SimSun", sans-serif; font-size: 12px;
  padding: 3px 14px;
  border: 1px solid #003c74; border-radius: 3px;
  background: linear-gradient(180deg, #fdfdfd, #d9e4f1 45%, #b9d0ec);
  color: #003c74; cursor: pointer;
}
.xp-btn:active { background: linear-gradient(180deg, #b9d0ec, #fdfdfd); }
.xp-select {
  font-family: Tahoma, "SimSun", sans-serif; font-size: 12px;
  padding: 3px 6px; border: 1px solid #7f9db9; border-radius: 2px;
  background: #fff; color: #003c74; max-width: 100%;
}
.seriesflag {
  margin-left: auto; font-weight: bold; color: #0a4fae;
  background: #fff; border: 1px solid #aca899; border-radius: 2px;
  padding: 2px 8px;
}
.tb-hint { padding: 3px 8px; background: #fffbe6; border-bottom: 1px solid #aca899; font-size: 11px; color: #7a5b00; }

/* 窗口主体：左侧栏 + 内容 */
.winbody { display: flex; align-items: stretch; min-height: 360px; flex: 1; }
.sidebar {
  width: 180px; flex: 0 0 180px;
  background: #fff;
  border-right: 1px solid #aca899;
  padding: 8px 0;
}
.sidebar .sb-head {
  font-size: 11px; color: #555; padding: 2px 10px 6px;
  border-bottom: 1px solid #e3dfd0; margin-bottom: 4px;
}
.sidebar a {
  display: block; padding: 5px 12px; color: #0033cc; text-decoration: none;
  border-left: 3px solid transparent;
}
.sidebar a:hover { background: #eaf1fb; }
.sidebar a.cur { background: #dce8fb; border-left-color: #0a5bd6; font-weight: bold; }
.sidebar a:visited { color: #0033cc; }

.content { flex: 1; padding: 16px 18px; background: #fff; min-width: 0; }
.content h1 { font-size: 18px; margin: 0 0 4px; }
.content .sub { color: #777; font-size: 11px; margin-bottom: 12px; }
.content h2.sec {
  font-size: 14px; margin: 18px 0 8px;
  border-bottom: 1px solid #c9c2ad; padding-bottom: 3px; color: #0a4fae;
}

/* 内容组件 */
ul.news { list-style: none; margin: 0; padding: 0; }
ul.news li { padding: 6px 0; border-bottom: 1px dotted #d8d2c0; font-size: 12px; }
ul.news li .date { color: #888; margin-right: 8px; }
a { color: #0033cc; }
a:visited { color: #551a8b; }
.src {
  background: #0c0c0c; color: #6cff6c;
  font-family: "Courier New", monospace; font-size: 12px; line-height: 1.6;
  padding: 10px 12px; white-space: pre-wrap; word-break: break-all;
  border: 1px solid #000; margin: 8px 0;
}
.note { background: #fff7d6; border: 1px solid #e3cf8a; padding: 8px 12px; font-size: 12px; margin: 8px 0; }
/* 素材影像：XP 相框风格 */
.media { margin: 10px 0 14px; }
.media img, .media video {
  display: block; width: 100%; height: auto; max-width: 100%;
  background: #000; border: 1px solid #aca899; border-radius: 2px;
  box-shadow: inset 0 0 0 1px #fff, 2px 2px 0 rgba(0,0,0,.06);
}
.media video { max-height: 400px; }
.media.portrait img { max-width: 300px; }
.media .cap { display: block; margin-top: 6px; font-size: 11px; color: #777; font-style: italic; }
.locked { color: #777; font-style: italic; }
.flag { color: #b00000; font-weight: bold; }

/* 解码器 / 门禁 */
textarea#decInput, input#gateInput {
  font-family: "Courier New", monospace; font-size: 13px;
  padding: 4px 6px; border: 1px solid #7f9db9; border-radius: 2px; width: 220px; max-width: 100%;
}
#decOut {
  background: #0c0c0c; color: #6cff6c; font-family: "Courier New", monospace;
  font-size: 13px; padding: 8px 10px; margin-top: 6px; min-height: 18px; white-space: pre-wrap;
}
.archive-truth p { margin: 6px 0 14px; font-size: 12px; }
.archive-truth .ttl { font-weight: bold; color: #b00000; }

/* 状态栏 */
.statusbar {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 3px 8px; font-size: 11px; color: #333;
  background: #ece9d8; border-top: 1px solid #aca899;
}
.statusbar .st-box { border: 1px solid #aca899; border-right-color: #fff; border-bottom-color: #fff; padding: 1px 8px; }
.statusbar .st-box:last-child { margin-left: auto; }

/* ---------- XP 底部任务栏 ---------- */
.taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: 30px;
  display: flex; align-items: center; gap: 6px; padding: 0 4px;
  background: linear-gradient(180deg, #2074d8 0%, #0a5bd6 9%, #0a5bd6 40%, #3691f0 92%, #5aa0f0 100%);
  border-top: 1px solid #0a5bd6;
  z-index: 50;
}
.startbtn {
  display: flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 16px 0 8px;
  font-style: italic; font-weight: bold; font-size: 14px; color: #fff;
  background: linear-gradient(180deg, #5bbd4a 0%, #3c8a3c 50%, #2f6f2f 100%);
  border: 1px solid #2f6f2f; border-radius: 4px 10px 10px 4px;
  text-shadow: 1px 1px 1px rgba(0,0,0,.4);
}
.startbtn .orb { font-size: 15px; }
.task-btn {
  height: 23px; min-width: 110px; max-width: 55%; padding: 0 10px; color: #fff;
  background: linear-gradient(180deg, #3f8cf3, #0a5bd6);
  border: 1px solid #0a4aa8; border-radius: 3px; font-size: 11px;
  display: flex; align-items: center; gap: 5px; overflow: hidden; white-space: nowrap;
}
.tray {
  margin-left: auto; display: flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 8px; color: #fff; font-size: 11px;
  background: linear-gradient(180deg, #1a8ad6, #0a5bd6);
  border-left: 1px solid #0a4aa8; border-top: 1px solid #7fb6ee;
}

@media (max-width: 640px) {
  .win { margin: 0; border-radius: 0; min-height: 100vh; padding-bottom: 34px; }
  .titlebar { height: 32px; }
  .titlebar .ttl { font-size: 11px; letter-spacing: 0; }
  .tb-btns button { width: 26px; height: 26px; }

  .toolbar { gap: 5px; }
  .tb-input { width: 100%; flex: 1 1 100%; }
  .seriesflag { margin-left: 0; order: 3; }
  .xp-btn { padding: 5px 14px; }

  .winbody { flex-direction: column; min-height: 0; }
  .sidebar {
    width: auto; flex: none;
    border-right: none; border-bottom: 1px solid #aca899;
    display: flex; flex-wrap: wrap; gap: 4px; padding: 8px;
  }
  .sidebar .sb-head { width: 100%; border-bottom: none; margin-bottom: 0; }
  .sidebar a {
    display: inline-block; border-left: none;
    border: 1px solid #aca899; border-radius: 3px;
    background: #f3f1e7; font-size: 12px; padding: 5px 10px;
  }
  .sidebar a.cur { background: #dce8fb; border-color: #0a5bd6; }

  .content { padding: 12px 12px; }
  .content h1 { font-size: 16px; }
  .content h2.sec { font-size: 13px; }
  .media.portrait img { max-width: 100%; }
  .media video { max-height: 220px; }

  .statusbar { gap: 4px; }
  .statusbar .st-box:last-child { margin-left: 0; }

  .taskbar { gap: 4px; padding: 0 3px; }
  .startbtn { padding: 0 9px 0 6px; font-size: 13px; height: 26px; }
  .task-btn { min-width: 0; max-width: 50%; font-size: 10px; }

  textarea#decInput, input#gateInput, .xp-select { width: 100%; max-width: 100%; }

  /* 隐藏页内联代码块在窄屏良好换行 */
  .src { font-size: 11px; line-height: 1.5; }
}

@media (max-width: 360px) {
  .titlebar .ttl { font-size: 10px; }
  .content h1 { font-size: 15px; }
  .task-btn { display: none; }
}

