/* =====================================================
   cloaksystem.com 主站样式 v1.0
   紫色主题（与站群统一：#6a11cb / #8a2be2 / #4a0e8f）
   零内联style，全部class实现
   ===================================================== */

:root {
    --c-main: #6a11cb;
    --c-deep: #4a0e8f;
    --c-mid: #8a2be2;
    --c-light: #b388ff;
    --ink: #2a1b3d;
    --ink-soft: #6a5c7d;
    --bg-soft: #f9f5ff;
    --bg-card: #ffffff;
    --line: #e0d6ff;
    --code-bg: #1a0e2e;
    --radius: 12px;
    --shadow: 0 4px 18px rgba(106, 17, 203, 0.09);
    --shadow-lg: 0 10px 34px rgba(106, 17, 203, 0.16);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
    background: var(--bg-soft);
    color: var(--ink);
    line-height: 1.88;
    font-size: 15px;
}

a { color: var(--c-main); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ---------------- 顶部导航 ---------------- */
.site-header {
    background: linear-gradient(90deg, var(--c-deep) 0%, var(--c-main) 100%);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(74, 14, 143, 0.25);
}
.header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 12px 22px;
    display: flex;
    align-items: center;
    gap: 26px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none !important;
    flex-shrink: 0;
}
.logo-text {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.logo-text em {
    font-style: normal;
    font-size: 11px;
    font-weight: 400;
    color: var(--c-light);
    letter-spacing: 1px;
}
.main-nav {
    display: flex;
    gap: 4px;
    flex: 1;
    flex-wrap: wrap;
}
.main-nav a {
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    padding: 7px 13px;
    border-radius: 8px;
    text-decoration: none;
}
.main-nav a:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    text-decoration: none;
}
.header-cta {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    white-space: nowrap;
    text-decoration: none;
}
.header-cta:hover { background: rgba(255, 255, 255, 0.28); text-decoration: none; }
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

