:root {
    --bg: #f6f7fb;
    --card: #ffffff;
    --text: #172033;
    --muted: #667085;
    --line: #e7eaf2;
    --brand: #1f2a44;
    --accent: #246bfe;
    --soft: #eef4ff;
    --gold: #f4b740;
    --radius: 22px;
    --shadow: 0 18px 45px rgba(22, 30, 48, 0.08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.72;
}
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(16px);
    background: rgba(246, 247, 251, 0.92);
    border-bottom: 1px solid rgba(231, 234, 242, 0.9);
}
.topbar, .main-nav, .search-box, main, .site-footer .footer-grid, .copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0 12px;
    gap: 16px;
}
.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.brand-logo img {
    border-radius: 16px;
    box-shadow: 0 10px 22px rgba(31, 42, 68, 0.12);
}
.brand-logo strong { display: block; font-size: 1.3rem; letter-spacing: 0.08em; }
.brand-logo small { display: block; color: var(--muted); font-size: 0.8rem; }
.domain-pill {
    background: var(--soft);
    color: #24406f;
    border: 1px solid #dbe7ff;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.92rem;
}
.main-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 0 12px;
}
.main-nav a {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 15px;
    color: #34405a;
    background: #fff;
    font-weight: 700;
}
.main-nav a.active, .main-nav a:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.search-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 0 0 18px;
}
.search-box input {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 16px;
    padding: 14px 16px;
    font-size: 1rem;
    outline: none;
}
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(36, 107, 254, 0.10); }
.search-box button, .btn {
    border: none;
    background: var(--accent);
    color: #fff;
    border-radius: 16px;
    padding: 0 20px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
}
.search-hint { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 0.92rem; }
main { padding: 30px 0 48px; }
.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    align-items: stretch;
}
.panel, .card, .article-card, .video-card, .faq-item, .comment, .author-card, .stat-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.hero-copy { padding: 34px; }
.kicker { color: var(--accent); font-weight: 900; letter-spacing: 0.08em; margin: 0 0 10px; }
h1, h2, h3 { line-height: 1.25; margin-top: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.8rem); margin-bottom: 18px; }
h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); margin-bottom: 12px; }
h3 { font-size: 1.16rem; }
.lead { color: #3f4a62; font-size: 1.08rem; }
.meta-row, .tag-row, .article-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.92rem;
}
.badge, .tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #eef4ff;
    color: #2858a5;
    border-radius: 999px;
    padding: 5px 10px;
    font-weight: 800;
    font-size: 0.85rem;
}
.hero-media { overflow: hidden; }
.hero-media figure { margin: 0; height: 100%; position: relative; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.image-description {
    position: absolute;
    left: 18px;
    bottom: 18px;
    right: 18px;
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
    border-radius: 14px;
    padding: 10px 12px;
    font-size: 0.88rem;
}
.section-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: end;
    margin: 42px 0 16px;
}
.section-head p { margin: 0; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.article-card { padding: 18px; }
.article-card img { border-radius: 18px; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 14px; }
.article-card p { color: var(--muted); margin-bottom: 12px; }
.video-card { overflow: hidden; position: relative; }
.video-frame { position: relative; background: #151b2d; }
.video-frame img, .video-frame video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; opacity: 0.92; }
.play-button {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.94);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.82);
    background: rgba(255,255,255,0.24);
    opacity: 0;
    transition: 0.22s ease;
    display: grid;
    place-items: center;
}
.play-button::before {
    content: "";
    width: 0;
    height: 0;
    border-top: 13px solid transparent;
    border-bottom: 13px solid transparent;
    border-left: 20px solid #fff;
    margin-left: 5px;
}
.video-card:hover .play-button, .video-card:focus-within .play-button { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.video-card .body { padding: 16px; }
.stats { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 0.88rem; }
.stats span { background: #f3f5f9; border-radius: 999px; padding: 4px 8px; }
.topic-banner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
    background: linear-gradient(135deg, #1f2a44, #2f4c84);
    color: #fff;
    border-radius: 28px;
    padding: 28px;
    box-shadow: var(--shadow);
}
.topic-banner p { color: rgba(255,255,255,0.82); }
.rank-list { list-style: none; padding: 0; margin: 0; counter-reset: rank; }
.rank-list li {
    counter-increment: rank;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: start;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}
.rank-list li::before {
    content: counter(rank);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--soft);
    color: var(--accent);
    font-weight: 900;
}
.author-card, .faq-item, .comment, .stat-card { padding: 18px; }
.author-card p, .faq-item p, .comment p, .stat-card p { margin-bottom: 0; color: var(--muted); }
.faq-item h3 { margin-bottom: 8px; }
.comment strong { display: block; margin-bottom: 6px; }
.cta-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 28px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}
.breadcrumb { color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--accent); font-weight: 800; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }
.article-main { padding: 28px; }
.article-main p { color: #38435c; }
.article-main ul { padding-left: 1.2rem; }
.sidebar { display: grid; gap: 18px; }
.sidebar .card { padding: 18px; }
.table-like { width: 100%; border-collapse: collapse; overflow: hidden; border-radius: 18px; }
.table-like th, .table-like td { border-bottom: 1px solid var(--line); padding: 12px; text-align: left; }
.table-like th { background: #f2f5fb; }
.site-footer { background: #101827; color: #d8dfef; padding: 42px 0 26px; }
.site-footer .footer-grid { display: grid; grid-template-columns: 1.3fr 0.8fr 1fr; gap: 24px; }
.site-footer h2 { font-size: 1rem; color: #fff; }
.site-footer a { display: block; color: #d8dfef; margin: 6px 0; }
.footer-logo small, .site-footer p { color: #aab5ca; }
.copyright { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 26px; padding-top: 18px; color: #aab5ca; }
@media (max-width: 900px) {
    .hero, .grid-2, .grid-3, .grid-4, .article-layout, .site-footer .footer-grid, .topic-banner, .cta-panel { grid-template-columns: 1fr; }
    .topbar { align-items: flex-start; flex-direction: column; }
    .section-head { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 560px) {
    .topbar, .main-nav, .search-box, main, .site-footer .footer-grid, .copyright { width: min(100% - 22px, 1180px); }
    .search-box { grid-template-columns: 1fr; }
    .search-box button { padding: 13px 16px; }
    .hero-copy, .article-main { padding: 22px; }
    .rank-list li { grid-template-columns: auto 1fr; }
    .rank-list li span:last-child { grid-column: 2; }
}
.tag-row-space { margin-top: 18px; }
.rank-panel { padding: 0 20px; }
.article-figure { margin: 22px 0; }
.article-figure img { border-radius: 20px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.article-figure figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }
