:root{
  --brand:#5b6ef5; --brand2:#8b5cf6; --brand3:#ec4899;
  --bg:#f6f7fc; --card:#ffffff; --text:#1a1d2e; --muted:#7a8098;
  --border:#eef0f7; --shadow:0 2px 12px rgba(91,110,245,.07);
  --shadow-hover:0 12px 32px rgba(91,110,245,.18);
  --radius:16px;
}
*{ box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
body{ margin:0; background:var(--bg); color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif; line-height:1.6; }
a{ text-decoration:none; color:inherit; }
img{ max-width:100%; display:block; }
h1,h2,h3,h4,h5,h6{ margin:0 0 .5rem; font-weight:700; }
p{ margin:0 0 .5rem; }

.container{ max-width:1200px; margin:0 auto; padding:24px 16px; }

/* ===== 导航 ===== */
.navbar{
  background:rgba(255,255,255,.85); backdrop-filter:blur(12px);
  border-bottom:1px solid var(--border); position:sticky; top:0; z-index:100;
}
.nav-inner{ max-width:1200px; margin:0 auto; padding:0 16px; display:flex; align-items:center; justify-content:space-between; height:62px; }
.brand{ font-weight:800; font-size:21px;
  background:linear-gradient(120deg,#5b6ef5,#8b5cf6); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.nav-links{ display:flex; align-items:center; gap:2px; flex-wrap:wrap; }
.nav-links a{ color:#4a5068; padding:7px 13px; border-radius:10px; font-size:14px; font-weight:500; transition:.2s; }
.nav-links a:hover{ background:#eef0ff; color:var(--brand); }
.nav-toggle{ display:none; background:none; border:none; color:var(--text); font-size:24px; cursor:pointer; }
.search-box{ display:flex; margin-left:10px; }
.search-box input{ border:1.5px solid var(--border); border-radius:22px 0 0 22px; padding:7px 16px; outline:none; width:150px; font-size:14px; transition:.2s; }
.search-box input:focus{ border-color:var(--brand); }
.search-box button{ border:none; background:linear-gradient(120deg,#5b6ef5,#8b5cf6); color:#fff; padding:7px 16px; border-radius:0 22px 22px 0; cursor:pointer; font-size:14px; }
@media(max-width:820px){
  .nav-toggle{ display:block; }
  .nav-links{ display:none; position:absolute; top:62px; left:0; right:0; background:#fff; flex-direction:column; padding:12px; border-bottom:1px solid var(--border); box-shadow:0 8px 20px rgba(0,0,0,.06); }
  .nav-links.open{ display:flex; }
  .search-box{ margin:8px 0; }
}

/* ===== Hero ===== */
.hero{
  position:relative; overflow:hidden;
  background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);
  border-radius:22px; padding:48px 36px; color:#fff; margin-bottom:28px;
  box-shadow:0 10px 30px rgba(118,75,162,.25);
}
.hero::before{
  content:""; position:absolute; right:-60px; top:-60px; width:260px; height:260px;
  border-radius:50%; background:rgba(255,255,255,.12);
}
.hero::after{
  content:""; position:absolute; right:60px; bottom:-80px; width:180px; height:180px;
  border-radius:50%; background:rgba(255,255,255,.08);
}
.hero h1{ font-size:30px; margin-bottom:8px; position:relative; z-index:1; }
.hero p{ opacity:.92; font-size:15px; position:relative; z-index:1; margin:0; }

/* ===== 区块标题 ===== */
.section-title{ font-size:15px; font-weight:700; color:#4a5068; margin:0 0 14px; display:flex; align-items:center; gap:8px; }
.section-title::before{ content:""; width:4px; height:16px; border-radius:2px; background:linear-gradient(180deg,#5b6ef5,#8b5cf6); }

/* ===== 分类胶囊 ===== */
.cat-wrap{ background:#fff; border-radius:var(--radius); padding:18px 20px; box-shadow:var(--shadow); margin-bottom:24px; text-align:center; }
.cat-badge{ display:inline-block; padding:8px 18px; margin:0 8px 10px 0; background:#f6f7fc; border-radius:22px; font-size:14px; font-weight:500; color:#4a5068; transition:.2s; }
.cat-badge:hover{ background:linear-gradient(120deg,#5b6ef5,#8b5cf6); color:#fff; transform:translateY(-2px); box-shadow:0 6px 16px rgba(91,110,245,.3); }
.badge{ display:inline-block; padding:1px 8px; border-radius:10px; font-size:12px; font-weight:600; background:#eef0ff; color:var(--brand); }

/* ===== 标签云 ===== */
.tag-wrap{ background:#fff; border-radius:var(--radius); padding:18px 20px; box-shadow:var(--shadow); margin-bottom:24px; text-align:center; }
.tag-cloud{ display:flex; flex-wrap:wrap; justify-content:center; }
.tag-cloud a{ padding:5px 14px; margin:0 8px 8px 0; color:#5a6280; background:#f6f7fc; border-radius:16px; font-size:13px; transition:.2s; }
.tag-cloud a:hover{ background:var(--brand); color:#fff; }
.tag-cloud small{ color:#aab; }

/* ===== 字体网格 ===== */
.row{ display:flex; flex-wrap:wrap; margin:0 -8px; justify-content:center; }
.col-6{ width:50%; padding:0 8px; margin-bottom:16px; }
@media(min-width:768px){ .col-md-4{ width:33.33%; } .col-lg-2{ width:20%; } }

.card{ background:var(--card); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow); transition:.25s; }
.card:hover{ box-shadow:var(--shadow-hover); transform:translateY(-4px); }
.card-img-top{ height:110px; width:100%; object-fit:cover; }
.card-body{ padding:12px 10px; text-align:center; }
.card-body a{ display:block; font-size:14px; font-weight:600; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.card-body .small{ color:var(--muted); font-size:12px; margin-top:2px; }
.font-placeholder{ height:110px; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg,#eef0ff 0%,#fdf2ff 100%); font-size:28px; color:var(--brand); font-weight:800; }
.font-preview{ height:110px; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg,#f8f9ff 0%,#fdf8ff 100%); font-size:30px; color:#2a2f45; padding:0 10px; overflow:hidden; }

/* ===== 按钮 ===== */
.btn{ display:inline-block; padding:11px 26px; border-radius:12px; border:none; cursor:pointer; font-size:15px; font-weight:600; transition:.2s; }
.btn-primary{ background:linear-gradient(120deg,#5b6ef5,#8b5cf6); color:#fff; box-shadow:0 6px 18px rgba(91,110,245,.35); }
.btn-primary:hover{ transform:translateY(-2px); box-shadow:0 10px 24px rgba(91,110,245,.45); }
.btn-lg{ padding:13px 34px; font-size:16px; border-radius:14px; }

/* ===== 广告位 ===== */
.ad-place{ margin:18px 0; }
.ad-item{ background:#fff; border-radius:12px; padding:10px; text-align:center; box-shadow:var(--shadow); }
.ad-img{ border-radius:8px; margin:0 auto; }

/* ===== 详情页 ===== */
.badge.sec{ background:#eef0ff; color:var(--brand); margin-right:5px; font-weight:600; }
.preview-box{ font-size:32px; line-height:1.5; word-break:break-all; }
.list-group{ background:#fff; border-radius:14px; overflow:hidden; box-shadow:var(--shadow); }
.list-group-item{ display:flex; justify-content:space-between; padding:12px 16px; border-bottom:1px solid var(--border); font-size:14px; }
.list-group-item:last-child{ border-bottom:none; }
.list-group-item:hover{ background:#f8faff; }

/* ===== 提示框 ===== */
.alert{ padding:13px 18px; border-radius:12px; margin:14px 0; font-size:14px; }
.alert-info{ background:#eef4ff; color:#3b5bdb; }
.alert-success{ background:#e6f9ee; color:#2b8a4b; }
.alert-warning{ background:#fff7e6; color:#b8860b; }
.alert-danger{ background:#ffe9e9; color:#c0392b; }

/* ===== 分页 ===== */
.pagination{ display:flex; list-style:none; padding:0; justify-content:center; gap:6px; margin:24px 0; }
.pagination .page-link{ padding:7px 14px; background:#fff; border-radius:10px; color:var(--brand); font-size:14px; box-shadow:var(--shadow); }
.pagination .active .page-link{ background:linear-gradient(120deg,#5b6ef5,#8b5cf6); color:#fff; }

/* ===== 页脚 ===== */
.footer{ background:linear-gradient(120deg,#1e2235,#2d3252); color:#aab3d6; margin-top:50px; padding:36px 0; }
.footer h6{ color:#fff; margin-bottom:12px; font-size:15px; }
.footer-grid{ display:flex; flex-wrap:wrap; gap:30px; }
.footer-grid>div{ flex:1; min-width:250px; }
.links a{ display:inline-block; margin:0 12px 8px 0; color:#aab3d6; transition:.2s; }
.links a:hover{ color:#fff; }
.small{ font-size:13px; color:#8a90b8; line-height:1.8; }
.muted{ color:#8a90b8; }
