/* =====================================================
   CMS 默认主题（default）· 现代主流视觉
   渐变主色 + 毛玻璃顶栏 + 卡片式内容 + 深色页脚
   ===================================================== */

:root {
  --primary: #3b5bff;
  --primary-dark: #2a47d4;
  --accent: #7c5cff;
  --grad: linear-gradient(135deg, #1d3fb8 0%, #3b5bff 55%, #7c5cff 100%);
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1c2433;
  --text-2: #5c6675;
  --text-3: #98a2b3;
  --border: #e8ecf3;
  --danger: #e4574a;
  --success: #16a06a;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow: 0 6px 18px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 16px 40px rgba(16, 24, 40, 0.12);
  --container: 1200px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 4px 20px rgba(16, 24, 40, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text);
  white-space: nowrap;
}
.brand:hover { color: var(--text); }

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(59, 91, 255, 0.35);
  overflow: hidden;
}
.brand-logo-img { background: transparent; box-shadow: none; }
.brand-logo-img img { width: 34px; height: 34px; object-fit: contain; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.nav-item {
  position: relative;
  display: block;
  padding: 9px 15px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  border-radius: 8px;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}
.nav-item:hover { color: var(--primary); background: rgba(59, 91, 255, 0.07); }
.nav-item.active { color: var(--primary); font-weight: 600; }
.nav-item.active::after {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 2px;
  height: 3px;
  border-radius: 2px;
  background: var(--grad);
}

.nav-dropdown { cursor: pointer; }
/* 透明桥（用 ::before，与激活蓝条 ::after 分离）：覆盖菜单上方 8px 间隙，鼠标移向子菜单时 hover 保持连续 */
.nav-dropdown::before {
  content: "";
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  min-width: 180px;
  height: 8px;
}
.nav-link { color: inherit; display: block; }
.nav-link:hover { color: var(--primary); }

.dropdown-menu {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 8px;
  z-index: 50;
  animation: fadeIn 0.18s ease;
}
.nav-dropdown:hover .dropdown-menu { display: block; }

.dropdown-item {
  display: block;
  padding: 9px 14px;
  color: var(--text-2);
  font-size: 14px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.dropdown-item:hover { background: rgba(59, 91, 255, 0.07); color: var(--primary); }

.site-search { display: flex; align-items: center; }
.site-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 8px 0 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #f6f8fc;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.site-search-box:focus-within {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59, 91, 255, 0.12);
}
.site-search-box svg { flex: 0 0 auto; color: var(--text-3); }
.site-search-box input {
  width: 150px;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13.5px;
  color: var(--text);
}
.site-search-box button {
  border: none;
  height: 26px;
  padding: 0 14px;
  border-radius: 13px;
  background: var(--grad);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.site-search-box button:hover { opacity: 0.9; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.2s, opacity 0.2s;
}

/* ---------- 主视觉 Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--grad);
  color: #fff;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
}
.hero::before { width: 420px; height: 420px; top: -160px; right: -120px; }
.hero::after { width: 340px; height: 340px; bottom: -150px; left: -90px; }

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 76px 20px 84px;
  text-align: center;
  max-width: 820px;
}

.hero h1 {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.25;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.18);
  animation: riseIn 0.6s ease both;
}

.hero-desc {
  margin: 18px auto 34px;
  max-width: 560px;
  font-size: 16px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.88);
  animation: riseIn 0.6s 0.1s ease both;
}

.hero-search {
  display: flex;
  max-width: 560px;
  margin: 0 auto;
  background: #fff;
  border-radius: 46px;
  padding: 7px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  animation: riseIn 0.6s 0.2s ease both;
}
.hero-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  padding: 0 20px;
  font-size: 15px;
  color: var(--text);
}
.hero-search button {
  border: none;
  height: 44px;
  padding: 0 30px;
  border-radius: 38px;
  background: var(--grad);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}
.hero-search button:hover { opacity: 0.92; transform: translateY(-1px); }

/* ---------- 内容区 ---------- */
.site-main { padding: 40px 0 56px; }

.section { margin-bottom: 40px; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.section-title::before {
  content: "";
  width: 4px;
  height: 20px;
  border-radius: 2px;
  background: var(--grad);
}

.section-more {
  font-size: 13.5px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}
.section-more:hover { color: var(--primary); }

.empty-tip {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-3);
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  font-size: 14.5px;
}

/* ---------- 卡片网格 ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(59, 91, 255, 0.35);
}

.card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #4c6fff 0%, #7c5cff 100%);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card:hover .card-media img { transform: scale(1.06); }

.card-media .badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.card-media-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.92);
  font-size: 40px;
  font-weight: 800;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.card-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }

.card-title {
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--primary); }

.card-summary {
  flex: 1;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.7;
  margin-bottom: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-3);
  font-size: 12.5px;
  padding-top: 12px;
  border-top: 1px solid #f2f4f8;
}

.meta-item { display: inline-flex; align-items: center; gap: 5px; }
.meta-item svg { flex: 0 0 auto; }

/* ---------- 徽标 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 20px;
}
.badge-top { background: linear-gradient(135deg, #ff8f3d, #ff5f6d); color: #fff; box-shadow: 0 3px 8px rgba(255, 95, 109, 0.35); }
.badge-hot { background: linear-gradient(135deg, #3b5bff, #7c5cff); color: #fff; box-shadow: 0 3px 8px rgba(59, 91, 255, 0.35); }

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 22px;
  padding: 12px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-3);
  font-size: 13px;
}
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: #cbd2dd; }
.breadcrumb .current { color: var(--text); font-weight: 500; }

/* ---------- 详情页 ---------- */
.detail-wrap { max-width: 860px; margin: 0 auto; }

.detail-article {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 44px;
  box-shadow: var(--shadow-sm);
}

.detail-title {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 10px;
}

.detail-subtitle {
  color: var(--text-2);
  font-size: 15.5px;
  margin-bottom: 20px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  color: var(--text-3);
  font-size: 13px;
  padding: 16px 0;
  border-top: 1px solid #f0f2f6;
  border-bottom: 1px solid #f0f2f6;
  margin-bottom: 22px;
}

.detail-cats { margin-bottom: 22px; display: flex; flex-wrap: wrap; gap: 8px; }

.detail-thumb {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.detail-content {
  font-size: 16px;
  line-height: 2;
  color: #2b3444;
  word-break: break-word;
}
.detail-content p { margin-bottom: 18px; }
.detail-content h2, .detail-content h3, .detail-content h4 {
  margin: 30px 0 14px;
  color: var(--text);
  font-weight: 700;
}
.detail-content h2 { font-size: 22px; }
.detail-content h3 { font-size: 19px; }
.detail-content img { margin: 16px auto; border-radius: 10px; box-shadow: var(--shadow-sm); }
.detail-content ul, .detail-content ol { margin: 0 0 18px 26px; }
.detail-content li { margin-bottom: 6px; }
.detail-content blockquote {
  margin: 20px 0;
  padding: 14px 20px;
  border-left: 4px solid var(--primary);
  background: linear-gradient(90deg, rgba(59, 91, 255, 0.06), transparent);
  border-radius: 0 10px 10px 0;
  color: var(--text-2);
}
.detail-content code {
  padding: 2px 7px;
  border-radius: 6px;
  background: #f0f2f6;
  color: #d6336c;
  font-size: 14px;
}
.detail-content pre {
  margin: 18px 0;
  padding: 16px 20px;
  border-radius: 10px;
  background: #141b2d;
  color: #dce6f3;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.7;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid #f0f2f6;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  background: rgba(59, 91, 255, 0.08);
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 500;
  border-radius: 20px;
  transition: background 0.2s, color 0.2s;
}
a.tag-chip:hover { background: var(--primary); color: #fff; }

.detail-prevnext {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}
.pn-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 13px;
  color: var(--text-3);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.pn-item:hover { border-color: rgba(59, 91, 255, 0.4); box-shadow: var(--shadow-sm); }
.pn-item .pn-label { display: block; margin-bottom: 4px; }
.pn-item .pn-text {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 分页 ---------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 36px;
}
.page-link {
  min-width: 38px;
  height: 38px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-2);
  font-size: 14px;
  transition: all 0.2s;
}
.page-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.page-link.current {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(59, 91, 255, 0.35);
}

/* ---------- 单页 ---------- */
.page-article {
  max-width: 860px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 44px;
  box-shadow: var(--shadow-sm);
}

.page-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 18px;
}

.page-thumb { border-radius: 12px; overflow: hidden; margin-bottom: 24px; box-shadow: var(--shadow-sm); }

.page-content {
  font-size: 16px;
  line-height: 2;
  color: #2b3444;
  word-break: break-word;
}
.page-content p { margin-bottom: 18px; }

/* ---------- 404 ---------- */
.error-page {
  max-width: 560px;
  margin: 60px auto 0;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 70px 40px;
  box-shadow: var(--shadow-sm);
}
.error-code {
  font-size: 88px;
  font-weight: 800;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.error-message { margin: 18px 0 30px; color: var(--text-2); font-size: 16px; }
.error-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  border-radius: 26px;
  background: var(--grad);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(59, 91, 255, 0.35);
  transition: opacity 0.2s, transform 0.2s;
}
.error-home:hover { opacity: 0.92; transform: translateY(-2px); color: #fff; }

/* ---------- 页脚 ---------- */
.site-footer {
  background: #101a2e;
  color: #9aa7bd;
  margin-top: 40px;
}
.footer-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding: 52px 0 36px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 14px; }
.footer-desc { font-size: 13.5px; line-height: 1.9; color: #8a97ad; max-width: 320px; }
.footer-col h4 { color: #fff; font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #8a97ad; font-size: 13.5px; transition: color 0.2s; }
.footer-col a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 0;
  font-size: 13px;
  color: #6c7a91;
  text-align: center;
}
.footer-bottom span { display: inline-block; margin: 0 8px; }
.footer-bottom a { color: #8a97ad; transition: color 0.2s; }
.footer-bottom a:hover { color: #fff; }
.footer-icp a { text-decoration: none; }

/* ---------- 动画 ---------- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- 小屏适配（默认 PC，仅兜底） ---------- */
@media (max-width: 992px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 12px 20px; gap: 12px; }
  .site-nav {
    order: 3;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding-bottom: 8px;
  }
  .site-nav.open { display: flex; }
  .nav-item.active::after { display: none; }
  .nav-toggle { display: flex; margin-left: auto; }
  .site-search { order: 2; }
  .dropdown-menu { position: static; box-shadow: none; border: none; padding: 8px 8px 8px 18px; }
  .nav-dropdown::before { display: none; }
  .hero h1 { font-size: 30px; }
  .hero-inner { padding: 56px 16px 64px; }
  .hero-search button { padding: 0 18px; }
  .card-grid { grid-template-columns: 1fr; }
  .detail-article, .page-article { padding: 24px 20px; }
  .detail-title { font-size: 24px; }
  .detail-prevnext { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; gap: 28px; padding: 40px 0 28px; }
}
