/* ==========================================================================
   AIGC 主题美化层  https://aigc.izzi.cn
   现代化视觉系统：翡翠绿主色 / 柔和阴影 / 圆角 / 深色模式
   本文件为独立覆盖层，在 nav.css 之后加载，不修改原样式文件，便于回滚
   ========================================================================== */

/* ---------- 设计令牌（亮色） ---------- */
:root {
    --brand:        #111111;
    --brand-strong: #000000;
    --brand-soft:   #3a3a3a;
    --brand-tint:   rgba(17, 17, 17, .06);
    --brand-tint-2: rgba(17, 17, 17, .12);
    --brand-grad:   linear-gradient(135deg, #333333 0%, #111111 100%);

    --bg:           #f6f6f7;
    --bg-soft:      #efeff0;
    --surface:      #ffffff;
    --surface-2:    #fafafa;
    --surface-3:    #f0f0f0;

    --text:         #111111;
    --text-2:       #4a4a4a;
    --text-muted:   #8c8c8c;

    --border:       rgba(0, 0, 0, .08);
    --border-strong:rgba(0, 0, 0, .14);

    --radius-sm:    8px;
    --radius:       12px;
    --radius-lg:    16px;
    --radius-pill:  999px;

    --shadow-sm:    0 1px 2px rgba(0, 0, 0, .04);
    --shadow:       0 4px 16px -4px rgba(0, 0, 0, .08);
    --shadow-lg:    0 18px 40px -16px rgba(0, 0, 0, .18);
    --shadow-brand: 0 14px 30px -14px rgba(0, 0, 0, .45);
}

/* ---------- 基础 / 字体 ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
    background-color: var(--bg);
    background-image: radial-gradient(1200px 520px at 85% -10%, rgba(0, 0, 0, .035), transparent 60%);
    background-attachment: fixed;
    color: var(--text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
a { color: var(--text); transition: color .2s ease; }
a:hover, a:focus { color: var(--brand); text-decoration: none; }
.tab-content p, .mb-5 p { color: var(--text-muted); }

/* 可访问焦点 */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   顶部导航栏 —— 毛玻璃
   ========================================================================== */
.navbar .navbar-content {
    background: rgba(255, 255, 255, .78);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    box-shadow: 0 1px 0 var(--border);
    padding-bottom: 0;
}
.user-info-navbar .user-info-menu > li > a {
    color: var(--text-2);
    font-weight: 500;
    padding: 16px 12px;
}
.user-info-navbar .user-info-menu > li > a:hover {
    color: var(--brand);
    background: transparent;
}
.user-info-navbar .user-info-menu > li:not(.hidden-xs) { color: var(--text-muted); }

/* ==========================================================================
   侧栏 —— 深色
   说明：站内 logo 是白色笔划的透明 PNG，必须落在深色底上才可见；
   深色侧栏 + 白色内容区也正好构成黑白的对比基调。
   ========================================================================== */
.sidebar-menu {
    background: #131316;
    border-right: 0;
}
.sidebar-menu .logo-env {
    padding: 18px 26px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.sidebar-menu .main-menu {
    padding: 14px 16px;
    margin-top: 8px;
}
/* 圆角菜单项，替换原来的深色分隔线 */
.sidebar-menu .main-menu a {
    color: rgba(255, 255, 255, .72);
    padding: 10px 12px;
    margin: 2px 0;
    border-bottom: 0;
    border-radius: var(--radius-sm);
    font-weight: 500;
    position: relative;
}
.sidebar-menu .main-menu a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, .08);
}
/* 激活态：白色文字 + 浅白底 + 左侧指示条 */
.sidebar-menu .main-menu li.active > a {
    color: #ffffff;
    background: rgba(255, 255, 255, .12);
    font-weight: 600;
}
.sidebar-menu .main-menu li.active > a::before {
    content: "";
    position: absolute;
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    border-radius: 0 3px 3px 0;
    background: #ffffff;
}
.sidebar-menu .main-menu li.has-sub > a::before { color: rgba(255, 255, 255, .40); }

/* 子菜单 */
.sidebar-menu .main-menu ul li a { padding-left: 34px; }
.sidebar-menu .main-menu ul li a:hover { background: rgba(255, 255, 255, .08); }

/* 折叠态 */
.sidebar-menu.collapsed .main-menu > li.active,
.sidebar-menu.collapsed .main-menu > li li.active { background-color: transparent; }
.sidebar-menu.collapsed .main-menu > li.active > a { background: rgba(255, 255, 255, .12); }

/* ==========================================================================
   搜索区
   ========================================================================== */
#search { border-radius: var(--radius-lg); }
#search form { position: relative; }
#search-text {
    height: 56px;
    padding: 0 76px 0 22px;
    font-size: 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: box-shadow .25s ease, border-color .25s ease;
}
#search-text::placeholder { color: var(--text-muted); }
#search-text:focus {
    border-color: var(--brand-soft);
    box-shadow: 0 0 0 4px var(--brand-tint), var(--shadow);
}
#search button {
    top: 6px;
    right: 6px;
    width: 52px;
    height: 44px;
    margin: 0;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--brand-grad);
    box-shadow: var(--shadow-brand);
    transition: transform .15s ease, filter .2s ease;
}
#search button:hover { background: var(--brand-grad); filter: brightness(1.05); }
#search button:active { transform: scale(.94); }
#search button i { color: #fff; font-size: 17px; }

