/* ==========================================================================
   idc · 站点错误页样式（404.php / NotFound.php）
   --------------------------------------------------------------------------
   ★ 为什么外置成独立文件：
     项目规范要求 PHP / CSS / JS 三者分离，不得在模板里写内联 <style>。
   ★ 这是零依赖静态页的样式表，不引用任何其他主题资源，
     也不依赖 CSS 变量文件（变量就定义在本文件的 :root 里）。
   ★ 配色与官网 idc 主题一致：主绿 #00B42A，正文链接用 #00801E 保证
     对白底 5.1:1 对比度，主按钮沿用官网的黑色胶囊（白字对比 19:1）。
   ========================================================================== */

:root {
  --brand: #00B42A;
  --brand-deep: #00801E;
  --brand-code: #009A24;
  --btn: #0A0A0A;
  --btn-hover: #242424;
  --ink: #1a1a1a;
  --ink-2: #666;
  --line: #e5e5e5;
  --bg: #f7fafc;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  /* 垂直居中不用 align-items:center —— 内容比视口高时（小屏、横屏、
     浏览器放大字号）flex 居中会把内容顶部推到可滚动区域之外，用户
     滚不回去。改成 align-items:flex-start + .wrap{margin:auto}：
     空间富余时照样居中，内容超高时 auto margin 归零，顶部完整可见。 */
  align-items: flex-start;
  justify-content: center;
  padding: 48px 20px;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.wrap {
  width: 100%;
  max-width: 560px;
  margin: auto;          /* 配合 body 的 flex-start 实现安全居中 */
  text-align: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 34px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.brand i {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--brand);
  display: grid;
  place-items: center;
  color: #fff;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}

.code {
  font-size: 84px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -2px;
  color: var(--brand-code);
  font-variant-numeric: tabular-nums;
}

h1 {
  font-size: 22px;
  font-weight: 600;
  margin: 18px 0 10px;
}

p {
  color: var(--ink-2);
  margin: 0 auto 26px;
  max-width: 420px;
}

.acts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 22px;
  border-radius: 8px;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: .18s;
}

.btn--primary { background: var(--btn); color: #fff; }
.btn--primary:hover { background: var(--btn-hover); }

.btn--outline { background: #fff; border-color: var(--line); color: var(--ink); }
.btn--outline:hover { border-color: #c9c9c9; }

.search {
  margin: 30px auto 0;
  display: flex;
  gap: 8px;
  max-width: 380px;
}

.search input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
}

.search input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 180, 42, .22);
}

.search button {
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: var(--btn);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

.search button:hover { background: var(--btn-hover); }

.foot {
  margin-top: 38px;
  font-size: 12.5px;
  color: #727272;
}

.foot a {
  color: var(--brand-deep);
  text-decoration: none;
}

.foot a:hover { text-decoration: underline; }

/* 窄屏：按钮铺满一行，搜索框纵向排列 */
@media (max-width: 480px) {
  body { padding: 36px 16px; }
  .code { font-size: 66px; }
  h1 { font-size: 20px; }
  .acts { flex-direction: column; }
  .btn { justify-content: center; width: 100%; }
  .search { flex-direction: column; }
  .search button { width: 100%; }
}
