:root {
    --bg: #0d0f14;
    --bg-soft: #141821;
    --panel: #191e29;
    --panel-2: #202634;
    --line: rgba(255, 255, 255, .09);
    --text: #eef1f7;
    --muted: #98a1b3;
    --accent: #ffbf47;
    --accent-2: #ff6a5e;
    --radius: 14px;
    --shadow: 0 10px 35px rgba(0, 0, 0, .28);
    --container: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: radial-gradient(circle at 50% -20%, #232b3d 0, var(--bg) 42%);
    color: var(--text);
    font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font: inherit; }
button { cursor: pointer; }
.container { width: min(var(--container), calc(100% - 32px)); margin: 0 auto; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--accent); color: #111; padding: 8px 14px; }
.skip-link:focus { left: 12px; top: 12px; }
.muted { color: var(--muted); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(13, 15, 20, .9);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; font-weight: 800; font-size: 19px; }
.brand-mark {
    display: grid; place-items: center; width: 35px; height: 35px; border-radius: 11px;
    color: #16110a; background: linear-gradient(135deg, var(--accent), #ffe29b); font-size: 19px;
}
.main-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; }
.main-nav::-webkit-scrollbar { display: none; }
.nav-link { white-space: nowrap; padding: 7px 10px; border-radius: 9px; color: var(--muted); font-size: 14px; }
.nav-link:hover, .nav-link.is-active { color: var(--text); background: rgba(255, 191, 71, .12); }
.header-search { display: flex; flex: 0 0 220px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.header-search input { width: 100%; min-width: 0; border: 0; background: transparent; color: var(--text); padding: 8px 10px; outline: none; }
.header-search button { border: 0; background: var(--accent); color: #17120a; padding: 0 12px; font-weight: 700; }
.menu-toggle { display: none; width: 38px; height: 36px; border: 1px solid var(--line); background: var(--panel); border-radius: 9px; padding: 8px; }
.menu-toggle span { display: block; height: 2px; background: var(--text); margin: 4px 0; border-radius: 2px; }
.header-ad { margin-top: 16px; }

.site-main { padding: 24px 0 42px; min-height: 55vh; }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.content-main { min-width: 0; }
.sidebar { position: sticky; top: 88px; display: grid; gap: 16px; }
.side-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.side-title { margin: 0 0 12px; font-size: 16px; }
.side-cats { display: grid; gap: 2px; }
.side-cats a { display: flex; justify-content: space-between; gap: 8px; padding: 7px 8px; border-radius: 8px; color: var(--muted); }
.side-cats a:hover { background: var(--panel-2); color: var(--text); }
.side-cats em { font-style: normal; color: var(--accent); font-size: 12px; }
.side-links { display: flex; flex-wrap: wrap; gap: 8px; }
.side-links a { padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 13px; }
.side-notice p { color: var(--muted); font-size: 13px; margin: 0; }

.hero { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(220px, .85fr); gap: 12px; margin-bottom: 18px; }
.hero-main { position: relative; min-height: 330px; border-radius: var(--radius); overflow: hidden; background: var(--panel); border: 1px solid var(--line); }
.hero-main > img, .hero-main > .cover-placeholder { width: 100%; height: 100%; min-height: 330px; object-fit: cover; position: absolute; inset: 0; }
.hero-overlay { position: absolute; inset: auto 0 0; padding: 60px 22px 20px; background: linear-gradient(transparent, rgba(0, 0, 0, .9)); }
.hero-kicker { color: var(--accent); font-size: 12px; letter-spacing: .1em; }
.hero-overlay h1 { margin: 6px 0 8px; font-size: clamp(20px, 3vw, 30px); line-height: 1.35; }
.hero-overlay p { margin: 0; color: #cdd3df; font-size: 14px; }
.hero-side { display: grid; gap: 10px; }
.hero-small { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: center; min-height: 72px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 7px; font-size: 13px; }
.hero-small img, .hero-small .cover-placeholder { width: 92px; height: 58px; object-fit: cover; border-radius: 8px; }
.hero-small:hover { border-color: rgba(255, 191, 71, .4); }

.category-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 14px; scrollbar-width: none; }
.category-strip::-webkit-scrollbar { display: none; }
.category-strip a { white-space: nowrap; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 13px; }
.category-strip em { font-style: normal; margin-left: 5px; color: var(--accent); font-size: 11px; }
.category-strip a:hover { color: var(--text); border-color: rgba(255, 191, 71, .4); }

.section-block { margin-top: 20px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-heading h2 { margin: 0; font-size: 20px; }
.section-heading span { color: var(--muted); font-size: 12px; }
.post-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.post-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.post-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, border-color .2s; }
.post-card:hover { transform: translateY(-3px); border-color: rgba(255, 191, 71, .36); }
.post-card-link { display: block; height: 100%; }
.post-card-cover { position: relative; aspect-ratio: 16 / 10; background: #252b38; overflow: hidden; }
.post-card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.post-card:hover .post-card-cover img { transform: scale(1.04); }
.cover-placeholder { display: grid; place-items: center; width: 100%; height: 100%; min-height: 90px; background: linear-gradient(135deg, #2b3242, #171b24); color: rgba(255, 191, 71, .8); font-size: 22px; font-weight: 800; }
.video-badge { position: absolute; right: 8px; top: 8px; background: rgba(0, 0, 0, .72); color: var(--accent); font-size: 11px; padding: 3px 7px; border-radius: 999px; }
.post-card-body { padding: 12px; }
.post-card-cat { color: var(--accent); font-size: 11px; }
.post-card-title { margin: 5px 0 7px; font-size: 15px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card-excerpt { margin: 0 0 8px; color: var(--muted); font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card-meta { display: flex; justify-content: space-between; gap: 8px; color: #7e8799; font-size: 11px; }

.page-heading { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; }
.page-heading .eyebrow { color: var(--accent); margin: 0 0 4px; font-size: 12px; letter-spacing: .12em; }
.page-heading h1 { margin: 0 0 6px; font-size: clamp(23px, 4vw, 34px); }
.page-heading p { margin: 0; color: var(--muted); }
.page-count { color: #7e8799; font-size: 12px; }
.search-page-form { display: flex; max-width: 560px; margin: 16px 0 10px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg-soft); }
.search-page-form input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); padding: 10px 12px; outline: none; }
.search-page-form button { border: 0; background: var(--accent); color: #17120a; padding: 0 18px; font-weight: 700; }

.empty-state { text-align: center; padding: 70px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); }
.empty-state h1, .empty-state h3 { color: var(--text); margin: 0 0 8px; }
.empty-state code { display: inline-block; background: var(--bg); border: 1px solid var(--line); padding: 8px 12px; border-radius: 8px; color: var(--accent); margin-top: 8px; }
.error-state { margin-top: 20px; }
.button, .sidebar a.button { display: inline-block; margin-top: 14px; padding: 9px 18px; border-radius: 9px; background: var(--accent); color: #17120a; font-weight: 700; }

.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 24px 0 8px; }
.page-link, .page-gap { min-width: 34px; text-align: center; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.page-link:hover, .page-link.is-active { background: var(--accent); border-color: var(--accent); color: #17120a; }
.page-gap { border-color: transparent; }


.breadcrumb { display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: 12px; margin-bottom: 14px; overflow: hidden; white-space: nowrap; }
.breadcrumb a:hover { color: var(--accent); }
.article { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(16px, 3vw, 30px); }
.article-header h1 { margin: 0 0 10px; font-size: clamp(24px, 4.5vw, 38px); line-height: 1.35; overflow-wrap: anywhere; }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; color: var(--muted); font-size: 12px; }
.article-cat { color: var(--accent); border: 1px solid rgba(255, 191, 71, .28); padding: 2px 8px; border-radius: 999px; }
.video-player { margin: 20px 0; border-radius: 12px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.video-player video { width: 100%; max-height: 70vh; display: block; background: #000; }
.video-status { margin: 0; padding: 10px 12px; color: #ffd27a; background: rgba(0, 0, 0, .78); font-size: 13px; line-height: 1.6; }
.video-status[hidden] { display: none; }
.video-status.is-error { color: #ff9f9f; }
.article-cover { margin: 20px 0; border-radius: 12px; overflow: hidden; }
.article-cover img { width: 100%; max-height: 540px; object-fit: cover; }
.article-content { margin-top: 20px; font-size: 16px; line-height: 1.9; overflow-wrap: anywhere; }
.article-content p { margin: 0 0 15px; }
.article-content img { margin: 10px auto; border-radius: 10px; height: auto; }
.article-content h2, .article-content h3, .article-content h4 { margin: 24px 0 10px; line-height: 1.4; }
.article-content blockquote { margin: 16px 0; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--bg-soft); color: #c7cfdd; }
.article-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-content ul, .article-content ol { padding-left: 24px; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 22px; color: var(--muted); font-size: 13px; }
.article-tags a { border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; }
.article-nav { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); margin-top: 26px; padding-top: 18px; }
.article-nav a { max-width: 48%; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.article-nav a:hover { color: var(--accent); }
.article-nav small { display: block; color: #6e7788; font-size: 11px; margin-bottom: 3px; }
.article-nav .next { text-align: right; }
.ad-slot { margin: 16px 0; text-align: center; }
.ad-slot img { margin: 0 auto; border-radius: 10px; }

.site-footer { margin-top: 40px; border-top: 1px solid var(--line); background: #0a0c10; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 25px; padding: 28px 0 38px; color: var(--muted); font-size: 13px; }
.footer-block strong { color: var(--text); display: block; margin-bottom: 8px; }
.footer-block p { margin: 0; }
.friend-links { display: flex; flex-wrap: wrap; gap: 8px; }
.friend-links a { color: var(--muted); }
.friend-links a:hover { color: var(--accent); }
.footer-meta { display: flex; flex-direction: column; gap: 5px; text-align: right; }
.footer-meta a:hover { color: var(--accent); }
.flash-wrap { margin-top: 16px; }
.flash { padding: 10px 14px; border-radius: 9px; margin-bottom: 8px; background: var(--panel); border: 1px solid var(--line); }
.flash-success { border-color: rgba(82, 196, 126, .4); color: #8ce0ad; }
.flash-error { border-color: rgba(255, 106, 94, .45); color: #ff9b92; }

@media (max-width: 1080px) {
    .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .content-layout { grid-template-columns: minmax(0, 1fr) 270px; gap: 18px; }
    .header-search { flex-basis: 180px; }
}
@media (max-width: 860px) {
    .container { width: min(100% - 24px, 760px); }
    .menu-toggle { display: block; }
    .header-inner { gap: 10px; }
    .main-nav {
        position: absolute; left: 12px; right: 12px; top: 62px; display: none;
        max-height: 62vh; overflow-y: auto; padding: 10px; background: var(--panel);
        border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); z-index: 60;
    }
    .main-nav.is-open { display: flex; flex-wrap: wrap; }
    .header-search { flex: 1 1 auto; }
    .content-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; grid-row: auto; }
    .hero { grid-template-columns: 1fr; }
    .hero-main, .hero-main > img, .hero-main > .cover-placeholder { min-height: 280px; }
    .hero-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-inner { grid-template-columns: 1fr; gap: 18px; }
    .footer-meta { text-align: left; }
}
@media (max-width: 600px) {
    body { font-size: 14px; }
    .header-inner { min-height: 58px; }
    .brand-text { display: none; }
    .header-search { flex-basis: auto; }
    .header-search input { padding: 7px 8px; }
    .header-search button { padding: 0 10px; }
    .site-main { padding-top: 14px; }
    .hero-main, .hero-main > img, .hero-main > .cover-placeholder { min-height: 230px; }
    .hero-overlay { padding: 44px 14px 14px; }
    .hero-overlay p { display: none; }
    .hero-side { grid-template-columns: 1fr; }
    .post-grid, .post-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .post-card-body { padding: 9px; }
    .post-card-title { font-size: 13px; }
    .post-card-excerpt { display: none; }
    .article { border-left: 0; border-right: 0; border-radius: 0; margin-left: -12px; margin-right: -12px; }
    .article-nav { flex-direction: column; }
    .article-nav a { max-width: 100%; }
    .footer-inner { padding-bottom: 24px; }
}


.image-lightbox {
    position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
    padding: 20px; background: rgba(0, 0, 0, .9); cursor: zoom-out;
}
.image-lightbox img { max-width: 96vw; max-height: 92vh; width: auto; border-radius: 6px; }