/* 搜索引擎切换标签 */
.search-type li label {
    font-size: 14px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    color: var(--text-2);
}
.search-type input:checked + label,
.search-type input:hover + label {
    background: var(--surface);
    color: var(--brand-strong);
}
.s-type-list {
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}
.s-type-list::before { border-bottom-color: var(--surface); }
.type-text { color: var(--text-2); }

/* ==========================================================================
   分区标题 + 标签页
   ========================================================================== */
h4.text-gray {
    color: var(--text) !important;
    font-weight: 700;
    font-size: 17px;
    margin-top: 2.2rem;
}
h4.text-gray > i { color: var(--brand); }

/* 子分类胶囊导航 */
.slider_menu.mini_tab > ul {
    background: var(--surface-3) !important;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill) !important;
    padding: 4px;
    gap: 2px;
}
.slider_menu .nav-item .nav-link {
    border-radius: var(--radius-pill);
    color: var(--text-2);
    padding: 6px 16px;
    font-weight: 500;
    transition: all .2s ease;
}
.slider_menu .nav-item .nav-link:hover {
    color: var(--brand-strong);
    background: var(--brand-tint);
}
.slider_menu .nav-item.active > .nav-link {
    color: #fff;
    background: var(--brand-grad);
    box-shadow: var(--shadow-brand);
}

/* 有子类区块：标签轨道收缩贴合内容 */
.flex-tab .slider_menu.mini_tab {
    flex: 0 0 auto;
    min-width: 0;
    max-width: 100%;
}
.flex-tab .slider_menu.mini_tab > ul {
    display: inline-flex;
    width: auto;
    max-width: 100%;
}

/* ==========================================================================
   网址卡片
   ========================================================================== */
.xe-card { height: 78px; margin-top: 18px; }
.xe-widget.xe-conversations {
    padding: 14px 16px;
    margin: 0 8px;
}
.box2 {
    height: 78px;
    padding: 0 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.box2:hover, .box2:focus {
    transform: translateY(-3px);
    background: var(--surface);
    border-color: var(--brand-tint-2);
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--brand-tint);
}
.xe-comment-entry img {
    background: var(--surface-3);
    border-radius: var(--radius-sm);
    padding: 4px;
}
.xe-user-name strong { font-weight: 600; color: var(--text); }
.xe-comment p { color: var(--text-muted); font-size: 13px; }

/* 国家标签：跟在标题后面 */
.site-card-country {
    float: none;
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
    line-height: 1.5;
    vertical-align: middle;
    color: var(--text-muted);
    background: var(--surface-3);
}

/* 「热 / 新 / 网站已关闭」角标：贴在卡片左上角。
   原样式 .site-card-badge 是绝对定位，而卡片本身没有建立定位上下文，
   这里给卡片补上 position: relative，否则角标会定位到页面左上角而看不见。 */
.box2 { position: relative; }
.site-card-badge {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    padding: 0 9px;
    border-radius: var(--radius-lg) 0 var(--radius) 0;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    color: #fff;
    background: #111111;
}
.site-card-badge small { font-size: inherit; line-height: 1; }

/* 角标语义配色（黑白基调上的少量点缀色）
   热 = 橙红 ／ 新 · 今日 = 蓝 ／ 网站已关闭 = 中性灰 ／ 网站筹备中 = 琥珀 */
