:root {
  --red: #e23c32;
  --red-dark: #c12c24;
  --bg: #f4f5f7;
  --card: #fff;
  --line: #e6e8ee;
  --text: #222;
  --muted: #667085;
  --link: #1a56c4;
  --hot: #c2410c;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  --ui: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 var(--ui);
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }

.wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.top {
  background: #fff;
  border-bottom: 2px solid var(--red);
}
.top-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 52px;
}
.brand {
  color: var(--red);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}
.brand strong {
  background: var(--red);
  color: #fff;
  padding: 2px 7px 3px;
  border-radius: 4px;
  margin-right: 4px;
  font-size: 20px;
}
.top-meta { color: var(--muted); flex: 1; }
.nav { display: flex; gap: 16px; white-space: nowrap; }
.nav a { color: #444; }

.search-panel {
  margin: 22px 0 16px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 18px 20px 16px;
}
.engine-tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.engine-tabs button {
  border: 0;
  background: #f3f4f8;
  color: #444;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}
.engine-tabs button.on {
  background: var(--red);
  color: #fff;
}
.search-row { display: flex; }
.search-row input {
  flex: 1;
  height: 42px;
  border: 2px solid var(--red);
  border-right: 0;
  padding: 0 12px;
  outline: none;
}
.search-row button {
  width: 92px;
  border: 0;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.search-row button:hover { background: var(--red-dark); }
.suggest {
  border: 1px solid var(--line);
  border-top: 0;
  background: #fff;
}
.suggest a, .suggest button {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #f3f4f8;
  padding: 8px 12px;
  color: #333;
  cursor: pointer;
}
.suggest a:hover, .suggest button:hover { background: #f7f8fb; }
.quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 12px;
  color: var(--muted);
}
.quick a { color: #555; }

.hot-box, .cat-box, .page-box {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.box-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}
.box-hd span { color: var(--muted); font-weight: 400; font-size: 12px; }

.hot-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  padding: 14px;
}
.site {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  color: #333;
  text-decoration: none;
  border-radius: 6px;
}
.site:hover { background: #f6f7fb; text-decoration: none; }
.site i {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #fff;
  font-style: normal;
  font-weight: 800;
  font-size: 13px;
}
.site b { font-weight: 500; font-size: 12px; text-align: center; }
.site .mark {
  color: var(--hot);
  font-size: 10px;
  line-height: 1;
}

.cats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  padding: 10px 12px 14px;
}
.links a {
  width: 25%;
  padding: 6px 8px;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.links a.own { color: var(--hot); font-weight: 700; }
.links a.biz { color: #9a3412; }

.page-box { padding: 22px 24px 32px; }
.page-box h1 { margin: 0 0 8px; font-size: 26px; }
.muted { color: var(--muted); }
.form { display: grid; gap: 12px; max-width: 640px; margin-top: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.form input, .form select, .form textarea, .admin-card input, .admin-card select, .admin-card textarea {
  width: 100%;
  border: 1px solid #d0d5dd;
  padding: 9px 10px;
  background: #fff;
}
.cta {
  display: inline-block;
  border: 0;
  background: var(--red);
  color: #fff;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  width: fit-content;
  text-decoration: none;
}
.cta:hover { background: var(--red-dark); text-decoration: none; color: #fff; }
.ghost {
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px 16px;
  cursor: pointer;
}
.notice {
  padding: 12px 14px;
  background: #ecfdf3;
  color: #067647;
  border: 1px solid #abefc6;
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 40;
}
.modal-card {
  width: min(480px, 100%);
  background: #fff;
  padding: 20px;
}
.modal-card h3 { margin: 0 0 10px; }
.modal-card ol { padding-left: 18px; color: #444; }

.admin-tabs { display: flex; gap: 8px; margin: 18px 0; flex-wrap: wrap; }
.admin-tabs button {
  border: 1px solid var(--line);
  background: #fff;
  padding: 7px 12px;
  cursor: pointer;
}
.admin-tabs button.on { background: var(--red); color: #fff; border-color: var(--red); }
.admin-card {
  border: 1px solid var(--line);
  background: #fff;
  padding: 14px;
  margin-bottom: 12px;
  display: grid;
  gap: 10px;
}
.admin-actions, .check-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.check-row label { display: flex; gap: 6px; align-items: center; color: #333; }
.check-row input { width: auto; }
.meta { color: var(--muted); font-size: 12px; }

.foot {
  color: var(--muted);
  padding: 24px 0 40px;
  text-align: center;
  font-size: 12px;
}
.foot-links { margin-top: 8px; display: flex; justify-content: center; gap: 16px; }

@media (max-width: 900px) {
  .hot-grid { grid-template-columns: repeat(5, 1fr); }
  .cats { grid-template-columns: 1fr; }
  .links a { width: 33.33%; }
  .form-grid { grid-template-columns: 1fr; }
  .nav a:last-child { display: none; }
}
