/* Blog 首页主体（main.blog-main）专用样式：只负责导航栏和页脚之间的内容区
   配色取 css/theme.css 的变量，深浅两套自动跟随；强调色沿用 css/home.css 的写法——
   先写深色值，再用 prefers-color-scheme: light 覆盖，具体底色/描边一律用 color-mix 从 --a 推 */

/* 主体版心：导航/页脚仍按 css/global.css 的 body 1200 排，内容自己收到 1000 居中 */
.blog-main {
    max-width: 900px;
    margin-inline: auto;
    --a-blue: #60a5fa;
    --a-green: #34d399;
    --a-orange: #fbbf24;
    --a-purple: #a78bfa;
}

@media (prefers-color-scheme: light) {
    .blog-main {
        --a-blue: #2563eb;
        --a-green: #15803d;
        --a-orange: #c2620a;
        --a-purple: #6d28d9;
    }
}

/* ==================== 01. 顶部价值介绍 ==================== */
.blog-intro {
    padding-top: 4px;
    text-align: center;
}

.blog-intro h1 {
    font-size: clamp(34px, 5vw, 38px);
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -.3px;
    color: var(--ink);
}

.blog-intro p {
    max-width: 620px;
    margin: 12px auto 0;
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink-soft);
}

/* ==================== 02. 三张用户价值卡片（桌面同一行） ==================== */
.aud-grid {
    display: grid;
    /* minmax(0,1fr)：卡片里的长句不换行时会把列撑破，这里保证窄屏也不横向溢出 */
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 33px;
    margin-top: 26px;
}

.aud {
    --a: var(--a-blue);
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 94px;
    padding: 16px 18px;
    border-radius: 15px;
    background: color-mix(in srgb, var(--a) 10%, var(--card));
    box-shadow: 0 6px 18px var(--shadow);
}

.aud--blue {
    --a: var(--a-blue);
}

.aud--green {
    --a: var(--a-green);
}

.aud--orange {
    --a: var(--a-orange);
}

.aud-icon {
    flex: none;
    display: flex;
    width: 44px;
    height: 44px;
    color: var(--a);
}

.aud-icon svg {
    width: 44px;
    height: 44px;
    stroke-width: 1.7;
}

/* 强调色只用于图标、色块和圆点；文字一律再混一档 --ink（同 css/home.css 的 .card .tag 写法），
   深浅两套下都能把 17px 加粗标题推到 4.5:1 以上，橙色尤其需要 */
.aud-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: color-mix(in srgb, var(--a) 66%, var(--ink));
}

.aud-desc {
    margin-top: 3px;
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--ink-soft);
}

/* ==================== 03. 四个内容分类（纵向排列） ==================== */
.cats {
    margin-top: 46px;
}

.section-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ink);
}

.cat {
    padding-block: 22px;
}

/* 分割线只画在分类之间，第一条留给标题下方——不加，避免多出一条横线 */
.cat + .cat {
    border-top: 1px solid var(--line);
}

.cat--blue {
    --a: var(--a-blue);
}

.cat--purple {
    --a: var(--a-purple);
}

.cat--green {
    --a: var(--a-green);
}

.cat--orange {
    --a: var(--a-orange);
}

.cat-title {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--ink);
}

.cat-no {
    color: color-mix(in srgb, var(--a) 66%, var(--ink));
}

.cat-main {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-top: 12px;
}

/* 图标方块：尺寸和 home 页 SEO 区块的圆角图标同一档，底色由 --a 混出 */
.cat-icon {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 15px;
    background: color-mix(in srgb, var(--a) 14%, var(--card));
    color: var(--a);
}

.cat-icon svg {
    width: 45px;
    height: 45px;
    stroke-width: 1.8;
}

.cat-zh {
    font-size: 17.5px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--ink);
}

.cat-note {
    margin-top: 2px;
    font-style: italic;
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--ink-soft);
}

.cat-posts {
    display: grid;
    gap: 7px;
    margin-top: 11px;
    list-style: none;
}

.cat-posts li {
    position: relative;
    padding-left: 16px;
    font-size: 15px;
    line-height: 1.55;
}

.cat-posts li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: .62em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--a) 55%, transparent);
}

/* 箭头写在 li 上而不是 <a> 里：进了 <a>，下划线会一路画到箭头底下 */
.cat-posts li::after {
    content: "→";
    margin-left: 6px;
    color: var(--ink);
}

/* 列表标题压住 css/global.css 的琥珀链接色，用正文深色 + 悬停换强调色；下划线常驻 */
.cat-posts a {
    color: var(--ink);
    text-decoration: underline;
}

.cat-posts a:hover {
    color: color-mix(in srgb, var(--a) 66%, var(--ink));
}

/* 箭头跟着行 hover 换色，指针对准箭头时也不会出现文字变紫、箭头没变的情况 */
.cat-posts li:hover::after {
    color: color-mix(in srgb, var(--a) 66%, var(--ink));
}

