/* ============================================
   首页五屏布局
   色值统一由 tokens.css 定义，本文件只引用变量
   ============================================ */

/* ---------- 通用基础 ---------- */
.home-page {
    margin-top: 0;
    background-color: transparent;
    color: var(--text);
    /* 整屏翻页：主体固定一屏高，内部由 .fp-wrapper 平移切换 */
    height: 100vh;
    overflow: hidden;
}

/* 整屏翻页平移层：每屏高度由 JS 按可视窗口高度内联设定，切换时 translateY 过渡 */
.fp-wrapper {
    height: 100%;
    will-change: transform;
    transition: transform .7s cubic-bezier(.65, .05, .36, 1);
}

.fp-wrapper .screen {
    height: 100%;
}

/* 首页整屏模式下锁死原生页面滚动条（由 JS 在首页给 <html> 加 .fp-active） */
html.fp-active,
html.fp-active body {
    overflow: hidden;
}

/* 通用屏幕 */
.screen {
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    /* 横向留白交给 .screen-content 的栅格变量，避免与导航/页脚叠加出双份边距 */
    padding: 100px 0;
}

/* 首页主体容器：与导航 .nav-inner、页脚 .footer-inner 共用同一套栅格 */
.screen-content {
    max-width: var(--layout-max);
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--layout-gutter);
    position: relative;
    z-index: 1;
}

.screen-heading {
    font-size: 42px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    color: var(--text-strong);
    letter-spacing: 2px;
}

/* ---------- 第一屏：Banner / Hero ---------- */
/* 已取消首屏独立背景图：全站共用 assets/images/index.webp（见 style.css body::before）。
   此处只保留深色可读性遮罩，维持白色标题与「未下滑时用 logo-light」的显示逻辑。 */
.screen-banner {
    background: var(--hero-scrim);
    text-align: center;
    /* 描述文字的默认行宽（按当前文案两行算）；index.php 会按文案长度
       在 <p> 上内联注入同名变量覆盖它，模板未更新时这个值仍能保证居中两行。 */
    --hero-desc-max: 45em;
}

/* 渐变光斑装饰 */
.screen-banner::before {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--brand-blue-rgb), 0.22) 0%, transparent 60%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.screen-banner::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--brand-green-rgb), 0.18) 0%, transparent 60%);
    bottom: 10%;
    right: 15%;
    pointer-events: none;
}

/* 顶部欢迎胶囊标签 */
.hero-welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    margin-bottom: 40px;
    background: var(--on-dark-wash);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    border: 1px solid var(--on-dark-4);
    font-size: 14px;
    color: var(--on-dark-2);
}

.hero-welcome-badge .emoji {
    font-size: 16px;
}

.hero-welcome-badge .divider {
    opacity: 0.5;
    font-size: 12px;
}

/* 大标题 */
.hero-big-title {
    font-family: "快看世界体", 'Noto Sans SC', 'PingFang SC', sans-serif;
    font-size: 64px;
    font-weight: 600;
    color: var(--on-dark);
    margin-bottom: 32px;
    letter-spacing: 5px;
    line-height: 1.2;
}

/* 描述文字：行宽由文案长度决定（--hero-desc-max 由 index.php 按字符数算出，
   约等于「总字符位 ÷ 目标行数 + 首行缩进」），全部字符均匀铺进 2~3 行；
   text-wrap:balance 在既定行宽内把各行排匀，不出现短尾行，也不会因行宽
   不足而被摊成更多行。文字块 fit-content + margin:auto + 行内居中，与上方
   胶囊 / 大标题共用同一条中轴线；首行空两个字符位。
   min(100%, ...) 保证窄屏自动收进视口、行数自然增加。 */
.hero-description {
    font-size: 19px;
    color: var(--on-dark-3);
    line-height: 2;
    width: -webkit-fit-content;
    width: fit-content;
    max-width: min(100%, var(--hero-desc-max, 45em));
    margin: 0 auto;
    text-align: center;    /* 行内居中，与标题同轴 */
    text-indent: 2em;      /* 第一行空两个字符位 */
    text-wrap: balance;    /* 字符均匀分配到各行 */
}

/* 滚动指示器 */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 60px;
    background: var(--on-dark-4);
}

.scroll-dot {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--on-dark);
    animation: scrollDown 2.5s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { opacity: 1; top: 0; }
    80% { opacity: 0; top: 50px; }
    100% { opacity: 0; top: 0; }
}

