/*
Theme Name: HostPro 主机测评主题
Theme URI: http://host.vpsqq.com/
Author: VPSQQ Team
Description: 深色科技风 IDC 主机测评站模板，模仿 IDC 聚合平台布局：顶部导航 + 公告条 + 促销横幅 + 特价套餐表格 + 最新/最热资讯双栏，自适应响应式（表格移动端横滑），日/夜双模式。适合 VPS 测评、服务器资讯、主机商家展示类站点。
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: hostvps
*/

* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #0b1120;
  --bg2: #101a33;
  --card: #141f3a;
  --card2: #1a2747;
  --line: rgba(255,255,255,.09);
  --text: #e6ebf6;
  --muted: #8ea0c4;
  --brand: #3b82f6;
  --brand2: #22d3ee;
  --brand3: #a78bfa;
  --grad: linear-gradient(120deg, #3b82f6, #22d3ee);
  --grad2: linear-gradient(120deg, #2563eb, #22d3ee 55%, #a78bfa);
  --green: #34d399;
  --orange: #f59e0b;
  --red: #f43f5e;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(2, 6, 23, .5);
  --shadow-hover: 0 14px 40px rgba(2, 6, 23, .65);
  --header-bg: rgba(9, 14, 27, .88);
}
html[data-theme="light"] {
  --bg: #eef2f9;
  --bg2: #ffffff;
  --card: #ffffff;
  --card2: #f4f7fd;
  --line: #e2e8f2;
  --text: #16213a;
  --muted: #64748b;
  --brand: #2563eb;
  --brand2: #06b6d4;
  --brand3: #7c3aed;
  --grad: linear-gradient(120deg, #2563eb, #06b6d4);
  --grad2: linear-gradient(120deg, #2563eb, #06b6d4 55%, #7c3aed);
  --shadow: 0 6px 24px rgba(30,64,175,.10);
  --shadow-hover: 0 14px 36px rgba(30,64,175,.16);
  --header-bg: rgba(255,255,255,.88);
}
body {
  font-family: "PingFang SC","Microsoft YaHei",Helvetica,Arial,sans-serif;
  background:
    radial-gradient(1000px 480px at 85% -10%, rgba(59,130,246,.14), transparent 60%),
    radial-gradient(800px 420px at -10% 30%, rgba(34,211,238,.10), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  transition: background .3s, color .3s;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 18px; }

/* ===== 顶栏 ===== */
.topbar {
  font-size: 12.5px; color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(10px);
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; height: 38px; }
.tb-site { color: var(--brand); font-weight: 600; }
.topbar a { margin-left: 16px; color: var(--muted); transition: color .2s; }
.topbar a:hover { color: var(--brand); }
@media (max-width: 480px) { .topbar .tb-site { display: none; } }

/* ===== 主头部 ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.hd-inner {
  display: flex; align-items: center; gap: 26px;
  padding: 18px 18px 14px; max-width: 1200px; margin: 0 auto;
}
.logo { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo-mark {
  width: 42px; height: 42px; border-radius: 11px; background: var(--grad2);
  display: flex; align-items: center; justify-content: center; color: #fff;
  font-size: 19px; font-weight: 900; box-shadow: 0 6px 16px rgba(59,130,246,.4);
  flex-shrink: 0;
}
.logo-img {
  height: 48px; width: auto; max-width: 200px; object-fit: contain;
  flex-shrink: 0;
}
.footer-logo {
  height: 40px; width: auto; max-width: 180px; object-fit: contain;
  margin-bottom: 12px;
}
.logo-text { line-height: 1.15; min-width: 0; }
.logo-text a { font-size: 22px; font-weight: 800; letter-spacing: .4px; color: var(--text); white-space: nowrap; }
.logo-text a b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-text em {
  display: block; font-style: normal; font-size: 11.5px; color: var(--muted);
  margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px;
}
.hd-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search-form { display: flex; position: relative; }
.search-form input {
  background: var(--card); border: 1.5px solid var(--line); color: var(--text);
  padding: 10px 44px 10px 16px; border-radius: 30px; outline: none; width: 240px;
  font-size: 13px; transition: all .25s;
}
.search-form input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(59,130,246,.15); }
.search-form button {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  background: var(--grad); border: none; color: #fff; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.mode-btn {
  background: var(--card); border: 1.5px solid var(--line); color: var(--text);
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 16px;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: all .25s;
}
.mode-btn:hover { border-color: var(--brand); color: var(--brand); }
.burger {
  display: none; background: var(--card); border: 1.5px solid var(--line); cursor: pointer;
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.burger span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: all .25s; }
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== 导航 ===== */
.main-nav { border-top: 1px solid var(--line); }
.main-nav .wrap { display: flex; align-items: center; }
.main-nav ul { display: flex; list-style: none; gap: 2px; }
.main-nav a {
  display: block; padding: 12px 18px; font-size: 14px; font-weight: 500;
  color: var(--muted); position: relative; transition: color .2s;
}
.main-nav a::after {
  content: ""; position: absolute; left: 50%; bottom: -1px; width: 0; height: 2.5px;
  background: var(--grad); border-radius: 3px; transition: all .25s; transform: translateX(-50%);
}
.main-nav a:hover { color: var(--brand); }
.main-nav a:hover::after { width: 60%; }
.main-nav li:first-child a { color: var(--brand); font-weight: 700; }
.main-nav li:first-child a::after { width: 60%; }
@media (max-width: 900px) {
  .burger { display: flex; }
  .search-form input { width: 180px; }
  .main-nav {
    display: none; max-height: calc(100vh - 130px); overflow-y: auto;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 8px 0 14px; }
  .main-nav a { padding: 13px 20px; font-size: 15px; }
  .main-nav a::after { display: none; }
  .main-nav a:hover { background: var(--card2); }
}
@media (max-width: 520px) {
  .hd-inner { flex-wrap: wrap; }
  .hd-tools { margin-left: 0; order: 3; width: 100%; }
  .search-form { flex: 1; }
  .search-form input { width: 100%; }
}

/* ===== 公告条 ===== */
.announce {
  background: linear-gradient(120deg, rgba(59,130,246,.12), rgba(34,211,238,.10));
  border: 1px solid rgba(59,130,246,.3);
  border-radius: var(--radius);
  margin-top: 22px; padding: 14px 18px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 13px; color: var(--text);
}
.announce .an-badge {
  background: var(--grad); color: #fff; padding: 3px 12px; border-radius: 30px;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.announce span { color: var(--muted); }
.announce a { color: var(--brand2); font-weight: 600; }

/* ===== 促销横幅 ===== */
.hero-banner {
  margin-top: 18px; border-radius: var(--radius); overflow: hidden; position: relative;
  background: var(--grad2); padding: 34px 30px; color: #fff;
  box-shadow: var(--shadow);
}
.hero-banner.has-bg {
  background-size: cover; background-position: center;
}
.hero-banner.has-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(2,6,23,.78), rgba(2,6,23,.45));
  pointer-events: none;
}
.hero-banner .hero-inner { position: relative; z-index: 1; }
.hero-banner h2 { font-size: 26px; font-weight: 800; line-height: 1.4; }
.hero-banner p { font-size: 13.5px; opacity: .9; margin-top: 8px; line-height: 1.8; }
.hero-banner .hero-btns { margin-top: 18px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-banner .hero-btns a {
  padding: 9px 22px; border-radius: 30px; font-size: 13.5px; font-weight: 700;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.4); color: #fff;
  backdrop-filter: blur(4px); transition: all .2s;
}
.hero-banner .hero-btns a:hover { background: #fff; color: #2563eb; }
@media (max-width: 640px) {
  .hero-banner { padding: 24px 20px; }
  .hero-banner h2 { font-size: 20px; }
}

/* ===== 特价套餐区 ===== */
.section-title {
  display: flex; align-items: center; gap: 12px;
  font-size: 19px; font-weight: 800; margin: 26px 0 16px; color: var(--text);
}
.section-title::before { content: ""; width: 6px; height: 20px; border-radius: 3px; background: var(--grad2); }
.section-title small { font-weight: 400; font-size: 12.5px; color: var(--muted); }
.section-title .st-right { margin-left: auto; font-size: 12.5px; }
.section-title .st-right a { color: var(--brand2); }

/* 特价导航标签 */
.deal-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.deal-nav a {
  padding: 6px 16px; border-radius: 30px; font-size: 12.5px; font-weight: 600;
  background: var(--card); border: 1px solid var(--line); color: var(--muted); transition: all .2s;
}
.deal-nav a:hover, .deal-nav a.on { background: var(--grad); color: #fff; border-color: transparent; }

/* 套餐表格 */
.table-scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
.deal-table { width: 100%; border-collapse: collapse; min-width: 880px; font-size: 13px; }
.deal-table thead th {
  background: var(--card2); color: var(--muted); font-weight: 700; font-size: 12px;
  padding: 13px 12px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line);
}
.deal-table tbody td { padding: 14px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.deal-table tbody tr:last-child td { border-bottom: none; }
.deal-table tbody tr { transition: background .2s; }
.deal-table tbody tr:hover { background: var(--card2); }
.deal-table .t-provider { font-weight: 700; color: var(--text); }
.deal-table .t-badge {
  display: inline-block; font-size: 10.5px; font-weight: 700; color: #fff;
  padding: 2px 8px; border-radius: 20px; margin-right: 6px; vertical-align: 1px;
}
.deal-table .t-price { color: var(--orange); font-weight: 800; }
.deal-table .t-intro { color: var(--muted); max-width: 220px; white-space: normal; line-height: 1.6; }
.deal-table .t-buy a {
  display: inline-block; padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 700;
  background: var(--grad); color: #fff; transition: transform .2s;
}
.deal-table .t-buy a:hover { transform: scale(1.06); }
.deal-table .t-detail a { color: var(--brand2); font-size: 12px; }

/* ===== 资讯双栏 ===== */
.news-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 8px; }
.news-col { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.news-col .nc-title { font-size: 15px; font-weight: 800; margin-bottom: 6px; display: flex; align-items: center; gap: 9px; }
.news-col .nc-title::before { content: ""; width: 5px; height: 16px; border-radius: 3px; background: var(--grad2); }
.news-col .nc-sub { font-size: 11.5px; color: var(--muted); margin-bottom: 12px; }
.news-list li {
  display: flex; align-items: center; gap: 10px; padding: 11px 0;
  border-bottom: 1px dashed var(--line); font-size: 13.5px;
}
.news-list li:last-child { border-bottom: none; }
.news-list a { flex: 1; min-width: 0; }
.news-list a:hover { color: var(--brand); }
.news-list .n-views { color: var(--muted); font-size: 11.5px; flex-shrink: 0; }
.news-list .n-date { color: var(--muted); font-size: 11.5px; flex-shrink: 0; }
@media (max-width: 800px) { .news-grid { grid-template-columns: 1fr; } }

/* ===== 文章卡片（列表页） ===== */
.post-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 6px; }
.post-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); transition: all .28s; position: relative; overflow: hidden;
}
.post-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: var(--grad2); opacity: 0; transition: opacity .28s;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.post-card:hover::before { opacity: 1; }
.pc-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cat-tag {
  padding: 3px 13px; border-radius: 30px; font-size: 11.5px; font-weight: 700; color: #fff;
}
.pc-date { font-size: 12.5px; color: var(--muted); }
.pc-title { font-size: 18px; font-weight: 700; line-height: 1.5; }
.pc-title a:hover { color: var(--brand); }
.pc-excerpt { font-size: 13px; color: var(--muted); line-height: 1.85; margin-top: 9px; }
.pc-meta {
  display: flex; align-items: center; gap: 14px; margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted);
}
.pc-meta .sep { flex: 1; }
.pc-more {
  background: var(--card2); border: 1.5px solid var(--line); color: var(--text);
  padding: 6px 16px; border-radius: 30px; font-size: 12.5px; font-weight: 600; transition: all .25s;
}
.pc-more:hover { background: var(--grad); color: #fff; border-color: transparent; }
@media (max-width: 760px) { .post-list { grid-template-columns: 1fr; } }

/* ===== 分页 ===== */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 28px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  padding: 0 14px; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; font-size: 13.5px; color: var(--text); transition: all .2s;
}
.pagination .current { background: var(--grad); color: #fff; font-weight: 700; border-color: transparent; }
.pagination a:hover { border-color: var(--brand); color: var(--brand); }

/* ===== 侧边栏（详情页） ===== */
.side-col { width: 300px; flex-shrink: 0; }
.page-body { display: flex; gap: 24px; padding: 26px 0 50px; align-items: flex-start; }
.main-col { flex: 1; min-width: 0; }
@media (max-width: 900px) {
  .page-body { flex-direction: column; }
  .side-col { width: 100%; }
}
.side-widget {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.sw-title { font-size: 14.5px; font-weight: 800; margin-bottom: 12px; display: flex; align-items: center; gap: 9px; }
.sw-title::before { content: ""; width: 5px; height: 16px; border-radius: 3px; background: var(--grad2); }
.hot-list { list-style: none; }
.hot-list li { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.hot-list li:last-child { border-bottom: none; }
.hot-num {
  width: 24px; height: 24px; flex-shrink: 0; border-radius: 8px; background: var(--card2);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--muted);
}
.hot-list li:nth-child(-n+3) .hot-num { background: var(--grad); color: #fff; }
.hot-list a:hover { color: var(--brand); }
.side-cats { list-style: none; }
.side-cats li { padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; display: flex; justify-content: space-between; }
.side-cats li:last-child { border-bottom: none; }
.side-cats a:hover { color: var(--brand); }
.side-cats .cnt { color: var(--muted); font-size: 12px; }

/* ===== 单篇文章 ===== */
.single-head { margin-bottom: 18px; }
.single-title { font-size: 25px; font-weight: 800; line-height: 1.5; margin: 14px 0 12px; }
.single-meta { display: flex; gap: 18px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.single-body { font-size: 15px; line-height: 2.05; }
.single-body img { border-radius: 10px; }
.single-body p { margin: 14px 0; }
.single-body h2, .single-body h3 { margin: 24px 0 12px; }
.single-body a { color: var(--brand2); }
.single-body blockquote {
  border-left: 3px solid var(--brand2); background: var(--card2);
  padding: 13px 16px; border-radius: 0 10px 10px 0; margin: 16px 0;
}
.post-nav {
  display: flex; justify-content: space-between; gap: 12px; margin-top: 26px;
  font-size: 13px; color: var(--muted);
}
.post-nav a { background: var(--card); border: 1px solid var(--line); padding: 8px 16px; border-radius: 30px; max-width: 48%; }
.post-nav a:hover { color: var(--brand); border-color: var(--brand); }

/* ===== 页脚 ===== */
.site-footer {
  border-top: 3px solid transparent; border-image: linear-gradient(90deg, #3b82f6, #22d3ee) 1;
  background: var(--bg2); padding: 40px 0 26px; margin-top: 24px;
}
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; margin-bottom: 26px; }
@media (max-width: 800px) { .footer-cols { grid-template-columns: 1fr; } }
.foot-title { font-size: 14px; font-weight: 700; margin-bottom: 13px; color: var(--brand2); }
.footer-cols p { font-size: 12.5px; color: var(--muted); line-height: 2; }
.footer-cols ul { list-style: none; }
.footer-cols li { padding: 5px 0; font-size: 12.5px; color: var(--muted); }
.footer-cols a:hover { color: var(--brand2); }
.copy { text-align: center; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 20px; line-height: 2; }
.copy a { color: var(--brand2); }

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #3b82f6, #22d3ee); border-radius: 10px; }

/* ===== 广告位 ===== */
.ad-banner { margin: 18px 0; text-align: center; }
.ad-banner img {
  max-width: 100%; border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.ad-post { margin: 24px 0 4px; }
/* 底飘广告 */
.ad-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 9999;
  max-width: 240px;
  animation: adFloatIn .45s ease;
}
.ad-float img {
  display: block; width: 100%; border-radius: 12px;
  border: 1px solid var(--line); box-shadow: 0 10px 32px rgba(2,6,23,.45);
}
.ad-float-close {
  position: absolute; top: -12px; right: -12px; z-index: 2;
  width: 28px; height: 28px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--grad); color: #fff; font-size: 15px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(2,6,23,.4);
}
@keyframes adFloatIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 640px) {
  .ad-float { max-width: 170px; right: 12px; bottom: 12px; }
}
