/* COC 攻略站 - 全站样式 */
:root {
    --bg: #0d1220;
    --bg-soft: #141b2b;
    --panel: #1a2234;
    --panel-2: #212b40;
    --line: #2a3448;
    --gold: #f2b632;
    --gold-soft: #ffd166;
    --text: #e8ecf4;
    --muted: #939db3;
    --green: #3ddc97;
    --red: #ff6b6b;
    --radius: 14px;
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; display: block; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部导航 ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(13, 18, 32, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.5px;
}

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--gold), #b8791a);
    display: grid;
    place-items: center;
    font-size: 12.5px;
    letter-spacing: -0.4px;
    color: #241a05;
    font-weight: 900;
}

.nav-links { display: flex; gap: 6px; }

.nav-links a {
    padding: 8px 14px;
    border-radius: 9px;
    font-size: 14.5px;
    color: var(--muted);
    transition: 0.18s;
}

.nav-links a:hover { color: var(--text); background: var(--panel); }

.nav-links a.active { color: var(--gold-soft); background: rgba(242, 182, 50, 0.1); }

/* ---------- Hero ---------- */
.hero {
    padding: 72px 0 56px;
    background:
        radial-gradient(900px 380px at 15% -10%, rgba(242, 182, 50, 0.16), transparent 60%),
        radial-gradient(700px 340px at 88% 0%, rgba(61, 220, 151, 0.1), transparent 60%);
    border-bottom: 1px solid var(--line);
}

.hero-tag {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(242, 182, 50, 0.12);
    border: 1px solid rgba(242, 182, 50, 0.28);
    color: var(--gold-soft);
    font-size: 12.5px;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: clamp(28px, 4.6vw, 44px);
    line-height: 1.25;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.hero h1 em {
    font-style: normal;
    color: var(--gold);
}

.hero p {
    color: var(--muted);
    max-width: 640px;
    font-size: 15.5px;
}

.hero-stats {
    display: flex;
    gap: 36px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.hero-stats div strong {
    display: block;
    font-size: 24px;
    color: var(--gold-soft);
    letter-spacing: -0.5px;
}

.hero-stats div span { font-size: 13px; color: var(--muted); }

/* ---------- 区块 ---------- */
.section { padding: 56px 0; }

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 26px;
    gap: 16px;
    flex-wrap: wrap;
}

.section-head h2 {
    font-size: 22px;
    letter-spacing: -0.3px;
}

.section-head h2::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 18px;
    background: var(--gold);
    border-radius: 2px;
    margin-right: 10px;
    vertical-align: -2px;
}

.section-head a { font-size: 14px; color: var(--muted); }
.section-head a:hover { color: var(--gold-soft); }

/* ---------- 卡片 ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 18px;
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-3px);
    border-color: rgba(242, 182, 50, 0.4);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.card-tag {
    align-self: flex-start;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(61, 220, 151, 0.12);
    color: var(--green);
    margin-bottom: 14px;
}

.card-tag.th { background: rgba(242, 182, 50, 0.12); color: var(--gold-soft); }
.card-tag.pk { background: rgba(255, 107, 107, 0.12); color: var(--red); }

.card h3 {
    font-size: 17px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.card p {
    font-size: 14px;
    color: var(--muted);
    flex: 1;
}

.card-meta {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: 12.5px;
    color: #6f7a91;
    display: flex;
    justify-content: space-between;
}

/* ---------- 文章页 ---------- */
.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 40px;
    padding: 48px 0 72px;
}

.article-head { margin-bottom: 30px; }

.crumb { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.crumb a:hover { color: var(--gold-soft); }

.article-head h1 {
    font-size: clamp(24px, 3.6vw, 34px);
    line-height: 1.35;
    margin-bottom: 14px;
    letter-spacing: -0.4px;
}

.article-info {
    display: flex;
    gap: 18px;
    font-size: 13px;
    color: var(--muted);
    flex-wrap: wrap;
}

.article-body h2 {
    font-size: 20px;
    margin: 36px 0 14px;
    padding-left: 12px;
    border-left: 3px solid var(--gold);
}

.article-body h3 {
    font-size: 16.5px;
    margin: 26px 0 10px;
    color: var(--gold-soft);
}

.article-body p { margin-bottom: 14px; color: #ccd4e2; }

.article-body ul, .article-body ol {
    margin: 0 0 16px 22px;
    color: #ccd4e2;
}

.article-body li { margin-bottom: 8px; }

.article-body strong { color: var(--gold-soft); font-weight: 600; }

.article-body code {
    background: var(--panel-2);
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 13.5px;
    color: var(--green);
}

.quote {
    background: var(--panel);
    border-left: 3px solid var(--green);
    border-radius: 0 10px 10px 0;
    padding: 16px 20px;
    margin: 22px 0;
    font-size: 14.5px;
    color: var(--muted);
}

.table-wrap { overflow-x: auto; margin: 20px 0; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: var(--panel);
    border-radius: 10px;
    overflow: hidden;
}

th, td {
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

th { background: var(--panel-2); color: var(--gold-soft); font-weight: 600; font-size: 13.5px; }

tr:last-child td { border-bottom: none; }

td { color: #c3cbdb; }

/* ---------- 侧栏 ---------- */
.sidebar { position: sticky; top: 88px; align-self: start; }

.side-box {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 18px;
}

.side-box h4 {
    font-size: 14px;
    color: var(--gold-soft);
    margin-bottom: 14px;
    letter-spacing: 0.5px;
}

.side-box ul { list-style: none; }

.side-box li { margin-bottom: 11px; }

.side-box li a { font-size: 13.5px; color: var(--muted); }
.side-box li a:hover { color: var(--gold-soft); }

/* ---------- 页脚 ---------- */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 36px 0;
    margin-top: 20px;
    font-size: 13px;
    color: #6f7a91;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
    .article-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .nav-links a { padding: 8px 10px; font-size: 13.5px; }
    .hero { padding: 48px 0 40px; }
    .hero-stats { gap: 24px; }
}

@media (max-width: 560px) {
    .nav-links { gap: 0; }
    .nav-links a { padding: 8px; font-size: 13px; }
    .logo span { display: none; }
}
