/* ============================================================
   tpl040 亮色简洁风覆盖样式
   最后按需覆盖 nky.css / layout.css / bootstrap.css，不修改原文件
   整体回退：删除 private_tpl_header.php 里本文件的 <link> 即恢复原样式
   注意：模板内还有多段内联 <style> 位于本文件之后，
   同特异性时它们会胜出，因此本文件关键声明使用 !important
   ============================================================ */

:root {
    --bg: #f5f7fa;
    --surface: #ffffff;
    --line: #e5e9f0;
    --line-2: #d4dae3;
    --txt: #1f2937;
    --txt-2: #4b5563;
    --txt-3: #9aa3b0;
    --acc: #2563eb;
    --acc-dark: #1d4ed8;
    --r: 10px;
}

/* ---------- 基础 ---------- */
body {
    background: var(--bg) !important;
    color: var(--txt) !important;
    font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif !important;
}

.home { background: var(--bg) !important; }

.container {
    background: var(--surface) !important;
    border-radius: var(--r);
    box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
}

a { color: var(--acc); }
a:hover { color: var(--acc-dark); }

/* ---------- 顶部滚动公告 ---------- */
.msg { background: #eef2f7 !important; border: 1px solid var(--line); }
.msg .marquee, .msg .marquee p { color: var(--txt-2) !important; }

/* ---------- 区块标题 ---------- */
.page-header {
    color: var(--txt) !important;
    border-bottom: 1px solid var(--line) !important;
}

.page-header small { color: var(--txt-3) !important; }
.page-header a small { color: var(--acc) !important; }

/* ---------- 分区导航按钮 ---------- */
.class-feed-btn2 .btn-danger, .btn-danger {
    background: #eef2f7 !important;
    border: 1px solid var(--line-2) !important;
    color: var(--txt-2) !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

.class-feed-btn2 .btn-danger:hover, .btn-danger:hover {
    background: var(--acc) !important;
    border-color: var(--acc) !important;
    color: #fff !important;
}

.class-feed-btn2 .btn-danger.active, .btn-danger.active {
    background: var(--acc) !important;
    border-color: var(--acc) !important;
    color: #fff !important;
}

/* ---------- 友情链接块 ---------- */
.toplinks a {
    background: #eef2f7 !important;
    color: var(--txt-2) !important;
}

.toplinks a:hover {
    background: var(--acc) !important;
    color: #fff !important;
}

/* ---------- 图标广告 ---------- */
.app ul li a, .app ul li a:hover { color: var(--txt-2) !important; }
.app ul li a:hover { color: var(--acc) !important; }
.app_title { color: var(--txt) !important; }

/* ---------- 热搜标签 ---------- */
.tag:not(body) { background: #eef2f7 !important; color: var(--txt-2) !important; }
.tag:not(body).is-danger { background: #eef2f7 !important; color: var(--txt-2) !important; }
.tag:not(body):hover, .tag:not(body).is-danger:hover { background: var(--acc) !important; color: #fff !important; }

/* ---------- 视频卡片 ---------- */
.new-video {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
    margin-bottom: 14px;
}

.v-title, .v-title a { color: var(--txt-2) !important; }
.v-title a:hover { color: var(--acc) !important; }
/* 悬浮在图片上的时间条保持深色半透明白字，可读性最好 */
.uptime { color: #fff !important; }

/* ---------- 搜索框 ---------- */
.form-control {
    background: var(--surface) !important;
    border: 1px solid var(--line-2) !important;
    color: var(--txt) !important;
}

.form-control:focus {
    border-color: var(--acc) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12) !important;
}

.input-group-btn .btn-default {
    background: var(--acc) !important;
    border-color: var(--acc) !important;
    color: #fff !important;
}

/* ---------- 分页 ---------- */
.news-feed-btn { border-top: 1px solid var(--line) !important; }

.news-feed-btn a {
    background: #eef2f7 !important;
    color: var(--txt-2) !important;
}

.news-feed-btn a:hover { background: var(--acc) !important; color: #fff !important; }
.news-feed-btn span, .news-feed-btn .pagenow { background: var(--acc) !important; color: #fff !important; }

/* ---------- 页脚 ---------- */
footer { background: transparent !important; color: var(--txt-3) !important; }
footer p, footer div { color: var(--txt-3) !important; }

/* ---------- 悬浮广告关闭按钮微调 ---------- */
.fad .fad-close { background: rgba(17, 24, 39, .8); }