/* ==================== 04. Latest Articles（桌面三列） ==================== */
.latest {
    margin-top: 24px;
}

.latest-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px 18px;
    justify-content: space-between;
}

.more-link {
    font-size: 15px;
    font-weight: 600;
    color: color-mix(in srgb, var(--a-purple) 66%, var(--ink));
    text-decoration: none;
}

.more-link:hover {
    color: var(--ink);
    text-decoration: underline;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 33px;
    margin-top: 16px;
}

.post {
    --a: var(--a-blue);
    position: relative; /* 整卡链接的 ::after 和右下角箭头都以卡片为定位基准 */
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--card);
    transition: box-shadow .2s ease, border-color .2s ease;
}

.post:hover {
    border-color: color-mix(in srgb, var(--a) 40%, var(--line));
    box-shadow: 0 10px 24px var(--shadow);
}

.post--blue {
    --a: var(--a-blue);
    background: #FFD8B5;
}

.post--green {
    --a: var(--a-green);
    background: #FFCBBD;
}

.post--purple {
    --a: var(--a-purple);
    background: #E9DDD1;
}

.post-tag {
    display: block;
    width: fit-content;
    margin-inline: auto;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 21.5px;
    font-weight: 700;
    background: color-mix(in srgb, var(--a) 13%, var(--card));
    color: color-mix(in srgb, var(--a) 66%, var(--ink));
}

.post-title {
    margin-top: 12px;
    font-size: 17.5px;
    font-weight: 700;
    line-height: 1.4;
}

.post-title a {
    color: var(--ink);
    text-decoration: none;
}

.post-title a:hover {
    color: color-mix(in srgb, var(--a) 66%, var(--ink));
    text-decoration: underline;
}

.post-desc {
    margin-top: 6px;
    font-style: italic;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--ink-soft);
}

/* 右下角箭头：整张卡唯一的跳转入口，绝对定位不进文档流，卡片高度和文字排版不受影响。
   底色/箭头色用固定值，深浅两套一致，紫箭头压在浅紫底上才始终够对比度 */
.card-arrow {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ede9fe;
    color: #5b2fc9;
    text-decoration: none; /* a 变成链接后 UA 默认带下划线，圆圈里只有 svg 也得显式关掉 */
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.post:hover .card-arrow {
    background: #5b2fc9;
    color: #fff;
    transform: translateX(4px);
}

/* ==================== 05. 底部游戏导流 ==================== */
.cta {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 46px;
    padding: 22px 24px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--a-purple) 11%, var(--card));
}

.cta-icon {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--a-purple) 18%, var(--card));
    color: color-mix(in srgb, var(--a-purple) 82%, var(--ink));
}

.cta-icon svg {
    width: 60px;
    height: 60px;
    stroke-width: 1.8;
}

.cta-text {
    flex: 1 1 auto;
    text-align: center;
}

.cta-text h2 {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--ink);
}

.cta-text p {
    margin-top: 2px;
    font-size: 20px;
    font-style: italic;
    color: var(--ink-soft);
}

/* 按钮底色不跟深浅模式翻转：白字在 #7c4dde 上两套配色下都够对比度 */
.cta-btn {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 11px 20px;
    border-radius: 11px;
    background: #FF3B30;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: filter .18s ease;
}

.cta-btn:hover {
    filter: brightness(1.08);
    color: #fff;
}

/* ==================== 06. 右下角悬浮 Play Now ==================== */
/* 外观由上面的 .cta-btn 提供（HTML 上 cta-btn 和 cta-float 两个 class 一起写），这里只管钉位和隐藏态。
   right/bottom 相对视口，不受 css/global.css 给 body 的 max-width:1200 + padding 影响。
   z-index 9：低于 css/site.css 里吸顶导航的 10。
   visibility 也进 transition：隐藏时等淡出跑完才真的不可见（顺带移出 tab 焦点），出现时立刻可见，
   不会看见一个点不动的透明按钮挡在页脚上。 */
.cta-float {
    position: fixed;
    right: 22px;
    bottom: 80px;
    font-size: 20px;
    z-index: 9;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .24);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

/* blog/script.js 在原本那个按钮进入视口时挂上这个类，滚上去后摘掉 */
.cta-float.is-hidden {
    opacity: 0;
    transform: translateY(10px);
    visibility: hidden;
}

/* ==================== 响应式 ==================== */
@media (max-width: 900px) {
    .aud-grid,
    .post-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .aud-grid {
        gap: 12px;
    }

    .post-grid {
        gap: 14px;
    }

    .cats,
    .cta {
        margin-top: 38px;
    }
}

@media (max-width: 560px) {
    /* 游戏导流改纵向：图标 + 文案一行，按钮另起一行铺满 */
    .cta {
        flex-wrap: wrap;
        padding: 20px;
    }

    .cta-text {
        flex: 1 1 200px;
    }

    .cta-btn {
        flex: 1 1 100%;
        justify-content: center;
    }
}
