/* ============================================================
   网址导航 · 视觉系统 v6
   风格：深灰 + 纯白 + 深蓝（冷静、专业、有层次）
   所有旧类名保持不变，仅重设视觉与布局节奏
   ============================================================ */

:root {
  /* 主色：深蓝（按钮 / 强调） */
  --primary: #1E3A6E;
  --primary-dark: #12284C;
  --primary-light: #E9F0FA;   /* 浅蓝底 */
  --primary-soft: #F3F7FD;    /* 极浅冷底 */

  /* 品牌强调色：亮蓝 / 深蓝 / 浅蓝 */
  --accent: #2F6BD8;
  --accent-deep: #1B4FA8;
  --accent-light: #9CC0F5;

  /* 中性 */
  --bg: #F5F7FA;
  --card: #FFFFFF;
  --text: #1B2431;
  --text-2: #6B7787;
  --border: #E1E7EF;
  --border-strong: #C9D4E2;

  --radius: 14px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(24, 34, 48, .04), 0 6px 16px rgba(24, 34, 48, .045);
  --shadow: 0 2px 6px rgba(24, 34, 48, .05), 0 16px 36px rgba(24, 34, 48, .08);
  --shadow-lg: 0 28px 70px rgba(12, 28, 60, .22);
}

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

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  font-family: "Inter", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(1100px 520px at 50% -12%, rgba(47, 107, 216, .13), transparent 62%),
    radial-gradient(700px 380px at 96% 4%, rgba(27, 36, 49, .05), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 14px;
  line-height: 1.65;
}

a { color: inherit; text-decoration: none; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; width: 100%; }

/* ===== 顶栏 ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(100deg, #1B2431 0%, #1E3A6E 58%, #22477E 100%);
  border-bottom: 1px solid rgba(156, 192, 245, .22);
  box-shadow: 0 4px 20px rgba(12, 28, 60, .16);
}
.topbar-inner { display: flex; align-items: center; gap: 26px; height: 66px; }

.logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 16.5px; font-weight: 600; letter-spacing: .02em;
  color: #F4F8FF; white-space: nowrap;
}
.logo-icon {
  width: 32px; height: 32px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #fff;
  background: linear-gradient(150deg, #2F6BD8 0%, #1B4FA8 100%);
  border: 1px solid rgba(255, 255, 255, .3);
  box-shadow: 0 4px 12px rgba(6, 18, 42, .32);
}

.menu { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.menu::-webkit-scrollbar { display: none; }
.menu a, .menu span {
  position: relative;
  padding: 8px 14px; border-radius: 8px;
  color: rgba(233, 241, 252, .74); font-size: 13.5px; white-space: nowrap;
  transition: color .18s, background .18s;
}
.menu a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px;
  height: 1px; background: #9CC0F5;
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.menu a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.menu a:hover::after { transform: scaleX(1); }
.menu span { cursor: default; opacity: .42; }

.user-area { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.user-area .username {
  font-size: 13.5px; color: rgba(233, 241, 252, .88); max-width: 130px;
  overflow: hidden; text-overflow: ellipsis;
}
.admin-badge {
  background: rgba(156, 192, 245, .14);
  color: #D6E6FF; border: 1px solid rgba(156, 192, 245, .4);
  font-size: 11px; padding: 1px 8px; border-radius: 999px; font-weight: 600;
}
.link-btn {
  background: none; border: none; color: rgba(233, 241, 252, .8); cursor: pointer;
  font-size: 13.5px; padding: 7px 10px; border-radius: 8px;
  transition: color .18s, background .18s;
  font-family: inherit;
}
.link-btn:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.link-btn.home-btn { border: 1px solid rgba(255, 255, 255, .24); color: rgba(233, 241, 252, .86); background: rgba(255, 255, 255, .06); }
.link-btn.home-btn:hover { border-color: #9CC0F5; color: #fff; background: rgba(255, 255, 255, .14); }

/* ===== 首屏搜索区 ===== */
.search-section {
  position: relative;
  padding: 78px 0 66px;
  text-align: center;
  overflow: hidden;
}
.search-section::before {
  content: "";
  position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  width: 760px; max-width: 92vw; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(47, 107, 216, .5), transparent);
}
.search-section .container { position: relative; z-index: 1; }

