/*
Theme Name: CF-DH
Theme URI: https://ccs.linbei.de/dh/
Description: CrossFire 外服导航同款暗黑电竞风格 Typecho 主题
Version: 1.0.1
Author: Linbei
Author URI: https://linbei.de
*/

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800;900&family=Noto+Sans+SC:wght@400;500;700;900&display=swap');

:root {
    --gold: #f5e003;
    --gold-hover: #d4c102;
    --bg: #0a0a0a;
    --panel: #111111;
    --panel-hover: #1a1a1a;
    --panel2: #151515;
    --text: #ffffff;
    --muted: #a0a0a0;
    --line: #222222;
    --red: #ff4444;
    --green: #22c55e;
    --purple: #a855f7;
    --blue: #3b82f6;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font: 15px/1.75 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-hover); }

/* ====== Layout ====== */
.container { width: min(1280px, calc(100% - 48px)); margin: auto; }

/* ====== Header ====== */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    height: 70px; display: flex; align-items: center;
    transition: background 0.3s ease, border-color 0.3s ease;
}
.site-header.scrolled {
    background: rgba(10,10,10,0.95); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%;
}
.brand {
    display: flex; align-items: center; gap: 10px;
    font: 900 22px/1 'Barlow Condensed', 'Noto Sans SC', sans-serif;
    letter-spacing: 0.04em; text-transform: uppercase;
}
.brand-mark {
    width: 34px; height: 34px; background: var(--gold); color: #000;
    display: grid; place-items: center; border-radius: 6px;
    font-weight: 900; font-size: 13px;
}
.brand small {
    display: block; color: var(--muted);
    font: 500 10px/1.4 'Noto Sans SC'; letter-spacing: 0.14em; text-transform: none;
}
.brand .brand-accent { color: var(--gold); }

/* Nav */
.site-nav { display: flex; gap: 28px; align-items: center; }
.site-nav a {
    font-size: 0.82rem; font-weight: 700; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.5px; transition: color 0.2s;
}
.site-nav a:hover, .site-nav a.current { color: var(--gold); }
.nav-search { color: var(--muted); cursor: pointer; transition: color 0.2s; }
.nav-search:hover { color: var(--gold); }

/* Search Form */
.search-drop {
    display: none; position: absolute; top: 70px; right: 0;
    background: var(--panel); border: 1px solid var(--line);
    border-radius: 12px; padding: 12px;
}
.search-drop.active { display: block; }
.search-drop input {
    background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
    color: var(--text); padding: 10px 16px; font-size: 14px; width: 260px;
    outline: none;
}
.search-drop input:focus { border-color: var(--gold); }

/* Mobile Nav */
.mobile-toggle {
    display: none; background: none; border: none;
    color: var(--text); font-size: 1.4rem; cursor: pointer;
}
.mobile-menu {
    display: none; position: fixed; inset: 0; z-index: 2000;
    background: rgba(0,0,0,0.96); flex-direction: column;
    align-items: center; justify-content: center; gap: 32px;
}
.mobile-menu.active { display: flex; }
.mobile-menu a { font-size: 1.15rem; font-weight: 700; text-transform: uppercase; }
.mobile-menu .close-btn {
    position: absolute; top: 24px; right: 24px;
    font-size: 2rem; cursor: pointer; color: var(--muted);
}

/* ====== Hero (Home only) ====== */
.outpost-hero {
    position: relative; min-height: 100vh; display: flex; align-items: center;
    padding: 100px 0 80px; overflow: hidden;
    background: var(--bg);
}
.outpost-hero::before {
    content: ''; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(to bottom, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.55) 60%, var(--bg) 100%);
}
.hero-bg-img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: center 30%; z-index: 0;
}
.outpost-hero::after {
    content: attr(data-watermark);
    position: absolute; right: -30px; bottom: -50px; z-index: 1;
    color: rgba(255,255,255,0.03); font: 900 280px/0.8 'Barlow Condensed';
    letter-spacing: -0.06em; pointer-events: none;
}
.outpost-hero .container { position: relative; z-index: 2; }
.hero-eyebrow {
    display: flex; align-items: center; gap: 10px;
    color: var(--gold); font: 700 13px 'Barlow Condensed';
    letter-spacing: 0.16em; text-transform: uppercase;
}
.hero-eyebrow::before {
    content: ''; display: block; width: 32px; height: 2px; background: var(--gold);
}
.outpost-hero h1 {
    font: 900 clamp(56px, 9vw, 120px)/0.82 'Barlow Condensed';
    letter-spacing: -0.04em; margin: 20px 0; text-transform: uppercase;
    text-shadow: 0 0 60px rgba(245,224,3,0.2);
}
.outpost-hero h1 span {
    display: block;
    background: linear-gradient(135deg, var(--gold) 0%, #fff 50%, var(--gold) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-copy {
    max-width: 520px; color: var(--muted); font-size: 16px; margin-bottom: 28px;
}

/* ====== Buttons ====== */
.cf-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px; padding: 12px 28px; font-size: 0.82rem; font-weight: 700;
    letter-spacing: 1px; text-transform: uppercase; cursor: pointer;
    transition: all 0.25s ease; border: none;
}
.cf-btn:hover { transform: translateY(-2px); }
.cf-btn-gold {
    background: var(--gold); color: #000; border-radius: 50px;
    box-shadow: 0 8px 30px rgba(245,224,3,0.25);
}
.cf-btn-gold:hover {
    background: var(--gold-hover); box-shadow: 0 12px 40px rgba(245,224,3,0.35);
}
.cf-btn-dark {
    background: transparent; color: var(--gold); border: 2px solid var(--gold);
    border-radius: 50px; box-shadow: 0 4px 20px rgba(245,224,3,0.1);
}
.cf-btn-dark:hover {
    background: var(--gold); color: #000; box-shadow: 0 8px 30px rgba(245,224,3,0.25);
}