/* ---------- 第二屏：最新文章 ---------- */
.screen-highlight {
    background: transparent;
}

/* 最新文章列表跟随全站栅格，不再额外收窄到 800px */
.highlight-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    margin: 0 auto;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px 28px;
    background: var(--highlight-bg);
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    text-decoration: none;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.highlight-item:hover {
    background: var(--highlight-bg-hover);
    border-color: var(--accent-soft);
    transform: translateX(8px);
}

.highlight-item-index {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-faint);
    min-width: 50px;
}

.highlight-item-title {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-strong);
    margin-bottom: 6px;
}

.highlight-item-meta {
    font-size: 13px;
    color: var(--muted);
}

.highlight-item-meta .divider {
    margin: 0 8px;
}

.empty-text {
    text-align: center;
    color: var(--muted);
    font-size: 16px;
}

/* ---------- 第三屏：首分类精选 ---------- */
.screen-feature {
    background: transparent;
}

.feature-head {
    text-align: center;
    margin-bottom: 48px;
}

.feature-title {
    font-family: "快看世界体", 'Noto Sans SC', 'PingFang SC', sans-serif;
    font-size: 38px;
    font-weight: 700;
    color: var(--text-strong);
    letter-spacing: 2px;
    line-height: 1.2;
    margin: 0 0 16px;
}

.feature-desc {
    font-size: 16px;
    color: var(--muted);
    letter-spacing: 1px;
    line-height: 1.8;
    margin: 0;
}

.feature-viewport {
    position: relative;
    overflow: hidden;
}

.feature-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 28px;
    transition: transform .5s cubic-bezier(.65, .05, .36, 1);
}

.feature-page {
    flex: 0 0 100%;
    min-width: 0;
    display: flex;
    gap: 28px;
}

.feature-card {
    flex: 0 0 calc((100% - 56px) / 3);
    display: flex;
    flex-direction: column;
    background: var(--surface-raised);
    border: 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    text-decoration: none;
    transition: box-shadow .25s ease, transform .25s ease;
}

.feature-card:hover {
    box-shadow: var(--card-shadow-hover);
}

.feature-card-cover {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.feature-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.feature-card:hover .feature-card-cover img {
    transform: scale(1.06);
}

.feature-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 14px;
    background: var(--night);
}

.feature-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 20px 22px;
}

.feature-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
}

.feature-card-meta > span {
    display: inline-flex;
    align-items: center;
}

.fc-meta-icon {
    flex: 0 0 auto;
    width: 13px;
    height: 13px;
    margin-right: 4px;
}

.fc-dot {
    opacity: .5;
}

/* PC 默认显示「评论N条 / 浏览N次」文字版；纯数字版留给窄屏 */
.fc-num {
    display: none;
}

.feature-card-title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.5;
}

.feature-card-title a {
    color: var(--text-strong);
    text-decoration: none;
}

/* 悬停卡片任意位置时，标题链接一并呈现 hover 变色 */
.feature-card:hover .feature-card-title a {
    color: var(--accent-hover);
}

.feature-card-excerpt {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 卡片左右分页切换（圆形箭头悬浮于视口两侧） */
/* 分页钮：静态排在卡片视口下方，居中一排 */
.feature-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding-top: 10px;
    pointer-events: auto;
}

.fp-prev,
.fp-next {
    position: static;
}

.fp-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-deep);
    color: var(--accent-contrast);
    border: 1px solid var(--on-dark-4);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(var(--brand-deep-rgb), .32);
    transition: opacity .2s ease, transform .2s ease, background .2s ease;
}

.fp-arrow:hover {
    transform: scale(1.06);
}

.fp-arrow:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.fp-arrow svg {
    display: block;
}

/* ---------- 第三屏：分类导航（旧，已停用） ---------- */
.screen-categories {
    background: transparent;
}

/* 第三屏：左右布局 */
.categories-wrapper {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 60px;
    align-items: start;
}

/* 左侧分类导航 */
.categories-sidebar {
    position: sticky;
    top: 120px;
}

.categories-title {
    font-size: 40px;
    font-weight: 800;
    color: var(--text-strong);
    margin-bottom: 48px;
    letter-spacing: 1px;
    line-height: 1.2;
}

.categories-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-nav-item {
    padding: 12px 0 12px 20px;
    border-left: 2px solid var(--line-strong);
    transition: border-color .2s ease;
    cursor: pointer;
}

.category-nav-item.active {
    border-left-color: var(--link);
}

