/* DBN 首页样式 v2.0 — 现代科技蓝重做（仅作用于首页 index.php） */

/* 字体覆盖：仅首页，覆盖 main.css 的仿宋衬线 */
body#bodyfirst {
    font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

/* ===== 通用 ===== */
.ic { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; flex-shrink: 0; }

.home-container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.home-section { margin-bottom: 56px; }

.section-title {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 22px; font-weight: 700; color: var(--gray-800);
    margin-bottom: 24px; letter-spacing: .5px;
}
.section-title::before {
    content: ""; width: 4px; height: 22px; border-radius: 2px;
    background: linear-gradient(180deg, #3b82f6, #1d4ed8);
}

/* ===== Hero ===== */
.hero { position: relative; height: 480px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.hero .slides { position: absolute; inset: 0; }
.hero .slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease-in-out; }
.hero .slide.active { opacity: 1; }
.hero .slide img { width: 100%; height: 100%; object-fit: cover; }
.hero .slide.active img { animation: heroZoom 6s ease-out forwards; }
@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.08); } }
.hero .overlay { position: absolute; inset: 0; z-index: 1; background: linear-gradient(115deg, rgba(2,6,23,.62), rgba(37,99,235,.28)); }
.hero .overlay::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(2,6,23,.15), transparent 42%, rgba(2,6,23,.5)); }
.hero .hero-content { position: relative; z-index: 2; text-align: center; padding: 0 24px; max-width: 860px; }
.hero .hero-eyebrow { display: inline-block; padding: 7px 18px; border-radius: 999px; background: rgba(255,255,255,.14); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #e0f2fe; font-size: 13px; letter-spacing: 2px; margin-bottom: 20px; }
.hero .hero-content h1 { font-size: 48px; color: #fff; margin: 0 0 14px; font-weight: 800; letter-spacing: 2px; text-shadow: 0 2px 16px rgba(0,0,0,.35); }
.hero .hero-content p { font-size: 18px; color: rgba(255,255,255,.9); margin: 0 0 32px; }
.hero .hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .hero-btns a { padding: 13px 36px; border-radius: 999px; font-size: 15px; font-weight: 600; text-decoration: none; transition: all .25s; }
.hero .btn-hero-primary { background: #fff; color: #1d4ed8; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.hero .btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,.28); color: #1d4ed8; }
.hero .btn-hero-outline { border: 2px solid rgba(255,255,255,.75); color: #fff; }
.hero .btn-hero-outline:hover { background: rgba(255,255,255,.16); transform: translateY(-2px); }
.hero .slide-dots { position: absolute; bottom: 22px; z-index: 3; display: flex; gap: 10px; left: 50%; transform: translateX(-50%); }
.hero .slide-dots span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.4); cursor: pointer; transition: all .3s; }
.hero .slide-dots span.active { background: #fff; width: 28px; border-radius: 5px; }

/* ===== 统计条 ===== */
.stats-wrap { margin: 32px 0 56px; }
.stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 14px 36px rgba(15,23,42,.09); padding: 22px 8px; }
.stat-item { display: flex; align-items: center; gap: 14px; padding: 6px 22px; border-right: 1px solid var(--border); }
.stat-item:last-child { border-right: none; }
.stat-item .st-icon { width: 48px; height: 48px; border-radius: 13px; display: flex; align-items: center; justify-content: center; background: #eff6ff; color: var(--primary); flex-shrink: 0; }
.stat-item .st-icon .ic { width: 24px; height: 24px; }
.stat-item .st-num { font-size: 26px; font-weight: 800; color: var(--gray-800); line-height: 1.1; }
.stat-item .st-label { font-size: 13px; color: var(--gray-400); margin-top: 3px; }

/* ===== 主题网格 ===== */
.topic-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px; }
.topic-grid.daily { grid-template-columns: repeat(6, 1fr); }
.topic-card { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 14px; font-size: 14px; font-weight: 600; color: var(--gray-700); text-decoration: none; transition: all .2s; }
.topic-card .ic { width: 22px; height: 22px; color: var(--primary); transition: transform .2s; }
.topic-card:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow-md); text-decoration: none; }
.topic-card:hover .ic { transform: scale(1.1); }

