* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background: #f7f8f9;
  color: #1b1d21;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
button { font-family: inherit; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
}
.brand { font-size: 17px; font-weight: 700; color: #1b1d21; text-decoration: none; }
.nav { display: flex; align-items: center; gap: 14px; }
.nav a { color: #55595f; text-decoration: none; font-size: 14px; }
.nav a:hover { color: #0e9f6e; }
.btn {
  border: 1px solid #d5d8dc;
  background: #fff;
  color: #1b1d21;
  border-radius: 9px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
}
.btn:hover { border-color: #0e9f6e; color: #0e9f6e; }
.btn.primary { background: #0e9f6e; border-color: #0e9f6e; color: #fff; }
.btn.primary:hover { filter: brightness(1.06); color: #fff; }

.hero { flex: 1; text-align: center; padding: 8vh 20px 40px; }
.logo { font-size: 52px; margin: 0 0 6px; letter-spacing: 0.04em; font-weight: 800; }
.slogan { color: #6d7078; margin: 0 0 34px; }

.search-wrap { display: flex; justify-content: center; }
#search {
  width: min(600px, 100%);
  padding: 13px 20px;
  font-size: 15px;
  border: 1px solid #d9dce0;
  border-radius: 12px;
  outline: none;
  background: #fff;
  box-shadow: 0 4px 18px rgba(20, 24, 30, 0.05);
  transition: border-color 0.15s, box-shadow 0.15s;
}
#search:focus { border-color: #0e9f6e; box-shadow: 0 0 0 3px rgba(14,159,110,0.14); }
#search::placeholder { color: #9aa0a8; }

.engine-row { margin: 14px 0 60px; display: flex; gap: 10px; justify-content: center; }
.engine-btn {
  border: 1px solid #d5d8dc;
  background: #fff;
  color: #4d5256;
  border-radius: 9px;
  padding: 8px 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.engine-btn:hover { border-color: #0e9f6e; color: #0e9f6e; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  max-width: 980px;
  margin: 0 auto;
}
.feature {
  background: #fff;
  border: 1px solid #e3e5e9;
  border-radius: 14px;
  padding: 22px 20px;
  text-align: left;
}
.f-ico { font-size: 26px; margin-bottom: 8px; }
.feature h3 { margin: 0 0 6px; font-size: 15.5px; }
.feature p { margin: 0; color: #6d7078; font-size: 13.5px; }

.foot { text-align: center; color: #9aa0a8; font-size: 12.5px; padding: 20px; }

/* 登录弹窗 */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.4);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal {
  width: min(400px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.16);
}
.modal h3 { margin: 0 0 16px; font-size: 17px; }
.chan-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.chan-tab {
  flex: 1; border: 1px solid #d5d8dc; background: #fff; color: #55595f;
  border-radius: 8px; padding: 8px 0; font-size: 13.5px; cursor: pointer;
}
.chan-tab.active { background: #0e9f6e; border-color: #0e9f6e; color: #fff; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; color: #6d7078; margin-bottom: 5px; }
.field input {
  width: 100%; padding: 10px 12px; font-size: 14.5px;
  border: 1px solid #d5d8dc; border-radius: 9px; outline: none;
}
.field input:focus { border-color: #0e9f6e; }
.field-row { display: flex; gap: 8px; }
.field-row input { flex: 1; }
.field-row button {
  border: 1px solid #d5d8dc; background: #fff; color: #0e9f6e;
  border-radius: 9px; padding: 0 14px; font-size: 13.5px; cursor: pointer;
  white-space: nowrap;
}
.field-row button:disabled { color: #9aa0a8; cursor: default; }
.dev-tip {
  background: #fff7e6; border: 1px solid #ffe1a6; color: #8a6116;
  border-radius: 8px; padding: 8px 12px; font-size: 13px; margin-bottom: 12px;
}
.err { color: #d43d51; font-size: 13px; min-height: 18px; margin: 2px 0 8px; }
.modal-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.modal .btn.primary { padding: 10px 22px; }

.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%);
  z-index: 120; background: #1b1d21; color: #fff; font-size: 14px;
  border-radius: 10px; padding: 10px 18px; max-width: min(520px, 90vw);
}

@media (max-width: 640px) {
  .logo { font-size: 38px; }
  .slogan { font-size: 13.5px; }
  .hero { padding-top: 5vh; }
}

/* ================= 演示书签区（与应用页同版式） ================= */
.demo-sec { max-width: 1010px; margin: 54px auto 0; padding: 0 20px; text-align: center; }
.demo-title { font-size: 21px; margin: 0 0 6px; }
.demo-sub { color: #6d7078; font-size: 13.5px; margin: 0 0 16px; }
.demo-sub a { color: #0e9f6e; }

.pills { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 14px; justify-content: center; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: none; border: 0; color: #4d5256;
  border-radius: 7px; padding: 5px 9px;
  font-size: 14px; cursor: pointer; text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.pill:hover { background: #eef0f2; color: #0e9f6e; }
.pill .pname { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cats-box {
  background: #fff; border: 1px solid #e3e5e9; border-radius: 10px;
  box-shadow: 0 4px 16px rgba(20, 24, 30, 0.08);
  padding: 6px 8px; text-align: left;
}
.cat { display: flex; gap: 12px; padding: 13px 10px; }
.cat + .cat { border-top: 1px solid #e3e5e9; }
.cat-head { flex: none; width: 100px; }
.cat-head h2 {
  margin: 0; font-size: 15px; font-weight: 700; color: #4d5256;
  line-height: 34px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.grid { flex: 1; min-width: 0; }
.card {
  display: inline-flex; align-items: center; gap: 7px;
  width: 138px; height: 34px; vertical-align: top;
  color: #4d5256; font-size: 15px; line-height: 34px;
  cursor: pointer; text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color 0.12s;
}
.card:hover { color: #0e9f6e; }

.fav {
  flex: none; width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.fav img { width: 16px; height: 16px; display: block; }
.fav.letter {
  background: hsl(var(--h, 200) 42% 90%);
  color: #444; border-radius: 3px;
  font-size: 11px; font-weight: 650; line-height: 16px;
}

@media (max-width: 720px) {
  .demo-sec { padding: 0 10px; }
  .cat { flex-direction: column; gap: 2px; padding: 10px 8px; }
  .cat-head { width: auto; }
  .card { width: 32%; }
}
