/* vChain / 10v.co 现代主题 — 浅色 + 深蓝强调 */
@charset "utf-8";

:root {
	--bg: #f5f7fb;
	--bg-soft: #eef2f9;
	--card: #ffffff;
	--card-hover: #f8faff;
	--text: #1e293b;
	--text-soft: #475569;
	--muted: #94a3b8;
	--border: #e6ebf2;
	--accent: #2563eb;
	--accent-soft: #eff4ff;
	--accent-grad: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
	--shadow: 0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
	--shadow-lg: 0 10px 30px -10px rgba(37,99,235,.18);
	--radius: 14px;
	--radius-sm: 10px;
	--maxw: 1240px;
}
html.dark {
	--bg: #0b1120;
	--bg-soft: #111a2e;
	--card: #161f33;
	--card-hover: #1b2740;
	--text: #e6edf7;
	--text-soft: #aab8cc;
	--muted: #64748b;
	--border: #243049;
	--accent: #3b82f6;
	--accent-soft: #16233f;
	--shadow: 0 1px 3px rgba(0,0,0,.3);
	--shadow-lg: 0 10px 30px -10px rgba(59,130,246,.25);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
.hidden, [hidden] { display: none !important; }
body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
	background: var(--bg);
	color: var(--text);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	transition: background .25s, color .25s;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

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

/* ===== 顶部栏 ===== */
.topbar {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255,255,255,.85);
	backdrop-filter: saturate(180%) blur(12px);
	border-bottom: 1px solid var(--border);
}
html.dark .topbar { background: rgba(11,17,32,.85); }
.topbar-inner {
	max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
	height: 64px; display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); flex-shrink: 0; }
.brand-icon { height: 28px; width: 28px; flex-shrink: 0; }
.brand-text { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: .3px; }

.search-wrap {
	flex: 1; max-width: 560px; position: relative;
	display: flex; align-items: center;
	background: var(--bg-soft); border: 1px solid var(--border);
	border-radius: 999px; padding: 0 6px 0 18px; height: 42px;
	transition: border-color .2s, box-shadow .2s;
}
.search-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-ico { color: var(--muted); font-size: 14px; }
.search-wrap .kw {
	flex: 1; border: none; background: transparent; outline: none;
	font-size: 14px; color: var(--text); padding: 0 12px; height: 100%;
}
.search-wrap .kw::placeholder { color: var(--muted); }
.engine-switch { position: relative; }
.engine-switch .search-btn {
	border: none; background: var(--accent); color: #fff;
	height: 30px; padding: 0 14px; border-radius: 999px; cursor: pointer;
	font-size: 13px; display: flex; align-items: center; gap: 5px; white-space: nowrap;
}
.engine-switch .search-btn:hover { filter: brightness(1.08); }
.search-lists {
	position: absolute; top: calc(100% + 8px); right: 0;
	background: var(--card); border: 1px solid var(--border);
	border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
	min-width: 120px; padding: 6px; overflow: hidden;
}
.search-lists.hide { display: none; }
.search-lists .list {
	padding: 8px 12px; border-radius: 8px; font-size: 13px; cursor: pointer; color: var(--text-soft);
}
.search-lists .list:hover { background: var(--accent-soft); color: var(--accent); }

.topbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.theme-toggle, .btn-admin {
	width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	color: var(--text-soft); background: var(--bg-soft); border: 1px solid var(--border);
	transition: all .2s; font-size: 15px;
}
.theme-toggle:hover, .btn-admin:hover { color: var(--accent); border-color: var(--accent); }

