/* ============================================================
   奶蛙居民局官网样式（主站首页 + 文章资讯模块）
   风格：简约高级，暗灰/深底色为主，奶蛙IP淡黄色点缀
   适配：PC 与手机移动端响应式
   注意：身份卡居民页使用 style.css，本文件互不影响
   ============================================================ */

/* ---------- 全局变量与基础 ---------- */
:root {
    --bg: #141519;         /* 页面主背景（深灰黑） */
    --bg-soft: #1a1c21;    /* 次级背景 */
    --card: #20232a;       /* 卡片底色 */
    --card-2: #262a33;     /* 卡片悬浮底色 */
    --line: #2c303a;       /* 分割线/描边 */
    --txt: #eceae4;        /* 主文字 */
    --muted: #a09c92;      /* 次要文字（灰） */
    --yellow: #ffd23f;     /* 奶蛙主黄 */
    --yellow-deep: #f5b800;/* 深黄（按钮渐变） */
    --ink: #17181b;        /* 黄底上的深色文字 */
    --radius: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; } /* 锚点平滑滚动（卡片介绍/购买渠道） */
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--txt);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { width: min(1120px, 92%); margin: 0 auto; }

/* ---------- 顶部导航 ---------- */
.site-nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(20, 21, 25, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.nav-inner {
    width: min(1120px, 92%); margin: 0 auto;
    height: 64px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
/* Logo 区 */
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-frog { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.brand-text { font-size: 16px; font-weight: 700; letter-spacing: 1px; display: flex; flex-direction: column; line-height: 1.2; }
.brand-text small { font-size: 9px; font-weight: 500; color: var(--muted); letter-spacing: 2.5px; }
/* 导航链接 */
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
    font-size: 13.5px; color: var(--muted); position: relative;
    padding: 6px 0; transition: color .2s;
}
.nav-links a:hover { color: var(--txt); }
.nav-links a.active { color: var(--yellow); }
.nav-links a.active::after {
    content: ""; position: absolute; left: 50%; transform: translateX(-50%);
    bottom: -2px; width: 16px; height: 2px; background: var(--yellow); border-radius: 2px;
}
/* 汉堡按钮（移动端显示） */
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--txt); margin: 5px 0; border-radius: 2px; transition: .25s; }

/* ---------- 通用区块 ---------- */
.site-main { min-height: calc(100vh - 64px); }
section { padding: 88px 0; }
.sec-tag {
    font-size: 11px; letter-spacing: 3px; color: var(--yellow);
    font-family: "SFMono-Regular", Consolas, monospace;
    text-transform: uppercase; margin-bottom: 12px;
}
.sec-title { font-size: clamp(24px, 3.2vw, 32px); letter-spacing: 1px; margin-bottom: 14px; }
.sec-desc { color: var(--muted); font-size: 15px; max-width: 640px; }

/* ---------- 首页主视觉 ---------- */
.hero { padding: 96px 0 88px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero-badge {
    display: inline-block; font-size: 11px; letter-spacing: 2px;
    color: var(--yellow); border: 1px solid rgba(255, 210, 63, 0.35);
    border-radius: 999px; padding: 5px 14px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(30px, 4.6vw, 50px); letter-spacing: 2px; line-height: 1.25; margin-bottom: 18px; }
.hero h1 em { font-style: normal; color: var(--yellow); }
.hero-sub { color: var(--muted); font-size: 16px; margin-bottom: 30px; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
/* 按钮样式 */
.btn-solid {
    display: inline-block; padding: 12px 26px; border-radius: 10px;
    background: linear-gradient(135deg, var(--yellow) 0%, var(--yellow-deep) 100%);
    color: var(--ink); font-size: 14px; font-weight: 700; letter-spacing: 1px;
    box-shadow: 0 6px 20px rgba(255, 210, 63, 0.22); transition: transform .2s, box-shadow .2s;
}
.btn-solid:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(255, 210, 63, 0.3); }
.btn-line {
    display: inline-block; padding: 12px 26px; border-radius: 10px;
    border: 1px solid var(--line); color: var(--txt); font-size: 14px; transition: border-color .2s, color .2s;
}
.btn-line:hover { border-color: var(--yellow); color: var(--yellow); }
/* 数据统计条 */
.stat-row { display: flex; gap: 40px; margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line); }
.stat b { display: block; font-size: 24px; color: var(--yellow); font-family: Consolas, monospace; }
.stat span { font-size: 12px; color: var(--muted); letter-spacing: 1px; }