/* ===== 文章区 ===== */
.article-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.article-col { display: flex; flex-direction: column; gap: 16px; }
.article-card { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; transition: box-shadow .25s, transform .25s, border-color .25s; }
.article-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, #3b82f6, #1d4ed8); transform: scaleY(0); transition: transform .25s; }
.article-card:hover { box-shadow: 0 12px 28px rgba(37,99,235,.13); transform: translateY(-3px); border-color: #dbeafe; }
.article-card:hover::before { transform: scaleY(1); }
.article-card h3 { font-size: 16px; margin: 0 0 8px; }
.article-card h3 a { color: var(--gray-800); text-decoration: none; transition: color .15s; }
.article-card h3 a:hover { color: var(--primary); }
.article-card .meta { font-size: 12px; color: var(--gray-400); margin-bottom: 8px; }
.article-card .meta .cate-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; background: #eff6ff; color: var(--primary); font-size: 11px; font-weight: 600; margin-right: 4px; vertical-align: middle; }
.article-card .summary { font-size: 13px; color: var(--gray-500); line-height: 1.7; }

.side-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; }
.side-list a { display: flex; align-items: center; gap: 10px; padding: 10px 0; color: var(--gray-600); font-size: 13px; border-bottom: 1px solid #f1f5f9; text-decoration: none; transition: color .15s, padding-left .15s; }
.side-list a:last-child { border-bottom: none; }
.side-list a:hover { color: var(--primary); padding-left: 4px; }
.side-list.hot a { font-weight: 600; }
.side-list .hot-rank { width: 22px; height: 22px; border-radius: 6px; background: #f1f5f9; color: var(--gray-400); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.side-list .hot-rank.top { color: #fff; }
.side-list a:nth-child(1) .hot-rank { background: linear-gradient(135deg, #f59e0b, #f97316); box-shadow: 0 2px 6px rgba(245,158,11,.35); }
.side-list a:nth-child(2) .hot-rank { background: linear-gradient(135deg, #94a3b8, #64748b); }
.side-list a:nth-child(3) .hot-rank { background: linear-gradient(135deg, #d97706, #b45309); }

/* ===== 核心优势 ===== */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 1100px; margin: 0 auto; }
.feature-card { text-align: center; padding: 36px 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: all .2s; }
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(15,23,42,.1); border-color: #dbeafe; }
.feature-card .ft-icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #eff6ff, #dbeafe); color: var(--primary); }
.feature-card .ft-icon .ic { width: 30px; height: 30px; }
.feature-card h3 { font-size: 17px; color: var(--gray-800); margin: 0 0 10px; }
.feature-card p { font-size: 13px; color: var(--gray-500); line-height: 1.7; margin: 0; }

/* ===== 精选推荐 ===== */
.topliked-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.topliked-grid .article-card { margin-bottom: 0; }
.article-card .meta .ic { width: 14px; height: 14px; color: var(--gray-400); margin-right: 3px; vertical-align: -2px; }
.empty-state { color: var(--gray-400); text-align: center; padding: 20px; margin: 0; }

/* ===== CTA ===== */
.cta-band { background: linear-gradient(135deg, #2563eb, #1d4ed8); text-align: center; padding: 64px 24px; margin-top: 20px; }
.cta-band h2 { font-size: 28px; color: #fff; margin: 0 0 12px; font-weight: 700; }
.cta-band p { font-size: 15px; color: rgba(255,255,255,.82); margin: 0 0 28px; }
.cta-btn { display: inline-block; padding: 14px 44px; background: #fff; color: #2563eb; font-size: 16px; font-weight: 700; border-radius: 999px; text-decoration: none; transition: all .25s; }
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.22); color: #2563eb; }

/* ===== 页脚 ===== */
.home-footer { background: #1a1a2e; color: #ccc; text-align: center; padding: 40px 0 0; font-size: 13px; }
.home-footer .ft-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.home-footer a { color: #ccc; text-decoration: none; }
.home-footer a:hover { color: #fff; text-decoration: none; }
.home-footer .ft-links { padding: 10px 0; }
.home-footer .ft-links a { margin: 0 6px; }
.home-footer .ft-beian { padding: 6px 0; font-size: 12px; }
.home-footer .ft-gongan { padding: 6px 0; }
.home-footer .ft-gongan a { display: inline-flex; align-items: center; gap: 6px; color: #ccc; }
.home-footer .ft-gongan img { width: 20px; height: 20px; }
.home-footer .ft-copy { padding: 6px 0; font-size: 12px; color: #999; }
.home-footer .ft-copy a { color: #999; }
.home-footer .ft-qr { display: flex; align-items: center; justify-content: center; gap: 30px; padding: 15px 0 0; }
.home-footer .ft-qr .qr { text-align: center; }
.home-footer .ft-qr img { border-radius: 8px; background: #fff; padding: 3px; }
.home-footer .ft-qr .qr-label { color: #999; font-size: 11px; margin-top: 4px; }

/* ===== 左侧导航侧边栏 ===== */
.home-sidebar { position: fixed; left: 0; top: 180px; width: 56px; z-index: 99; background: #fff; border-radius: 0 12px 12px 0; box-shadow: 2px 0 14px rgba(0,0,0,.08); padding: 8px 0; transition: width .2s; overflow: hidden; border: 1px solid var(--border); border-left: none; }
.home-sidebar:hover { width: 152px; }
.home-sidebar a { display: flex; align-items: center; gap: 10px; padding: 10px 13px; font-size: 13px; color: #475569; text-decoration: none; white-space: nowrap; transition: .15s; font-weight: 500; border-left: 3px solid transparent; }
.home-sidebar a:hover { background: #f8fafc; color: #1d4ed8; border-left-color: #1d4ed8; }
.home-sidebar a .s-icon { width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--si-bg, #f1f5f9); color: var(--si, #64748b); transition: all .18s; }
.home-sidebar a .s-icon .ic { width: 18px; height: 18px; }
.home-sidebar a:hover .s-icon { background: var(--si, #2563eb); color: #fff; transform: scale(1.05); }
.home-sidebar a .s-label { opacity: 0; transition: opacity .15s; }
.home-sidebar:hover a .s-label { opacity: 1; }
.home-sidebar .s-divider { height: 1px; background: #e5e7eb; margin: 4px 8px; }

/* 各图标主题色（避免单一灰调） */
.home-sidebar .s-icon.si-home      { --si: #2563eb; --si-bg: #dbeafe; }
.home-sidebar .s-icon.si-grid      { --si: #6366f1; --si-bg: #e0e7ff; }
.home-sidebar .s-icon.si-news      { --si: #0ea5e9; --si-bg: #e0f2fe; }
.home-sidebar .s-icon.si-pin       { --si: #f59e0b; --si-bg: #fef3c7; }
.home-sidebar .s-icon.si-star      { --si: #8b5cf6; --si-bg: #ede9fe; }
.home-sidebar .s-icon.si-search    { --si: #10b981; --si-bg: #d1fae5; }
.home-sidebar .s-icon.si-book      { --si: #0891b2; --si-bg: #cffafe; }
.home-sidebar .s-icon.si-clipboard { --si: #f43f5e; --si-bg: #ffe4e6; }
.home-sidebar .s-icon.si-clock     { --si: #14b8a6; --si-bg: #ccfbf1; }
.home-sidebar .s-icon.si-heart     { --si: #ef4444; --si-bg: #fee2e2; }
.home-sidebar .s-icon.si-user      { --si: #475569; --si-bg: #e2e8f0; }

/* ===== 返回顶部 ===== */
.back-top { position: fixed; bottom: 80px; right: 24px; z-index: 998; width: 44px; height: 44px; border-radius: 50%; background: #2563eb; color: #fff; border: none; font-size: 18px; cursor: pointer; box-shadow: 0 4px 16px rgba(37,99,235,.35); display: none; align-items: center; justify-content: center; transition: all .2s; }
.back-top:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(37,99,235,.45); }

/* ===== 响应式 ===== */
@media (max-width: 1200px) {
    .home-sidebar { display: none; }
    .topic-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 992px) {
    .topic-grid { grid-template-columns: repeat(3, 1fr); }
    .topic-grid.daily { grid-template-columns: repeat(3, 1fr); }
    .article-grid { grid-template-columns: 1fr; }
    .feature-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .topic-grid { grid-template-columns: repeat(2, 1fr); }
    .topic-grid.daily { grid-template-columns: repeat(2, 1fr); }
    .stats-bar { grid-template-columns: repeat(2, 1fr); }
    .stat-item { border-right: none; }
    .topliked-grid { grid-template-columns: 1fr; }
    .hero { height: 320px; }
    .hero .hero-content h1 { font-size: 26px; }
    .hero .hero-content p { font-size: 15px; }
    .back-top { right: 16px; bottom: 24px; }
}
