/* ============================================================
   B70 导航 · 样式表 v2（原创编写）
   视觉风格：简洁清爽的上网主页（黄 #ffe400 / 白 / 灰）
   ============================================================ */

/* ---------- 主题变量 ---------- */
:root {
    --bg-page: #e9e9e9;
    --text-main: #15120e;
    --text-sub: #919191;
    --text-weak: #afafaf;
    --text-deep: #545454;
    --surface: #ffffff;
    --surface-soft: #efefef;
    --line: #cccccc;
    --line-strong: #353535;
    --accent: #ffe400;
    --accent-hover: #f7dd00;
    --link-hover-bg: rgba(0, 0, 0, 0.06);
    --mask: rgba(0, 0, 0, 0.4);
    --font-main: "Noto Sans SC", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "WenQuanYi Micro Hei", sans-serif;
}

/* ---------- 基础重置 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
    outline: none;
}

html, body { height: 100%; }

body {
    font-family: var(--font-main);
    letter-spacing: 0.2px;
    -webkit-font-smoothing: antialiased;
    background-color: var(--bg-page);
    background-image: url(../images/bg.png);
    color: var(--text-main);
    transition: background-color 0.3s ease;
}

a { color: inherit; }
img { border: 0 none; }

input[type="text"]::-ms-clear { display: none; }
input::-webkit-search-cancel-button { display: none; }

/* ---------- 布局容器 ---------- */
.page-wrap {
    width: 100%;
    min-width: 1000px;
    min-height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.stage {
    width: 1000px;
    min-height: auto;
    margin: 0 auto;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 58px 0 10px;
}

/* ---------- Logo ---------- */
.logo-area {
    overflow: hidden;
    width: 300px;
    margin: 0 auto 6px;
}

/* B70 专属 Logo：单张组合标识 */
.logo-main {
    width: 300px;
    height: 100px;
    display: block;
}

/* ---------- 搜索框 ---------- */
.search-pill {
    height: 50px;
    background-color: var(--surface);
    border-radius: 100px;
    overflow: visible;
    position: relative;
    z-index: 20;
}

.search-inner { position: relative; }

.engine-switch {
    width: 50px;
    height: 50px;
    background-color: var(--surface);
    border: 1px solid var(--line-strong);
    border-right: 0;
    border-top-left-radius: 100px;
    border-bottom-left-radius: 100px;
    float: left;
    position: relative;
}

.engine-switch .eng-icon {
    display: block;
    width: 20px;
    height: 20px;
    margin: 14px auto 0;
    cursor: pointer;
    opacity: 0.45;
    transition: opacity 0.2s;
}

.engine-switch .eng-icon:hover { opacity: 1; }

.engine-menu {
    display: none;
    width: 640px;
    flex-flow: row wrap;
    padding: 10px;
    background-color: var(--surface);
    position: absolute;
    top: 100%;
    left: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    z-index: 41;
}

.engine-menu.show { display: flex; }

.eng-item {
    width: 25%;
    display: flex;
    align-items: center;
    height: 45px;
    color: var(--text-deep);
    border-radius: 4px;
    cursor: pointer;
    padding: 0 10px;
}

.eng-item:hover { background-color: var(--link-hover-bg); }

.eng-item img { width: 20px; height: 20px; margin-right: 10px; }
.eng-item span { font-size: 16px; font-weight: 500; white-space: nowrap; }

.search-input {
    width: 890px;
    height: 50px;
    border: 1px solid var(--line-strong);
    border-left: 0;
    border-right: 0;
    float: left;
    font-size: 16px;
    padding-left: 6px;
    color: var(--text-main);
    background: var(--surface);
}

.search-btn {
    width: 50px;
    height: 50px;
    background-color: var(--accent);
    border: 1px solid var(--line-strong);
    border-top-right-radius: 100px;
    border-bottom-right-radius: 100px;
    float: left;
    background-image: url(../images/searchBtn.png?v=2.0);
    background-position: 11px 13px;
    background-repeat: no-repeat;
    cursor: pointer;
}

.search-btn:hover { background-color: var(--accent-hover); }

/* 搜索联想 */
.suggest-box {
    width: 917px;
    border: 1px solid var(--line);
    border-top: none;
    position: absolute;
    top: 50px;
    left: 34px;
    z-index: 40;
    display: none;
    font-size: 15px;
    background-color: var(--surface);
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    overflow: hidden;
}

.suggest-box.show { display: block; }

.suggest-box .sug-item {
    display: block;
    width: 100%;
    height: 28px;
    text-indent: 15px;
    line-height: 28px;
    cursor: pointer;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.suggest-box .sug-item:hover { background-color: var(--link-hover-bg); }

.suggest-box .sug-sep {
    display: block;
    padding: 4px 15px 2px;
    font-size: 12px;
    color: var(--text-weak);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

/* 首字色块图标（无图标时回退） */
.letter-avatar {
    position: absolute;
    left: 10px;
    top: 15px;
    display: inline-block;
    border-radius: 6px;
    background: #ffe400;
    color: #15120e;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    overflow: hidden;
}

.site-list .list-empty {
    padding: 30px 0;
    text-align: center;
    color: var(--text-weak);
    font-size: 14px;
}

/* ---------- 分类导航 ---------- */
.cat-nav {
    width: 720px;
    text-align: center;
    margin: 12px auto 4px;
    position: relative;
}

.cat-nav .cat-item {
    display: inline-block;
    width: 60px;
    height: 40px;
    text-align: center;
    color: var(--text-sub);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    line-height: 30px;
    padding-top: 10px;
    position: relative;
    white-space: nowrap;
}

.cat-nav .cat-item:hover { color: var(--text-main); }
.cat-nav .cat-item.active {
    color: var(--text-main);
    font-weight: 700;
}

.cat-nav .cat-add {
    position: absolute;
    right: -34px;
    top: 6px;
    width: 26px;
    height: 26px;
    line-height: 24px;
    border-radius: 50%;
    color: var(--text-weak);
    cursor: pointer;
    font-size: 20px;
    text-align: center;
    user-select: none;
    border: 1px solid var(--line);
    background: var(--surface);
    opacity: 0;
    transition: opacity 0.2s;
}

.cat-nav:hover .cat-add { opacity: 1; }
.cat-nav .cat-add:hover { color: var(--accent-hover); border-color: var(--accent-hover); }

/* ---------- 站点列表 ---------- */
.site-list {
    overflow: hidden;
    padding: 8px 0 12px;
    width: 1000px;
}

.site-list ul { width: 1000px; }

.site-list li {
    float: left;
    position: relative;
    margin-right: 27px;
    margin-bottom: 5px;
}

/* 每行第 6 个去掉右边距，避免被容器裁切 */
.site-list li:nth-child(6n) { margin-right: 0; }

.site-list li .link {
    display: block;
    float: left;
    width: 144px;
    height: 50px;
    line-height: 50px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-main);
    padding-right: 10px;
    position: relative;
}

.site-list li .link:hover {
    background: url(../images/hSiteBg.png) no-repeat;
}

.site-list li .link img {
    position: absolute;
    left: 10px;
    top: 15px;
    transition: transform 0.2s ease;
}
.site-list li .link:hover img {
    transform: scale(1.2);
}

.site-list li .link .text {
    display: block;
    padding-left: 38px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 站点管理按钮（悬浮于卡片右上角） */
.site-list li .site-ops {
    position: absolute;
    right: 2px;
    top: -6px;
    display: none;
    z-index: 5;
}

.site-list li:hover .site-ops { display: block; }

.site-list li .site-ops .op-btn {
    width: 20px;
    height: 20px;
    line-height: 20px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, .07);
    color: var(--text-sub);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    float: left;
    margin-left: 4px;
    user-select: none;
    opacity: .85;
    transition: background .15s, color .15s, transform .15s;
}

.site-list li .site-ops .op-btn:hover {
    background: var(--accent);
    color: #15120e;
    opacity: 1;
    transform: scale(1.12);
}

.site-list li .site-ops .op-btn.op-del:hover {
    background: #ff4d4f;
    color: #fff;
}

/* 最近访问区 */
.recents {
    display: none;
    width: 1000px;
    margin: 6px auto 0;
    padding: 8px 0 4px;
    border-top: 1px dashed var(--line);
}

.recents.show { display: block; }

.recents .rec-title {
    font-size: 13px;
    color: var(--text-weak);
    margin-bottom: 6px;
}

.recents .rec-links a {
    display: inline-block;
    font-size: 14px;
    color: var(--text-deep);
    margin: 0 14px 6px 0;
    cursor: pointer;
}

.recents .rec-links a:hover { color: var(--accent-hover); text-decoration: underline; }

/* ---------- 顶部工具条（时钟） ---------- */
.top-bar {
    position: absolute;
    top: 14px;
    left: 18px;
    right: 18px;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-deep);
}

.tb-left, .tb-right { display: flex; align-items: center; gap: 10px; min-width: 0; }

.tb-quote {
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    color: var(--text-deep);
    font-weight: 500;
    user-select: none;
}
.tb-quote::before { content: "摸鱼｜"; color: var(--accent); }

.tb-pill {
    padding: 4px 12px;
    border-radius: 100px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.62);
    cursor: pointer;
    color: var(--text-deep);
    font-weight: 500;
    user-select: none;
    line-height: 1.6;
}
.tb-pill:hover { border-color: var(--line-strong); }
.tb-pill-brand {
    background: var(--accent);
    border-color: transparent;
    color: #15120e;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 228, 0, 0.4);
    transition: all .15s;
}
.tb-pill-brand:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255, 228, 0, 0.5);
}

