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

html, body {
  min-height: 100%;
  color: var(--ink-0);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(900px 420px at 50% -10%, rgba(31, 111, 235, 0.16), transparent 60%),
    radial-gradient(620px 320px at 12% 88%, rgba(31, 157, 106, 0.08), transparent 55%),
    linear-gradient(180deg, #f7fafc 0%, var(--bg-0) 45%, #e8eef6 100%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

/* —— 顶栏 —— */
.sp-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 24px 0;
}

.sp-top a {
  color: var(--ink-1);
  font-size: 13px;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.sp-top a:hover { color: var(--accent); }

/* —— 主舞台：百度式居中搜索 —— */
.sp-stage {
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 56px;
}

.sp-brand {
  text-align: center;
  margin-bottom: 28px;
  animation: sp-rise 0.55s ease both;
}

.sp-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--accent) 0%, #3d8bff 100%);
  color: #fff;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow: 0 12px 28px rgba(31, 111, 235, 0.28);
  animation: sp-float 4.5s ease-in-out infinite;
}

.sp-brand-name {
  font-family: var(--font-display);
  font-size: clamp(42px, 8vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink-0);
  background: linear-gradient(120deg, var(--ink-0) 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sp-brand-tag {
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 14px;
  letter-spacing: 0.04em;
}

/* —— 引擎 Tab —— */
.sp-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 2px;
  max-width: var(--frame-max);
  width: 100%;
  margin-bottom: 14px;
  animation: sp-rise 0.55s ease 0.08s both;
}

.sp-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-1);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
}

.sp-tab:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.sp-tab.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 700;
  position: relative;
}

.sp-tab.is-active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

/* —— 搜索框 —— */
.sp-search {
  width: 100%;
  max-width: var(--frame-max);
  animation: sp-rise 0.55s ease 0.14s both;
}

.sp-search-box {
  display: flex;
  align-items: stretch;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sp-search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(31, 111, 235, 0.16);
}

.sp-search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  padding: 16px 22px;
  font-size: 16px;
  color: var(--ink-0);
}

.sp-search-input::placeholder { color: var(--ink-2); }

.sp-search-btn {
  flex: 0 0 auto;
  border: 0;
  cursor: pointer;
  padding: 0 28px;
  background: linear-gradient(180deg, #3d8bff 0%, var(--accent) 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: background 0.15s, filter 0.15s;
}

.sp-search-btn:hover {
  filter: brightness(1.05);
  background: linear-gradient(180deg, #4a94ff 0%, var(--accent-deep) 100%);
}

.sp-search-btn:active { filter: brightness(0.96); }

.sp-engine-hint {
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-2);
}

.sp-engine-hint strong { color: var(--accent); font-weight: 600; }

/* —— 热门关键词 —— */
.sp-hot {
  width: 100%;
  max-width: var(--frame-max);
  margin-top: 28px;
  animation: sp-rise 0.55s ease 0.22s both;
}

.sp-hot-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sp-hot-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-1);
  letter-spacing: 0.04em;
}

.sp-hot-updated {
  font-size: 12px;
  color: var(--ink-2);
}

.sp-hot-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.sp-hot-item button {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-1);
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.15s;
}

.sp-hot-item button:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #fff;
  transform: translateY(-1px);
}

.sp-hot-item.is-hot button {
  border-color: rgba(226, 75, 74, 0.35);
  color: var(--hot);
}

.sp-hot-item.is-hot button::before {
  content: "热";
  display: inline-block;
  margin-right: 6px;
  padding: 0 4px;
  border-radius: 3px;
  background: var(--hot);
  color: #fff;
  font-size: 10px;
  line-height: 1.5;
  vertical-align: 1px;
}

.sp-hot-status {
  text-align: center;
  color: var(--ink-2);
  font-size: 13px;
  padding: 8px 0;
}

.sp-hot-status--error { color: var(--hot); }

/* —— 页脚 —— */
.sp-foot {
  text-align: center;
  padding: 0 20px 28px;
  color: var(--ink-2);
  font-size: 12px;
}

.sp-foot a { color: var(--ink-1); }
.sp-foot a:hover { color: var(--accent); }
.sp-foot-links { margin-bottom: 6px; }
.sp-foot-links span { margin: 0 8px; color: var(--line); }

/* —— 热榜 / 文章页共用 —— */
.px-page {
  min-height: 100vh;
}