/* ====== Sections ====== */
.outpost-section { padding: 80px 0; }
.outpost-dark {
    background: var(--panel); border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.section-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    margin-bottom: 40px; flex-wrap: wrap; gap: 16px;
}
.section-head h2 {
    font: 900 42px/0.92 'Barlow Condensed'; letter-spacing: 0.02em;
    margin: 0; text-transform: uppercase;
}
.section-head h2 span { color: var(--gold); }
.section-head p { color: var(--muted); font-size: 13px; margin-top: 8px; }
.section-line { width: 60px; height: 3px; background: var(--gold); margin-bottom: 16px; }

/* ====== Post Card Grid ====== */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}
.post-card {
    position: relative; background: var(--panel2); border: 1px solid var(--line);
    border-radius: 18px; padding: 28px; transition: all 0.3s ease;
    display: flex; flex-direction: column;
}
.post-card:hover {
    transform: translateY(-6px); border-color: var(--gold);
    box-shadow: 0 16px 48px rgba(245,224,3,0.06);
}
.post-card .cat-tag {
    display: inline-block; padding: 3px 12px; border-radius: 50px;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.4px;
    text-transform: uppercase; margin-bottom: 16px;
    background: rgba(245,224,3,0.1); color: var(--gold);
}
.post-card h3 {
    font: 800 22px/1.15 'Barlow Condensed'; margin-bottom: 10px;
    text-transform: uppercase;
}
.post-card p {
    color: var(--muted); font-size: 0.85rem; line-height: 1.7;
    flex: 1; margin-bottom: 18px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card-meta {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.75rem; color: var(--muted); padding-top: 16px;
    border-top: 1px solid var(--line);
}
.post-card-meta .author { color: var(--gold); font-weight: 600; }
.post-card-link {
    color: var(--gold); font-size: 0.78rem; font-weight: 700;
    display: flex; align-items: center; gap: 6px; transition: gap 0.2s;
}
.post-card-link:hover { gap: 10px; }

/* Empty state */
.post-grid .empty {
    grid-column: 1/-1; text-align: center; padding: 80px 20px; color: var(--muted);
}
.post-grid .empty i { font-size: 3rem; display: block; margin-bottom: 16px; opacity: 0.3; }

/* ====== Pagination ====== */
.pager {
    display: flex; justify-content: center; gap: 8px; margin-top: 40px;
    font-size: 0.85rem; font-weight: 700;
}
.pager a, .pager .current {
    padding: 10px 18px; border-radius: 10px; transition: all 0.2s;
}
.pager a { background: var(--panel); color: var(--muted); }
.pager a:hover { background: var(--gold); color: #000; }
.pager .current { background: var(--gold); color: #000; }
.pager .prev, .pager .next { text-transform: uppercase; letter-spacing: 0.5px; }

/* ====== Single Post / Page ====== */
.article-wrap { padding: 100px 0 60px; }
.article { max-width: 820px; }
.article h1 {
    font: 900 clamp(42px, 7vw, 76px)/0.88 'Barlow Condensed';
    margin: 16px 0 24px; text-transform: uppercase;
}
.article h1 span { color: var(--gold); }
.article-meta {
    display: flex; gap: 20px; color: var(--muted); font-size: 0.85rem;
    margin-bottom: 32px; padding-bottom: 20px; border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}
.article-meta a { color: var(--gold); }
.article-meta .cat, .article-meta .author { font-weight: 600; color: var(--gold); }
.article-body {
    font-size: 16px; line-height: 1.9; color: #d2d4ce;
}
.article-body img { max-width: 100%; height: auto; border-radius: 12px; }
.article-body h2, .article-body h3 {
    font-family: 'Barlow Condensed'; font-weight: 800; color: var(--gold);
    text-transform: uppercase; margin: 32px 0 12px;
}
.article-body h2 { font-size: 32px; }
.article-body h3 { font-size: 24px; }
.article-body a { color: var(--gold); border-bottom: 1px solid var(--gold); }
.article-body a:hover { color: var(--gold-hover); }
.article-body blockquote {
    border-left: 3px solid var(--gold); padding: 12px 20px;
    background: var(--panel); border-radius: 0 10px 10px 0; margin: 16px 0;
    color: var(--muted);
}
.article-body pre {
    background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
    padding: 20px; overflow-x: auto; font-size: 14px; line-height: 1.6;
}
.article-body code {
    background: rgba(245,224,3,0.08); color: var(--gold);
    padding: 2px 8px; border-radius: 4px; font-size: 0.9em;
}
.article-body pre code { background: none; color: var(--text); padding: 0; }
.article-body ul, .article-body ol { padding-left: 24px; margin: 12px 0; }
.article-body li { margin: 6px 0; }

/* Tags */
.article-tags {
    margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line);
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.article-tags span { color: var(--muted); font-size: 0.8rem; margin-right: 4px; }
.article-tags a {
    padding: 5px 14px; background: var(--panel); border: 1px solid var(--line);
    border-radius: 50px; font-size: 0.75rem; color: var(--muted); transition: all 0.2s;
}
.article-tags a:hover { border-color: var(--gold); color: var(--gold); }

/* Post nav */
.article-nav {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
    margin-top: 40px;
}
.article-nav a {
    display: block; padding: 20px; background: var(--panel); border: 1px solid var(--line);
    border-radius: 14px; font-size: 0.8rem; color: var(--muted); transition: all 0.2s;
}
.article-nav a:hover { border-color: var(--gold); }
.article-nav span { display: block; color: var(--gold); font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }

/* ====== Comments ====== */
.comments { margin-top: 48px; }
.comments h2 {
    font: 900 36px/1 'Barlow Condensed'; text-transform: uppercase; margin-bottom: 24px;
}
.comments h2 span { color: var(--gold); }
.comment-list { list-style: none; padding: 0; }
.comment-list li {
    padding: 20px; background: var(--panel); border: 1px solid var(--line);
    border-radius: 14px; margin-bottom: 14px;
}
.comment-list li.comment-level-odd { border-left: 3px solid var(--gold); }
.comment-meta { font-size: 0.8rem; color: var(--gold); margin-bottom: 8px; }
.comment-meta a { color: var(--gold); font-weight: 600; }
.comment-content { color: #c2c5be; font-size: 0.9rem; line-height: 1.8; }
.comment-content p { margin: 0; }
.comment-reply { margin-top: 8px; }
.comment-reply a { color: var(--gold); font-size: 0.78rem; font-weight: 600; }

/* Comment form */
.respond { margin-top: 32px; }
.respond h3 {
    font: 800 24px 'Barlow Condensed'; text-transform: uppercase; margin-bottom: 16px;
    color: var(--gold);
}
#comment-form p { margin-bottom: 14px; }
#comment-form label {
    display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 4px;
}
#comment-form input[type="text"],
#comment-form input[type="email"],
#comment-form input[type="url"],
#comment-form textarea {
    width: 100%; padding: 12px 16px;
    background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
    color: var(--text); font-size: 14px; outline: none; transition: border-color 0.2s;
}
#comment-form input:focus, #comment-form textarea:focus { border-color: var(--gold); }
#comment-form textarea { min-height: 140px; resize: vertical; }
#comment-form .submit {
    padding: 12px 32px; background: var(--gold); color: #000;
    border: none; border-radius: 50px; font-size: 0.85rem; font-weight: 700;
    cursor: pointer; text-transform: uppercase; letter-spacing: 0.5px;
    transition: all 0.2s;
}
#comment-form .submit:hover { background: var(--gold-hover); }
.cancel-comment-reply { margin-bottom: 12px; }
.cancel-comment-reply a { color: var(--red); font-size: 0.8rem; }

/* ====== Archive ====== */
.archive-header {
    padding: 100px 0 40px; text-align: center;
}
.archive-header h2 {
    font: 900 clamp(36px, 6vw, 64px)/1 'Barlow Condensed'; text-transform: uppercase;
}
.archive-header h2 span { color: var(--gold); }

/* ====== Sidebar (Widgets) ====== */
.sidebar { margin-top: 40px; }
.widget {
    background: var(--panel); border: 1px solid var(--line);
    border-radius: 16px; padding: 24px; margin-bottom: 20px;
}
.widget-title {
    font: 800 18px/1 'Barlow Condensed'; text-transform: uppercase;
    margin-bottom: 16px; color: var(--gold); letter-spacing: 0.02em;
}
.widget ul { list-style: none; padding: 0; }
.widget li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.widget li:last-child { border-bottom: none; }
.widget a { color: var(--muted); font-size: 0.85rem; transition: color 0.2s; }
.widget a:hover { color: var(--gold); }
.widget .tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.widget .tag-cloud a {
    padding: 5px 14px; background: var(--bg); border: 1px solid var(--line);
    border-radius: 50px; font-size: 0.75rem;
}

/* ====== Footer ====== */
.site-footer {
    background: var(--bg); border-top: 1px solid var(--line); padding: 32px 0;
    text-align: center;
}
.site-footer p { font-size: 0.82rem; color: var(--muted); }
.site-footer strong { color: var(--gold); font-weight: 600; }

/* ====== 404 ====== */
.error-page {
    text-align: center; padding: 160px 24px 100px;
}
.error-page h1 {
    font: 900 clamp(80px, 15vw, 160px)/1 'Barlow Condensed'; color: var(--gold);
    margin-bottom: 8px;
}
.error-page h2 {
    font: 800 28px 'Barlow Condensed'; text-transform: uppercase; margin-bottom: 16px;
}
.error-page p { color: var(--muted); margin-bottom: 24px; }

/* ====== Server Cards ====== */
.server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}
.server-card {
    background: var(--panel); border: 1px solid var(--line);
    border-radius: 20px; overflow: hidden; transition: all 0.4s ease;
}
.server-card:hover {
    transform: translateY(-8px); border-color: var(--gold);
    box-shadow: 0 20px 60px rgba(245,224,3,0.08);
}
.sc-header {
    padding: 28px 28px 20px; display: flex; align-items: flex-start; gap: 16px;
}
.sc-icon {
    width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; font-weight: 900; color: #fff;
}
.sc-info { flex: 1; min-width: 0; }
.sc-name { font-size: 1.15rem; font-weight: 800; margin-bottom: 4px; }
.sc-region { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.sc-tag {
    padding: 4px 12px; border-radius: 50px; font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px; flex-shrink: 0;
}
.sc-official { background: rgba(34,197,94,0.15); color: var(--green); }
.sc-private { background: rgba(168,85,247,0.15); color: var(--purple); }
.sc-body { padding: 0 28px 20px; }
.sc-features { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.sc-features span {
    font-size: 0.75rem; color: var(--muted); padding: 4px 12px;
    background: rgba(255,255,255,0.03); border-radius: 6px; white-space: nowrap;
}
.sc-desc {
    font-size: 0.85rem; color: var(--muted); line-height: 1.7;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sc-footer {
    padding: 16px 28px; border-top: 1px solid var(--line); display: flex; gap: 10px;
}
.sc-link {
    flex: 1; padding: 10px 16px; border-radius: 10px; font-size: 0.8rem;
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    text-align: center; transition: all 0.2s;
}
.sc-link.web { background: var(--gold); color: #000; }
.sc-link.web:hover { background: var(--gold-hover); }
.sc-link.discord { background: rgba(88,101,242,0.15); color: #5865f2; }
.sc-link.discord:hover { background: rgba(88,101,242,0.25); }

/* Filter Buttons */
.filter-btn {
    padding: 8px 20px; border-radius: 50px; font-size: 0.8rem; font-weight: 700;
    cursor: pointer; letter-spacing: 0.5px; transition: all 0.25s;
}
.filter-btn:hover { background: var(--gold-hover) !important; color: #000 !important; }

/* ====== Tips Cards ====== */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 18px;
}
.tip-card {
    background: var(--panel); border: 1px solid var(--line);
    border-radius: 14px; padding: 26px; transition: all 0.3s;
}
.tip-card:hover { border-color: var(--gold); }
.tip-icon {
    width: 44px; height: 44px; border-radius: 10px;
    background: rgba(245,224,3,0.08); display: flex;
    align-items: center; justify-content: center;
    color: var(--gold); font-size: 1.1rem; margin-bottom: 14px;
}
.tip-title { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.tip-desc { font-size: 0.82rem; color: var(--muted); line-height: 1.7; }

/* ====== Responsive ====== */
@media (max-width: 860px) {
    .site-nav, .nav-search { display: none; }
    .mobile-toggle { display: block; }
    .outpost-hero { min-height: 500px; }
    .outpost-hero::after { font-size: 180px; right: -20px; bottom: -30px; }
    .post-grid, .server-grid { grid-template-columns: 1fr; }
    .tips-grid { grid-template-columns: 1fr; }
    .section-head h2 { font-size: 34px; }
    .article-nav { grid-template-columns: 1fr; }
    .article-body { font-size: 15px; }
    .server-card .sc-header { flex-wrap: wrap; }
}