.hero-kicker {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 11px; letter-spacing: .34em; text-transform: uppercase;
  color: var(--accent-deep); margin-bottom: 20px;
}
.hero-kicker::before, .hero-kicker::after {
  content: ""; width: 34px; height: 1px; background: rgba(47, 107, 216, .55);
}

.hero-title {
  font-size: 42px; font-weight: 300; letter-spacing: .1em;
  color: var(--text); line-height: 1.3;
}
.hero-sub {
  margin-top: 14px; font-size: 14px; color: var(--text-2); letter-spacing: .18em;
}

.search-box { max-width: 660px; margin: 36px auto 0; }
.engine-tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.engine-tab {
  padding: 7px 17px; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(255, 255, 255, .7);
  color: var(--text-2); cursor: pointer; font-size: 13px;
  transition: all .2s ease; font-family: inherit;
}
.engine-tab:hover { color: var(--text); border-color: var(--border-strong); background: #fff; }
.engine-tab.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
  font-weight: 500; box-shadow: 0 8px 20px rgba(20, 22, 26, .18);
}

.search-input-row {
  display: flex; align-items: center;
  background: #fff; border: 1px solid var(--border-strong);
  border-radius: 999px; padding: 6px 6px 6px 24px;
  box-shadow: 0 10px 30px rgba(24, 34, 48, .07), 0 1px 2px rgba(24, 34, 48, .04);
  transition: border-color .2s, box-shadow .2s;
}
.search-input-row:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(47, 107, 216, .12), 0 12px 32px rgba(24, 34, 48, .09);
}
.search-input-row input {
  flex: 1; border: none; outline: none; font-size: 15px;
  color: var(--text); background: transparent; min-width: 0; font-family: inherit;
}
.search-input-row input::placeholder { color: #9BA7B7; }
.search-input-row button {
  border: none; color: #fff; font-size: 14px; letter-spacing: .18em;
  padding: 12px 30px; border-radius: 999px; cursor: pointer;
  background: linear-gradient(150deg, #1E3A6E, #12284C);
  transition: transform .2s, box-shadow .2s, background .2s;
  font-family: inherit;
}
.search-input-row button:hover {
  background: linear-gradient(150deg, #1A222E, #05070A);
  box-shadow: 0 8px 22px rgba(12, 28, 60, .3);
}

/* 搜索历史 */
.search-wrap { position: relative; max-width: 660px; margin: 0 auto; }
.search-history {
  position: absolute; top: calc(100% + 10px); left: 0; right: 0; z-index: 30;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow); padding: 8px; display: none; text-align: left;
  animation: pop .18s ease;
}
.search-history.show { display: block; }
.sh-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-2); padding: 6px 12px 10px;
}
.sh-head button {
  border: none; background: none; color: var(--accent-deep); cursor: pointer;
  font-size: 12px; letter-spacing: 0; font-family: inherit;
}
.sh-item {
  padding: 9px 12px; font-size: 13.5px; color: var(--text);
  border-radius: 8px; cursor: pointer; display: flex; gap: 10px; align-items: center;
  transition: background .15s;
}
.sh-item::before { content: "↗"; font-size: 11px; color: var(--accent); }
.sh-item:hover { background: var(--primary-soft); }

/* ===== 区块 ===== */
.section { padding: 44px 20px 6px; }
/* 只有「我的收藏」吸收多余高度，避免区块之间被拉出大片空白 */
#my { flex: 1 0 auto; }
.section:not(#my) { flex: 0 0 auto; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 20px;
  padding-bottom: 14px; border-bottom: 1px solid var(--border);
}
.section-head .sh-left { display: flex; flex-direction: column; gap: 5px; }
.kicker {
  font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--accent-deep); font-weight: 600;
}
.section-head h2 { font-size: 19px; font-weight: 600; letter-spacing: .04em; }

