
/* =========================================================
   TH 模板 · 现代化细节层
   仅覆盖视觉细节（配色/字体/圆角/阴影/悬停态），不改变页面结构
   ========================================================= */

/* ---------- 设计令牌 ---------- */
:root {
    --th-bg: #f5f6f8;
    --th-card: #ffffff;
    --th-border: #e8eaee;
    --th-text: #262b33;
    --th-text-muted: #6b7280;
    --th-accent: #2563eb;
    --th-accent-dark: #1d4ed8;
    --th-accent-soft: rgba(37, 99, 235, 0.12);
    --th-radius: 8px;
    --th-radius-lg: 10px;
    --th-shadow: 0 1px 3px rgba(17, 24, 39, 0.06);
    --th-nav-bg: #1f2430;
    --th-nav-text: #d3d7de;
}

/* ---------- 基础排版 ---------- */
body {
    background-color: var(--th-bg);
    color: var(--th-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.custom-background {
    background-color: var(--th-bg) !important;
}

a {
    color: var(--th-accent);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover,
a:focus {
    color: var(--th-accent-dark);
}

a:focus {
    outline: none;
}

a:focus-visible {
    outline: 2px solid var(--th-accent);
    outline-offset: 2px;
}

::selection {
    background: var(--th-accent-soft);
}

/* ---------- 页头 ---------- */
.site-branding,
.site-content {
    background: transparent;
}

.site-title a {
    color: var(--th-text);
    font-weight: 700;
    letter-spacing: -0.3px;
}

.site-branding .logo .site-title a {
    font-size: 24px !important;
}

.site-title a i {
    color: var(--th-accent);
}

.search-menu-mobile {
    color: var(--th-text);
}

/* ---------- 主导航 ---------- */
#site-navigation ul {
    background: var(--th-nav-bg);
}

#site-navigation > ul > li > a {
    color: var(--th-nav-text);
    font-size: 15px;
    transition: color 0.15s ease;
}

#site-navigation > ul > li:hover > a {
    color: #ffffff;
}

#site-navigation > ul > li > a[aria-current="page"] {
    color: #ffffff;
    border-bottom: 3px solid var(--th-accent);
}

#site-navigation ul li.current-menu-item a {
    border-bottom-color: var(--th-accent);
}

/* ---------- 搜索框 ---------- */
input[type="text"],
input[type="search"] {
    border: 1px solid var(--th-border);
    color: var(--th-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="search"]:focus {
    color: var(--th-text);
    border-color: var(--th-accent) !important;
    box-shadow: 0 0 0 3px var(--th-accent-soft);
    outline: 0;
}

input[type="submit"],
button,
input[type="button"],
input[type="reset"] {
    background-color: var(--th-accent);
}

input[type="submit"]:hover,
button:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
    background-color: var(--th-accent-dark) !important;
    color: #fff;
}

/* ---------- 提示条 ---------- */
.alert {
    border-radius: var(--th-radius);
    font-size: 14px;
}