.top-bar .tb-clock { color: #1a1a1a; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: 0.5px; }

/* ---------- 底部（跟随 flex 布局贴到视口底部） ---------- */
.footer {
    margin-top: 24px;
    width: 100%;
    font-size: 14px;
    color: var(--text-weak);
    text-align: center;
    padding-bottom: 18px;
}

.footer .f-row { width: 100%; text-align: center; }

.footer a { text-decoration: none; cursor: pointer; }
.footer a:hover { color: #777; }

.footer .qr-wrap { position: relative; cursor: pointer; }

.footer .qr-pop {
    position: absolute;
    bottom: 25px;
    left: 50%;
    margin-left: -60px;
    width: 124px;
    height: 150px;
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    z-index: 41;
    display: none;
}

.footer .qr-pop.show { display: block; }
.footer .qr-pop img { width: 100px; height: 100px; margin: 10px auto 0; display: block; }
.footer .qr-pop div { line-height: 15px; text-align: center; font-size: 12px; }

/* ---------- 弹窗（通用） ---------- */
.modal-mask {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    background: var(--mask);
}

.modal-mask.show { display: block; }

.modal-panel {
    width: 520px;
    background: var(--surface-soft);
    border-radius: 10px;
    border: 1px solid var(--line);
    margin: 18vh auto 0;
    position: relative;
    overflow: hidden;
    color: var(--text-main);
}

.modal-panel .mp-close {
    position: absolute;
    right: 10px;
    top: 10px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    line-height: 22px;
    text-align: center;
    color: var(--text-weak);
    font-size: 18px;
    z-index: 5;
}

.modal-panel .mp-close:hover { color: var(--text-main); }

.modal-panel .mp-title {
    text-align: center;
    font-size: 18px;
    margin: 22px 0 14px;
}

.modal-panel .mp-body { padding: 0 40px 26px; }

.modal-panel .mp-tip {
    text-align: center;
    font-size: 14px;
    color: var(--text-weak);
    margin-bottom: 10px;
}

/* 表单 */
.form-row {
    overflow: hidden;
    margin-top: 16px;
}

.form-row label {
    display: block;
    float: left;
    width: 56px;
    height: 40px;
    line-height: 40px;
    font-size: 16px;
    font-weight: normal;
    color: var(--text-deep);
}

.form-row .form-input {
    border: 1px solid var(--line-strong);
    height: 40px;
    line-height: 40px;
    width: 350px;
    padding: 0 15px;
    float: left;
    border-radius: 100px;
    background: var(--surface);
    color: var(--text-main);
    font-size: 14px;
}

.form-row .form-input:focus { border-color: var(--accent); }

.form-row .form-select {
    border: 1px solid var(--line-strong);
    height: 40px;
    width: 350px;
    float: left;
    border-radius: 100px;
    padding: 0 12px;
    background: var(--surface);
    color: var(--text-main);
    font-size: 14px;
}

/* 主按钮 */
.btn-primary {
    text-align: center;
    background: var(--accent);
    border: 1px solid var(--line-strong);
    width: 160px;
    height: 40px;
    line-height: 38px;
    border-radius: 100px;
    font-size: 16px;
    text-decoration: none;
    display: block;
    margin: 18px auto 0;
    cursor: pointer;
    color: var(--text-main);
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-plain {
    width: 150px;
    height: 35px;
    background-color: var(--accent);
    font-size: 15px;
    color: #0e0e0e;
    margin: 0 auto;
    display: block;
    text-align: center;
    line-height: 35px;
    border-radius: 5px;
    cursor: pointer;
    border: 1px solid var(--line-strong);
}

.btn-plain:hover { background-color: var(--accent-hover); }

/* 管理面板（分类 + 站点编辑） */
.manage-tabs {
    overflow: hidden;
    margin-bottom: 8px;
}

.manage-tabs .tab {
    float: left;
    padding: 6px 16px;
    margin-right: 6px;
    border-radius: 100px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-sub);
    border: 1px solid var(--line);
}

.manage-tabs .tab.active {
    background: var(--accent);
    color: var(--text-main);
    border-color: var(--line-strong);
}

.manage-list {
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 6px 10px;
}

.manage-list .ml-item {
    display: flex;
    align-items: center;
    padding: 5px 2px;
    border-bottom: 1px dashed var(--line);
    font-size: 14px;
    cursor: pointer;
    gap: 8px;
}

.manage-list .ml-item:last-child { border-bottom: none; }

.manage-list .ml-item .ml-name { flex: 0 0 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manage-list .ml-item .ml-ops { display: flex; gap: 6px; }

.manage-list .ml-item .ml-btn {
    font-size: 12px;
    padding: 1px 8px;
    border: 1px solid var(--line);
    border-radius: 100px;
    color: var(--text-sub);
    cursor: pointer;
}

.manage-list .ml-item .ml-btn:hover { color: var(--text-main); border-color: var(--line-strong); }
.manage-list .ml-item .ml-btn.danger:hover { color: #d05; border-color: #d05; }

.manage-list .ml-empty { text-align: center; color: var(--text-weak); padding: 16px 0; font-size: 13px; }

/* 备份区 */
.backup-zone {
    margin-top: 12px;
    text-align: center;
    font-size: 13px;
    color: var(--text-weak);
}

.backup-zone a { color: var(--text-deep); cursor: pointer; text-decoration: underline; }
.backup-zone a:hover { color: var(--text-main); }

/* 提示 Toast */
.toast {
    position: fixed;
    left: 50%;
    top: 30px;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 10px 24px;
    border-radius: 100px;
    font-size: 14px;
    z-index: 2000;
    display: none;
}

.toast.show { display: block; animation: toastIn 0.25s ease; }

@keyframes toastIn {
    from { opacity: 0; transform: translate(-50%, -8px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- 内页通用（关于 / 联系 / 声明 / 主页设置） ---------- */
.sub-logo {
    padding-top: 60px;
}

.sub-box {
    width: 940px;
    margin: 0 auto;
    overflow: hidden;
    padding: 60px 30px;
    background-color: var(--surface);
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.sub-nav {
    float: left;
    width: 180px;
    color: var(--text-deep);
}

.sub-nav li {
    height: 25px;
    margin-bottom: 15px;
    font-size: 16px;
    padding-left: 30px;
    cursor: pointer;
}

.sub-nav li.current {
    color: var(--text-main);
    font-weight: bold;
}

.sub-nav li.current::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 2px;
    margin-right: 8px;
}

.sub-nav li:hover { color: var(--text-main); }

.sub-content {
    float: left;
    border-left: 1px solid var(--line);
    padding: 0 0 0 80px;
    width: 660px;
    color: var(--text-deep);
    font-size: 15px;
    line-height: 1.9;
}

.sub-content img { max-width: 100%; margin: 4px 0; }

.sub-copy {
    margin: 30px auto 0;
    width: 240px;
    text-align: center;
    font-size: 14px;
    color: var(--text-weak);
}

.sub-copy a { cursor: pointer; }
.sub-copy a:hover { color: #777; }

.friend-links a:hover { color: #ffa200; }
.friend-links .sub-tip { font-size: 13px; color: var(--text-weak); text-decoration: underline; }

.t-more-title { font-size: 20px; font-weight: bold; margin-bottom: 10px; }
.t-more-text { font-size: 15px; line-height: 28px; color: var(--text-deep); }
.t-more-text img { max-width: 100%; margin: 5px 0; }
.t-more-text .note { color: var(--text-weak); }

/* ---------- 移动端 ---------- */
@media (max-width: 1000px) {
    .page-wrap { min-width: 0; display: block; min-height: auto; }
    .stage {
    margin-bottom: auto;
        width: 100%;
        min-height: 0;
        margin: 0;
        flex: none;
        display: block;
        padding: 30px 12px 60px;
    }

    .logo-area { width: 240px; margin-bottom: 22px; }
    .logo-main { width: 240px; height: 80px; }

    .engine-menu { width: 420px; }
    .search-input { width: calc(100% - 100px); }
    .suggest-box { width: calc(100% - 66px); left: 34px; }

    .cat-nav { width: 100%; }
    .cat-nav .cat-item { width: 60px; }
    .cat-nav .cat-add { right: 10px; }

    .site-list { width: 100%; }
    .site-list ul { width: 100%; }
    .site-list li { margin-right: 2%; }
    .site-list li .link { width: 17.6%; }

    .top-bar { position: static; justify-content: flex-end; margin-bottom: 10px; }
    .recents { width: 100%; }

    .footer {
    margin-top: 40px; position: static; width: 100%; margin: 30px auto 0; }
}

@media (max-width: 600px) {
    .top-bar { left: 12px; right: 12px; }
    .tb-quote { display: none; }
    .engine-menu { width: 100%; left: 0; }
    .eng-item { width: 50%; }
    .site-list li .link { width: 18%; }
    .modal-panel { width: 94%; }
    .form-row .form-input, .form-row .form-select { width: 68%; }
    .sub-box { width: 94%; padding: 30px 16px; }
    .sub-nav { width: 100%; float: none; margin-bottom: 16px; }
    .sub-nav li { display: inline-block; padding-left: 8px; margin: 0 12px 10px 0; }
    .sub-nav li.current { background: none; color: var(--text-main); font-weight: bold; }
    .sub-content { width: 100%; float: none; border-left: 0; padding: 0; }
}

/* ==================== 本地工具箱 ==================== */
.toolbox{width:100%;background:var(--surface);border:1px solid var(--line);border-radius:12px;margin-top:24px;overflow:hidden;box-shadow:0 4px 18px rgba(0,0,0,.06)}
.tb-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line);flex-wrap:wrap}
.tb-title{font-size:15px;font-weight:700;color:var(--text);display:flex;align-items:baseline;gap:8px}
.tb-title small{font-size:12px;font-weight:400;color:var(--sub);}
.tb-tabs{display:flex;gap:6px;flex-wrap:wrap}
.tb-tab{padding:6px 16px;border-radius:100px;font-size:13px;cursor:pointer;color:var(--sub);background:transparent;border:1px solid transparent;transition:all .15s}
.tb-tab:hover{color:var(--text)}
.tb-tab.active{background:var(--accent);color:#15120e;font-weight:700}
.tb-body{padding:16px}
.tb-pane{display:none}
.tb-pane.active{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.tool-card{border:1px solid var(--line);border-radius:10px;padding:14px;background:var(--bg);display:flex;flex-direction:column;gap:8px;min-width:0}
.tool-card h4{margin:0;font-size:14px;color:var(--text)}
.tc-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.tc-sep{color:var(--sub);font-size:13px}
.tool-card input[type=date],.tool-card input[type=datetime-local],.tool-card input[type=number],.tool-card input[type=text],.tool-card textarea,.tool-card select{flex:1 1 100px;min-width:80px;padding:7px 9px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--text);font-size:13px;outline:none}
.tool-card input:focus,.tool-card textarea:focus,.tool-card select:focus{border-color:var(--accent)}
.tool-card textarea{resize:vertical}
.tc-btn{padding:7px 14px;border:none;border-radius:8px;background:var(--accent);color:#15120e;font-size:13px;font-weight:600;cursor:pointer;transition:opacity .15s}
.tc-btn:hover{opacity:.85}
.tc-btn.tc-ghost{background:transparent;color:var(--sub);border:1px solid var(--line)}
.tc-btn.tc-ghost:hover{color:var(--text);opacity:1}
.tc-text{margin:0;font-size:13px;color:var(--sub);line-height:1.7;word-break:break-all}
.tc-text b{color:var(--accent)}
.tc-note{margin:0;font-size:11px;color:var(--sub);opacity:.75}
.tc-swatches{display:flex;gap:8px;flex-wrap:wrap;min-height:44px}
.tc-swatch{flex:1 1 60px;max-width:110px;height:44px;border-radius:8px;cursor:pointer;position:relative;border:1px solid rgba(0,0,0,.08);transition:transform .12s}
.tc-swatch:hover{transform:scale(1.06)}
.tc-swatch i{position:absolute;left:0;right:0;bottom:4px;text-align:center;font-style:normal;font-size:10px;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.5);letter-spacing:.3px}
.tc-grad{height:64px;border-radius:8px;border:1px solid rgba(0,0,0,.08);background:linear-gradient(135deg,#ffe400,#ff7849)}
.toolbox input[type=color]{width:46px;height:34px;padding:2px;border:1px solid var(--line);border-radius:8px;background:var(--surface);cursor:pointer}
.tc-file{display:inline-block;padding:7px 14px;border-radius:8px;background:var(--surface);color:var(--text);border:1px solid var(--line);font-size:13px;font-weight:500;cursor:pointer;transition:border-color .15s}
.tc-file:hover{border-color:var(--accent)}
.tc-file input{display:none}
.tc-imgs{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:2px}
.tc-img-box{border:1px solid var(--line);border-radius:8px;padding:6px;background:var(--surface)}
.tc-img-label{font-size:11px;color:var(--sub);margin-bottom:4px}
.tc-img-box canvas{width:100%;height:auto;display:block;border-radius:4px;background-image:repeating-conic-gradient(#e2e2e2 0% 25%,#fff 0% 50%);background-size:14px 14px;cursor:crosshair}
.tool-card input[type=range]{flex:1 1 120px;min-width:90px;accent-color:var(--accent)}
.tc-thumbs{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;margin-top:4px}
.tc-thumb{display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 4px;border:1px solid var(--line);border-radius:8px;cursor:pointer;background:var(--surface)}
.tc-thumb:hover{border-color:var(--accent)}
.tc-thumb input{accent-color:var(--accent);cursor:pointer}
.tc-thumb canvas{width:44px;height:44px;image-rendering:auto;display:block;background-image:repeating-conic-gradient(#e2e2e2 0% 25%,#fff 0% 50%);background-size:12px 12px;border-radius:4px}
.tc-thumb i{font-style:normal;font-size:11px;color:var(--sub)}
@media (max-width:640px){
  .tc-imgs{grid-template-columns:1fr}
  .tc-thumbs{grid-template-columns:repeat(3,1fr)}
}

@media (max-width:1000px){
  .tb-pane.active{grid-template-columns:1fr}
  .tb-head{flex-direction:column;align-items:flex-start}
}

/* SEO 辅助：视觉隐藏但可被屏幕阅读器/搜索引擎读取 */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ============================================================
   内页（关于/联系/法律声明）· G123 风格文档页
   ============================================================ */
.doc-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 1000px;
    margin: 0 auto 0;
    padding: 12px 22px;
    background: linear-gradient(135deg, #fffdf0 0%, #ffffff 55%, #fdf6d8 100%);
    border: 1px solid #f0e3b8;
    border-bottom: 3px solid #ffe400;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(21, 18, 14, .06);
}
.doc-logo { display: flex; align-items: center; }
.doc-logo img { height: 32px; display: block; }
.doc-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.doc-nav a {
    font-size: 14.5px;
    color: #555;
    text-decoration: none;
    font-weight: 500;
    padding: 7px 15px;
    border-radius: 100px;
    transition: color .15s, background .15s, box-shadow .15s;
}
.doc-nav a:hover { color: #15120e; background: #fff3ae; }
.doc-nav a.active { color: #15120e; font-weight: 700; background: #ffe400; box-shadow: 0 2px 6px rgba(255, 228, 0, .45); }
.doc-main { max-width: 1000px; margin: 0 auto; padding: 28px 24px 10px;
}
.doc { max-width: 900px; margin: 0 auto; }
.doc .crumbs {
    font-size: 13px;
    color: #777;
    margin: 0 0 22px;
    display: inline-block;
    background: #f6f1df;
    border-radius: 100px;
    padding: 5px 15px;
}
.doc .crumbs a { color: #8a856f; text-decoration: none; }
.doc .crumbs a:hover { color: #15120e; }
.doc h1 {
    font-size: 28px;
    font-weight: 700;
    color: #15120e;
    margin: 0 0 12px;
    letter-spacing: .5px;
}
.doc .lead {
    color: #888;
    font-size: 14.5px;
    line-height: 1.7;
    margin: 0 0 30px;
}
.doc h2 {
    font-size: 18px;
    font-weight: 650;
    color: #15120e;
    margin: 28px 0 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.doc h2::before {
    content: "";
    width: 4px;
    height: 16px;
    border-radius: 2px;
    background: var(--accent);
}
.doc p {
    font-size: 14.5px;
    line-height: 1.9;
    color: #333;
    margin: 0 0 12px;
}
.doc ul, .doc ol { margin: 0 0 14px 22px; }
.doc li { font-size: 14.5px; line-height: 1.85; margin-bottom: 6px; color: #333; }
.doc a { color: #15120e; text-decoration: underline; }
.doc a:hover { color: #000; }
.doc img.inline { max-width: 100%; margin: 8px 0; border-radius: 8px; }
.doc .updated {
    margin-top: 36px;
    padding-top: 16px;
    border-top: 1px solid #ddd;
    font-size: 12px;
    color: #999;
    line-height: 1.9;
}
.doc .updated a { color: #999; text-decoration: none; }
.doc .updated a:hover { color: #15120e; }

.doc-foot { text-align: center; font-size: 12px; color: #999; padding: 8px 16px 24px;
    line-height: 1.9;
}
.doc-foot a { color: #999; text-decoration: none; }
.doc-foot a:hover { color: #15120e; }

@media (max-width: 900px) {
    .doc-topbar { gap: 12px; padding: 12px 16px; }
    .doc-nav { gap: 6px; }
    .doc-nav a { padding: 6px 11px; font-size: 13.5px; }
}
@media (max-width: 640px) {
    .doc-topbar { padding: 12px 12px; gap: 8px; }
    .doc-logo img { height: 26px; }
    .doc h1 { font-size: 24px; }
    .doc-main { padding: 20px 16px 40px; }
}
@media (max-width: 560px) {
    .doc-topbar { flex-direction: column; align-items: flex-start; padding: 14px 14px; }
    .doc-nav { gap: 8px; width: 100%; }
}

/* ===== 内页美化（about/contact/shengming/submit 等共享） ===== */
body { background: #f7f7f5; }
.doc-main { padding-top: 40px; }
.doc {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 16px;
    padding: 40px 48px;
    box-shadow: 0 2px 12px rgba(0,0,0,.03);
}
@media (max-width: 640px) {
    .doc { padding: 24px 20px; border-radius: 12px; }
}
.doc h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -.5px;
    margin-bottom: 14px;
}
.doc .lead {
    font-size: 15.5px;
    color: #666;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 28px;
}
.doc h2 {
    font-size: 19px;
    font-weight: 700;
    margin-top: 32px;
    margin-bottom: 14px;
}
.doc p, .doc li {
    font-size: 15px;
    line-height: 1.85;
    color: #333;
}
.doc ul, .doc ol {
    padding-left: 22px;
    margin: 12px 0;
}
.doc li { margin-bottom: 8px; }
.doc a {
    color: #15120e;
    text-decoration: none;
    background: linear-gradient(180deg, transparent 65%, rgba(255,228,0,.5) 65%);
}
.doc a:hover { background: linear-gradient(180deg, transparent 60%, #ffe400 60%); }
.doc .updated {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    font-size: 13px;
    color: #999;
}
.doc .updated a { background: none; }
.doc .updated a:hover { text-decoration: underline; }

/* ===== 首页底部 G123 风格 ===== */
.footer .f-links { margin-bottom: 10px; font-size: 14px; }
.footer .f-links a { color: #555; }
.footer .f-links .f-dot { color: #ccc; margin: 0 14px; }
.footer .f-slogan { font-size: 13px; color: #999; margin-bottom: 8px; }
.footer .f-copy { font-size: 12.5px; color: #999; line-height: 1.8; margin-bottom: 6px; }
.footer .f-icp { font-size: 12.5px; color: #999; }
.footer .f-icp a { color: #999; }
.footer .f-icp a:hover { color: #666; }

/* ===== B70 三入口导航：游戏(橙) / 工具箱(蓝) / 字体(绿) ===== */
.b70-subnav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    flex-wrap: wrap;
}
.b70-subnav-link {
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.3px;
    padding: 7px 18px;
    border-radius: 100px;
    background: #f3f4f6;
    transition: all .15s ease;
}
.b70-subnav-link:hover { background: #e5e7eb; }
.b70-subnav-game { color: #f5563d; }
.b70-subnav-tool { color: #2563eb; }
.b70-subnav-font { color: #16a34a; }
.b70-subnav-hot { color: #d97706; }
.b70-subnav-current, .b70-subnav-current:hover { color: #fff !important; }
.b70-subnav-game.b70-subnav-current { background: #f5563d; }
.b70-subnav-tool.b70-subnav-current { background: #2563eb; }
.b70-subnav-font.b70-subnav-current { background: #16a34a; }
.b70-subnav-hot.b70-subnav-current { background: #d97706; }
@media (max-width: 640px) {
    .b70-subnav { gap: 8px; margin-bottom: 16px; }
    .b70-subnav-link { font-size: 13px; padding: 6px 14px; }
}

/* ===== 手机端网站图标竖排（图标在上文字在下） ===== */
@media (max-width: 600px) {
    .site-list li { margin-right: 0; margin-bottom: 10px; width: 20%; }
    .site-list li:nth-child(6n) { margin-right: 0; }
    .site-list li:nth-child(5n) { margin-right: 0; }
    .site-list li .link {
        width: 100%;
        height: auto;
        min-height: 56px;
        line-height: 1.2;
        padding: 4px 2px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    .site-list li .link img {
        position: static;
        width: 28px;
        height: 28px;
        margin-bottom: 4px;
    }
    .site-list li .link .text {
        padding-left: 0;
        font-size: 11px;
        white-space: normal;
        word-break: break-word;
        overflow: visible;
        text-overflow: clip;
    }
}

/* ===== 手机端网站图标竖排 ===== */
@media (max-width: 600px) {
    .site-list li {
        width: 20% !important;
        margin-right: 0 !important;
        margin-bottom: 12px !important;
        float: left;
    }
    .site-list li .link {
        width: 100% !important;
        height: auto !important;
        min-height: 60px !important;
        line-height: 1.2 !important;
        padding: 4px 2px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        float: none !important;
        position: static !important;
    }
    .site-list li .link img,
    .site-list li .link .letter-avatar {
        display: none !important;
        position: static !important;
        width: 28px !important;
        height: 28px !important;
        margin: 0 !important;
    }
    .site-list li .link .text {
        padding-left: 0 !important;
        font-size: 11px !important;
        white-space: normal !important;
        word-break: break-word !important;
        overflow: visible !important;
        text-overflow: clip !important;
        text-align: center !important;
        line-height: 1.2 !important;
    }
}

/* ===== 手机端网站列表：药丸按钮样式 ===== */
@media (max-width: 600px) {
    .site-list li {
        width: 20% !important;
        margin-right: 0 !important;
        margin-bottom: 8px !important;
        float: left;
    }
    .site-list li .link {
        width: 92% !important;
        height: auto !important;
        min-height: 36px !important;
        line-height: 36px !important;
        padding: 0 4px !important;
        float: none !important;
        position: static !important;
        display: block !important;
        text-align: center !important;
        background: #f4f4f5 !important;
        border-radius: 18px !important;
        font-size: 12px !important;
        overflow: visible !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
    .site-list li .link:hover {
        background: #e9e9eb !important;
    }
    .site-list li .link img,
    .site-list li .link .letter-avatar {
        display: none !important;
    }
    .site-list li .link .text {
        padding-left: 0 !important;
        font-size: 12px !important;
        white-space: nowrap !important;
        overflow: visible !important;
        text-overflow: ellipsis !important;
        display: block !important;
    }
}

/* ===== 手机端网站列表：m/ 风格干净文字 ===== */
@media (max-width: 600px) {
    .site-list li {
        width: 20% !important;
        margin-right: 0 !important;
        margin-bottom: 10px !important;
        float: left;
    }
    .site-list li .link {
        width: 100% !important;
        height: auto !important;
        min-height: 32px !important;
        line-height: 32px !important;
        padding: 0 2px !important;
        float: none !important;
        position: static !important;
        display: block !important;
        text-align: center !important;
        background: transparent !important;
        border-radius: 0 !important;
        font-size: 13px !important;
        overflow: visible !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
    .site-list li .link img,
    .site-list li .link .letter-avatar {
        display: none !important;
    }
    .site-list li .link .text {
        padding-left: 0 !important;
        font-size: 13px !important;
        white-space: nowrap !important;
        overflow: visible !important;
        text-overflow: ellipsis !important;
        display: block !important;
        text-align: center !important;
    }
}

/* ===== 手机端长页面（m/ 风格） ===== */
@media (max-width: 600px) {
    #catNav { display: none !important; }
    .m-cat-section { margin: 1.5rem 0; }
    .m-cat-title {
        text-align: center;
        font-size: 1.1rem;
        font-weight: bold;
        margin: 0 0 1rem;
        position: relative;
        display: inline-block;
        left: 50%;
        transform: translateX(-50%);
    }
    .m-cat-title-text {
        position: relative;
        z-index: 1;
        background: linear-gradient(#ffe400 55%, transparent 45%);
        padding: 0 6px;
    }
    .m-site-grid {
        list-style: none;
        padding: 0;
        margin: 0;
        overflow: hidden;
    }
    .m-site-grid li {
        float: left;
        width: 20%;
        text-align: center;
        margin-bottom: 0.8rem;
    }
    .m-site-grid li a {
        display: block;
        padding: 0.3rem 0.2rem;
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: var(--text-main);
    }
}

/* 手机端三入口导航确保显示 */
@media (max-width: 600px) {
    .b70-subnav { display: flex !important; margin: 12px 0 16px !important; }
}

/* 手机端三入口导航条强制显示 */
@media (max-width: 600px) {
    .b70-subnav { display: none !important;
        justify-content: center !important;
        gap: 8px !important;
        margin: 10px 0 16px !important;
        padding: 0 !important;
        visibility: visible !important;
    }
    .b70-subnav-link {
        font-size: 13px !important;
        padding: 6px 14px !important;
        border-radius: 100px !important;
    }
}

/* 手机端常用大图标区 */
@media (max-width: 600px) {
    .m-top-grid {
        list-style: none;
        padding: 0;
        margin: 0 0 1rem;
        overflow: hidden;
    }
    .m-top-grid li {
        float: left;
        width: 16.66%;
        text-align: center;
        margin-bottom: 0.8rem;
    }
    .m-top-grid li a {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0.2rem;
    }
    .m-top-grid li img,
    .m-top-grid li .letter-avatar {
        width: 28px;
        height: 28px;
        margin-bottom: 4px;
        display: block;
    }
    .m-top-grid .m-top-name {
        font-size: 11px;
        color: var(--text-main);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
}

/* 修复：常用大图标每排6个 */
@media (max-width: 600px) {
    .m-top-grid {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 0 1rem !important;
        overflow: visible !important;
    }
    .m-top-grid li {
        float: left !important;
        width: 16.66% !important;
        text-align: center !important;
        margin-bottom: 0.8rem !important;
    }
}

/* 确保手机端内容可见 */
@media (max-width: 600px) {
    #siteList { display: block !important; }
    .m-cat-section { display: block !important; margin: 1rem 0 !important; }
    .m-top-grid li a { display: flex !important; flex-direction: column !important; align-items: center !important; }
}

/* 手机端顶部样式匹配 m/ */
@media (max-width: 600px) {
    .tb-clock { display: none !important; }
    .top-bar { display: none !important; }
    .search-pill {
        border: 1px solid #15120e !important;
        border-radius: 5px !important;
        overflow: visible !important;
        padding: 0 !important;
    }
    .search-inner { border-radius: 5px !important; }
    .search-btn {
        background: #ffe400 !important;
        border-radius: 0 5px 5px 0 !important;
    }
}

/* 手机端完整匹配 m/ 样式 */
@media (max-width: 600px) {
    body { background: #f7f7f5 !important; }
    .stage {
    margin-bottom: auto; background: #f7f7f5 !important; padding-top: 20px !important; }
    .logo-area { width: 180px !important; margin-bottom: 16px !important; }
    .logo-main { width: 180px !important; height: auto !important; }
    .search-pill {
        border: 1px solid #15120e !important;
        border-radius: 5px !important;
        overflow: visible !important;
        padding: 0 !important;
        height: 38px !important;
    }
    .search-inner { height: 38px !important; }
    .engine-switch {
        width: 38px !important;
        height: 38px !important;
        border-right: 1px solid #15120e !important;
        border-radius: 0 !important;
        background: #fff !important;
    }
    .search-input {
        height: 38px !important;
        border: none !important;
        font-size: 14px !important;
    }
    .search-btn {
        width: 42px !important;
        height: 38px !important;
        background: #ffe400 !important;
        background-image: url(../images/searchBtn.png?v=2.0) !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        border: none !important;
        border-radius: 0 !important;
    }
}

/* 手机端搜索框精确匹配 m/ */
@media (max-width: 600px) {
    .search-pill {
        border: 1px solid #333 !important;
        border-radius: 8px !important;
        padding: 0 !important;
        height: 38px !important;
        overflow: visible !important;
    }
    .search-inner {
        display: flex !important;
        align-items: stretch !important;
        height: 38px !important;
    }
    .engine-switch {
        width: 40px !important;
        height: 38px !important;
        border-right: 1px solid #333 !important;
        border-radius: 0 !important;
        background: #fff !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .engine-switch img {
        width: 18px !important;
        height: 18px !important;
    }
    .search-input {
        flex: 1 !important;
        height: 38px !important;
        border: none !important;
        font-size: 14px !important;
        padding: 0 8px !important;
    }
    .search-btn {
        width: 44px !important;
        height: 38px !important;
        border: none !important;
        border-radius: 0 !important;
        background: #ffe400 !important;
        background-image: url(../images/searchBtn.png?v=2.0) !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        cursor: pointer !important;
    }
}

/* 修复手机端搜索框 flex */
@media (max-width: 600px) {
    .search-inner form {
        flex: 1 !important;
        display: flex !important;
        align-items: stretch !important;
    }
    .search-input {
        flex: 1 !important;
        width: auto !important;
    }
}

/* 手机端引擎图标方块居中 */
@media (max-width: 600px) {
    .engine-switch {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .engine-switch img {
        margin: 0 auto !important;
    }
}

/* 手机端压缩底部空白 */
@media (max-width: 600px) {
    #siteList { margin-bottom: 0 !important; padding-bottom: 0 !important; }
    .m-cat-section:last-child { margin-bottom: 0 !important; }
    .stage {
    margin-bottom: auto; padding-bottom: 20px !important; }
    .footer {
    margin-top: 40px; margin-top: 20px !important; padding-top: 10px !important; }
}

/* 返回顶部按钮 */
#backTop {
    display: none;
    position: fixed !important;
    right: 16px;
    bottom: 80px;
    width: 36px;
    height: 36px;
    background: #f0f0f0;
    border-radius: 50%;
    text-align: center;
    line-height: 36px;
    cursor: pointer;
    z-index: 9999;
    transition: all .2s;
}
#backTop:hover { background: #e0e0e0; }
#backTop:active { background: #f5563d !important; }
@media (max-width: 600px) {
    #backTop { display: block !important; }
}

/* 手机端引擎下拉菜单 */
@media (max-width: 600px) {
    .engine-switch { position: relative !important; }
    .engine-menu { width: 200px !important; left: 0 !important; }
    .eng-item { width: 100% !important; }
}

/* 手机端引擎下拉菜单强制显示 */
@media (max-width: 600px) {
    .search-inner { overflow: visible !important; }
    .engine-menu.show {
        display: flex !important;
        width: 180px !important;
        z-index: 9999 !important;
        position: absolute !important;
        top: 46px !important;
        left: 0 !important;
        background: #fff !important;
        border: 1px solid #ddd !important;
        box-shadow: 0 4px 16px rgba(0,0,0,.15) !important;
    }
    .engine-menu.show .eng-item {
        width: 100% !important;
        padding: 8px 10px !important;
    }
}

/* 手机端引擎菜单美化 */
@media (max-width: 600px) {
    .engine-menu.show {
        width: 160px !important;
        border-radius: 10px !important;
        padding: 6px 0 !important;
        box-shadow: 0 6px 20px rgba(0,0,0,.12) !important;
        border: none !important;
    }
    .engine-menu.show .eng-item {
        padding: 10px 14px !important;
        font-size: 14px !important;
        border-radius: 0 !important;
    }
    .engine-menu.show .eng-item:active {
        background: #f5f5f5 !important;
    }
    .engine-menu.show .eng-item img {
        width: 18px !important;
        height: 18px !important;
    }
}

/* 引擎菜单 m/ 风格 */
@media (max-width: 600px) {
    .engine-menu.show {
        width: 150px !important;
        background: #fff !important;
        border: none !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 12px rgba(0,0,0,.15) !important;
        padding: 4px 0 !important;
    }
    .engine-menu.show .eng-item {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        padding: 8px 12px !important;
        width: 100% !important;
        font-size: 14px !important;
        color: #333 !important;
    }
    .engine-menu.show .eng-item img {
        width: 16px !important;
        height: 16px !important;
        flex-shrink: 0 !important;
    }
}

/* 引擎菜单 m/ 精确风格 */
@media (max-width: 600px) {
    .engine-menu.show {
        width: 176px !important;
        background: #fff !important;
        border: 1px solid #e5e5e5 !important;
        border-radius: 5px !important;
        box-shadow: 0 4px 12px rgba(0,0,0,.12) !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
    .engine-menu.show .eng-item {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        height: 44px !important;
        padding: 0 12px !important;
        font-size: 15px !important;
        color: #333 !important;
        gap: 10px !important;
    }
    .engine-menu.show .eng-item img {
        width: 20px !important;
        height: 20px !important;
    }
}

/* 引擎菜单最终 m/ 风格 */
@media (max-width: 600px) {
    .engine-menu.show {
        width: 150px !important;
    }
    .engine-menu.show .eng-item {
        height: 40px !important;
        font-size: 14px !important;
        gap: 10px !important;
    }
    .engine-menu.show .eng-item img {
        width: 18px !important;
        height: 18px !important;
    }
}

/* 引擎菜单定位修正 */
@media (max-width: 600px) {
    .engine-switch { position: relative !important; z-index: 100 !important; }
    .engine-menu.show {
        left: 0 !important;
        top: 100% !important;
    }
}

/* 引擎菜单图标文字对齐修正 */
@media (max-width: 600px) {
    .engine-menu.show .eng-item {
        display: flex !important;
        align-items: center !important;
        line-height: 1 !important;
    }
    .engine-menu.show .eng-item img {
        display: block !important;
        margin: 0 !important;
    }
    .engine-menu.show .eng-item span {
        display: block !important;
        line-height: 1 !important;
        margin: 0 !important;
    }
}

/* 引擎菜单缩小 */
@media (max-width: 600px) {
    .engine-menu.show {
        width: 130px !important;
    }
    .engine-menu.show .eng-item {
        height: 34px !important;
        font-size: 13px !important;
    }
    .engine-menu.show .eng-item img {
        width: 16px !important;
        height: 16px !important;
    }
}

/* 工具箱按钮 */
#toolBtn {
    display: none;
    position: fixed !important;
    right: 16px;
    bottom: 124px;
    width: 36px;
    height: 36px;
    background: #f0f0f0;
    border-radius: 50%;
    text-align: center;
    line-height: 36px;
    cursor: pointer;
    z-index: 9999;
    transition: all .2s;
}
#toolBtn:hover { background: #e0e0e0; }
@media (max-width: 600px) {
    #toolBtn { display: block !important; }
}

/* 手机端隐藏历史记录 */
@media (max-width: 600px) {
    .recents { display: none !important; }
}

/* 手机端搜索框美化 */
@media (max-width: 600px) {
    .search-pill {
        border-radius: 20px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,.08) !important;
        background: #fff !important;
    }
    .engine-switch {
        border-radius: 20px 0 0 20px !important;
    }
    .search-btn {
        border-radius: 0 20px 20px 0 !important;
    }
    .search-input {
        font-size: 15px !important;
    }
}

/* PC端分类标题 */
.site-list .cat-title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin: 20px 0 10px;
    padding-left: 0;
}



/* 自定义网站样式 */
#customSites li a {
    display: flex !important;
    align-items: center;
    padding: 6px 8px;
    font-size: 13px;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: background 0.2s;
}
#customSites li a:hover {
    background: #f5f5f5;
}
#customSites li a span.icon-char {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #ffe400;
    border-radius: 6px;
    margin-right: 6px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0; align-self: flex-start; height: 22px;
}

/* ========== 暗色模式 ========== */
body.theme-dark {
    background-color: #2d2d30 !important;
    color: #fff !important;
}
body.theme-dark .search-pill {
    background: #38383c !important;
    border: 1px solid #444 !important;
}
body.theme-dark .engine-switch {
    background: #38383c !important;
    border-color: #444 !important;
}
body.theme-dark .search-input {
    color: #fff !important;
    background: #38383c !important;
}
body.theme-dark .cat-item {
    color: #aaa !important;
}
body.theme-dark .cat-item.active {
    color: #fff !important;
}
body.theme-dark .site-list a {
    color: #ddd !important;
}
body.theme-dark .recents {
    background: #38383c !important;
    border-color: #444 !important;
    color: #aaa !important;
}
body.theme-dark .footer {
    color: #888 !important;
}
body.theme-dark .top-bar {
    color: #aaa !important;
}
body.theme-dark .top-bar button {
    background: #38383c !important;
    border-color: #444 !important;
    color: #ddd !important;
}
body.theme-dark .b70-subnav-link {
    background: #38383c !important;
    color: #ddd !important;
}
body.theme-dark .logo-main {
    filter: invert(1) brightness(0.9);
}

body.theme-black {
    background-color: #0f0f0f !important;
    color: #fff !important;
}
body.theme-black .search-pill {
    background: #181818 !important;
    border: 1px solid #222 !important;
}
body.theme-black .engine-switch {
    background: #181818 !important;
    border-color: #222 !important;
}
body.theme-black .search-input {
    color: #fff !important;
    background: #181818 !important;
}
body.theme-black .cat-item {
    color: #aaa !important;
}
body.theme-black .cat-item.active {
    color: #fff !important;
}
body.theme-black .site-list a {
    color: #ddd !important;
}
body.theme-black .recents {
    background: #181818 !important;
    border-color: #222 !important;
    color: #aaa !important;
}
body.theme-black .footer {
    color: #888 !important;
}
body.theme-black .top-bar {
    color: #aaa !important;
}
body.theme-black .top-bar button {
    background: #181818 !important;
    border-color: #222 !important;
    color: #ddd !important;
}
body.theme-black .b70-subnav-link {
    background: #181818 !important;
    color: #ddd !important;
}
body.theme-black .logo-main {
    filter: invert(1) brightness(0.9);
}

/* ===== 历史记录：右上角按钮 + 弹出面板 ===== */
.rec-btn-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    cursor: pointer;
    margin-left: 8px;
    vertical-align: middle;
}
.rec-btn-top svg {
    width: 14px;
    height: 14px;
    stroke: #8b5cf6;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.rec-btn-top:hover { background: linear-gradient(135deg, #c4b5fd, #8b5cf6); }
.rec-btn-top:hover svg { stroke: #fff; }
body.theme-dark .rec-btn-top { background: #38383c !important; }
body.theme-dark .rec-btn-top svg { stroke: #c4b5fd; }
body.theme-black .rec-btn-top { background: #181818 !important; }
body.theme-black .rec-btn-top svg { stroke: #c4b5fd; }

.recents {
    width: 300px !important;
    max-width: calc(100vw - 44px) !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 14px !important;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.14) !important;
    background: #fff !important;
    position: fixed !important;
    right: 16px !important;
    top: 46px !important;
    z-index: 95 !important;
    overflow: hidden;
    display: none;
}
.recents.show { display: block !important; }
.rec-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 8px;
}
.rec-panel-title {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.rec-panel-title svg {
    width: 16px;
    height: 16px;
    stroke: #8b5cf6;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.rec-clear { font-size: 12px; color: #94a3b8; cursor: pointer; padding: 3px 8px; border-radius: 6px; }
.rec-clear:hover { color: #f5563d; background: #fef2f2; }
.rec-panel-body { padding: 0 8px 10px; max-height: 320px; overflow-y: auto; }
.rec-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 8px;
    text-decoration: none;
    color: #475569;
    font-size: 13px;
}
.rec-item:hover { background: #f5f6fa; color: #111827; }
.rec-item img {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: contain;
    background: #f1f3f5;
    flex-shrink: 0;
}
.rec-empty { padding: 26px 16px 22px; text-align: center; }
.rec-empty svg {
    display: block;
    width: 44px;
    height: 44px;
    margin: 0 auto 10px;
    stroke: #c4b5fd;
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.rec-empty p { margin: 4px 0 2px; font-size: 13px; color: #64748b; }
.rec-empty span { font-size: 12px; color: #94a3b8; }
body.theme-dark .recents,
body.theme-black .recents {
    background: #38383c !important;
    border-color: #444 !important;
}
body.theme-dark .rec-item,
body.theme-black .rec-item { color: #ccc !important; }
body.theme-dark .rec-item:hover,
body.theme-black .rec-item:hover { background: #4a4a4e !important; }
body.theme-dark .rec-panel-title,
body.theme-black .rec-panel-title { color: #eee !important; }
/* 移动端隐藏 */
@media (max-width: 600px) {
    .rec-btn-top { display: none !important; }
    .recents { display: none !important; }
}