.site-card-badge.site-card-hot  { color: #fff; background: #f04438; }
.site-card-badge.site-card-new  { color: #fff; background: #2563eb; }
.site-card-badge.site-card-off  { color: #fff; background: #6b7280; }
.site-card-badge.site-card-soon { color: #fff; background: #d97706; }

/* ==========================================================================
   面板 / 评论 / 按钮 / 分页
   ========================================================================== */
.panel, .comments-area {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
input[type="text"], input[type="email"], input[type="url"], input[type="password"],
input[type="search"], input[type="number"], input[type="tel"], textarea, select {
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
}
input:focus, textarea:focus, select:focus {
    border-color: var(--brand-soft);
    box-shadow: 0 0 0 3px var(--brand-tint);
    outline: 0;
}
input[type="button"], input[type="submit"],
.but-home, .btn-cat, .panel-tougao button {
    background: var(--brand-grad);
    border-radius: var(--radius-sm);
    font-weight: 600;
}
input[type="button"]:hover, input[type="submit"]:hover,
.but-home:hover, .btn-cat:hover, .panel-tougao button:hover {
    filter: brightness(1.05);
    color: #fff;
}
.posts-nav .page-numbers { border-radius: var(--radius-sm); }
.posts-nav .page-numbers.current,
.posts-nav .page-numbers:not(.dots):hover {
    background: var(--brand-grad);
    box-shadow: var(--shadow-brand);
}
.nothing {
    background: var(--surface-2);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
}

/* ==========================================================================
   排行榜页（/aigc-top100、/aigc-cn-top100、/rankings）
   结构：.panel.panel-top > ol > li.aigc-top > strong.top-strong-title（序号 + 图标 + 名称 + 浏览量）+ p
   ========================================================================== */
.panel-top { padding: 16px 20px 20px; }
.panel-top > ol {
    list-style: none;
    margin: 0;
    padding: 0;
}
.panel-top > ol > li.aigc-top {
    line-height: 1.6;
    padding: 14px 18px;
    margin-top: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.panel-top > ol > li.aigc-top:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow);
}

/* 标题行：序号 + 图标 + 名称 + 浏览量 */
.top-strong-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}
.top-strong-title > img {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    padding: 3px;
    background: var(--surface-3);
    border-radius: 50%;
    object-fit: contain;
}
.top-strong-title > a,
.top-strong-title a {
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
}
.top-strong-title > a:hover,
.top-strong-title a:hover {
    color: var(--brand);
    text-decoration: none;
}

/* 排名序号徽章（等宽，hover 卡片时反色） */
.top-strong-title > span {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 26px;
    padding: 0 8px;
    border-radius: var(--radius-sm);
    background: var(--surface-3);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    transition: background .2s ease, color .2s ease;
}
.panel-top > ol > li.aigc-top:hover .top-strong-title > span {
    background: #111111;
    color: #ffffff;
}

/* 浏览量：右侧胶囊，弱化处理 */
.top-strong-title > small {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 11px;
    border-radius: var(--radius-pill);
    background: var(--surface-3);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}
.top-strong-title > small .fa { color: var(--text-muted); font-size: 12px; }

/* 每项的说明文字 */
.panel-top > ol > li.aigc-top > p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13.5px;
    line-height: 1.75;
}

/* 列表里夹带的广告位：不套卡片样式 */
.panel-top > ol > li.aigc-top:has(.ad) {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    transform: none;
}
.panel-top > ol > li.aigc-top:has(.ad):hover { transform: none; box-shadow: none; }
.panel-top .ad img { max-width: 100%; height: auto; }

/* 顶部 tab 切换 */
.tab-buttons { justify-content: center; gap: 8px; }
.tab-button {
    flex: 0 1 auto;
    min-width: 0;
    padding: 0;
    background: var(--surface-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    transition: background .2s ease, border-color .2s ease;
}
.tab-button > a {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    color: var(--text-2);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}
.tab-button:hover { background: var(--surface-2); border-color: var(--border-strong); }
.tab-button:hover > a { color: var(--text); }
.tab-button.active { background: #111111; border-color: #111111; }
.tab-button.active > a { color: #ffffff; font-weight: 600; }

/* 分类筛选胶囊 */
.category-filter { margin: 18px 0 6px !important; }
.filter-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-button {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text-2);
    font-size: 13px;
    line-height: 1.6;
    text-decoration: none;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.filter-button:hover {
    color: var(--text);
    background: var(--surface-2);
    border-color: var(--border-strong);
    text-decoration: none;
}
.filter-button.active {
    background: #111111;
    border-color: #111111;
    color: #ffffff;
    font-weight: 600;
}

/* ---------- 排行榜页头部：标题 / 说明 / 分享按钮 ---------- */
.main-content .panel-default { margin-bottom: 0; }
.main-content .panel-default > h1.h2 {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--text);
}
/* 说明文字：模板里是 h5 里嵌灰色 span，这里统一做成柔和的提示块 */
.main-content .panel-body h5 {
    margin: 0 0 16px;
    padding: 12px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.85;
    color: var(--text-muted);
}
.main-content .panel-body h5 span { color: inherit !important; }
.main-content .panel-body h5 span:first-child { color: var(--text-2) !important; font-weight: 600; }

/* 头部卡片与榜单卡片之间留出间距（模板把 margin-bottom 置 0 了） */
.main-content .panel-default + .panel.panel-top { margin-top: 20px; }

/* 分享按钮组（模板输出的是裸链接，这里补成胶囊） */
.sss-share-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.sss-label { color: var(--text-muted); font-size: 13px; }
.sss-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text-2);
    font-size: 13px;
    line-height: 1.6;
    text-decoration: none;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.sss-btn:hover {
    background: var(--surface-2);
    border-color: var(--border-strong);
    color: var(--text);
    text-decoration: none;
}
.sss-icon { display: inline-flex; align-items: center; }
.sss-icon svg { display: block; }
.sss-count {
    min-width: 18px;
    padding: 0 6px;
    border-radius: var(--radius-pill);
    background: var(--surface-3);
    color: var(--text-muted);
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}

/* ---------- 排名序号：这两个模板没输出序号，用 CSS 计数器生成 ---------- */
.panel-top > ol { counter-reset: rank; }
.panel-top > ol > li.aigc-top:not(:has(.ad)) { counter-increment: rank; }
.panel-top > ol > li.aigc-top > .top-strong-title::before {
    content: counter(rank);
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
    padding: 0 8px;
    border-radius: var(--radius-sm);
    background: var(--surface-3);
    color: var(--text-2);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}
/* rankings 页模板自带 <span> 序号，避免重复显示（“编辑”链接的 span 不算） */
.panel-top > ol > li.aigc-top > .top-strong-title:has(> span:not(.edit-link))::before { display: none; }

/* ---------- 排名项内部排版 ---------- */
.panel-top > ol > li.aigc-top > p { margin: 0 0 6px; }
.panel-top > ol > li.aigc-top > p:last-child { margin-bottom: 0; }
/* 分类标签：原来是黑底白字、hover 变蓝，改成浅色胶囊 */
.panel-top > ol > li.aigc-top .btn-cat {
    display: inline-flex;
    align-items: center;
    margin: 2px 4px 2px 0;
    padding: 2px 10px;
    background: var(--surface-3);
    border-radius: var(--radius-pill);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.7;
    text-decoration: none;
}
.panel-top > ol > li.aigc-top .btn-cat:hover { background: #111111; color: #ffffff; }
.panel-top > ol > li.aigc-top .edit-link a { color: var(--text-muted); font-size: 12px; font-weight: 400; }

/* ==========================================================================
   页脚（本项目结构：footer-inner / footer-info / footer-text）
   ========================================================================== */
footer.main-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    margin-top: 48px;
    padding: 24px 16px 8px;
}
footer.main-footer .footer-inner {
    max-width: none;   /* 去掉原 1320px 上限，直接铺满页脚可用宽度 */
    margin: 0 auto;
    padding: 0;
}

/* 第一段：收藏提示条（footer 的第 2 个 div 即第一个 .footer-inner） */
footer.main-footer .footer-inner:nth-of-type(2) { padding-top: 32px; text-align: center; }
footer.main-footer .footer-inner > h4 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 30px;
    padding: 10px 20px;
    max-width: 100%;
    background: var(--brand-tint);
    border-radius: var(--radius-pill);
    color: var(--text-2);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.6;
    text-align: center;
}
/* 第二段：三块信息（简介 / 页面链接 / 二维码） */
footer.main-footer .footer-inner + .footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: flex-start;
}
/* 覆盖 nav.css 的 max-width:33.333% / float:left / min-width:310px，
   否则三栏宽度会被压到 33% 以内（移动端会把二维码栏挤到比图片还窄） */
footer.main-footer .footer-info { flex: 1 1 0; min-width: 0; max-width: none; }
footer.main-footer .footer-info:first-child { flex: 2.2 1 0; }
footer.main-footer .footer-info:last-child { flex: 1.4 1 0; }

footer.main-footer .footer-info-text {
    margin: 0 0 10px;
    color: var(--text-2);
    font-size: 13.5px;
    line-height: 1.85;
}
footer.main-footer .footer-info-text strong { color: var(--text); font-weight: 600; }
footer.main-footer .footer-info-text a {
    display: inline-block;
    margin-right: 10px;
    color: var(--text-2);
}
footer.main-footer .footer-info-text a:hover { color: var(--brand); }

/* ---------- 页脚导航链接组（关于 / 合作） ---------- */
/* 分组小标题（“关于：”“合作：”） */
footer.main-footer .footer-info-text > strong {
    display: block;
    margin-bottom: 10px;
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}
footer.main-footer .footer-info-text > strong::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 14px;
    margin-right: 8px;
    vertical-align: -2px;
    border-radius: 2px;
    background: #111111;
}
/* 导航链接做成胶囊 */
footer.main-footer .footer-info-text > a {
    display: inline-flex;
    align-items: center;
    margin: 0 8px 8px 0;
    padding: 5px 13px;
    background: var(--surface-3);
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    color: var(--text-2);
    font-size: 13px;
    line-height: 1.6;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}