/* ===== 英雄区 ===== */
.hero { text-align: center; padding: 56px 20px 32px; }
.hero-title { font-size: 34px; font-weight: 800; letter-spacing: -.5px; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-desc { margin-top: 12px; color: var(--text-soft); font-size: 15px; max-width: 640px; margin-left: auto; margin-right: auto; }
.hero-stat { margin-top: 18px; color: var(--muted); font-size: 13px; display: inline-flex; gap: 8px; align-items: center; background: var(--card); border: 1px solid var(--border); padding: 8px 18px; border-radius: 999px; box-shadow: var(--shadow); }
.hero-stat b { color: var(--accent); font-weight: 700; }
.hero-stat .dot { opacity: .5; }

/* ===== 分类锚点导航 ===== */
.catnav {
	position: sticky; top: 64px; z-index: 40;
	background: rgba(245,247,251,.9); backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--border);
}
html.dark .catnav { background: rgba(11,17,32,.9); }
.catnav-inner {
	max-width: var(--maxw); margin: 0 auto; padding: 10px 20px;
	display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
}
.catnav-inner::-webkit-scrollbar { display: none; }
.catnav .catlist {
	display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
	padding: 7px 14px; border-radius: 999px; font-size: 13px; color: var(--text-soft);
	background: var(--card); border: 1px solid var(--border); cursor: pointer; transition: all .2s;
}
.catnav .catlist i { font-size: 13px; color: var(--accent); }
.catnav .catlist:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }

/* ===== 区块通用 ===== */
.main { padding: 28px 20px 60px; }
.hot-section { padding: 24px 20px; }
.section-head {
	display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.section-head h2 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; color: var(--text); }
.section-head h2 i { color: var(--accent); font-size: 16px; }
.section-head small { color: var(--muted); font-size: 12px; font-weight: 400; }
.cat-count { font-size: 12px; color: var(--muted); background: var(--bg-soft); padding: 2px 10px; border-radius: 999px; }
.editFid { cursor: pointer; color: var(--muted); font-size: 13px; margin-left: auto; }
.editFid:hover { color: var(--accent); }

/* ===== 热门访问 ===== */
.hot-list { display: flex; flex-wrap: wrap; gap: 10px; }
.hot-item {
	display: flex; align-items: center; gap: 8px; padding: 8px 14px;
	background: var(--card); border: 1px solid var(--border); border-radius: 999px;
	font-size: 13px; color: var(--text-soft); transition: all .2s;
}
.hot-item:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.hot-item img { width: 16px; height: 16px; border-radius: 4px; }
.hot-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hot-click { font-size: 11px; color: var(--accent); background: var(--accent-soft); padding: 1px 7px; border-radius: 999px; font-weight: 600; }

/* ===== 卡片网格 ===== */
.cat-section { margin-bottom: 40px; scroll-margin-top: 120px; }
.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 14px;
}
.card {
	position: relative; display: flex; align-items: flex-start; gap: 12px;
	padding: 16px; background: var(--card); border: 1px solid var(--border);
	border-radius: var(--radius); box-shadow: var(--shadow); transition: all .2s;
	overflow: hidden;
}
.card::before {
	content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
	background: var(--accent-grad); opacity: 0; transition: opacity .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; background: var(--card-hover); }