/* ---------------- Hero ---------------- */
.hero {
    background:
        radial-gradient(900px 300px at 85% -40%, rgba(138, 43, 226, 0.18), transparent),
        radial-gradient(600px 260px at 10% 120%, rgba(37, 117, 252, 0.10), transparent),
        linear-gradient(180deg, #f6efff 0%, var(--bg-soft) 100%);
    padding: 74px 22px 64px;
    text-align: center;
}
.hero-kicker {
    color: var(--c-mid);
    font-size: 13px;
    letter-spacing: 3px;
    font-weight: 600;
    margin-bottom: 12px;
}
.hero h1 {
    font-size: 40px;
    line-height: 1.3;
    background: linear-gradient(120deg, var(--c-deep), var(--c-main) 55%, var(--c-mid));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 14px;
}
.hero-sub {
    color: var(--ink-soft);
    font-size: 16px;
    margin-bottom: 30px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------------- 按钮 ---------------- */
.btn-primary-lg, .btn-primary {
    display: inline-block;
    background: linear-gradient(120deg, var(--c-main), var(--c-mid));
    color: #fff;
    border-radius: 26px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary-lg { padding: 13px 34px; font-size: 15px; }
.btn-primary { padding: 9px 22px; font-size: 14px; }
.btn-primary-lg:hover, .btn-primary:hover {
    text-decoration: none;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(106, 17, 203, 0.35);
}
.btn-ghost-lg {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 26px;
    border: 1.5px solid var(--c-main);
    color: var(--c-main);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
}
.btn-ghost-lg:hover { background: rgba(106, 17, 203, 0.07); text-decoration: none; }

/* ---------------- 栏目卡片 ---------------- */
.concept-cards { padding: 46px 22px 8px; }
.cards-grid {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.concept-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 24px;
    text-decoration: none;
    color: var(--ink);
    box-shadow: var(--shadow);
    transition: transform 0.18s, box-shadow 0.18s;
    display: flex;
    flex-direction: column;
}
.concept-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}
.concept-card h3 {
    color: var(--c-main);
    font-size: 19px;
    margin-bottom: 10px;
    padding-left: 12px;
    border-left: 4px solid var(--c-mid);
}
.concept-card p { color: var(--ink-soft); font-size: 13.5px; flex: 1; }
.card-more { color: var(--c-mid); font-size: 13px; margin-top: 14px; font-weight: 600; }

/* ---------------- 通用区域 ---------------- */
.section-inner { max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.section-title {
    font-size: 24px;
    margin-bottom: 22px;
    padding-left: 14px;
    border-left: 5px solid var(--c-main);
}
.section-inner.with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 26px;
    align-items: start;
}

/* ---------------- 置顶推荐 ---------------- */
.featured-section { padding: 44px 0 8px; }
.featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.featured-card {
    background: linear-gradient(160deg, var(--c-deep), var(--c-main));
    border-radius: var(--radius);
    padding: 24px;
    color: #fff;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: transform 0.18s;
}
.featured-card:hover { transform: translateY(-4px); text-decoration: none; }
.featured-cat {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.18);
    font-size: 12px;
    padding: 3px 12px;
    border-radius: 12px;
    margin-bottom: 12px;
}
.featured-card h3 { font-size: 16.5px; line-height: 1.5; margin-bottom: 8px; }
.featured-card p { font-size: 13px; color: rgba(255, 255, 255, 0.82); flex: 1; }
.featured-meta { font-size: 12px; color: var(--c-light); margin-top: 12px; }

/* ---------------- 首页核心词简介 ---------------- */
.home-intro { padding: 44px 0 48px; }
.intro-text p {
    font-size: 14.5px;
    line-height: 1.95;
    color: var(--ink-soft);
    margin-bottom: 12px;
}
.intro-text p:last-child { margin-bottom: 0; }

/* ---------------- 文章列表 ---------------- */
.latest-section { padding: 40px 0 30px; }
.post-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin-bottom: 18px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.18s;
}
.post-card:hover { box-shadow: var(--shadow-lg); }
.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12.5px;
    color: var(--ink-soft);
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.post-cat {
    background: var(--c-light);
    color: var(--c-deep);
    font-weight: 600;
    font-size: 12px;
    padding: 2px 12px;
    border-radius: 12px;
    text-decoration: none;
}
.post-cat:hover { text-decoration: none; filter: brightness(0.95); }
.pin-badge {
    background: var(--c-main);
    color: #fff;
    font-size: 11px;
    padding: 1px 10px;
    border-radius: 10px;
}
.post-title { font-size: 19px; line-height: 1.5; margin-bottom: 8px; }
.post-title a { color: var(--ink); }
.post-title a:hover { color: var(--c-main); }
.post-summary {
    color: var(--ink-soft);
    font-size: 13.5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    font-size: 12.5px;
    color: var(--ink-soft);
}
.read-more { font-weight: 600; font-size: 13px; }