footer.main-footer .footer-info-text > a:hover {
    background: #111111;
    color: #ffffff;
    text-decoration: none;
}
/* 链接组不要套用简介那套 4 行截断（否则链接一多就被裁掉） */
footer.main-footer .footer-info-text:has(> a) {
    max-width: 100%;
    overflow: visible;
    display: block;
    -webkit-line-clamp: unset;
}

/* 二维码栏：每个二维码「图在上、文字在下」，整体在栏内居中 */
footer.main-footer .footer-qr {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 24px;
}
footer.main-footer .qr-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}
footer.main-footer .footer-info img {
    display: block;
    width: 96px;
    height: 96px;
    padding: 5px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    object-fit: contain;
}
footer.main-footer .qr-item > span {
    color: var(--text-2);
    font-size: 13px;
    line-height: 1.6;
    white-space: nowrap;
}

/* 版权行 */
footer.main-footer .footer-text {
    float: none; /* 覆盖 nav.css 的 float:left，让版权行真正居中 */
    max-width: none;
    margin: 26px auto 0;
    padding: 18px 0 4px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}
footer.main-footer .footer-text a { color: var(--text-2); }
footer.main-footer .footer-text a:hover { color: var(--brand); }

/* 回到顶部 */
footer.main-footer .go-up a { background: var(--brand); box-shadow: var(--shadow-brand); }
footer.main-footer .go-up a:hover { background: var(--brand-strong); }

/* ==========================================================================
   深色模式（body.black）
   ========================================================================== */