.alert-warning {
    background-color: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.alert-warning b {
    font-weight: 600;
}

.alert-warning font {
    color: #b91c1c;
}

/* ---------- 内容卡片 ---------- */
.archive-content {
    border-radius: var(--th-radius-lg);
    box-shadow: var(--th-shadow);
}

/* ---------- 区块标题 ---------- */
.archive-content .widget-title {
    font-size: 18px;
    color: var(--th-text);
    line-height: 1.4;
    padding-left: 12px;
    border-left: 4px solid var(--th-accent);
    margin-bottom: 14px;
}

.archive-content .widget-title a {
    color: inherit;
}

.archive-content .widget-title a:hover {
    color: var(--th-accent);
}

/* ---------- 文章列表 ---------- */
.list li {
    padding: 11px 10px;
    border-bottom: 1px solid var(--th-border);
    border-radius: 6px;
    transition: background-color 0.15s ease;
}

.list li:hover {
    background-color: #f8fafc;
}

.list_item,
.list_item a {
    color: var(--th-text);
}

.list_item a {
    transition: color 0.15s ease;
}

.list_item a:hover {
    color: var(--th-accent);
}

/* ---------- 按钮 ---------- */
.button,
.btn {
    display: inline-block;
    background-color: var(--th-accent) !important;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--th-radius);
    padding: 10px 22px;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.button:hover,
.btn:hover {
    background-color: var(--th-accent-dark) !important;
    color: #fff;
}

.button:active,
.btn:active {
    transform: translateY(1px);
}

/* ---------- 分页 ---------- */
.tpl-pagination {
    margin-top: 20px;
}
.tpl-pagination nav {
    clear: both;
    display: table;
    margin: 0 auto;
}
.tpl-pagination ul.pagination {
    list-style: none;
    overflow: hidden;
    margin: 0;
    padding: 0;
}
.tpl-pagination ul.pagination li {
    float: left;
    margin: 5px;
    display: block;
    list-style: none;
}
.tpl-pagination ul.pagination li a.page-link {
    display: block;
    padding: 10px 18px;
    border-radius: var(--th-radius);
    background-color: var(--th-card);
    border: 1px solid var(--th-border);
    outline: none;
    color: var(--th-text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease,
        border-color 0.15s ease;
}
.tpl-pagination ul.pagination li a.page-link:hover {
    background-color: var(--th-accent);
    border-color: var(--th-accent);
    color: #fff;
}
.tpl-pagination ul.pagination li span.page-link {
    display: block;
    padding: 10px 18px;
    border-radius: var(--th-radius);
    background-color: var(--th-card);
    border: 1px solid var(--th-border);
    outline: none;
    color: var(--th-text-muted);
    font-size: 14px;
    font-weight: 500;
}
.tpl-pagination ul.pagination li.active span.page-link {
    background-color: var(--th-accent);
    border-color: var(--th-accent);
    color: #fff;
}

/* ---------- 批量打开链接 ---------- */
.open-all-link {
    text-align: center;
    margin: 20px 0;
}
.open-all-link a {
    display: inline-block;
    padding: 10px 22px;
    border: 1px solid var(--th-border);
    border-radius: var(--th-radius);
    background-color: var(--th-card);
    color: var(--th-accent);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease,
        border-color 0.15s ease;
}
.open-all-link a:hover {
    background-color: var(--th-accent);
    border-color: var(--th-accent);
    color: #fff;
}

/* ---------- 详情页 ---------- */
.video-player-area .video-infos .title-views h1 {
    margin: 0 0 16px;
    border-bottom: 0;
    padding-bottom: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--th-text);
    line-height: 1.5;
}

.video-description > div:first-of-type {
    background: #f8fafc;
    border: 1px solid var(--th-border);
    border-radius: var(--th-radius);
    padding: 12px 18px;
    color: var(--th-text);
    font-size: 14px;
    word-break: break-all;
}

.video-description > div:first-of-type p {
    margin: 0;
}

.preview-grid {
    overflow: hidden;
}
.preview-grid .capture-col {
    float: left;
    padding: 2px;
    width: 25%;
}
.preview-grid.preview-single .capture-col {
    float: none;
    width: 100%;
}
.preview-grid .capture-col img {
    width: 100%;
    display: block;
    border-radius: var(--th-radius);
}
@media (max-width: 500px) {
    .preview-grid .capture-col { width: 50%; }
}
@media (min-width: 501px) {
    .preview-grid .capture-col { width: 25%; }
}

/* ---------- 合作伙伴 ---------- */
.partner-zone {
    margin-top: 20px;
}
.partner-grid {
    overflow: hidden;
    padding: 5px 0;
}
.partner-grid a {
    float: left;
    margin: 5px;
    display: block;
}

#icon-container a:hover {
    opacity: 0.8;
}
#icon-container img {
    border-radius: var(--th-radius);
}

/* ---------- 页脚 ---------- */
.site-footer {
    background: transparent;
    border-top: 1px solid var(--th-border);
    padding: 22px 16px 28px;
}