.nav-row {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  gap: 14px; margin-bottom: 14px;
}
.site-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 13px 15px;
  box-shadow: var(--shadow-sm);
  transition: transform .22s cubic-bezier(.2, .7, .3, 1), box-shadow .22s, border-color .22s;
  overflow: hidden; position: relative;
}
.site-card::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(180deg, var(--accent), transparent);
  opacity: 0; transition: opacity .22s;
}
.site-card:hover {
  transform: translateY(-2px);
  border-color: rgba(47, 107, 216, .45);
  box-shadow: var(--shadow);
}
.site-card:hover::after { opacity: 1; }
.site-ico {
  width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 15px; color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
}
/* 真实 favicon 用浅底托板，避免透明/白色图标在白卡上消失 */
img.site-ico {
  background: #F1F5FA;
  border: 1px solid var(--border);
  padding: 4px;
  object-fit: contain !important;
  box-shadow: none;
}
/* 字母打底 + 真实图标覆盖：图标加载失败时自动回退字母徽标 */
.ico-wrap { position: relative; overflow: hidden; }
.ico-letter { font-weight: 600; font-size: 15px; color: #fff; line-height: 1; }
.ico-wrap.has-icon .ico-letter { visibility: hidden; }
.ico-wrap img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; background: #F1F5FA; padding: 4px;
  border-radius: inherit; box-shadow: none;
}
.site-card .info { min-width: 0; }
.site-card .name {
  font-size: 13.5px; font-weight: 600; letter-spacing: .01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.site-card .desc {
  font-size: 11.5px; color: var(--text-2); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-ops { margin-left: auto; display: none; gap: 4px; }
.site-card:hover .card-ops { display: flex; }
.card-ops button {
  border: 1px solid var(--border); background: #fff; border-radius: 7px;
  padding: 4px 8px; cursor: pointer; font-size: 11.5px; color: var(--text-2);
  transition: all .15s;
}
.card-ops button:hover { color: var(--accent-deep); border-color: var(--accent); background: rgba(47, 107, 216, .06); }

/* 分类 */
.cat-group { margin-bottom: 30px; }
.cat-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cat-head h3 {
  font-size: 14.5px; font-weight: 600; letter-spacing: .02em;
  display: flex; align-items: center; gap: 9px;
}
.cat-head h3::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px rgba(47, 107, 216, .16);
}
.cat-head .cat-ops { display: flex; gap: 6px; opacity: .88; transition: opacity .18s; }
.cat-head:hover .cat-ops { opacity: 1; }
.cat-head .cat-ops button {
  border: 1px solid var(--border); background: #fff; border-radius: 7px;
  padding: 4px 11px; font-size: 12px; cursor: pointer; color: var(--text-2);
  transition: all .15s; font-family: inherit;
}
.cat-count {
  font-size: 10.5px; font-weight: 600; color: var(--accent-deep);
  background: rgba(47, 107, 216, .1); border: 1px solid rgba(47, 107, 216, .24);
  border-radius: 999px; padding: 0 8px; line-height: 18px; letter-spacing: 0;
}
.cat-head .cat-ops button:hover { color: var(--accent-deep); border-color: var(--accent); background: rgba(47, 107, 216, .06); }

.empty-tip {
  text-align: center; color: var(--text-2); padding: 52px 20px;
  font-size: 13.5px; line-height: 2.1;
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  background: rgba(255, 255, 255, .55);
}

/* ===== 页脚 ===== */
.footer {
  background: linear-gradient(180deg, #1B2431 0%, #12284C 100%);
  color: #B9C6D8; padding: 36px 0 30px; margin-top: 56px;
  font-size: 12.5px; border-top: 1px solid rgba(47, 107, 216, .28);
  position: relative;
}
.footer::before {
  content: ""; position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  width: 240px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(156, 192, 245, .8), transparent);
}
.friend-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 2px; margin-bottom: 18px; }
.fl-label { color: var(--accent-light); letter-spacing: .12em; font-size: 11px; text-transform: uppercase; margin-right: 6px; }
.friend-links a {
  color: #B9C6D8; padding: 2px 10px; border-radius: 6px;
  transition: color .15s, background .15s;
}
.friend-links a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.footer-info { border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 18px; text-align: center; line-height: 2.1; }
.footer-terms { font-size: 11.5px; color: #A3B3C8; }
.footer-terms a { color: #CFE2FA; text-decoration: none; border-bottom: 1px solid rgba(207, 226, 250, .4); }
.footer-terms a:hover { color: #fff; border-bottom-color: #fff; }
.footer-terms .sep { opacity: .35; margin: 0 8px; }
.footer-info a { color: #B9C6D8; }
.footer-info a:hover { color: #fff; }

/* ===== 弹窗 ===== */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(12, 14, 17, .55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  padding: 16px; overflow-y: auto;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px; width: 100%; max-width: 404px;
  box-shadow: var(--shadow-lg); animation: pop .2s cubic-bezier(.2, .7, .3, 1);
  max-height: calc(100vh - 32px); overflow-y: auto;
}
.modal-sm { max-width: 330px; }
.modal-lg { max-width: 580px; }
@keyframes pop { from { transform: translateY(8px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-head h3 { font-size: 17px; font-weight: 600; letter-spacing: .04em; }
.close-btn {
  border: none; background: none; font-size: 22px; line-height: 1;
  color: var(--text-2); cursor: pointer; width: 30px; height: 30px; border-radius: 8px;
  transition: all .15s;
}
.close-btn:hover { background: rgba(27, 36, 49, .06); color: var(--text); }

.auth-tabs { display: flex; gap: 6px; margin-bottom: 18px; padding: 4px; background: #EEF2F8; border-radius: 10px; }
.auth-tab {
  flex: 1; padding: 8px; border: none; background: transparent;
  border-radius: 7px; cursor: pointer; font-size: 13.5px; color: var(--text-2);
  transition: all .18s; font-family: inherit;
}
.auth-tab.active { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 2px 6px rgba(24, 34, 48, .08); }

.modal input, .modal select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border);
  border-radius: 9px; font-size: 13.5px; margin-bottom: 12px;
  outline: none; transition: all .18s; background: #F8FAFD; font-family: inherit;
  color: var(--text);
}
.modal input:focus, .modal select:focus {
  border-color: var(--accent); background: #fff;
  box-shadow: 0 0 0 3px rgba(47, 107, 216, .13);
}
.modal input::placeholder { color: #9BA7B7; }
.form-msg { font-size: 12.5px; color: #C0453C; min-height: 18px; margin-bottom: 8px; line-height: 1.6; }
.form-msg.ok { color: #2F7A5B; }

.primary-btn {
  width: 100%; padding: 13px; border: none; border-radius: 10px;
  background: linear-gradient(150deg, #1E3A6E, #12284C); color: #fff;
  font-size: 14px; letter-spacing: .16em; cursor: pointer;
  transition: transform .18s, box-shadow .18s; font-family: inherit;
}
.primary-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(12, 28, 60, .28); }
.primary-btn:active { transform: none; }
.auth-tip { text-align: center; font-size: 11.5px; color: var(--text-2); margin-top: 14px; line-height: 1.9; }
.auth-tip a { color: var(--accent-deep); border-bottom: 1px solid rgba(27, 79, 168, .35); }

/* 注册资料 */
.reg-row { display: flex; gap: 8px; }
.reg-row input { flex: 1; min-width: 0; }
.reg-sec {
  background: #F3F7FD; border: 1px solid #DCE6F3;
  border-radius: 11px; padding: 12px 14px; margin-bottom: 12px;
}
.reg-sec-title {
  font-size: 11.5px; font-weight: 600; color: var(--accent-deep);
  margin-bottom: 10px; line-height: 1.7; letter-spacing: .04em;
  position: relative; padding-left: 11px;
}
.reg-sec-title::before,
.terms-head::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 2px; background: var(--accent); border-radius: 2px;
}
.reg-sec input { background: #fff; margin-bottom: 8px; }
.reg-sec input:last-of-type { margin-bottom: 0; }

/* 免责声明 */
.terms-box {
  border: 1px solid #DCE6F3; background: #F3F7FD;
  border-radius: 11px; padding: 12px 14px; margin-bottom: 12px;
}
.terms-head {
  font-size: 12.5px; font-weight: 600; color: var(--accent-deep);
  margin-bottom: 8px; letter-spacing: .03em;
  position: relative; padding-left: 11px;
}
.terms-scroll {
  max-height: 122px; overflow-y: auto; font-size: 11.5px; line-height: 1.9;
  color: #5A687A; padding-right: 6px;
}
.terms-scroll p { margin-bottom: 8px; }
.terms-scroll b { color: var(--accent-deep); }
.terms-scroll a { color: var(--accent-deep); text-decoration: underline; }
.terms-check {
  display: flex; gap: 9px; align-items: flex-start; font-size: 11.5px;
  line-height: 1.75; color: var(--text); margin-top: 10px;
  border-top: 1px dashed #DBE4F0; padding-top: 10px; cursor: pointer;
}
.terms-check input {
  width: 16px !important; height: 16px; margin: 2px 0 0 !important;
  flex: 0 0 16px; accent-color: var(--accent-deep);
}
.terms-check span { flex: 1; }
.terms-check a { color: var(--accent-deep); text-decoration: underline; }

/* ===== 小按钮组 ===== */
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mini-btn {
  border: 1px solid var(--border); background: #fff; color: var(--text-2);
  border-radius: 9px; padding: 7px 13px; font-size: 12.5px; cursor: pointer;
  transition: all .18s; font-family: inherit;
}
.mini-btn:hover { color: var(--accent-deep); border-color: var(--accent); background: rgba(47, 107, 216, .06); }
.mini-btn.primary {
  background: linear-gradient(150deg, #1E3A6E, #12284C);
  border: 1px solid #12284C; color: #fff; font-weight: 500;
}
.mini-btn.primary:hover { background: #0C1F40; border-color: #0C1F40; }

/* ===== 列表视图 ===== */
.row-list { display: flex; flex-direction: column; gap: 7px; }
.row-list .site-card { padding: 9px 15px; }
.row-list .site-card .site-ico { width: 27px; height: 27px; font-size: 12.5px; border-radius: 8px; }

/* ===== 设为首页向导 ===== */
.home-tip {
  font-size: 12.5px; color: #5A687A; background: #F3F7FD;
  border-left: 2px solid var(--accent); border-radius: 9px;
  padding: 12px 15px; margin-bottom: 16px; line-height: 1.85;
}
.home-url-row { display: flex; gap: 8px; margin-bottom: 16px; }
.home-url-row input {
  flex: 1; min-width: 0; background: #fff; border: 1px dashed var(--accent);
  border-radius: 9px; padding: 11px 13px; font-size: 12.5px;
  color: var(--accent-deep); font-weight: 600;
}
.home-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.home-tab {
  border: 1px solid var(--border); background: #fff; color: var(--text-2);
  border-radius: 999px; padding: 6px 14px; font-size: 12.5px;
  cursor: pointer; transition: all .18s; font-family: inherit;
}
.home-tab:hover { color: var(--accent-deep); border-color: var(--accent); }
.home-tab.active {
  background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 500;
}
.home-steps { margin: 0; padding-left: 20px; font-size: 13.5px; line-height: 2.2; color: var(--text); }
.home-steps li::marker { color: var(--accent); font-weight: 700; }

/* ===== 自动识别标题 ===== */
.auto-tip { font-size: 11.5px; color: var(--text-2); margin: -6px 0 10px; }
#bmName.auto-filled { border-color: #2F8A6B; box-shadow: 0 0 0 3px rgba(47, 138, 107, .12); }

/* ===== 找回密码 ===== */
.reset-steps input { width: 100%; }
.reset-tip { font-size: 11.5px; color: var(--text-2); margin-bottom: 12px; line-height: 1.8; }
.reset-q {
  font-size: 13px; font-weight: 600; color: var(--accent-deep);
  padding: 11px 14px; background: #F3F7FD; border: 1px solid #DCE6F3;
  border-radius: 9px; margin-bottom: 12px;
}

/* ===== 导入弹窗 ===== */
.import-tip {
  font-size: 12.5px; color: #5A687A; background: #F3F7FD;
  border-radius: 9px; padding: 12px 15px; margin-bottom: 14px; line-height: 1.9;
}
#importFile {
  border: 1px dashed var(--border-strong); background: #F8FAFD;
  padding: 20px 12px; text-align: center; cursor: pointer; border-radius: 9px;
}

/* ===== toast ===== */
#toast {
  position: fixed; top: 82px; left: 50%; transform: translateX(-50%);
  background: rgba(20, 22, 26, .95); color: #fff;
  padding: 11px 22px; border-radius: 10px; font-size: 13px;
  z-index: 200; display: none; max-width: 80vw;
  box-shadow: 0 14px 36px rgba(12, 28, 60, .28);
  border: 1px solid rgba(255, 255, 255, .09);
}

/* ===== 轮播 ===== */
.ad-section { flex: 0 0 auto; padding: 10px 20px 44px; }
.ad-carousel {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: #12284C; border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.ad-slides { position: relative; width: 100%; height: 100%; }
.ad-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease; }
.ad-slide.show { opacity: 1; }
.ad-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .22);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  background: rgba(16, 18, 22, .42); color: #fff; font-size: 20px; line-height: 1;
  transition: all .2s; backdrop-filter: blur(6px);
}
.ad-arrow:hover { background: rgba(47, 107, 216, .85); border-color: transparent; }
.ad-prev { left: 12px; }
.ad-next { right: 12px; }
.ad-dots { position: absolute; bottom: 14px; left: 0; right: 0; z-index: 5; display: flex; justify-content: center; gap: 8px; }
.ad-dot {
  width: 8px; height: 8px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 255, 255, .45); padding: 0; transition: all .25s;
}
.ad-dot.active { background: var(--accent-light); width: 22px; border-radius: 5px; }

/* ===== 暗色模式 ===== */
[data-theme="dark"] {
  --bg: #12284C;
  --card: #161E2A;
  --text: #E9EEF5;
  --text-2: #929EAF;
  --border: #1E3A6E;
  --border-strong: #354254;
  --primary: #E9EEF5;
  --primary-dark: #fff;
  --primary-light: #16294A;
  --primary-soft: #1A222E;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 20px rgba(0, 0, 0, .28);
  --shadow: 0 2px 8px rgba(0, 0, 0, .35), 0 18px 40px rgba(0, 0, 0, .4);
}
[data-theme="dark"] body {
  background:
    radial-gradient(1000px 480px at 50% -12%, rgba(47, 107, 216, .1), transparent 62%),
    var(--bg);
}
[data-theme="dark"] .topbar { background: linear-gradient(100deg, #101823 0%, #16294A 100%); border-bottom-color: rgba(156, 192, 245, .16); }
[data-theme="dark"] .site-card { background: var(--card); border-color: var(--border); }
[data-theme="dark"] img.site-ico { background: #1B2635; border-color: #2D3848; }
[data-theme="dark"] .ico-wrap img { background: #1B2635; }
[data-theme="dark"] .search-input-row { background: #161E2A; border-color: var(--border-strong); }
[data-theme="dark"] .search-input-row input { color: var(--text); }
[data-theme="dark"] .search-history { background: #161E2A; border-color: var(--border); }
[data-theme="dark"] .sh-item:hover { background: #1D2735; }
[data-theme="dark"] .engine-tab { background: rgba(20, 23, 28, .8); border-color: var(--border); }
[data-theme="dark"] .engine-tab.active { background: #E9EEF5; color: #12284C; border-color: #E9EEF5; }
[data-theme="dark"] .modal { background: #161E2A; border-color: var(--border); }
[data-theme="dark"] .modal input, [data-theme="dark"] .modal select { background: #101823; color: var(--text); border-color: var(--border); }
[data-theme="dark"] .modal input:focus, [data-theme="dark"] .modal select:focus { background: #101823; }
[data-theme="dark"] .auth-tabs { background: #101823; }
[data-theme="dark"] .auth-tab.active { background: #1E3A6E; color: var(--text); }
[data-theme="dark"] .mini-btn { background: #1A222E; color: var(--text-2); border-color: var(--border); }
[data-theme="dark"] .mini-btn.primary { background: #E9EEF5; color: #12284C; border-color: #E9EEF5; }
[data-theme="dark"] .cat-head .cat-ops button,
[data-theme="dark"] .card-ops button { background: #1B2532; border-color: var(--border); color: var(--text-2); }
[data-theme="dark"] .reg-sec, [data-theme="dark"] .terms-box, [data-theme="dark"] .reset-q,
[data-theme="dark"] .home-tip, [data-theme="dark"] .import-tip {
  background: #1A222E; border-color: #2A3646;
}
[data-theme="dark"] .reg-sec input { background: #101823; }
[data-theme="dark"] .terms-scroll { color: #9BA6B5; }
[data-theme="dark"] .terms-scroll b { color: var(--accent-light); }
[data-theme="dark"] .terms-check { border-top-color: #2A3646; }
[data-theme="dark"] .home-url-row input { background: #161E2A; }
[data-theme="dark"] .home-tab { background: #1A222E; border-color: var(--border); }
[data-theme="dark"] .home-tab.active { background: #E9EEF5; color: #12284C; border-color: #E9EEF5; }
[data-theme="dark"] .footer { background: linear-gradient(180deg, #0E141D, #080D14); }
[data-theme="dark"] #importFile { background: #101823; }
[data-theme="dark"] .empty-tip { background: rgba(20, 23, 28, .5); border-color: var(--border); }
[data-theme="dark"] .link-btn.home-btn { background: #1A222E; border-color: var(--border); }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .hero-title { font-size: 34px; }
  .section { padding: 34px 18px 6px; }
}
@media (max-width: 640px) {
  .topbar-inner { gap: 6px; height: 58px; }
  .topbar-inner { padding: 0 14px; }
  .logo span:last-child { display: none; }
  .logo-icon { width: 28px; height: 28px; border-radius: 8px; font-size: 13px; }
  .menu { gap: 0; }
  .menu a, .menu span { padding: 6px 8px; font-size: 12.5px; }
  .user-area { gap: 0; }
  .link-btn { padding: 6px 7px; font-size: 13px; }
  .uc-name, .hb-label { display: none; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .head-actions { width: 100%; }
  .hero-title { font-size: 26px; letter-spacing: .06em; }
  .hero-sub { font-size: 12.5px; letter-spacing: .1em; }
  .hero-kicker { font-size: 10px; letter-spacing: .24em; }
  .search-section { padding: 46px 0 44px; }
  .search-input-row { padding-left: 18px; }
  .search-input-row button { padding: 11px 22px; }
  .nav-row { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
  .section-head h2 { font-size: 17px; }
  .user-area .username { display: none; }
  .footer { margin-top: 36px; }
  .cat-ops { opacity: 1; }
}