body.black {
    --brand:        #ffffff;
    --brand-strong: #ffffff;
    --brand-soft:   #d4d4d4;
    --brand-tint:   rgba(255, 255, 255, .10);
    --brand-tint-2: rgba(255, 255, 255, .18);
    --brand-grad:   linear-gradient(135deg, #f5f5f5 0%, #cfcfcf 100%);

    --bg:           #0b0b0c;
    --bg-soft:      #101012;
    --surface:      #161618;
    --surface-2:    #1c1c1f;
    --surface-3:    #242428;

    --text:         #f2f2f3;
    --text-2:       #b9b9bd;
    --text-muted:   #85858b;

    --border:       rgba(255, 255, 255, .09);
    --border-strong:rgba(255, 255, 255, .16);

    background-color: var(--bg);
    background-image: radial-gradient(1100px 480px at 85% -10%, rgba(255, 255, 255, .04), transparent 60%);
    color: var(--text);
}
body.black, body.black a:not(.btn), body.black .button > a { color: var(--text-2); }
body.black a:hover, body.black a:focus { color: var(--brand); }
body.black p, body.black .tab-content p { color: var(--text-muted); }
body.black .text-gray { color: var(--text) !important; }

body.black .navbar .navbar-content {
    background: rgba(17, 21, 28, .72);
    box-shadow: 0 1px 0 var(--border);
}
body.black .sidebar-menu { background: var(--surface); border-right: 1px solid var(--border); }
body.black .sidebar-menu .logo-env { border-bottom: 1px solid var(--border); }

body.black .xe-widget.xe-conversations,
body.black .panel, body.black .comments-area { background: var(--surface); }
body.black .xe-widget.xe-conversations:hover,
body.black .xe-widget.xe-conversations:focus { background: var(--surface) !important; }
body.black .box2 { background: var(--surface); border: 1px solid var(--border); }
body.black .box2:hover, body.black .box2:focus { background: var(--surface-2); }
body.black .xe-comment-entry img { background: var(--surface-3); }
body.black .xe-user-name strong { color: var(--text); }

body.black #search-text { background: var(--surface); border-color: var(--border); color: var(--text); }
body.black .search-type input:checked + label,
body.black .search-type input:hover + label { background: var(--surface-2); color: var(--brand); }
body.black .s-type-list { background: var(--surface-2); border-color: var(--border); }
body.black .s-type-list::before { border-bottom-color: var(--surface-2); }

body.black select,
body.black input[type="text"], body.black input[type="email"], body.black input[type="url"],
body.black input[type="password"], body.black input[type="search"], body.black input[type="number"],
body.black input[type="tel"], body.black textarea {
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--border);
}
body.black .slider_menu.mini_tab > ul { background: var(--surface-3) !important; border-color: var(--border); }
/* 深色下角标保留各自的语义色（在深色卡片上对比依然充足） */
body.black .site-card-badge { color: #111; background: #f2f2f3; }
body.black .site-card-badge.site-card-hot  { color: #fff; background: #f04438; }
body.black .site-card-badge.site-card-new  { color: #fff; background: #2563eb; }
body.black .site-card-badge.site-card-off  { color: #fff; background: #6b7280; }
body.black .site-card-badge.site-card-soon { color: #fff; background: #d97706; }

/* 深色下品牌渐变是浅色的，落在渐变上的文字/图标要改成深色才看得见 */
body.black #search button i { color: #111; }
body.black .slider_menu .nav-item.active > .nav-link { color: #111; }
body.black .posts-nav .page-numbers.current,
body.black .posts-nav .page-numbers:not(.dots):hover { color: #111; }
body.black input[type="submit"], body.black input[type="button"],
body.black .but-home, body.black .btn-cat { color: #111; }

/* 排行榜页深色适配 */
body.black .panel-top > ol > li.aigc-top { background: var(--surface); border-color: var(--border); }
body.black .top-strong-title > span { background: var(--surface-3); color: var(--text-2); }
body.black .panel-top > ol > li.aigc-top:hover .top-strong-title > span { background: #f2f2f3; color: #111111; }
body.black .top-strong-title > small { background: var(--surface-3); color: var(--text-muted); }
body.black .tab-button { background: var(--surface-2); border-color: var(--border); }
body.black .tab-button.active { background: #f2f2f3; border-color: #f2f2f3; }
body.black .tab-button.active > a { color: #111111; }
body.black .filter-button { background: var(--surface-2); border-color: var(--border); }
body.black .filter-button:hover { background: var(--surface-3); }
body.black .filter-button.active { background: #f2f2f3; border-color: #f2f2f3; color: #111111; }

/* 排行榜页头部与序号、分类标签的深色适配 */
body.black .main-content .panel-body h5 { background: var(--surface-2); border-color: var(--border); }
body.black .sss-btn { background: var(--surface-2); border-color: var(--border); }
body.black .sss-btn:hover { background: var(--surface-3); }
body.black .sss-count { background: var(--surface-3); }
body.black .panel-top > ol > li.aigc-top > .top-strong-title::before { background: var(--surface-3); color: var(--text-2); }
body.black .panel-top > ol > li.aigc-top .btn-cat { background: var(--surface-3); }
body.black .panel-top > ol > li.aigc-top .btn-cat:hover { background: #f2f2f3; color: #111111; }

/* 页脚深色适配 */
body.black footer.main-footer { background: var(--surface); border-top: 1px solid var(--border); }
body.black footer.main-footer .footer-info-text > strong { color: var(--text); }
body.black footer.main-footer .footer-info-text > strong::before { background: #f2f2f3; }
body.black footer.main-footer .footer-info-text > a { background: var(--surface-3); }
body.black footer.main-footer .footer-info-text > a:hover { background: #f2f2f3; color: #111111; }
body.black footer.main-footer .footer-info img { background: #fff; }
body.black footer.main-footer .footer-inner > h4 { color: var(--text-2); }

/* ==========================================================================
   响应式微调
   ========================================================================== */
@media screen and (max-width: 991px) {
    footer.main-footer .footer-inner + .footer-inner { gap: 28px; }
    footer.main-footer .footer-info,
    footer.main-footer .footer-info:first-child,
    footer.main-footer .footer-info:last-child { flex: 1 1 100%; }
}

@media screen and (max-width: 767px) {
    #search { margin-top: 28px; }
    #search-text { height: 52px; }
    .xe-card { height: 74px; }
    .box2 { height: 74px; }
    .slider_menu.mini_tab > ul { border-radius: var(--radius) !important; }

    footer.main-footer { margin-top: 32px; }
    footer.main-footer .footer-inner { padding: 0; }
    footer.main-footer .footer-inner:nth-of-type(2) { padding-top: 24px; }
    footer.main-footer .footer-inner > h4 {
        display: flex;
        width: 100%;
        margin-bottom: 22px;
        border-radius: var(--radius);
        font-size: 12.5px;
    }
    footer.main-footer .footer-info img { width: 84px; height: 84px; }
    /* 移动端：二维码两个入口居中，并解除 nav.css 的 min-width 限制 */
    footer.main-footer .footer-info { min-width: 0; }
    footer.main-footer .footer-qr { justify-content: center; gap: 28px; }
    footer.main-footer .footer-text { margin-top: 20px; padding: 16px 0 4px; }

    /* BS3 兼容：模板中使用了 BS4 风格的裸 .col-12（无断点后缀），
       在 <768px 下不命中任何列规则，这里补回宽度与 15px 内边距，
       保证嵌套 .row 的负 margin 有 padding 可抵消，避免横向溢出 */
    .col-12 {
        position: relative;
        width: 100%;
        min-height: 1px;
        padding-right: 15px;
        padding-left: 15px;
    }
}

/* ==========================================================================
   站点详情页（single-sites.php）体验优化
   回滚方式：删除本段即可恢复原状
   ========================================================================== */

/* ---------- 面包屑 ---------- */
.site-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 7px;
    margin: 0 0 20px;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-muted);
}
.site-breadcrumb a { color: var(--text-2); }
.site-breadcrumb a:hover { color: var(--brand); }
.site-breadcrumb .sep { color: var(--text-muted); opacity: .7; }
.site-breadcrumb .current { color: var(--text); }

/* ---------- 区块标题：红色竖条 → 黑白 ---------- */
.main-content .panel-body h3 {
    border-left: 4px solid var(--brand);
    padding-left: 12px;
    margin: 28px 0 14px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--text);
}

/* ---------- 顶部主卡：站点图标 ---------- */
.siteico {
    max-width: 230px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.siteico .img-cover {
    width: 84px;
    height: 84px;
    border: 2px solid var(--surface);
    border-radius: 20px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
    animation: none; /* 去掉 logo 持续自转（背景模糊层的缓慢旋转保留） */
}

/* ---------- 站点/文章图标：全站统一为圆角方形 ---------- */
/* 覆盖 bootstrap.css 与 nav.css 中把 .img-circle 设为圆形的规则 */
.img-circle,
.container .img-circle {
    border-radius: 25%; /* 小尺寸图标（榜单 25px 等）按比例缩放 */
}
/* 卡片内图标固定 40px，用固定圆角保证四角不出现椭圆 */
.xe-comment-entry .img-circle,
.xe-comment-entry img {
    border-radius: 10px;
}
.site-name h1 {
    margin: 0 0 4px;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.35;
    color: var(--text);
}
@media (min-width: 992px) {
    .site-name h1 { font-size: 23px; }
}
.site-name h1 a { color: var(--text); }
.site-name h1 a:hover { color: var(--brand); }

/* ---------- 顶部主卡：操作按钮 ---------- */
.site-go {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.site-go .btn { margin-right: 0 !important; }
.site-body .site-go .btn {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    color: var(--text);
}
.site-body .site-go .btn:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
/* 主 CTA「官网入口」：第一个链接，实心黑 */
.site-body .site-go a.btn:first-child {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    font-weight: 600;
    padding: 9px 22px;
}
.site-body .site-go a.btn:first-child span,
.site-body .site-go a.btn:first-child i { color: #fff; }
.site-body .site-go a.btn:first-child:hover { background: var(--brand-strong); }

/* 信息行（国家/描述/排名） */
.site-body .info-p { color: var(--text-2); }
.site-body .info-p strong { color: var(--text); font-weight: 700; }

/* 暂无评分时隐藏「用户评分：★★★★★ 0分」，底部评分组件仍可打分 */
.rmp-results-widget--not-rated { display: none !important; }

/* 底部评分卡片 */
.rmp-widgets-container {
    margin-top: 22px;
    padding: 20px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
body.black .rmp-widgets-container { background: var(--surface) !important; }

/* ---------- 说明条 + 元信息条 ---------- */
.details-card-bottom-1 {
    margin-top: 20px;
    padding: 14px 16px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    color: var(--text-muted);
}
.details-card-bottom-1 b { color: var(--text-2); }
.panel-body .details-card-bottom-1 .wechat-qrcode img {
    width: auto;
    max-width: 300px;
    height: auto;
    max-height: 72px;
}
.details-card-bottom {
    color: var(--text-muted);
    line-height: 2.2;
}
.details-card-bottom .btn-cat { margin: 0 2px; }

/* ---------- 正文区排版 ---------- */
.main-content .panel-body .border-top { padding-top: 8px; }
.panel-body .border-top p,
.tools-faq p,
.tools-models-version p,
.tools-website-info p {
    color: var(--text-2);
    line-height: 1.9;
}
.panel-body .border-top > p { margin: 0 0 14px; }
.panel-body .border-top img { border-radius: 10px; }
.panel-body iframe { max-width: 100%; }
.border-top iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: var(--radius);
}
.tools-features {
    margin: 6px 0 18px;
    line-height: 2.2;
}

/* ---------- 桌面端：渠道浮窗黑白化、避开回到顶部按钮 ---------- */
.floating-window {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-lg);
}
.show-floating-btn {
    bottom: 78px;
    background: #111;
}
.show-floating-btn:hover { background: #000; }

/* ---------- 深色模式补丁 ---------- */
body.black .siteico { background: var(--surface-2); }

/* 吸底操作栏：桌面端隐藏，仅移动端显示（样式见下方媒体查询） */
.site-action-bar, .site-action-bar-spacer { display: none; }
body.black .siteico .img-cover { background: #fff; }
body.black .site-body .site-go a.btn:first-child,
body.black .floating-window button {
    background: #f2f2f3;
    border-color: #f2f2f3;
    color: #111;
}
body.black .site-body .site-go a.btn:first-child span,
body.black .site-body .site-go a.btn:first-child i { color: #111; }
body.black .floating-window button:hover { background: #d4d4d4; }
body.black .show-floating-btn { background: #f2f2f3; color: #111; }

/* ==========================================================================
   移动端（≤767px）
   ========================================================================== */
@media (max-width: 767.98px) {
    /* 图标区瘦身：从整宽 60% 大色块改为 96px 小卡，首屏留给标题与 CTA */
    .siteico {
        max-width: 96px;
        margin: 0 auto;
        border-radius: 14px;
    }
    .siteico:before { padding-top: 100%; }
    .site-body-col { margin-top: 18px !important; }
    .siteico .img-cover { width: 58px; height: 58px; border-radius: 14px; }
    .siteico .site-card-badge {
        height: 17px;
        padding: 0 7px;
        font-size: 10px;
    }
    .site-name h1 { font-size: 19px; }

    /* 右侧广告：5 条整宽堆叠 → 2 列紧凑网格，少占一屏 */
    .ad-right { margin-top: 22px; }
    .ad-right .custom-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        align-items: stretch;
    }
    .ad-right .custom-list li {
        width: 100%;
        min-height: 58px;
        margin: 0;
        padding: 10px 8px;
        font-size: 12.5px;
        font-weight: 600;
        line-height: 1.35;
        border-color: var(--border);
        border-radius: 10px;
        background: var(--surface);
    }
    .ad-right .custom-list li a {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 38px;
        line-height: 1.35;
        text-align: center;
    }
    body.black .ad-right .custom-list li {
        background: var(--surface-2);
        border-color: var(--border);
    }

    /* 公众号二维码：保持原图比例、限制宽度，二维码可扫 */
    .panel-body .details-card-bottom-1 .wechat-qrcode img {
        width: auto;
        max-width: 260px;
        height: auto;
        max-height: 64px;
    }

    /* 回到顶部按钮上移，避开吸底操作栏 */
    body.is-site-detail footer.main-footer .go-up {
        bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }

    /* 吸底操作栏（桌面端隐藏，仅本模板输出） */
    .site-action-bar {
        display: flex;
        align-items: center;
        gap: 10px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 950;
        padding: 8px 14px calc(8px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, .95);
        border-top: 1px solid var(--border);
        -webkit-backdrop-filter: saturate(180%) blur(12px);
        backdrop-filter: saturate(180%) blur(12px);
    }
    body.black .site-action-bar { background: rgba(22, 22, 24, .95); }
    .site-action-bar-spacer {
        display: block;
        height: calc(62px + env(safe-area-inset-bottom, 0px));
    }
    .site-action-primary {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        padding: 11px 16px;
        border-radius: var(--radius-pill);
        background: #111;
        color: #fff !important;
        font-weight: 600;
        line-height: 1.2;
    }
    .site-action-primary i { position: static; width: auto; font-size: 15px; opacity: .9; }
    .site-action-primary:hover { color: #fff; }
    body.black .site-action-primary { background: #f2f2f3; color: #111 !important; }
    body.black .site-action-primary:hover { color: #111; }
    .site-action-channels {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 10px 14px;
        border: 1px solid var(--border-strong);
        border-radius: var(--radius-pill);
        background: var(--surface);
        color: var(--text);
        font-size: 13px;
        line-height: 1.2;
    }
    body.black .site-action-channels { background: var(--surface-2); color: var(--text); }

    /* 渠道浮窗改为吸底弹层（nav.css 原本移动端直接隐藏） */
    .floating-window {
        display: block;
        left: 12px;
        right: 12px;
        bottom: calc(66px + env(safe-area-inset-bottom, 0px));
        max-height: 46vh;
        overflow-y: auto;
        padding: 12px;
    }
}

/* ==========================================================================
   首页分区：父类标题 + 子类胶囊 + “查看更多”同一行（aigcwp 自定义，可整体回滚）
   ========================================================================== */
.d-none { display: none !important; }

.section-head-row {
    gap: 6px;
    margin-top: 2.2rem;
    align-items: center; /* 主题无 BS4 的 .align-items-center 工具类，必须显式声明，否则图标/链接内容贴顶 */
}
/* 行首分区图标（父类名已并入胶囊导航） */
.section-head-ico {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    color: var(--brand);
    font-size: 16px;
    line-height: 1;
}
/* 胶囊轨道居中，空间不足时轨道内部横向滚动，标题与“查看更多”始终可见 */
.section-head-row .slider_menu.mini_tab {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
}
.section-head-row .slider_menu.mini_tab > ul {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}
/* 胶囊不压缩、不换行，空间不足时由轨道内部横向滚动 */
.section-head-row .slider_menu .nav-item { flex: 0 0 auto; }
.section-head-row .slider_menu .nav-link { white-space: nowrap; }
/* “查看更多”固定靠行右端，不参与压缩 */
.section-more-link {
    flex: 0 0 auto;
    margin-left: auto;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    white-space: nowrap;
    transition: color .2s ease;
}
.section-more-link:hover,
.section-more-link:focus { color: var(--brand-strong); }
body.black .section-more-link,
body.black .section-more-link:hover { color: var(--text-2); }

@media screen and (max-width: 767px) {
    .section-head-row { gap: 6px; margin-top: 1.6rem; }
    .section-head-ico { font-size: 14px; }
    /* 移动端胶囊紧凑化，保证 3 个胶囊与“查看更多…”同行时不被遮挡 */
    .section-head-row .slider_menu.mini_tab > ul { padding: 2px; gap: 1px; }
    .section-head-row .slider_menu .nav-link { padding: 5px 9px; font-size: 13px; }
    .section-more-link { font-size: 12px; }
}

/* ===== aigcwp 自定义：左侧导航父类“跳转 / 展开”分离（可整段回滚） ===== */
/* 顶层父类 li 作为独立展开按钮的定位上下文 */
.sidebar-menu .main-menu > li.has-sub { position: relative; }
/* 隐藏父类链接上原有的 ::before 箭头（箭头迁移到独立按钮） */
.sidebar-menu .main-menu > li.has-sub > a::before { display: none; }
/* 父类链接右侧为按钮预留点击空间 */
.sidebar-menu .main-menu > li.has-sub > a { padding-right: 44px; }
/* 独立展开按钮：仅占行尾一列，点击只展开/收起子类，不跳转 */
.sidebar-menu .main-menu > li.has-sub > .sub-expand-btn {
    position: absolute;
    top: 0;
    right: 0;
    width: 48px;
    height: 47px; /* 固定对齐父类行高：子类展开后按钮不随 li 整体高度被拉长 */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, .45);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    -webkit-tap-highlight-color: transparent;
    transition: color .15s ease-in-out, background-color .15s ease-in-out;
}
.sidebar-menu .main-menu > li.has-sub > .sub-expand-btn:hover {
    color: rgba(255, 255, 255, .9);
    background-color: rgba(255, 255, 255, .06);
}
.sidebar-menu .main-menu > li.has-sub > .sub-expand-btn .fa {
    transform: rotate(-90deg); /* 收起态：箭头朝右 */
    transition: transform .15s ease-in-out;
}
.sidebar-menu .main-menu > li.has-sub.expanded > .sub-expand-btn .fa,
.sidebar-menu .main-menu > li.has-sub.opened   > .sub-expand-btn .fa {
    transform: rotate(0); /* 展开态：箭头朝下 */
}
/* 折叠态（窄屏自动收起侧栏）隐藏按钮，保持 hover 展开子类的原生行为 */
.sidebar-menu.collapsed .main-menu > li.has-sub > .sub-expand-btn { display: none; }
.sidebar-menu.collapsed .main-menu > li.has-sub > a { padding-right: 5px; }
/* ===== aigcwp 自定义 END ===== */