/* ---------------- 侧边栏 ---------------- */
.sidebar { position: sticky; top: 78px; }
.widget {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: var(--shadow);
}
.widget h4 {
    font-size: 15px;
    margin-bottom: 14px;
    padding-left: 10px;
    border-left: 4px solid var(--c-mid);
}
.hot-list { list-style: none; }
.hot-list li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 13px;
}
.hot-list li:last-child { border-bottom: none; }
.hot-list li a {
    color: var(--ink);
    flex: 1;
    line-height: 1.5;
}
.hot-list li a:hover { color: var(--c-main); }
.hot-list li span { color: var(--c-light); white-space: nowrap; font-size: 12px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-item {
    background: rgba(106, 17, 203, 0.08);
    color: var(--c-main);
    font-size: 12.5px;
    padding: 4px 13px;
    border-radius: 14px;
    text-decoration: none;
}
.tag-item:hover { background: rgba(106, 17, 203, 0.16); text-decoration: none; }
.widget-cta p { font-size: 13px; color: var(--ink-soft); margin-bottom: 12px; }
.widget-cta .btn-primary { width: 100%; text-align: center; }

/* ---------------- 面包屑 ---------------- */
.breadcrumb {
    max-width: 1180px;
    margin: 18px auto 0;
    padding: 0 22px;
    font-size: 13px;
    color: var(--ink-soft);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.breadcrumb em { font-style: normal; color: var(--c-main); }

/* ---------------- 栏目头 ---------------- */
.category-header {
    background: linear-gradient(120deg, var(--c-deep), var(--c-main));
    color: #fff;
    padding: 40px 0;
    margin-top: 18px;
}
.category-header h1 { font-size: 28px; margin-bottom: 8px; }
.category-header p { color: rgba(255, 255, 255, 0.85); font-size: 14px; max-width: 640px; }
.cat-count {
    display: inline-block;
    margin-top: 12px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 12.5px;
    padding: 3px 14px;
    border-radius: 14px;
}

/* ---------------- 文章页 ---------------- */
.article-section { padding: 36px 0 30px; }
.article-main {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 34px 38px;
    box-shadow: var(--shadow);
}
.article-header { border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 26px; }
.article-title { font-size: 28px; line-height: 1.45; margin: 10px 0 12px; }
.article-lede {
    color: var(--ink-soft);
    font-size: 14px;
    background: var(--bg-soft);
    border-left: 4px solid var(--c-light);
    padding: 10px 16px;
    border-radius: 6px;
}

/* 文章正文排版 */
.article-content { font-size: 15.5px; }
.article-content h2 {
    font-size: 22px;
    margin: 30px 0 14px;
    padding-left: 13px;
    border-left: 5px solid var(--c-main);
}
.article-content h3 {
    font-size: 18px;
    margin: 24px 0 10px;
    color: var(--c-deep);
}
.article-content h4 { font-size: 16px; margin: 20px 0 8px; }
.article-content p { margin-bottom: 14px; }
.article-content ul, .article-content ol { margin: 0 0 14px 24px; }
.article-content li { margin-bottom: 6px; }
.article-content blockquote {
    border-left: 4px solid var(--c-light);
    background: var(--bg-soft);
    padding: 12px 18px;
    border-radius: 6px;
    margin-bottom: 14px;
    color: var(--ink-soft);
}
.article-content pre {
    background: var(--code-bg);
    color: #e8ddff;
    border-radius: 10px;
    border-left: 4px solid var(--c-mid);
    padding: 18px 20px;
    overflow-x: auto;
    font-size: 13.5px;
    line-height: 1.7;
    margin-bottom: 16px;
    font-family: 'Cascadia Code', Consolas, 'Courier New', monospace;
}
.article-content code {
    background: rgba(106, 17, 203, 0.1);
    color: var(--c-deep);
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 0.9em;
    font-family: Consolas, monospace;
}
.article-content pre code { background: none; color: inherit; padding: 0; }
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    font-size: 13.5px;
}
.article-content th {
    background: var(--c-deep);
    color: #fff;
    padding: 10px 12px;
    text-align: left;
}
.article-content td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.article-content tr:nth-child(even) td { background: var(--bg-soft); }
.article-content hr { border: none; border-top: 1px solid var(--line); margin: 24px 0; }
.article-content img { border-radius: 8px; margin: 6px 0; }

/* 文章标签/CTA/上下篇/相关推荐 */
.article-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 26px 0;
    font-size: 13px;
    color: var(--ink-soft);
}
.article-cta {
    background: linear-gradient(120deg, var(--c-deep), var(--c-main));
    border-radius: var(--radius);
    padding: 24px 28px;
    color: #fff;
    text-align: center;
    margin: 26px 0;
}
.article-cta h3 { font-size: 18px; margin-bottom: 6px; }
.article-cta p { font-size: 13.5px; color: rgba(255, 255, 255, 0.85); margin-bottom: 16px; }
.prev-next {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 26px 0;
}
.pn-link {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px 16px;
    text-decoration: none;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.5;
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pn-link:hover { border-color: var(--c-mid); text-decoration: none; }
.pn-link span { color: var(--c-light); font-size: 12px; }
.pn-next { text-align: right; }
.related-box h3 {
    font-size: 18px;
    margin-bottom: 14px;
    padding-left: 12px;
    border-left: 4px solid var(--c-main);
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.related-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px;
    text-decoration: none;
    background: var(--bg-card);
    color: var(--ink);
    transition: border-color 0.15s;
}
.related-card:hover { border-color: var(--c-mid); text-decoration: none; }
.related-card h4 { font-size: 14.5px; line-height: 1.5; margin-bottom: 6px; }
.related-card p { font-size: 12.5px; color: var(--ink-soft); }

/* 文章目录 */
.widget-toc .toc-list { font-size: 13px; }
.widget-toc .toc-list a {
    display: block;
    padding: 5px 0 5px 12px;
    color: var(--ink-soft);
    border-left: 2px solid var(--line);
    line-height: 1.5;
}
.widget-toc .toc-list a:hover { color: var(--c-main); border-left-color: var(--c-mid); }
.widget-toc .toc-list a.toc-h3 { padding-left: 26px; font-size: 12.5px; }

/* ---------------- 分页 ---------------- */
.pagination { display: flex; gap: 8px; flex-wrap: wrap; margin: 26px 0 6px; }
.page-link {
    padding: 7px 15px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 13.5px;
    color: var(--ink);
    text-decoration: none;
    background: var(--bg-card);
}
.page-link:hover { border-color: var(--c-mid); color: var(--c-main); text-decoration: none; }
.page-link.current {
    background: linear-gradient(120deg, var(--c-main), var(--c-mid));
    color: #fff;
    border-color: transparent;
}
.page-link.ellipsis { border: none; background: none; }

/* ---------------- 搜索表单 ---------------- */
.search-form {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    max-width: 520px;
}
.search-form input {
    flex: 1;
    border: none;
    border-radius: 24px;
    padding: 11px 20px;
    font-size: 14px;
    outline: none;
}

/* ---------------- 空提示/404 ---------------- */
.empty-tip {
    background: var(--bg-card);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    color: var(--ink-soft);
}
.notfound { padding: 80px 22px; text-align: center; }
.nf-code {
    font-size: 90px;
    font-weight: 800;
    background: linear-gradient(120deg, var(--c-deep), var(--c-mid));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.1;
}
.notfound h1 { font-size: 24px; margin-bottom: 8px; }
.nf-tip { color: var(--ink-soft); margin-bottom: 26px; }

/* ---------------- 底部CTA与页脚 ---------------- */
.footer-cta {
    background: linear-gradient(120deg, var(--c-deep), var(--c-main) 60%, var(--c-mid));
    color: #fff;
    text-align: center;
    padding: 52px 22px;
}
.footer-cta-inner h2 { font-size: 24px; margin-bottom: 10px; }
.footer-cta-inner p { color: rgba(255, 255, 255, 0.85); font-size: 14px; margin-bottom: 22px; }

.site-footer { background: #1c0f31; color: rgba(255, 255, 255, 0.8); padding: 44px 0 0; }
.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 22px 30px;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
}
.footer-brand-head { display: flex; align-items: center; gap: 10px; }
.footer-brand-head img { display: block; flex: none; }
.footer-brand strong { color: #fff; font-size: 17px; }
.footer-brand p { font-size: 12.5px; margin-top: 10px; color: rgba(255, 255, 255, 0.6); line-height: 2; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-col h4 { color: var(--c-light); font-size: 14px; margin-bottom: 12px; }
.footer-col a {
    display: block;
    color: rgba(255, 255, 255, 0.66);
    font-size: 12.5px;
    padding: 4px 0;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px 22px;
    text-align: center;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.5);
}
.footer-disclaimer { margin-top: 4px; }

/* ---------------- 浮动TG ---------------- */
.float-telegram {
    position: fixed;
    right: 22px;
    bottom: 26px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--c-main), var(--c-mid));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(106, 17, 203, 0.4);
    text-decoration: none;
    z-index: 90;
}
.float-telegram:hover { text-decoration: none; transform: scale(1.06); }