.category-nav-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-strong);
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 20px;
    padding: 0 8px;
    border-radius: 10px;
    background: var(--badge-bg);
    color: var(--badge-text);
    font-size: 12px;
    font-weight: 600;
}

.category-nav-desc {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.7;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .3s ease, opacity .3s ease, margin .3s ease;
    margin-top: 0;
}

.category-nav-item.active .category-nav-desc {
    max-height: 120px;
    opacity: 1;
    margin-top: 12px;
}

/* 右侧文章卡片网格 */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    min-height: 500px;
}

/* 卡片整体 */
.post-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: var(--card-shadow);
    transition: box-shadow .25s ease;
    display: block;
}

.post-card:hover {
    box-shadow: var(--card-shadow-hover);
}

/* 封面图区域 */
.card-thumbnail {
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px;
    height: 360px;
    overflow: hidden;
    margin: 0;
}

/* 封面图绝对定位占满 */
.card-cover {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: block;
    overflow: hidden;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.post-card:hover .card-cover img {
    transform: scale(1.1);
}

.card-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 14px;
    background: var(--night);
}

/* 通用按钮样式 */
.card-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    height: 36px;
    width: 36px;
    padding: 0;
    background: var(--on-dark-wash);
    backdrop-filter: blur(8px);
    border-radius: 24px;
    color: var(--on-dark);
    font-size: 12px;
    text-decoration: none;
    overflow: hidden;
    cursor: pointer;
    transition: background .2s ease, width .3s ease;
    z-index: 1;
    flex-shrink: 0;
}

.card-btn:hover {
    background: var(--on-dark-wash-hover);
    width: auto;
}

/* 日期按钮：默认就是胶囊形状 */
.card-date {
    width: auto;
    padding: 0 12px;
    margin-right: auto;
}

.card-date:hover {
    width: auto;
}

.card-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    order: 1;
}

.card-btn-meta {
    white-space: nowrap;
    font-size: 12px;
    order: 2;
    overflow: hidden;
    max-width: 0;
    opacity: 0;
    transition: opacity .3s ease, max-width .3s ease;
}

.card-btn:hover .card-btn-meta {
    opacity: 1;
    max-width: 10em;
}

/* 作者头像按钮 */
.card-author {
    padding: 4.5px;
}

.card-author:hover {
    width: auto;
}

.card-avatar {
    width: 27px;
    height: 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-blue);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    order: 1;
}

/* 标签区域 */
.card-tags {
    flex-basis: 100%;
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 6px 12px;
}

.tag-list {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tag-list a {
    color: var(--on-dark-3);
    font-size: 12px;
    text-decoration: none;
}

/* 标题区域 */
.card-header {
    position: relative;
    padding: 12px 16px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-title {
    position: absolute;
    left: 16px;
    right: 16px;
    color: var(--on-dark-2);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    opacity: 1;
    transition: opacity .5s ease;
    margin: 0;
}

.card-note {
    position: absolute;
    left: 16px;
    right: 16px;
    color: var(--on-dark-3);
    font-size: 12px;
    line-height: 1.6;
    text-decoration: none;
    text-align: center;
    opacity: 0;
    transition: opacity .5s ease;
}

.post-card:hover .card-title {
    opacity: 0;
}

.post-card:hover .card-note {
    opacity: 1;
}

/* ---------- 第五屏：底部（关于本站 + 屏底页脚，整体一整屏） ---------- */
.screen-footer {
    background: transparent;
    text-align: center;
    flex-direction: column;
    justify-content: space-between;
    padding: 120px 0 0;
}

/* 页脚进入末屏内部：取消 body 贴底外边距，作为屏内底部通栏块 */
.screen-footer #footer {
    margin-top: 0;
    width: 100%;
}

.footer-text {
    font-size: 16px;
    color: var(--muted);
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto 32px;
}

.footer-copyright {
    font-size: 14px;
    color: var(--text-faint);
}

/* ---------- 底部横向导航条 ---------- */
.bottom-nav {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: var(--bottom-nav-bg);
    backdrop-filter: blur(10px);
    border-radius: 40px;
    border: 1px solid var(--line-soft);
    transition: opacity .3s ease, transform .3s ease;
}

.bottom-nav.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    pointer-events: none;
}

.bottom-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 30px;
    text-decoration: none;
    color: var(--bottom-nav-text);
    font-size: 14px;
    transition: color .2s ease;
}

.bottom-nav-item:hover {
    color: var(--accent-hover);
}