.card:hover::before { opacity: 1; }
.card-ico { flex-shrink: 0; width: 36px; height: 36px; border-radius: 9px; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.card-ico img { width: 20px; height: 20px; border-radius: 4px; }
.card-body { min-width: 0; flex: 1; }
.card-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-desc { font-size: 12px; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-lock { position: absolute; top: 12px; right: 12px; color: var(--muted); font-size: 12px; }

/* 搜索过滤时空状态 */
.empty { grid-column: 1/-1; text-align: center; padding: 40px; color: var(--muted); font-size: 14px; }

/* ===== 页脚 ===== */
.footer { text-align: center; padding: 30px 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.footer a { color: var(--accent); }
.footer-copy { margin-top: 6px; font-size: 12px; opacity: .8; }

/* ===== 浮动工具 ===== */
.float-tools { position: fixed; right: 24px; bottom: 30px; z-index: 60; display: flex; flex-direction: column; gap: 10px; }
.float-btn {
	width: 44px; height: 44px; border-radius: 12px; cursor: pointer;
	background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center;
	box-shadow: var(--shadow-lg); font-size: 17px; transition: all .2s; border: none;
}
.float-btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.float-btn.scroll_top { background: var(--card); color: var(--accent); border: 1px solid var(--border); display: none; }
.float-btn.scroll_top.show { display: flex; }

/* ===== 后台弹层表单 ===== */
.addsite-main { display: none; padding: 20px; background: var(--card); border-radius: var(--radius); }
.addsite-main .title { font-size: 16px; font-weight: 700; margin-bottom: 16px; color: var(--text); }
.addsite-main .list { margin-bottom: 12px; position: relative; }
.addsite-main .list .icon { position: absolute; left: 12px; top: 12px; color: var(--muted); }
.addsite-main .text, .addsite-main .num {
	width: 100%; padding: 10px 12px 10px 36px; border: 1px solid var(--border);
	border-radius: var(--radius-sm); font-size: 14px; background: var(--bg-soft); color: var(--text); outline: none;
}
.addsite-main .num { padding-left: 12px; }
.addsite-main .text:focus { border-color: var(--accent); }
.addsite-main textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; background: var(--bg-soft); color: var(--text); outline: none; min-height: 70px; resize: vertical; }
.addsite-main .list-2 { display: flex; gap: 16px; align-items: center; }
.addsite-main .list-2 .li { flex: 1; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-soft); }
.addsite-main .type .fid { display: inline-block; padding: 6px 12px; margin: 3px; border: 1px solid var(--border); border-radius: 999px; font-size: 12px; cursor: pointer; color: var(--text-soft); }
.addsite-main .type .fid:hover, .addsite-main .type .fid.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.addsite-main button { width: 100%; padding: 11px; background: var(--accent-grad); color: #fff; border: none; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; cursor: pointer; }
.addsite-main .kongs { display: inline-block; width: 60px; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
	.topbar-inner { gap: 10px; height: 56px; }
	.brand span { display: none; }
	.brand-text { display: none; }
	.search-wrap { height: 38px; }
	.engine-switch .search-btn { padding: 0 10px; font-size: 12px; }
	.engine-switch .search-btn span { display: none; }
	.hero { padding: 32px 16px 20px; }
	.hero-title { font-size: 24px; }
	.hero-desc { font-size: 13px; }
	.catnav { top: 56px; }
	.card-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
	.card { padding: 12px; }
	.card-ico { width: 32px; height: 32px; }
	.card-ico img { width: 18px; height: 18px; }
	.card-title { font-size: 13px; }
	.card-desc { -webkit-line-clamp: 1; }
	.float-tools { right: 16px; bottom: 20px; }
}

/* ===== 搜索快捷键 kbd 提示 ===== */
.search-kbd {
	position: absolute; right: 100px; top: 50%; transform: translateY(-50%);
	background: var(--card); border: 1px solid var(--border); border-radius: 6px;
	padding: 2px 7px; font-size: 12px; color: var(--muted); font-family: inherit;
	pointer-events: none; user-select: none;
}
.search-wrap.open .search-kbd { display: none; }

/* ===== 清空按钮 ===== */
.search-clear {
	position: absolute; right: 100px; top: 50%; transform: translateY(-50%);
	border: none; background: transparent; color: var(--muted); cursor: pointer;
	width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center;
	font-size: 12px;
}
.search-clear:hover { background: var(--bg-soft); color: var(--text); }

/* ===== 搜索联想面板 ===== */
.search-wrap { position: relative; }
.search-panel {
	position: absolute; left: 0; right: 0; top: calc(100% + 8px);
	background: var(--card); border: 1px solid var(--border);
	border-radius: var(--radius); box-shadow: var(--shadow-lg);
	overflow: hidden; z-index: 60;
}
.search-panel[hidden] { display: none; }
.search-panel-body { max-height: 420px; overflow-y: auto; padding: 6px; }
.search-panel-body::-webkit-scrollbar { width: 6px; }
.search-panel-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.sp-group { padding: 8px 10px 4px; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.sp-item {
	display: flex; align-items: center; gap: 12px; padding: 8px 10px;
	border-radius: 8px; text-decoration: none; color: var(--text); cursor: pointer;
	transition: background .12s;
}
.sp-item:hover, .sp-item.active { background: var(--accent-soft); }
.sp-ico {
	flex-shrink: 0; width: 28px; height: 28px; border-radius: 6px;
	background: var(--bg-soft); display: flex; align-items: center; justify-content: center;
	color: var(--accent); font-size: 13px; overflow: hidden;
}
.sp-ico img, img.sp-ico { width: 18px; height: 18px; border-radius: 3px; }
.sp-body { flex: 1; min-width: 0; }
.sp-title { font-size: 13px; font-weight: 500; color: var(--text); display: flex; align-items: center; gap: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-title mark { background: rgba(37,99,235,.18); color: var(--accent); padding: 0 2px; border-radius: 3px; font-weight: 700; }
html.dark .sp-title mark { background: rgba(59,130,246,.28); color: #93c5fd; }
.sp-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.sp-sub mark { background: rgba(37,99,235,.14); color: var(--accent); padding: 0 2px; border-radius: 3px; }
.sp-cat-tag { font-size: 10px; color: var(--muted); background: var(--bg-soft); padding: 1px 6px; border-radius: 999px; font-weight: 400; flex-shrink: 0; }
.sp-arrow { color: var(--muted); font-size: 10px; opacity: 0; transition: opacity .12s; }
.sp-item:hover .sp-arrow, .sp-item.active .sp-arrow { opacity: 1; }
.sp-hist-del { width: 22px; height: 22px; border-radius: 4px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 10px; }
.sp-hist-del:hover { background: var(--card); color: #ef4444; }

.sp-empty { padding: 24px 16px; text-align: center; }
.sp-empty-title { color: var(--muted); font-size: 13px; }
.sp-empty-web {
	display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
	padding: 6px 14px; background: var(--accent); color: #fff; border-radius: 999px;
	font-size: 13px; text-decoration: none;
}
.sp-empty-web:hover { filter: brightness(1.08); }

.sp-web { border-top: 1px solid var(--border); margin-top: 4px; }

.search-panel-footer {
	padding: 8px 12px; border-top: 1px solid var(--border);
	display: flex; gap: 14px; font-size: 11px; color: var(--muted);
	background: var(--bg-soft);
}
.search-panel-footer kbd {
	background: var(--card); border: 1px solid var(--border); border-radius: 4px;
	padding: 1px 6px; margin-right: 4px; font-family: inherit; font-size: 11px; color: var(--text-soft);
}

/* 输入框右侧空间给引擎按钮 + kbd 让位 */
.search-wrap .kw { padding-right: 130px; }

/* 移动端：搜索面板占满 */
@media (max-width: 768px) {
	.search-kbd { display: none; }
	.search-clear { right: 90px; }
	.search-wrap .kw { padding-right: 100px; }
	.search-panel-footer { display: none; }
}

/* ===== 客服二维码（参考 www.10v.co，vChain 深蓝主题版）===== */
.kefu { position: fixed; left: 24px; bottom: 30px; z-index: 60; }
.kefu-fab {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
	width: 56px; height: 56px; border: none; border-radius: 50%;
	background: var(--accent-grad); color: #fff;
	box-shadow: var(--shadow-lg); cursor: pointer;
	transition: transform .2s, box-shadow .2s, filter .2s;
}
.kefu-fab:hover { transform: translateY(-2px); filter: brightness(1.08); }
.kefu-fab-icon { display: flex; align-items: center; justify-content: center; }
.kefu-fab-icon svg { width: 22px; height: 22px; }
.kefu-fab-text { font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: .5px; }
.kefu-pop {
	position: absolute; left: 0; bottom: 68px; width: 236px;
	background: var(--card); border: 1px solid var(--border); border-radius: 16px;
	box-shadow: var(--shadow-lg); padding: 18px 18px 16px;
	opacity: 0; visibility: hidden;
	transform: translateY(8px) scale(.96); transform-origin: bottom left;
	transition: opacity .2s, transform .2s, visibility .2s;
}
.kefu.kefu--open .kefu-pop { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.kefu-pop-inner { text-align: center; }
.kefu-pop-inner h4 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.kefu-qr {
	width: 174px; height: 174px; object-fit: contain; border-radius: 10px;
	border: 1px solid var(--border); margin: 0 auto; display: block; background: #fff;
}
.kefu-pop-desc { font-size: 12.5px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
.kefu-pop-hint { font-size: 12px; color: var(--accent); margin-top: 6px; font-weight: 600; }

/* 桌面 hover 展开；触屏走点击 */
@media (hover: hover) and (pointer: fine) {
	.kefu:hover .kefu-pop { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
}
@media (max-width: 768px) {
	.kefu { left: 16px; bottom: 20px; }
	.kefu-fab { width: 50px; height: 50px; }
	.kefu-fab-icon svg { width: 20px; height: 20px; }
	.kefu-pop { width: 216px; bottom: 60px; padding: 16px 16px 14px; }
	.kefu-qr { width: 156px; height: 156px; }
}