.site-links {
    max-width: 1050px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 16px;
    line-height: 2;
}

.site-links a {
    text-decoration: none;
}

.link_text {
    font-size: 13px;
    color: var(--th-text-muted);
    transition: color 0.15s ease;
}
.site-footer .link_text:hover {
    color: var(--th-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.site-info {
    color: var(--th-text-muted);
    font-size: 13px;
    margin: 14px 0 0;
    text-align: center;
}
.site-info a {
    color: var(--th-text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s ease;
}
.site-info a:hover {
    color: var(--th-accent);
}
.site-info img {
    opacity: 0.75;
}
.site-info a:hover img {
    opacity: 1;
}

/* ---------- 轻提示 ---------- */
.toast-notification {
    position: fixed;
    left: 50%;
    bottom: 80px;
    transform: translateX(-50%) translateY(20px);
    background: rgba(17, 24, 39, 0.9);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    padding: 12px 24px;
    border-radius: var(--th-radius);
    box-shadow: 0 4px 12px rgba(17, 24, 39, 0.2);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2147483647;
    pointer-events: none;
}
.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---------- 上一篇/下一篇（仿 dashen 模板） ---------- */
.pagination-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0 10px;
}

.pagination-nav .nav-item {
    flex: 1;
    min-width: 0;
}

.prev-next-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 14px 16px;
    background-color: var(--th-card);
    border: 1px solid var(--th-border);
    border-radius: var(--th-radius);
    box-shadow: var(--th-shadow);
    text-decoration: none;
    color: var(--th-text);
    transition: all 0.2s ease;
    height: 100%;
    min-height: 80px;
    box-sizing: border-box;
}

.prev-next-link:hover,
.prev-next-link:focus {
    border-color: var(--th-accent);
    box-shadow: 0 2px 8px var(--th-accent-soft);
    color: var(--th-accent);
}

.prev-next-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--th-card);
}

.prev-next-link .nav-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--th-text-muted);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.prev-next-link:hover .nav-label,
.prev-next-link:focus .nav-label {
    color: var(--th-accent);
}

.prev-next-link .nav-title {
    font-size: 0.95rem;
    color: var(--th-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    max-width: 100%;
}

.prev-next-link:hover .nav-title,
.prev-next-link:focus .nav-title {
    color: var(--th-text);
}

@media (min-width: 768px) {
    .pagination-nav {
        flex-direction: row;
        gap: 16px;
    }

    .pagination-nav .nav-item {
        flex: 0 0 calc(50% - 8px);
        width: calc(50% - 8px);
        min-width: 0;
    }
}

/* =========================================================
   以下为功能性规则（广告位/响应式显隐等），保持原有行为
   ========================================================= */

.hf-container {
    width: 100%;
}
.hf-container .hf-link {
    display: block;
    width: 100%;
}
.hf-container .hf-img {
    display: block;
    width: 100%;
    margin: 1px 0;
}

.dp-container {
    display: none;
}
.dp-container .dp-link {
    display: none;
}
@media (max-width: 767.98px) {
    .dp-container {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 2147483647;
        text-align: center;
    }
}
.dp-container .dp-img {
    display: block;
    width: 100%;
}
.dp-container .dp-close {
    position: absolute;
    right: 0;
    top: 0;
    font-size: 12px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    display: inline-block;
    cursor: pointer;
    line-height: 1.2;
}

/* 底飘广告占位: 移动端底飘为 fixed 定位, 显示时由 JS 撑起等高占位避免遮挡 footer */
#bottom_float_spacer {
    display: none;
    width: 100%;
}

.only_mobile { display: none; }
.only_pc { display: block; }
@media (max-width: 767.98px) {
    .only_mobile { display: block; }
    .only_pc { display: none; }
    .hide-on-mobile { display: none; }
}

/* PC 端去除 entry-content 左右内边距(上下保留), 使内容宽度与顶部 header (.row 1000px) 对齐 */
@media (min-width: 768px) {
    .entry-content {
        padding-left: 0;
        padding-right: 0;
    }
}