/* ---------------- 浏览量统计信标（静态缓存页内嵌，view.php） ---------------- */
/* 用 visibility+零尺寸而非 display:none：部分浏览器省流模式会跳过加载 display:none 图片，导致计数丢失 */
.view-beacon {
    position: absolute;
    width: 0;
    height: 0;
    visibility: hidden;
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 960px) {
    .section-inner.with-sidebar { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .cards-grid, .featured-grid, .related-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; gap: 26px; }
    .footer-cols { grid-template-columns: repeat(2, 1fr); }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--c-deep);
        padding: 12px 22px;
        flex-direction: column;
    }
    .main-nav.open { display: flex; }
    .nav-toggle { display: block; margin-left: auto; }
    .header-cta { display: none; }
}
@media (max-width: 640px) {
    .hero { padding: 52px 16px 46px; }
    .hero h1 { font-size: 26px; }
    .hero-sub { font-size: 14px; }
    .article-main { padding: 22px 18px; }
    .article-title { font-size: 21px; }
    .prev-next { grid-template-columns: 1fr; }
    .section-title { font-size: 20px; }
    .footer-cols { grid-template-columns: 1fr; }
    .article-content { font-size: 15px; }
    .article-content h2 { font-size: 19px; }
}

/* 信任页面（关于/免责）窄栏排版 */
.page-narrow{max-width:820px;margin:0 auto;}