/* ---------- 首页身份卡视觉（纯 CSS/SVG 绘制，不依赖图片） ---------- */
.card-stack { position: relative; display: flex; justify-content: center; padding: 24px 0 40px; }
/* 卡片后的暗色背卡（错位叠加出层次） */
.card-stack::before {
    content: ""; position: absolute; inset: 8% 12% 22% 12%;
    background: var(--card-2); border-radius: 20px;
    transform: rotate(5deg); z-index: 0;
}
/* 身份卡正面 */
.id-card {
    position: relative; z-index: 1;
    width: min(400px, 100%); aspect-ratio: 1.586;
    background: linear-gradient(150deg, #ffe066 0%, var(--yellow) 45%, var(--yellow-deep) 100%);
    border-radius: 20px; padding: 22px 24px;
    color: var(--ink);
    transform: rotate(-3deg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 4px 14px rgba(0, 0, 0, 0.35);
    transition: transform .35s ease;
    display: flex; flex-direction: column;
}
.id-card:hover { transform: rotate(0) translateY(-8px); }
.id-head { display: flex; justify-content: space-between; align-items: center; }
.id-head .id-title { font-size: 10px; font-weight: 800; letter-spacing: 2px; opacity: .75; }
/* 芯片图形 */
.id-chip {
    width: 34px; height: 24px; border-radius: 5px;
    border: 2px solid rgba(23, 24, 27, 0.55); position: relative;
}
.id-chip::before {
    content: ""; position: absolute; inset: 5px 6px;
    border-top: 2px solid rgba(23, 24, 27, 0.55);
    border-bottom: 2px solid rgba(23, 24, 27, 0.55);
}
.id-body { flex: 1; display: flex; align-items: center; gap: 16px; margin-top: 6px; }
/* 卡上的蛙头像框 */
.id-avatar {
    width: 74px; height: 74px; border-radius: 50%;
    background: #fffdf2; border: 3px solid rgba(23, 24, 27, 0.8);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.id-avatar svg { width: 54px; height: 50px; }
.id-info { font-family: Consolas, "SFMono-Regular", monospace; }
.id-no { font-size: 14px; font-weight: 700; letter-spacing: .5px; word-break: break-all; }
.id-name { font-size: 11px; opacity: .8; margin-top: 4px; }
/* 卡底部条码 */
.id-barcode {
    height: 26px; margin-top: 6px;
    background: repeating-linear-gradient(90deg, #17181b 0 2px, transparent 2px 5px, #17181b 5px 6px, transparent 6px 10px);
    opacity: .75; border-radius: 2px;
}

/* ---------- 卡片介绍 ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 44px; }
.feat-card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 26px 22px; transition: border-color .25s, transform .25s;
}
.feat-card:hover { border-color: rgba(255, 210, 63, 0.5); transform: translateY(-4px); }
.feat-icon {
    width: 42px; height: 42px; border-radius: 11px; margin-bottom: 16px;
    background: rgba(255, 210, 63, 0.1);
    display: flex; align-items: center; justify-content: center;
}
.feat-icon svg { width: 22px; height: 22px; stroke: var(--yellow); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feat-card h3 { font-size: 15px; letter-spacing: 1px; margin-bottom: 8px; }
.feat-card p { font-size: 13px; color: var(--muted); }

/* ---------- 核心能力 ---------- */
.core { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cap-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; margin-top: 20px; }
.cap {
    display: flex; gap: 18px; padding: 26px 0;
    border-bottom: 1px dashed var(--line);
}
.cap-no {
    font-family: Consolas, monospace; font-size: 22px; font-weight: 700;
    color: var(--yellow); opacity: .9; line-height: 1.3; flex-shrink: 0;
}
.cap h3 { font-size: 15.5px; margin-bottom: 6px; letter-spacing: 1px; }
.cap p { font-size: 13px; color: var(--muted); }

/* ---------- 常见问题 FAQ ---------- */
.faq-list { margin-top: 40px; max-width: 780px; }
.faq-list details {
    background: var(--card); border: 1px solid var(--line); border-radius: 12px;
    margin-bottom: 12px; overflow: hidden; transition: border-color .2s;
}
.faq-list details[open] { border-color: rgba(255, 210, 63, 0.45); }
.faq-list summary {
    list-style: none; cursor: pointer; padding: 17px 20px;
    font-size: 14.5px; font-weight: 600; letter-spacing: .5px;
    display: flex; justify-content: space-between; align-items: center;
}
.faq-list summary::-webkit-details-marker { display: none; }
/* 加号指示器，展开时旋转成叉 */
.faq-list summary::after {
    content: "+"; color: var(--yellow); font-size: 20px; font-weight: 400;
    transition: transform .25s; flex-shrink: 0; margin-left: 14px;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-body { padding: 0 20px 18px; font-size: 13.5px; color: var(--muted); }

/* ---------- 购买渠道 ---------- */
.buy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.buy-card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 28px 24px; transition: border-color .25s, transform .25s;
}
.buy-card:hover { border-color: rgba(255, 210, 63, 0.5); transform: translateY(-4px); }
.buy-card .b-tag {
    display: inline-block; font-size: 10px; letter-spacing: 2px; color: var(--yellow);
    border: 1px solid rgba(255, 210, 63, 0.35); border-radius: 999px; padding: 3px 10px; margin-bottom: 14px;
}
.buy-card h3 { font-size: 16px; margin-bottom: 10px; letter-spacing: 1px; }
.buy-card p { font-size: 13px; color: var(--muted); }
.buy-tip {
    margin-top: 30px; padding: 15px 20px; border-radius: 12px;
    background: rgba(255, 210, 63, 0.07); border-left: 3px solid var(--yellow);
    font-size: 13.5px; color: var(--muted);
}
.buy-tip a { color: var(--yellow); }

/* ---------- 文章列表页 ---------- */
.page-head { padding: 70px 0 30px; border-bottom: 1px solid var(--line); }
.page-head .sec-desc { margin-top: 4px; }
/* 搜索框 */
.search-bar { display: flex; gap: 10px; margin-top: 26px; max-width: 420px; }
.search-bar input {
    flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 10px;
    padding: 10px 14px; color: var(--txt); font-size: 13.5px; outline: none; transition: border-color .2s;
}
.search-bar input:focus { border-color: var(--yellow); }
.search-bar button {
    background: linear-gradient(135deg, var(--yellow), var(--yellow-deep));
    color: var(--ink); border: 0; border-radius: 10px; padding: 0 20px;
    font-size: 13.5px; font-weight: 700; cursor: pointer;
}
/* 文章条目（分割线式排版，官方纸感） */
.post-list { max-width: 760px; margin: 0 auto; padding: 26px 0 30px; }
.post-item { padding: 30px 0; border-bottom: 1px solid var(--line); }
.post-date {
    font-family: Consolas, monospace; font-size: 12px; color: var(--yellow);
    letter-spacing: 1.5px; margin-bottom: 8px;
}
.post-item h2 { font-size: 20px; letter-spacing: .5px; margin-bottom: 10px; line-height: 1.5; }
.post-item h2 a { transition: color .2s; }
.post-item h2 a:hover { color: var(--yellow); }
.post-summary { font-size: 13.5px; color: var(--muted); margin-bottom: 12px; }
.post-more { font-size: 13px; color: var(--muted); transition: color .2s; }
.post-more:hover { color: var(--yellow); }
/* 列表空态与搜索无结果 */
.empty-tip { text-align: center; color: var(--muted); padding: 70px 0; font-size: 14px; }
/* 分页 */
.pager { display: flex; gap: 8px; justify-content: center; padding: 34px 0 70px; }
.pager a, .pager span {
    min-width: 36px; height: 36px; padding: 0 10px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: 9px;
    font-size: 13px; color: var(--muted); transition: .2s;
}
.pager a:hover { border-color: var(--yellow); color: var(--yellow); }
.pager span.current { background: var(--yellow); border-color: var(--yellow); color: var(--ink); font-weight: 700; }
.pager span.disabled { opacity: .35; pointer-events: none; }

/* ---------- 文章详情页 ---------- */
.article-wrap { max-width: 760px; margin: 0 auto; padding: 60px 0 80px; }
/* 面包屑 */
.crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 26px; }
.crumb a { color: var(--muted); transition: color .2s; }
.crumb a:hover { color: var(--yellow); }
.crumb em { font-style: normal; color: var(--yellow); margin: 0 8px; }
.article-wrap h1 { font-size: clamp(24px, 3.4vw, 32px); line-height: 1.45; letter-spacing: .5px; margin-bottom: 14px; }
.art-meta { font-size: 12.5px; color: var(--muted); margin-bottom: 34px; display: flex; gap: 16px; flex-wrap: wrap; }
.art-meta b { color: var(--yellow); font-weight: 600; }
/* 正文图文排版 */
.article-content { font-size: 15.5px; line-height: 1.95; color: #d8d5cd; }
.article-content p { margin-bottom: 16px; }
.article-content h2 { font-size: 21px; color: var(--txt); margin: 34px 0 14px; letter-spacing: 1px; border-left: 3px solid var(--yellow); padding-left: 12px; }
.article-content h3 { font-size: 17.5px; color: var(--txt); margin: 28px 0 12px; }
.article-content img { border-radius: 12px; border: 1px solid var(--line); margin: 8px 0 16px; }
.article-content ul, .article-content ol { padding-left: 24px; margin-bottom: 16px; }
.article-content li { margin-bottom: 6px; }
.article-content blockquote {
    border-left: 3px solid var(--yellow); background: rgba(255, 210, 63, 0.06);
    padding: 12px 16px; border-radius: 0 10px 10px 0; margin-bottom: 16px; color: var(--muted);
}
.article-content a { color: var(--yellow); border-bottom: 1px dashed rgba(255, 210, 63, 0.5); }
.article-content hr { border: 0; border-top: 1px dashed var(--line); margin: 26px 0; }
.article-content code { background: var(--card-2); border-radius: 5px; padding: 2px 7px; font-size: 13px; color: var(--yellow); }
/* 上一篇/下一篇 */
.art-nav { display: flex; justify-content: space-between; gap: 14px; margin-top: 46px; padding-top: 26px; border-top: 1px solid var(--line); }
.art-nav a {
    flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
    padding: 14px 18px; font-size: 13px; color: var(--muted); transition: border-color .2s, color .2s;
}
.art-nav a:hover { border-color: rgba(255, 210, 63, 0.5); color: var(--txt); }
.art-nav a b { display: block; color: var(--yellow); font-size: 11px; letter-spacing: 2px; margin-bottom: 5px; font-weight: 600; }
.art-nav a.next { text-align: right; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); }
.footer-inner {
    width: min(1120px, 92%); margin: 0 auto;
    display: grid; grid-template-columns: 1.4fr 1fr 1.4fr; gap: 44px;
    padding: 52px 0 40px;
}
.f-brand { font-size: 17px; font-weight: 700; letter-spacing: 2px; margin-bottom: 12px; }
.f-title { font-size: 13px; color: var(--yellow); letter-spacing: 2px; margin-bottom: 14px; }
.f-col a { display: block; font-size: 13px; color: var(--muted); padding: 4px 0; transition: color .2s; }
.f-col a:hover { color: var(--txt); }
.f-desc { font-size: 12.5px; color: var(--muted); }
.footer-bar {
    border-top: 1px solid var(--line);
    text-align: center; padding: 18px 5%;
    font-size: 12px; color: var(--muted); letter-spacing: .5px;
}

/* ---------- 响应式（移动端适配） ---------- */
@media (max-width: 860px) {
    section { padding: 64px 0; }
    .hero { padding: 56px 0 60px; }
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    /* 移动端导航：汉堡展开抽屉菜单 */
    .nav-toggle { display: block; }
    .nav-links {
        position: fixed; top: 64px; right: 0; left: 0;
        flex-direction: column; gap: 0;
        background: var(--bg-soft); border-bottom: 1px solid var(--line);
        padding: 8px 6%;
        transform: translateY(-130%); transition: transform .3s ease;
        box-shadow: 0 20px 40px rgba(0, 0, 0, .45);
    }
    .nav-links.open { transform: translateY(0); }
    .nav-links a { padding: 14px 0; width: 100%; border-bottom: 1px solid var(--line); font-size: 14.5px; }
    .nav-links a:last-child { border-bottom: 0; }
    .nav-links a.active::after { display: none; }
    /* 汉堡变叉 */
    .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle.open span:nth-child(2) { opacity: 0; }
    .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .buy-grid { grid-template-columns: 1fr; }
    .cap-list { grid-template-columns: 1fr; }
    .stat-row { gap: 26px; }
    .footer-inner { grid-template-columns: 1fr; gap: 30px; padding: 42px 0 32px; }
    .id-card { transform: rotate(-2deg); }
}
@media (max-width: 480px) {
    .grid-4 { grid-template-columns: 1fr; }
    .stat-row { flex-wrap: wrap; }
    .search-bar { max-width: 100%; }
}