.px-frame {
  max-width: 760px;
  margin: 28px auto;
  padding: 22px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.px-block {
  margin: 18px 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.px-block-tag {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-0);
  margin-bottom: 12px;
}

.px-block-tag--inline { margin-bottom: 0; }

.px-news-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.px-news-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.px-news-nav-btn,
.px-news-date,
.px-btn {
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink-0);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.px-news-nav-btn {
  width: 34px;
  height: 34px;
}

.px-news-date {
  padding: 6px 10px;
  min-height: 34px;
}

.px-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.px-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.px-btn--a { color: var(--accent); }
.px-btn--b {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.px-btn--b:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: #fff;
}

.px-news-summary,
.px-news-status,
.px-news-attrib {
  color: var(--ink-2);
  font-size: 13px;
  margin-bottom: 12px;
}

.px-news-status { text-align: center; padding: 20px 0; }
.px-news-status--error { color: var(--hot); }

.px-news-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.px-news-card {
  display: flex;
  align-items: stretch;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-2);
  transition: border-color 0.15s;
}

.px-news-card:hover { border-color: var(--accent); }

.px-news-card-main {
  flex: 1 1 auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  min-width: 0;
  color: inherit;
}

.px-news-src {
  flex: 0 0 auto;
  align-self: center;
  margin-right: 10px;
  padding: 6px 12px;
  font-size: 12px;
  white-space: nowrap;
}

.px-news-rank {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
}

.px-news-item:nth-child(-n+3) .px-news-rank {
  background: var(--hot);
  border-color: var(--hot);
  color: #fff;
}

.px-news-thumb {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bg-1);
}

.px-news-thumb--ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--accent);
  background: var(--accent-soft);
}

.px-news-body { flex: 1 1 auto; min-width: 0; }

.px-news-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 6px;
  color: var(--ink-0);
}

.px-news-card-main:hover .px-news-title { color: var(--accent); }

.px-news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-2);
}

.px-news-logo {
  width: 16px;
  height: 16px;
  object-fit: contain;
  border-radius: 2px;
}

.px-news-source { color: var(--accent); }
.px-news-heat { color: var(--hot); }

.px-news-expand {
  display: block;
  margin: 14px auto 0;
  width: 100%;
  max-width: 280px;
  text-align: center;
}

.px-news-attrib {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  text-align: center;
}

.px-news-attrib a { color: var(--accent); text-decoration: underline; }

.px-foot {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--ink-2);
  font-size: 12px;
}

.px-page--article .px-frame { margin-top: 24px; }

.px-article-crumb {
  font-size: 12px;
  color: var(--ink-2);
  margin-bottom: 16px;
  word-break: break-all;
}

.px-article-crumb a { color: var(--accent); text-decoration: underline; }

.px-article-status {
  color: var(--ink-1);
  text-align: center;
  padding: 40px 0;
}

.px-article-status--error { color: var(--hot); }

.px-article-head {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.px-article-rank {
  display: inline-block;
  font-size: 12px;
  color: var(--hot);
  border: 1px solid rgba(226, 75, 74, 0.4);
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.px-article-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 4vw, 30px);
  color: var(--ink-0);
  line-height: 1.35;
  margin-bottom: 12px;
}

.px-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-2);
}

.px-article-cover {
  margin: 0 0 20px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-2);
}

.px-article-cover img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.px-article-body {
  color: var(--ink-1);
  font-size: 15px;
  line-height: 1.85;
}

.px-article-lead {
  font-size: 15px;
  color: var(--ink-0);
  margin-bottom: 18px;
  padding: 14px 16px;
  background: var(--bg-2);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
}

.px-article-facts {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.px-article-facts div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}

.px-article-facts dt { color: var(--ink-2); font-weight: 600; }
.px-article-facts dd { color: var(--ink-0); word-break: break-all; }
.px-article-facts a { color: var(--accent); text-decoration: underline; }
.px-article-note { font-size: 12px; color: var(--ink-2); }

.px-article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 24px 0;
}

.px-article-related { margin-top: 8px; }
.px-foot--compact { margin-top: 16px; padding-top: 12px; }

.px-back-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

@keyframes sp-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes sp-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@media (max-width: 640px) {
  .sp-top { padding: 14px 16px 0; gap: 14px; }
  .sp-stage { padding: 28px 16px 40px; justify-content: flex-start; padding-top: 12vh; }
  .sp-brand-name { font-size: 40px; }
  .sp-tab { padding: 7px 9px; font-size: 12px; }
  .sp-search-box { border-radius: 14px; }
  .sp-search-input { padding: 14px 16px; font-size: 15px; }
  .sp-search-btn { padding: 0 18px; }
  .px-frame { margin: 14px; padding: 14px; }
  .px-news-head { flex-direction: column; align-items: stretch; }
  .px-news-nav { justify-content: center; }
  .px-news-thumb { width: 52px; height: 52px; }
  .px-news-src { margin: 0 8px 8px 0; align-self: flex-end; }
  .px-article-facts div { grid-template-columns: 72px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .sp-brand,
  .sp-tabs,
  .sp-search,
  .sp-hot,
  .sp-brand-mark { animation: none; }
}