.bottom-nav-item.active {
    color: var(--accent-hover);
}

.nav-num {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.7;
}

.nav-label {
    white-space: nowrap;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
    .feature-card {
        flex: 0 0 calc((100% - 28px) / 2);
    }
}

@media (max-width: 768px) {
    /* 移动终端首页：不显示底部整屏切换胶囊导航（顶部头部导航保留） */
    .home-page .bottom-nav {
        display: none;
    }

    .screen {
        padding: 80px 0;
    }

    /* 末屏页脚必须贴满屏底：底 padding 归 0，避免漏出 body 背景空白 */
    .screen-footer {
        padding: 80px 0 0;
    }

    .screen-heading {
        font-size: 30px;
        margin-bottom: 40px;
    }

    .hero-big-title {
        font-size: 40px;
    }

    .hero-description {
        font-size: 15px;
    }

    .highlight-item {
        padding: 18px 20px;
    }

    .highlight-item-index {
        font-size: 20px;
        min-width: 36px;
    }

    .highlight-item-title {
        font-size: 16px;
    }

    .categories-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .categories-sidebar {
        position: static;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    /* 窄屏分类屏：卡片纵向紧凑堆叠，压缩封面 / 内边距 / 字号 / 摘要行数，
       让当前一组卡片完整落在一屏内，不被屏底裁切（不做屏内滚动）。 */
    .feature-head {
        margin-bottom: 20px;
    }

    .feature-title {
        font-size: 26px;
        margin-bottom: 8px;
    }

    .feature-desc {
        font-size: 13px;
        line-height: 1.6;
    }

    /* 分类屏内容区占满一屏：标题 / 卡片视口 / 分页钮纵向排布，
       视口只占剩余高度，超出的卡片交给分页切换，不撑破整屏；
       底 padding 收紧，避免分页钮下方留一大块空白。 */
    .screen-feature {
        align-items: flex-start;
        padding: 92px 0 16px;
    }

    .screen-feature .screen-content {
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .feature-viewport {
        flex: 0 0 auto;
        min-height: 0;
        display: flex;
    }

    /* 窄屏横向分页：track 整页左右滑动，每页 .feature-page 内竖排若干卡片 */
    .feature-track {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0;
        width: 100%;
        height: auto;
    }

    .feature-page {
        flex: 0 0 100%;
        min-width: 0;
        height: auto;
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    /* 窄屏横排卡片：左缩略图、右标题 + 日期/阅读量 */
    .feature-card {
        flex: 0 0 auto;
        width: 100%;
        margin: 0;
        flex-direction: row;
        align-items: stretch;
        gap: 12px;
        padding: 12px;
        border-radius: 12px;
        overflow: hidden;
    }

    .feature-card-cover {
        flex: 0 0 112px;
        width: 112px;
        height: 84px;
        aspect-ratio: auto;
        align-self: center;
        border-radius: 8px;
    }

    .feature-card-body {
        flex: 1 1 0;
        min-width: 0;
        flex-direction: column;
        gap: 8px;
        padding: 0;
        justify-content: space-between;
    }

    .feature-card-meta {
        order: 3;
        font-size: 12px;
        gap: 6px;
        justify-content: space-between;
    }

    /* 窄屏隐藏作者及其分隔点；评论项在 meta 行居中，评论与浏览以图标+数量显示 */
    .feature-card-meta .fc-author,
    .feature-card-meta .fc-author + .fc-dot {
        display: none;
    }

    .feature-card-meta .fc-comments {
        flex: 1;
        justify-content: center;
    }

    /* 窄屏评论、浏览只显示图标 + 纯数字 */
    .fc-label {
        display: none;
    }

    .fc-num {
        display: inline;
    }

    .feature-card-title {
        order: 1;
        font-size: 15px;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 1;
        overflow: hidden;
    }

    .feature-card-excerpt {
        order: 2;
        font-size: 12px;
        line-height: 1.55;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    .fp-arrow {
        width: 36px;
        height: 36px;
    }
}

/* ============================================
   首页深色模式：中性深灰底 + 提亮的品牌蓝，由 tokens.css 覆写变量
   ============================================ */
html[data-theme="dark"] .home-page {
    color: var(--body);
}

/* 屏标题 */
html[data-theme="dark"] .screen-heading {
    color: var(--ink);
}

/* 第二屏：最新文章列表 */
html[data-theme="dark"] .highlight-item {
    background: var(--surface-raised);
    border-color: var(--line-soft);
}

html[data-theme="dark"] .highlight-item:hover {
    background: var(--surface-hover);
    border-color: var(--accent-soft);
}

html[data-theme="dark"] .highlight-item-index {
    color: var(--text-faint);
}

html[data-theme="dark"] .highlight-item-title {
    color: var(--ink);
}

html[data-theme="dark"] .highlight-item-meta {
    color: var(--muted);
}

html[data-theme="dark"] .empty-text {
    color: var(--muted);
}

/* 第三屏：分类导航 */
html[data-theme="dark"] .categories-title {
    color: var(--ink);
}

html[data-theme="dark"] .category-nav-item {
    border-left-color: var(--line-soft);
}

html[data-theme="dark"] .category-nav-name {
    color: var(--ink);
}

html[data-theme="dark"] .category-nav-desc {
    color: var(--muted);
}

/* 文章卡片：调整为深蓝黑色调 */
html[data-theme="dark"] .post-card {
    background: var(--card-bg);
    box-shadow: var(--card-shadow);
}

html[data-theme="dark"] .post-card:hover {
    box-shadow: var(--card-shadow-hover);
}

html[data-theme="dark"] .card-cover-placeholder {
    background: var(--bg);
    color: var(--muted);
}

html[data-theme="dark"] .feature-card-placeholder {
    background: var(--bg);
    color: var(--muted);
}

/* 第五屏：底部文字 */
html[data-theme="dark"] .footer-text {
    color: var(--muted);
}

html[data-theme="dark"] .footer-copyright {
    color: var(--muted);
}

/* 底部横向导航条 */
html[data-theme="dark"] .bottom-nav {
    background: var(--bottom-nav-bg);
    backdrop-filter: blur(10px);
    border-color: var(--line-soft);
}

html[data-theme="dark"] .bottom-nav-item {
    color: var(--muted);
}

html[data-theme="dark"] .bottom-nav-item:hover {
    color: var(--accent-hover);
}

html[data-theme="dark"] .bottom-nav-item.active {
    color: var(--accent-hover);
}

/* 标签：浅底深字，不与标题抢层次 */
.tag-list a {
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--tag-bg);
    color: var(--tag-text);
    transition: background .2s ease, color .2s ease;
}

.tag-list a:hover {
    background: var(--brand-leaf);
    color: var(--night);
}

/* ============================================
   首页透明导航压在深色 Hero 图上：改用浅色字
   滚动后（.header-scrolled）由 style.css 的深色规则接管
   本文件仅在首页加载，不影响文章页 / 独立页
   ============================================ */
.site-header:not(.header-scrolled) .logo-text,
.site-header:not(.header-scrolled) .nav-menu li a,
.site-header:not(.header-scrolled) .nav-icon {
    color: var(--on-dark);
}

/* 首页首屏的 hover / active 改由 style.css 末尾的胶囊规则统一接管：
   蓝渐变实底 + 白字，压在深色 Hero 上比原来的嫩叶色更醒目。 */

.site-header:not(.header-scrolled) .nav-icon:hover {
    background-color: var(--on-dark-wash);
    color: var(--on-dark);
}

/* ============================================
   首页 Logo 切换（本文件仅首页加载，其它页不受影响）
   浅色 · 未下滑：logo-light（白字，压在深色 Hero 上）
   浅色 · 已下滑：logo（深字，导航变白底）
   深色 · 任意滚动位置：只用 logo-dark（白字，导航底始终为深色）
   src 由 header.php 经 smartImage() 输出：webp 优先，png 降级
   ============================================ */
.logo-img-home .logo-home-normal,
.logo-img-home .logo-home-dark {
    display: none;
}

/* 浅色模式：随滚动切换 */
.site-header.header-scrolled .logo-img-home .logo-home-light {
    display: none;
}

.site-header.header-scrolled .logo-img-home .logo-home-normal {
    display: block;
}

/* 深色模式：屏蔽滚动状态，仅显示 logo-dark。
   加 html[data-theme="dark"] body .site-header 前缀把特异性提到 (0,4,2)，
   压过上方 .site-header.header-scrolled 的 (0,3,0)，无需 !important。 */
html[data-theme="dark"] body .site-header .logo-img-home .logo-home-light,
html[data-theme="dark"] body .site-header .logo-img-home .logo-home-normal {
    display: none;
}

html[data-theme="dark"] body .site-header .logo-img-home .logo-home-dark {
    display: block;
}
