/* ============================================================
   站内搜索页样式
   由 search/index.php 内联 <style> 抽离而来（样式与程序分离）。
   动态主题色经由页面根元素的 inline style 注入 CSS 变量。
   ============================================================ */
  /* ===== 站内搜索（蓝 #1b5bd5 / 橙 #f25d30 / 1200 居中 / 白卡片） ===== */
  .sp-wrap { min-height: 100vh; display: flex; flex-direction: column; }
  .cw { width: 1200px; max-width: calc(100% - 24px); margin: 0 auto; }

  /* 头部：logo + 首页 */
  .sp-header { background: #fff; border-bottom: 1px solid #e6e6e6; }
  .sp-header .cw { display: flex; align-items: center; gap: 24px; padding: 16px 0; }
  .sp-logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; text-decoration: none; }
  .sp-logo .lg-mark { width: 34px; height: 34px; border-radius: 7px; background: #1b5bd5; display: flex; align-items: center; justify-content: center; }
  .sp-logo .lg-txt { display: flex; flex-direction: column; line-height: 1.25; }
  .sp-logo .lg-txt .t { font-size: 17px; font-weight: 700; color: #333; letter-spacing: .5px; }
  .sp-logo .lg-txt .u { font-size: 11px; color: #aaa; }
  .sp-logo img.lg-img { max-height: 46px; display: block; }
  .sp-home-btn { margin-left: auto; flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: #555; text-decoration: none; padding: 7px 14px; border: 1px solid #e2e5ea; border-radius: 6px; transition: all .15s; }
  .sp-home-btn:hover { color: #1b5bd5; border-color: #1b5bd5; background: #f4f8ff; }

  .sp-main { flex: 1; padding: 22px 0 44px; }

  /* 搜索框（通用） */
  .sp-form { display: flex; height: 46px; border: 2px solid #1b5bd5; border-radius: 10px; overflow: hidden; background: #fff; }
  .sp-form input { flex: 1; border: none; outline: none; padding: 0 16px; font-size: 15px; color: #333; min-width: 0; }
  .sp-form input::placeholder { color: #b0b4bb; }
  .sp-form button { border: none; background: #1b5bd5; color: #fff; padding: 0 30px; font-size: 15px; letter-spacing: 2px; cursor: pointer; transition: background .15s; display: inline-flex; align-items: center; gap: 6px; }
  .sp-form button:hover { background: #1749b0; }

  /* 首页 hero */
  .sp-hero { text-align: center; padding: 60px 0 34px; }
  .sp-hero .sp-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: #1b5bd5; background: #eef4ff; border: 1px solid #d7e4fb; padding: 5px 14px; border-radius: 20px; margin-bottom: 18px; }
  .sp-hero h1 { font-size: 30px; font-weight: 800; color: #222; margin: 0 0 8px; letter-spacing: 1px; }
  .sp-hero .sp-sub { color: #98a2b3; font-size: 14px; margin-bottom: 26px; }
  .sp-hero .sp-form { max-width: 640px; margin: 0 auto; height: 52px; }
  .sp-hero .sp-form input { font-size: 16px; }

  /* 热搜词 */
  .sp-hot { max-width: 640px; margin: 18px auto 0; display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; justify-content: center; font-size: 13px; }
  .sp-hot .lb { color: #b0b4bb; }
  .sp-hot a { color: #666; text-decoration: none; transition: color .15s; }
  .sp-hot a:hover { color: #f25d30; }
  .sp-hot a .rk { color: #f25d30; font-weight: 700; margin-right: 3px; }
  .sp-hot a:nth-child(n+5) .rk { color: #f7a94b; }

  /* 结果页顶部搜索条 */
  .sp-top { display: flex; align-items: center; gap: 16px; padding: 6px 0 18px; flex-wrap: wrap; }
  .sp-top .sp-back { flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: #555; text-decoration: none; }
  .sp-top .sp-back:hover { color: #1b5bd5; }
  .sp-top .sp-form { flex: 1; min-width: 260px; max-width: 620px; height: 42px; }
  .sp-top .sp-form button { padding: 0 22px; font-size: 14px; }

  /* 结果统计 + 分类命中 */
  .sp-summary { font-size: 14px; color: #666; padding: 4px 2px 14px; }
  .sp-summary b { color: #1b5bd5; }
  .sp-summary .kw { color: #f25d30; font-weight: 700; }
  .sp-cats { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
  .sp-cats .lb { font-size: 13px; color: #98a2b3; }
  .sp-cats a { font-size: 13px; color: #444; text-decoration: none; padding: 5px 13px; border-radius: 16px; background: #f5f6f8; border: 1px solid #eceef1; transition: all .15s; }
  .sp-cats a:hover { color: #1b5bd5; border-color: #cddbf5; background: #f0f6ff; }

  /* 跨模块结果标签页 */
  .sp-tabs { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid #eceef1; margin-bottom: 16px; flex-wrap: wrap; }
  .sp-tabs a { position: relative; font-size: 14px; color: #606770; text-decoration: none; padding: 9px 16px; border-radius: 8px 8px 0 0; transition: color .15s; white-space: nowrap; }
  .sp-tabs a i { font-style: normal; font-size: 12px; color: #b6bcc4; margin-left: 3px; }
  .sp-tabs a:hover { color: #1b5bd5; }
  .sp-tabs a.on { color: #1b5bd5; font-weight: 700; }
  .sp-tabs a.on i { color: #1b5bd5; }
  .sp-tabs a.on::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px; border-radius: 2px; background: #1b5bd5; }

  /* 期刊封面 / 院校徽章（复用 sp-card 布局） */
  .sp-jcover { width: 40px; height: 52px; min-width: 40px; border-radius: 4px; background-size: cover; background-position: center; box-shadow: 0 2px 6px rgba(0,0,0,.16); position: relative; overflow: hidden; }
  .sp-jcover-g { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 700; text-align: center; padding: 0 3px; line-height: 1.2; }
  .sp-ubadge { color: #fff; font-size: 13px; font-weight: 700; }
  .sp-name .sp-tag { display: inline-block; font-style: normal; font-size: 10px; line-height: 1.4; color: #fff; background: #f25d30; border-radius: 3px; padding: 0 4px; margin-left: 4px; vertical-align: middle; font-weight: 700; }

  /* 结果网格（复刻分类页卡片） */
  .sp-panel { background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.05); padding: 18px 20px 22px; }
  .sp-grid { display: grid; grid-template-columns: repeat(var(--sp-cols, 3), 1fr); gap: 12px; }
  .sp-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #eef0f3; border-radius: 10px; background: #fff; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; min-width: 0; }
  .sp-card:hover { border-color: #cddbf5; box-shadow: 0 6px 16px rgba(27,91,213,.12); transform: translateY(-2px); }
  .sp-ico { width: 40px; height: 40px; min-width: 40px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; color: #fff; overflow: hidden; position: relative; text-transform: uppercase; }
  .sp-ico.r { border-radius: 50%; }
  .sp-ico .site-favicon { width: 100%; height: 100%; object-fit: cover; }
  .sp-body { min-width: 0; flex: 1; overflow: hidden; }
  .sp-name { display: block; font-size: 14px; font-weight: 600; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .15s; }
  .sp-card:hover .sp-name { color: #1b5bd5; }
  .sp-desc { display: block; font-size: 12px; color: #9aa0a8; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sp-name mark, .sp-desc mark { background: #fff2c9; color: inherit; padding: 0 1px; border-radius: 2px; }

  /* 空结果 / 失效 */
  .sp-empty { background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.05); text-align: center; padding: 66px 20px; }
  .sp-empty .big { font-size: 46px; margin-bottom: 12px; }
  .sp-empty h2 { margin: 0 0 8px; font-size: 20px; color: #333; }
  .sp-empty p { color: #999; font-size: 14px; margin: 0 0 6px; }
  .sp-empty .kw { color: #f25d30; font-weight: 700; }

  /* 分页 */
  .sp-pager { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 22px; }
  .sp-pager a, .sp-pager span { min-width: 36px; height: 36px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e6e9ef; border-radius: 8px; font-size: 14px; color: #555; text-decoration: none; background: #fff; transition: all .15s; }
  .sp-pager a:hover { border-color: #1b5bd5; color: #1b5bd5; }
  .sp-pager .cur { background: #1b5bd5; border-color: #1b5bd5; color: #fff; }
  .sp-pager .dis { color: #c0c4cc; }
  .sp-pager .info { border: none; background: none; color: #98a2b3; font-size: 13px; }

  @media (max-width: 1024px) { .sp-grid { --sp-cols: 3; } }
  @media (max-width: 768px) {
    .sp-grid { --sp-cols: 2; }
    .sp-hero h1 { font-size: 24px; }
    .sp-hero { padding: 40px 0 24px; }
  }
  @media (max-width: 480px) { .sp-grid { --sp-cols: 1; } }
