/* ========== 基础 ========== */
:root {
    --c-header: #1d2637;
    --c-primary: #01cdb8;
    --c-accent: #ff5722;
    --c-bg: #f2f4f7;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { font: 14px/1.6 "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif; color: #333; background: var(--c-bg); }
a { color: #333; text-decoration: none; }
a:hover { color: #01a596; }
img { max-width: 100%; border: 0; vertical-align: middle; }
ul, ol { list-style: none; }
input, select, textarea, button { font: inherit; color: inherit; outline: none; }
.container { width: 1200px; max-width: 96%; margin: 0 auto; }
.msg { padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; font-size: 13px; }
.msg.ok { background: #e8f8f5; color: #0b8a76; border: 1px solid #b5ece3; }
.msg.error { background: #fef0ef; color: #d93025; border: 1px solid #f6c8c4; }
.empty { padding: 60px 20px; text-align: center; color: #999; }
.center { text-align: center; }

/* ========== 按钮 ========== */
.btn-primary { display: inline-block; background: var(--c-primary); color: #fff; border: 0; border-radius: 6px; padding: 9px 22px; cursor: pointer; transition: background .2s; }
.btn-primary:hover { background: #01a596; color: #fff; }
.btn-block { display: block; width: 100%; background: var(--c-primary); color: #fff; border: 0; border-radius: 6px; padding: 11px; cursor: pointer; font-size: 15px; white-space: nowrap; }
.btn-block:hover { background: #01a596; }
.btn-plain { display: inline-block; background: #eef1f4; color: #555; border: 0; border-radius: 6px; padding: 9px 22px; cursor: pointer; }
.btn-mini { display: inline-block; background: var(--c-primary); color: #fff; border: 0; border-radius: 5px; padding: 5px 14px; font-size: 13px; cursor: pointer; }
.btn-mini:hover { color: #fff; background: #01a596; }
.link-danger { background: none; border: 0; color: #d93025; cursor: pointer; font-size: 13px; }
.link-danger:hover { text-decoration: underline; }

/* ========== 顶栏 ========== */
.header { background: var(--c-header); box-shadow: 0 2px 8px rgba(0,0,0,.12); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; height: 62px; }
.logo { margin-right: 30px; flex-shrink: 0; }
.logo a { color: #fff; font-size: 21px; font-weight: 700; letter-spacing: 1px; }
.logo a::before { content: ""; display: inline-block; width: 8px; height: 8px; background: var(--c-primary); border-radius: 50%; margin-right: 8px; }
.nav { display: flex; }
.nav { white-space: nowrap; flex-shrink: 0; }
.nav li { flex-shrink: 0; }
.nav li a { display: block; color: #cfd6e2; padding: 20px 14px; font-size: 15px; border-bottom: 3px solid transparent; }
.nav li a { white-space: nowrap; }
.nav li a:hover, .nav li a.on { color: #fff; border-bottom-color: var(--c-primary); }
.nav .m-user { display: none; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.search-box { display: flex; }
.search-box { flex-shrink: 1; min-width: 0; }
.search-box input { width: 210px; height: 34px; border: 0; border-radius: 5px 0 0 5px; padding: 0 12px; font-size: 13px; }
.search-box button { width: 66px; height: 34px; border: 0; background: var(--c-accent); color: #fff; border-radius: 0 5px 5px 0; cursor: pointer; }
.search-box button:hover { background: #e64a19; }
.user-box { display: flex; gap: 12px; flex-shrink: 0; white-space: nowrap; }
.user-box a, .user-box .points-badge { color: #cfd6e2; font-size: 13px; white-space: nowrap; }
.user-box a:hover { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: #fff; margin: 5px 0; }

/* ========== 首页横幅区 ========== */
.hero { background: linear-gradient(135deg, var(--c-header) 0%, #24404a 60%, var(--c-primary) 130%); padding: 26px 0 20px; }
.hero h1 { color: #fff; font-size: 28px; text-align: center; margin: 6px 0 10px; line-height: 1.4; }
.hero .container > p { color: #cfd6e2; font-size: 14px; text-align: center; max-width: 760px; margin: 0 auto 20px; line-height: 1.8; }
.hero-stats { display: flex; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; overflow: hidden; }
.stat { flex: 1; text-align: center; padding: 18px 8px; border-right: 1px solid rgba(255,255,255,.1); }
.stat:last-child { border-right: 0; }
.stat cite { display: block; color: #b9c3d4; font-style: normal; font-size: 13px; margin-bottom: 6px; }
.stat strong { color: #fff; font-size: 26px; font-weight: 700; }
.stat strong i { font-style: normal; font-size: 13px; color: var(--c-primary); margin-left: 3px; }
.hero-ticker { margin-top: 14px; display: flex; align-items: center; background: rgba(255,255,255,.08); border-radius: 8px; padding: 0 12px; height: 40px; overflow: hidden; }
.ticker-label { color: var(--c-primary); font-size: 13px; margin-right: 14px; flex-shrink: 0; font-weight: 700; }
.ticker-track { flex: 1; overflow: hidden; position: relative; }
.ticker-track ul { display: inline-block; white-space: nowrap; animation: marquee 32s linear infinite; }
.ticker-track li { display: inline-block; color: #cfd6e2; font-size: 13px; margin-right: 42px; }
.ticker-track .avatar { display: inline-block; width: 22px; height: 22px; line-height: 22px; text-align: center; background: var(--c-primary); color: #fff; border-radius: 50%; font-size: 12px; margin-right: 6px; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ========== 文字链广告 ========== */
.tp-ad-text { margin: 14px 0; background: #fff; border-radius: 8px; padding: 10px 12px; overflow: hidden; white-space: nowrap; }
.tp-ad-text a { display: inline-block; color: var(--c-accent); font-size: 13px; margin-right: 28px; }
.tp-ad-text a:hover { text-decoration: underline; }

/* ========== 首页横幅 ========== */
.home-banner .hengfuad { display: flex; gap: 12px; margin: 0 0 16px; }
.home-banner .hengfuad span { flex: 1; background: #fff; border-radius: 8px; overflow: hidden; }
.home-banner .hengfuad img { width: 100%; height: 110px; object-fit: cover; display: block; }

/* ========== 通用区块 / 卡片 ========== */
.section { background: #fff; border-radius: 10px; padding: 18px 18px 24px; margin-bottom: 18px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; border-bottom: 1px solid #f0f2f5; padding-bottom: 12px; }
.section-head h2 { font-size: 18px; color: var(--c-header); border-left: 4px solid var(--c-primary); padding-left: 10px; }
.section-head h2 small { font-size: 12px; color: #999; font-weight: normal; margin-left: 6px; }
.tabs { display: flex; gap: 4px; }
.tabs button { background: none; border: 0; padding: 6px 14px; cursor: pointer; color: #666; border-radius: 20px; font-size: 14px; }
.tabs button:hover { color: #01a596; }
.tabs button.on { background: var(--c-primary); color: #fff; }
.tab-panel { display: none; }
.tab-panel.show { display: block; }

.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card-grid.four { grid-template-columns: repeat(4, 1fr); }
.card { display: flex; flex-direction: column; background: #fff; border: 1px solid #eef0f3; border-radius: 8px; overflow: hidden; transition: transform .18s, box-shadow .18s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(0,0,0,.08); }
.card-img { position: relative; display: block; height: 130px; overflow: hidden; background: #eef0f3; }
.card-img { height: auto; aspect-ratio: 280 / 210; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card-img img { transform: scale(1.05); }
.card-title { display: block; margin: 0; padding: 10px 12px 2px; font-size: 14px; font-weight: 700; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding: 4px 12px 6px; color: #8a8f99; font-size: 12px; min-height: 36px; }
.card-meta { display: flex; justify-content: space-between; padding: 8px 12px; border-top: 1px solid #f4f5f7; color: #9aa0aa; font-size: 12px; }
.card-meta em { font-style: normal; }

/* ========== 首页 SEO 区块 ========== */
.seo-section h2 { font-size: 18px; color: #1d2637; border-left: 4px solid var(--c-primary); padding-left: 10px; margin-bottom: 12px; }
.seo-section h3 { font-size: 15px; color: #1d2637; margin: 14px 0 6px; }
.seo-section p { color: #555; font-size: 14px; line-height: 1.8; margin: 6px 0; }
.seo-section p.seo-sub { margin-top: 12px; }

/* ========== 页面搜索栏 ========== */
.page-search { margin-bottom: 18px; background: #fff; border-radius: 10px; padding: 22px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.page-search form { display: flex; max-width: 640px; margin: 0 auto; }
.page-search input { flex: 1; height: 44px; border: 1px solid #dfe3e8; border-radius: 8px 0 0 8px; padding: 0 16px; font-size: 15px; }
.page-search button { width: 110px; border: 0; background: var(--c-primary); color: #fff; border-radius: 0 8px 8px 0; font-size: 15px; cursor: pointer; }
.page-search button:hover { background: var(--c-accent); }

/* ========== 首页源码点击排行 ========== */
.rank-list { display: flex; flex-direction: column; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px dashed #f0f2f5; transition: background .15s; }
.rank-row:hover { background: #fafbfc; }
.rank-no { flex-shrink: 0; width: 26px; height: 26px; line-height: 26px; text-align: center; background: #eef0f3; color: #999; border-radius: 6px; font-size: 13px; font-weight: 700; }
.rank-no.top { background: var(--c-accent); color: #fff; }
.rank-title { flex: 1; min-width: 0; margin: 0; font-size: 14px; font-weight: 700; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-row:hover .rank-title { color: var(--c-primary); }
.rank-cat { flex-shrink: 0; color: #999; font-size: 12px; background: #f0f2f5; padding: 2px 10px; border-radius: 12px; }
.rank-meta { flex-shrink: 0; color: #9aa0aa; font-size: 12px; display: flex; gap: 12px; }
.rank-meta i { font-style: normal; color: var(--c-accent); }

/* ========== 积分系统 ========== */
.points-hint { color: #666; font-size: 13px; margin: 8px 0 4px; }
.points-hint b { color: var(--c-accent); }
.points-warn { color: #d93025; font-style: normal; }
.points-badge { color: #ffcf8a; font-size: 13px; background: rgba(255,255,255,.12); padding: 2px 10px; border-radius: 12px; }
.points-plus { color: #0b8a76; font-weight: 700; }
.points-minus { color: #d93025; font-weight: 700; }
.user-head { display: flex; justify-content: space-between; align-items: center; background: #fff; border-radius: 10px; padding: 18px 22px; margin-bottom: 16px; }
.user-head h1 { font-size: 20px; color: #1d2637; }
.user-head .meta { color: #999; font-size: 13px; margin-top: 4px; }
.user-head .meta b { color: var(--c-accent); font-size: 17px; }
.user-id { display: flex; align-items: center; gap: 14px; }
.user-avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--c-primary), var(--c-accent)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; flex-shrink: 0; }
.user-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.user-action { background: #fff; border-radius: 10px; padding: 18px 12px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.05); transition: transform .15s, box-shadow .15s; }
.user-action:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,.08); color: var(--c-primary); }
.user-action b { display: block; font-size: 16px; color: var(--c-header); }
.user-action span { display: block; font-size: 12px; color: #999; margin-top: 5px; }

/* ========== 积分充值 / 支付 ========== */
.pay-rate, .pay-balance { color: #666; font-size: 14px; margin: 6px 0; }
.pay-rate b, .pay-balance b { color: var(--c-accent); }
.pay-form h3 { margin: 18px 0 10px; font-size: 15px; color: #1d2637; border-left: 4px solid var(--c-primary); padding-left: 9px; }
.pay-amounts { display: flex; flex-wrap: wrap; gap: 10px; }
.pay-amt { flex: 1; min-width: 110px; max-width: 150px; }
.pay-amt input { display: none; }
.pay-amt span { display: flex; flex-direction: column; align-items: center; border: 2px solid #e8ebf0; border-radius: 10px; padding: 12px; cursor: pointer; }
.pay-amt input:checked + span { border-color: var(--c-primary); background: #e8f8f5; }
.pay-amt strong { font-size: 17px; color: #1d2637; }
.pay-amt em { font-style: normal; color: #999; font-size: 12px; margin-top: 2px; }
.pay-methods { display: flex; gap: 10px; flex-wrap: wrap; }
.pay-method input { display: none; }
.pay-method span { display: inline-block; border: 2px solid #e8ebf0; border-radius: 10px; padding: 10px 22px; cursor: pointer; }
.pay-method input:checked + span { border-color: var(--c-primary); background: #e8f8f5; }
.pay-epay-type { display: flex; gap: 14px; padding: 8px 4px; }
.pay-qr-box { margin: 20px auto; display: inline-block; padding: 16px; background: #fff; border: 1px solid #eee; border-radius: 12px; }

/* ========== 会员 ========== */
.vip-sub { color: #999; margin: 8px 0 18px; }
.vip-plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 16px; text-align: left; }
.vip-plan { border: 2px solid #e8ebf0; border-radius: 12px; padding: 18px 14px; }
.vip-plan h3 { font-size: 15px; color: #1d2637; }
.vip-price { font-size: 24px; color: var(--c-accent); font-weight: 800; margin: 8px 0 12px; }
.vip-price small { font-size: 12px; color: #999; font-weight: 400; }
.vip-plan select { width: 100%; border: 1px solid #dfe3e8; border-radius: 6px; padding: 6px 8px; margin-bottom: 8px; }
.vip-tip { color: #999; font-size: 12px; margin-top: 18px; }
.vip-ok { color: #0b8a76; font-style: normal; }
.level-now { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.level-icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; font-size: 16px; }
.level-progress { margin-top: 12px; }
.level-bar { height: 10px; background: #eef0f3; border-radius: 6px; overflow: hidden; margin-bottom: 6px; }
.level-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--c-primary), var(--c-accent)); }
.level-progress p { color: #999; font-size: 13px; }
.level-show { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 22px; }
.level-item { border: 1px solid #e8ebf0; border-radius: 10px; padding: 14px 10px; text-align: center; }
.level-item .level-icon { margin: 0 auto 6px; }
.level-item b { display: block; font-size: 14px; }
.level-item em { display: block; font-style: normal; color: #999; font-size: 12px; margin-top: 4px; }
@media (max-width: 767px) and (pointer: coarse) {
    .vip-plans { grid-template-columns: 1fr 1fr; }
    .level-show { grid-template-columns: 1fr 1fr; }
}

/* ========== 分页 ========== */
.pager { display: flex; justify-content: center; gap: 6px; margin: 22px 0 6px; flex-wrap: wrap; }
.pager a, .pager .dots { min-width: 34px; height: 34px; line-height: 34px; text-align: center; background: #fff; border: 1px solid #e3e6ea; border-radius: 6px; padding: 0 10px; font-size: 13px; }
.pager a:hover { border-color: var(--c-primary); color: #01a596; }
.pager a.on { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.pager a.disabled { color: #ccc; pointer-events: none; }

/* ========== 列表页 ========== */
.page-main { padding: 18px 0 30px; }
.crumb { margin-bottom: 14px; color: #999; font-size: 13px; }
.crumb a { color: #666; }
.crumb span { color: #333; }
.type-box { background: #fff; border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; display: flex; flex-wrap: wrap; align-items: center; }
.type-label { color: #999; margin-right: 8px; }
.type-box a { display: inline-block; padding: 4px 12px; margin: 4px 2px; border-radius: 16px; color: #555; font-size: 13px; }
.type-box a:hover { color: #01a596; }
.type-box a.on { background: var(--c-primary); color: #fff; }
.sort-box { display: flex; gap: 2px; }
.sort-box a { display: inline-block; padding: 4px 12px; border-radius: 16px; color: #666; font-size: 13px; }
.sort-box a.on { background: #e8f8f5; color: #01a596; }
.list-ad { background: #fff; border-radius: 10px; padding: 10px; margin-bottom: 16px; text-align: center; }

/* ========== 详情页 ========== */
.detail-wrap { display: flex; gap: 18px; align-items: flex-start; }
.detail-main { flex: 1; min-width: 0; background: #fff; border-radius: 10px; padding: 22px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.detail-head { border-bottom: 1px solid #f0f2f5; padding-bottom: 14px; margin-bottom: 18px; }
.detail-head h1 { font-size: 22px; color: var(--c-header); line-height: 1.4; }
.detail-sub { color: #999; font-size: 13px; margin-top: 8px; }
.down-panel { display: flex; gap: 20px; background: #fafbfc; border: 1px solid #eef0f3; border-radius: 10px; padding: 16px; margin-bottom: 20px; }
.gallery { flex: 1; min-width: 0; }
.gallery-main { border-radius: 8px; overflow: hidden; background: #fff; border: 1px solid #eee; }
.gallery-main { max-width: 820px; }
.gallery-main img { width: 100%; aspect-ratio: 820 / 510; object-fit: contain; display: block; }
.gallery-main img, .gallery-thumbs img, .detail-content img { cursor: zoom-in; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; }
.gallery-thumbs img { width: 76px; height: 52px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.gallery-thumbs img.on { border-color: var(--c-primary); opacity: 1; }
.down-info { width: 330px; flex-shrink: 0; }
.price-tag { display: inline-block; background: var(--c-accent); color: #fff; padding: 6px 16px; border-radius: 20px; font-size: 14px; margin-bottom: 14px; }
.meta-list li { padding: 7px 0; color: #555; font-size: 13px; border-bottom: 1px dashed #e8eaee; }
.meta-list li a { color: #01a596; }
.meta-list li.warn { color: #0066ff; border-bottom: 0; font-weight: 700; }
.btn-row { margin-top: 16px; display: flex; gap: 10px; }
.btn-download { flex: 1; text-align: center; background: var(--c-primary); color: #fff; padding: 12px 0; border-radius: 6px; font-size: 15px; }
.btn-download:hover { background: #01a596; color: #fff; }
.btn-download.alt { background: var(--c-accent); }
.btn-download.alt:hover { background: #e64a19; }
.btn-download i { font-style: normal; margin-right: 4px; }
.detail-content { padding: 6px 2px; }
.detail-content h3 { font-size: 18px; font-weight: 600; color: var(--c-header); border-left: 4px solid var(--c-primary); padding-left: 10px; margin: 24px 0 10px; }
.detail-content p { margin: 8px 0; color: #444; }
.detail-content ul, .detail-content ol { margin: 8px 0 8px 22px; }
.detail-content li { list-style: disc; margin: 5px 0; color: #444; }
.detail-content img { border-radius: 8px; margin: 8px 0; max-width: 820px; }
.tag-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.tag-label { background: var(--c-accent); color: #fff; padding: 3px 12px; border-radius: 14px; font-size: 12px; }
.tag-row a { background: #f0f2f5; color: #666; padding: 3px 12px; border-radius: 14px; font-size: 12px; }
.tag-row a:hover { background: #e8f8f5; color: #01a596; }
.related { margin-top: 20px; }
.detail-side { width: 300px; flex-shrink: 0; }
.detail-side { position: sticky; top: 76px; align-self: flex-start; }
.right-list { margin-bottom: 14px; }
.side-ad { border-radius: 10px; overflow: hidden; background: #fff; }
.side-ad img { width: 100%; height: 120px; object-fit: cover; display: block; }
.side-box { background: #fff; border-radius: 10px; padding: 16px; margin-bottom: 14px; }
.side-box h3 { font-size: 15px; color: var(--c-header); border-left: 4px solid var(--c-primary); padding-left: 9px; margin-bottom: 12px; }
.side-box ul li { display: flex; align-items: center; padding: 6px 0; font-size: 13px; border-bottom: 1px dashed #f0f2f5; }
.side-box ul li:last-child { border-bottom: 0; }
.side-box ul li a { color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-box ul li a:hover { color: #01a596; }
.no { flex-shrink: 0; width: 20px; height: 20px; line-height: 20px; text-align: center; background: #eef0f3; color: #999; border-radius: 4px; font-size: 12px; margin-right: 8px; }
.no-1, .no-2, .no-3 { background: var(--c-accent); color: #fff; }
.tag-cloud a { display: inline-block; background: #f0f2f5; color: #666; font-size: 12px; padding: 3px 10px; border-radius: 12px; margin: 0 6px 8px 0; }
.tag-cloud a:hover { background: #e8f8f5; color: #01a596; }
.common-ad { margin: 14px 0; text-align: center; }

/* ========== 单页 / 用户中心 ========== */
.plain-page { background: #fff; border-radius: 10px; padding: 26px; min-height: 300px; }
.plain-page h1 { font-size: 20px; margin-bottom: 16px; border-left: 4px solid var(--c-primary); padding-left: 10px; }
.plain-content p { margin: 10px 0; color: #444; }
.plain-content h3 { margin: 18px 0 8px; color: var(--c-header); }
.auth-wrap { display: flex; justify-content: center; padding: 50px 0; }
.auth-box { width: 380px; background: #fff; border-radius: 10px; padding: 30px; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.auth-box h1 { font-size: 20px; text-align: center; margin-bottom: 20px; }
.auth-box label { display: block; margin-bottom: 14px; color: #666; }
.auth-box input { width: 100%; height: 40px; border: 1px solid #e0e3e8; border-radius: 6px; padding: 0 12px; margin-top: 6px; }
.auth-link { text-align: center; margin-top: 16px; color: #999; font-size: 13px; }
.auth-link a { color: #01a596; }
.simple-table { width: 100%; border-collapse: collapse; }
.simple-table th, .simple-table td { padding: 10px 12px; border-bottom: 1px solid #f0f2f5; text-align: left; font-size: 13px; }
.simple-table th { background: #fafbfc; color: #666; }

/* ========== 页脚 ========== */
.footer { background: var(--c-header); color: #8a93a3; margin-top: 10px; }
.footer-inner { display: flex; justify-content: space-between; padding: 26px 0; gap: 30px; }
.footer-logo a { color: #fff; font-size: 18px; font-weight: 700; }
.footer-slogan { color: var(--c-primary); font-size: 14px; font-weight: normal; margin: 6px 0; }
.footer-note { font-size: 12px; max-width: 560px; line-height: 1.8; }
.footer-right { text-align: right; }
.footer-ul li { color: #8a93a3; font-size: 13px; }
.footer-ul a { color: #aeb6c4; }
.footer-ul a:hover { color: #fff; }
.copyright { font-size: 12px; margin-top: 12px; text-align: right; }
.copyright a { color: #8a93a3; }

/* ========== 导航自适应 ========== */
@media (max-width: 1200px) {
    .search-box input { width: 140px; }
    .nav li a { padding: 20px 11px; font-size: 14px; }
}
@media (max-width: 1024px) {
    .search-box { display: none; }
    .logo { margin-right: 18px; }
    .nav li a { padding: 20px 9px; font-size: 13px; }
}
@media (max-width: 900px) {
    .header-inner { height: 54px; position: relative; }
    .logo { margin-right: 12px; }
    .logo a { font-size: 17px; }
    .nav-toggle { display: block; }
    .nav { display: none; position: absolute; top: 54px; left: 0; right: 0; background: var(--c-header); flex-direction: column; padding: 6px 0 14px; box-shadow: 0 8px 16px rgba(0,0,0,.2); max-height: 75vh; overflow-y: auto; }
    .nav.open { display: flex; }
    .nav li a { padding: 12px 18px; border-bottom: 1px solid rgba(255,255,255,.06); }
    .nav .m-user { border-top: 1px solid rgba(255,255,255,.08); margin-top: 6px; padding-top: 4px; display: flex; gap: 4px; }
    .nav .m-user a { flex: 1; }
    .user-box { display: none; }
}
/* ========== 响应式 ========== */
@media (max-width: 980px) and (pointer: coarse) {
    .card-grid { grid-template-columns: repeat(3, 1fr); }
    .detail-wrap { flex-direction: column; }
    .detail-side { width: 100%; }
    .detail-side { position: static; }
}
@media (max-width: 767px) and (pointer: coarse) {
    body { overflow-x: hidden; }
    .header-inner { height: 54px; position: relative; }
    .logo { margin-right: 12px; }
    .logo a { font-size: 17px; }
    .nav-toggle { display: block; }
    .nav { display: none; position: absolute; top: 54px; left: 0; right: 0; background: var(--c-header); flex-direction: column; padding: 6px 0 14px; box-shadow: 0 8px 16px rgba(0,0,0,.2); max-height: 75vh; overflow-y: auto; }
    .nav.open { display: flex; }
    .nav li a { padding: 12px 18px; border-bottom: 1px solid rgba(255,255,255,.06); }
    .nav .m-user { border-top: 1px solid rgba(255,255,255,.08); margin-top: 6px; padding-top: 4px; display: flex; gap: 4px; }
    .nav .m-user a { flex: 1; }
    .header-right { gap: 8px; }
    .search-box input { width: 130px; }
    .user-box { display: none; }
    .hero { padding: 18px 0 14px; }
    .hero h1 { font-size: 20px; }
    .hero .container > p { font-size: 13px; margin-bottom: 14px; }
    .hero-stats .stat strong { font-size: 20px; }
    .stat { padding: 12px 4px; }
    .page-search { padding: 14px; }
    .page-search input { height: 40px; font-size: 14px; }
    .page-search button { width: 84px; }
    .tabs { overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; max-width: 100%; min-width: 0; }
    .tabs button { flex-shrink: 0; }
    .section { padding: 14px 12px 18px; }
    .section-head { max-width: 100%; min-width: 0; }
    .section-head h2 { flex-shrink: 0; }
    .card-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .card-img { height: auto; aspect-ratio: 280 / 210; }
    .card-desc { -webkit-line-clamp: 1; min-height: 0; padding: 3px 10px 5px; }
    .card-meta { padding: 6px 10px; }
    .home-banner .hengfuad { flex-direction: column; }
    .home-banner .hengfuad img { height: 90px; }
    .type-box { padding: 10px; }
    .type-box a { padding: 4px 9px; }
    .detail-head h1 { font-size: 18px; }
    .down-panel { flex-direction: column; }
    .down-info { width: 100%; }
    .gallery-main img { height: auto; aspect-ratio: 820 / 510; }
    .btn-row { flex-direction: column; }
    .btn-download { padding: 11px 0; }
    .detail-main { padding: 14px; }
    .rank-row { gap: 8px; padding: 7px 0; }
    .rank-title { font-size: 13px; }
    .rank-meta { gap: 6px; }
    .rank-meta em { display: none; }
    .footer-inner { flex-direction: column; gap: 14px; padding: 20px 0; }
    .footer-right { text-align: left; }
    .footer-links { justify-content: flex-start; flex-wrap: wrap; }
    .copyright { text-align: left; }
    .auth-box { width: 92%; padding: 24px 18px; }
}
@media (max-width: 480px) and (pointer: coarse) {
    .card-grid { grid-template-columns: 1fr 1fr; }
    .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
    .hero-stats .stat strong { font-size: 16px; }
    .stat cite { font-size: 12px; }
    .ticker-label { display: none; }
    .rank-cat { display: none; }
    .user-actions { grid-template-columns: repeat(2, 1fr); }
    .user-head { padding: 14px; }
}

/* 后台移动端适配 */
@media (max-width: 767px) and (pointer: coarse) {
    .admin-layout { flex-direction: column; }
    .admin-side { width: 100%; height: auto; position: static; }
    .side-logo { padding: 14px 16px; }
    .side-menu { display: flex; overflow-x: auto; padding: 8px 6px; }
    .side-menu li { flex-shrink: 0; }
    .side-menu li a { padding: 8px 14px; border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; }
    .side-menu li a.on { border-bottom-color: var(--c-primary); background: none; }
    .side-extra { flex-direction: row; gap: 14px; }
    .admin-content { padding: 14px 10px 30px; }
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
    .toolbar { flex-direction: column; align-items: stretch; }
    .table-wrap { overflow-x: auto; }
}

/* ========== 后台 ========== */
.admin-body { background: #eef1f5; }
.admin-layout { display: flex; min-height: 100vh; }
.admin-side { width: 216px; background: var(--c-header); flex-shrink: 0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.side-logo { padding: 20px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.side-logo a { color: #fff; font-size: 16px; font-weight: 700; }
.side-logo small { display: block; color: #7f8ba0; font-size: 12px; font-weight: 400; margin-top: 2px; }
.side-menu { flex: 1; padding: 12px 0; }
.side-menu li a { display: block; color: #aeb6c4; padding: 12px 20px; font-size: 14px; border-left: 3px solid transparent; }
.side-menu li a:hover { color: #fff; background: rgba(255,255,255,.05); }
.side-menu li a.on { color: #fff; background: rgba(1,205,184,.12); border-left-color: var(--c-primary); }
.side-extra { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 8px; }
.side-extra a { color: #7f8ba0; font-size: 13px; }
.side-extra a:hover { color: #fff; }
.admin-main { flex: 1; min-width: 0; }
.admin-top { background: #fff; height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; border-bottom: 1px solid #e5e8ec; }
.admin-top h2 { font-size: 16px; color: var(--c-header); }
.admin-name { color: #999; font-size: 13px; }
.admin-content { padding: 20px 22px 40px; }
.stat-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card { background: #fff; border-radius: 10px; padding: 18px; border-top: 3px solid var(--c-primary); }
.stat-card em { display: block; color: #999; font-style: normal; font-size: 13px; }
.stat-card strong { display: block; font-size: 24px; color: var(--c-header); margin-top: 6px; }
.panel { background: #fff; border-radius: 10px; padding: 18px; margin-bottom: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.panel-head h3 { font-size: 15px; color: var(--c-header); border-left: 4px solid var(--c-primary); padding-left: 9px; }
.panel-tip { color: #999; font-size: 12px; margin-top: 12px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.toolbar-form { display: flex; gap: 8px; }
.toolbar-form input, .toolbar-form select { height: 34px; border: 1px solid #dfe3e8; border-radius: 6px; padding: 0 10px; background: #fff; }
.table { width: 100%; border-collapse: collapse; }
.table th { background: #fafbfc; color: #666; font-weight: 600; text-align: left; padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #eef0f3; white-space: nowrap; }
.table td { padding: 9px 12px; font-size: 13px; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.table tr:hover td { background: #fafcfd; }
.td-title { max-width: 280px; }
.td-ops { white-space: nowrap; }
.td-ops a { color: #01a596; margin-right: 10px; }
.row-parent td { background: #f8fafb; }
.inline-form { display: inline; }
.tag-green { background: #e8f8f5; color: #0b8a76; padding: 2px 10px; border-radius: 12px; font-size: 12px; }
.tag-gray { background: #f0f2f5; color: #888; padding: 2px 10px; border-radius: 12px; font-size: 12px; }
.tag-red { background: #fef0ef; color: #d93025; padding: 2px 10px; border-radius: 12px; font-size: 12px; }
.thumb-sm { width: 72px; height: 42px; object-fit: cover; border-radius: 5px; }
.form-panel { background: #fff; border-radius: 10px; padding: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group label { display: block; color: #555; font-size: 13px; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; border: 1px solid #dfe3e8; border-radius: 6px; padding: 9px 12px; background: #fff; }
.form-group textarea { resize: vertical; }
.form-group .code-area { font-family: Consolas, monospace; font-size: 13px; }
.form-group.full { grid-column: 1 / -1; }
.field-tip { color: #999; font-size: 12px; margin-top: 4px; }
.upload-line { display: flex; gap: 8px; }
.upload-line input[type=text] { flex: 1; }
.form-actions { margin-top: 22px; display: flex; gap: 10px; }

/* ========== 图片灯箱 / 后台缩略图 ========== */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.86); display: none; align-items: center; justify-content: center; z-index: 9999; cursor: zoom-out; }
.lightbox.show { display: flex; }
.lightbox img { max-width: 92%; max-height: 92%; border-radius: 8px; box-shadow: 0 8px 40px rgba(0,0,0,.5); }
.admin-thumb { width: 72px; height: 44px; object-fit: cover; border-radius: 5px; cursor: zoom-in; border: 1px solid #eef0f3; }
.img-preview-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.img-preview-row img { width: 90px; height: 62px; object-fit: cover; border-radius: 6px; cursor: zoom-in; border: 1px solid #eef0f3; transition: transform .15s; }
.img-preview-row img:hover { transform: scale(1.05); }

/* ========== 后台登录 ========== */
.admin-login-body { background: linear-gradient(135deg, var(--c-header), #24404a); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.admin-login-box { width: 380px; background: #fff; border-radius: 12px; padding: 34px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.admin-login-box h1 { font-size: 19px; text-align: center; margin-bottom: 22px; color: var(--c-header); }
.admin-login-box label { display: block; color: #666; margin-bottom: 14px; }
.admin-login-box input { width: 100%; height: 42px; border: 1px solid #dfe3e8; border-radius: 6px; padding: 0 12px; margin-top: 6px; }
.admin-login-box p { text-align: center; margin-top: 16px; font-size: 13px; }
.admin-login-box p a { color: #01a596; }

/* ========== 安装页 ========== */
.install-body { background: linear-gradient(135deg, var(--c-header), #24404a); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 30px 10px; }
.install-box { width: 560px; max-width: 100%; background: #fff; border-radius: 12px; padding: 34px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.install-box h1 { font-size: 21px; text-align: center; color: var(--c-header); margin-bottom: 24px; }
.install-box h2 { font-size: 15px; color: var(--c-header); margin: 20px 0 12px; border-left: 4px solid var(--c-primary); padding-left: 9px; }
.install-form label { display: block; color: #666; margin-bottom: 12px; font-size: 13px; }
.install-form input, .install-form select { width: 100%; height: 40px; border: 1px solid #dfe3e8; border-radius: 6px; padding: 0 12px; margin-top: 5px; }
.install-warn { background: #fff7e6; color: #ad6800; border: 1px solid #ffe1a8; padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 12px; }
.install-error { background: #fef0ef; color: #d93025; border: 1px solid #f6c8c4; padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 12px; }
.install-ok { text-align: center; }
.install-ok h2 { color: #0b8a76; margin-bottom: 12px; }
.install-ok p { color: #555; margin: 8px 0; font-size: 14px; }
.install-ok .tip { color: #999; font-size: 12px; }
.install-ok .btn-primary, .install-ok .btn-plain { margin: 6px; }

/* ========== 在线更新 ========== */
.update-info { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.update-label { color: #888; font-size: 13px; display: inline-block; min-width: 76px; }
.update-info code { background: #f4f6f8; padding: 3px 10px; border-radius: 5px; font-size: 13px; word-break: break-all; }
.update-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.update-actions .btn-primary { padding: 9px 26px; }
.update-log { background: #1d2637; color: #bfe9e3; border-radius: 8px; padding: 14px 16px; font-size: 12px; line-height: 1.8; max-height: 420px; overflow-y: auto; white-space: pre-wrap; word-break: break-all; }

/* ========== AI 助手 / 新功能组件 ========== */
.notice-bar { background: linear-gradient(90deg, var(--c-primary), var(--c-accent)); color: #fff; text-align: center; padding: 7px 12px; font-size: 13px; }
.friend-links { margin-top: 10px; font-size: 12px; color: #8a93a3; }
.friend-links a { color: #aeb6c4; margin: 0 4px; }
.friend-links a:hover { color: #fff; }
.float-widgets { position: fixed; right: 18px; bottom: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 999; }
.fw-btn { width: 46px; height: 46px; border-radius: 50%; background: var(--c-primary); color: #fff; border: 0; font-size: 19px; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.fw-btn:hover { background: var(--c-accent); color: #fff; }

.ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ai-panel { margin-bottom: 18px; }
.ai-done { background: #e8f8f5; border: 1px solid #b5ece3; color: #0b8a76; border-radius: 10px; padding: 16px 18px; margin-bottom: 18px; }
.ai-done a { color: #0b8a76; text-decoration: underline; }
.theme-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.theme-item { display: flex; align-items: center; gap: 8px; border: 2px solid #e8ebf0; border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.theme-item:has(input:checked) { border-color: var(--c-primary); }
.theme-swatch { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; }
.theme-name { font-size: 13px; color: #555; }
.feature-box { display: flex; flex-direction: column; gap: 10px; }
.feature-line { display: flex; justify-content: space-between; align-items: center; background: #fafbfc; border: 1px solid #eef0f3; border-radius: 8px; padding: 10px 14px; cursor: pointer; }
.feature-line strong { display: block; font-size: 14px; color: #1d2637; }
.feature-line em { display: block; font-style: normal; color: #999; font-size: 12px; margin-top: 2px; }
.feature-line input { width: 18px; height: 18px; }
.feature-input { padding: 0 2px; display: flex; gap: 8px; }
.feature-input input, .feature-input textarea { flex: 1; border: 1px solid #dfe3e8; border-radius: 6px; padding: 8px 12px; }
.ai-gen-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ai-gen-grid form { background: #fafbfc; border: 1px solid #eef0f3; border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.ai-gen-grid h4 { font-size: 14px; color: #1d2637; }
.ai-gen-grid input, .ai-gen-grid select, .ai-gen-grid textarea { width: 100%; border: 1px solid #dfe3e8; border-radius: 6px; padding: 8px 12px; }
.ai-tip { color: #999; font-size: 12px; }
.agent-chat { height: 380px; overflow-y: auto; background: #fafbfc; border: 1px solid #eef0f3; border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.agent-msg { display: flex; }
.agent-msg.user { justify-content: flex-end; }
.agent-bubble { max-width: 82%; padding: 10px 14px; border-radius: 12px; font-size: 13px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.agent-msg.bot .agent-bubble { background: #fff; border: 1px solid #e8ebf0; border-top-left-radius: 3px; }
.agent-msg.user .agent-bubble { background: var(--c-primary); color: #fff; border-top-right-radius: 3px; }
.agent-actions { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.agent-chip { display: inline-block; background: #eef3ff; color: #3456c9; border-radius: 6px; padding: 3px 8px; font-size: 11px; }
.agent-input { display: flex; gap: 10px; }
.agent-input input { flex: 1; height: 42px; border: 1px solid #dfe3e8; border-radius: 8px; padding: 0 14px; }
.agent-status { color: #999; font-size: 12px; }
@media (max-width: 900px) and (pointer: coarse) {
    .ai-grid, .ai-gen-grid { grid-template-columns: 1fr; }
}
