@charset "utf-8";

/* ===== 1. 基础重置与背景 ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; line-height: 1.6; background-color: #0f172a; color: #1e293b; }
/* 全屏背景遮罩 */
.bg-mask { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.65); z-index: -1; }
.site-wrapper { background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,0.05); border-radius: 16px; box-shadow: 0 0 40px rgba(0,0,0,0.5); position: relative; z-index: 1; max-width: 1000px; margin: 30px auto; padding: 30px 20px; }

/* ===== 2. 顶部导航（复古暗金磨砂） ===== */
.site-header { display: flex; justify-content: center; align-items: center; padding: 10px 0; margin-bottom: 20px; }
.logo-text { font-size: 32px; font-weight: 900; color: #ffffff; text-decoration: none; letter-spacing: 2px; text-shadow: 0 2px 10px rgba(245, 158, 11, 0.6); }
.header h1{margin: 0; display: inline-block;}
.logo-img { max-height: 50px; }
.site-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 30px; padding: 12px; background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(10px); border-radius: 12px; border: 1px solid rgba(245, 158, 11, 0.3); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.site-nav a { padding: 8px 20px; color: #fcd34d; text-decoration: none; font-size: 15px; font-weight: 600; border-radius: 6px; transition: all 0.3s; }
.site-nav a:hover { background: rgba(245, 158, 11, 0.2); color: #fff; text-shadow: 0 0 10px #fcd34d; }
.site-nav a.active { background: linear-gradient(90deg, #b45309, #d97706); color: #fff; border: 1px solid #fcd34d; box-shadow: 0 0 15px rgba(245, 158, 11, 0.5); }

/* ===== 3. 前台双栏布局 ===== */
.portal-layout { display: flex; gap: 20px; align-items: flex-start; margin-top: 20px; }
.main-content { flex: 1; min-width: 0; }
.sidebar { width: 300px; flex-shrink: 0; }
.page-title { color: #ffffff; font-size: 26px; font-weight: 800; margin-bottom: 24px; display: flex; align-items: center; text-shadow: 0 2px 5px rgba(0,0,0,0.5); }
.page-title::before { content: ''; display: inline-block; width: 5px; height: 24px; background: #fcd34d; border-radius: 3px; margin-right: 12px; box-shadow: 0 0 10px #fcd34d; }

/* ===== 4. 图文文章卡片 ===== */
.article-card { display: flex; gap: 15px; background: rgb(255 255 255 / 85%); backdrop-filter: blur(10px); padding: 15px; border-radius: 12px; margin-bottom: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); transition: 0.3s; }
.article-card:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(245, 158, 11, 0.2); border-color: rgba(245, 158, 11, 0.5); }
.article-card img { width: 150px; height: 100px; object-fit: cover; border-radius: 8px; flex-shrink: 0; border: 1px solid rgba(255,255,255,0.2); }
.article-card .info { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.article-card h2 { font-size: 18px; margin: 0 0 10px 0; line-height: 1.4; }
.article-card h2 a { color: #1e1e1e; font-weight: bold; text-decoration: none; transition: color 0.3s; }
.article-card:hover h2 a { color: #b98e00; }
.article-card .meta { font-size: 13px; color: #94a3b8; display: flex; align-items: center; gap: 10px; }
.article-card .meta a { background: rgba(245, 158, 11, 0.15) !important; color: #000000 !important; border: 1px solid rgba(245, 158, 11, 0.3); padding: 2px 8px; border-radius: 4px; margin-right: 10px; text-decoration: none;}

/* ===== 5. 右侧边栏 ===== */
.side-box { background: rgb(255 255 255 / 85%); backdrop-filter: blur(10px); border-radius: 12px; padding: 20px; margin-bottom: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); }
.side-box h3 { font-size: 16px; margin: 0 0 15px 0; padding-bottom: 10px; border-bottom: 1px dashed rgb(0 0 0 / 15%); color: #000000; display: flex; align-items: center; }
.side-box h3::before { content: ''; display: inline-block; width: 4px; height: 16px; background: #fcd34d; border-radius: 2px; margin-right: 8px; }
.side-list { list-style: none; padding: 0; margin: 0; }
.side-list li { margin-bottom: 12px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-list li a { color: #232323; text-decoration: none; transition: 0.2s; font-weight: 500; }
.side-list li a:hover { color: #b98e00; text-decoration: underline; }
/* 排行榜数字 */
.top-list li { display: flex; align-items: center; gap: 10px; }
.top-list .num { display: inline-block; width: 20px; height: 20px; line-height: 20px; text-align: center; background: rgb(255 255 255 / 18%); color: #878f99; border-radius: 4px; font-size: 12px; font-weight: bold; flex-shrink: 0; }
.top-list li:nth-child(1) .num { background: #ef4444; color: #fff; box-shadow: 0 0 10px #ef4444; }
.top-list li:nth-child(2) .num { background: #f97316; color: #fff; box-shadow: 0 0 10px #f97316; }
.top-list li:nth-child(3) .num { background: #eab308; color: #fff; box-shadow: 0 0 10px #eab308; }

/* ===== 6. 文章详情页 ===== */
.post-container { padding: 30px; border-radius: 16px; margin-top: 20px; background: rgb(255 255 255 / 85%); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.1); }
.post-container h1 { margin-top: 0; font-size: 24px;  text-align: center;line-height: 1.3; margin-bottom: 16px; }
.post-meta { text-align: center;margin-bottom: 30px; border-bottom: 1px dashed rgba(255,255,255,0.85); padding-bottom: 20px; }
.post-content { font-size: 16px; color: #000000; line-height: 1.8; }
.post-content h2 { font-size: 20px; color: #bb6900; margin: 32px 0 16px; border-bottom:1px solid rgb(185 185 185 / 41%); padding-bottom: 10px; }
.post-content h3 { font-size: 18px; color: #bb6900; margin: 24px 0 12px; }
.post-content p { margin-bottom: 16px; }
.post-content img { max-width: 100%; border-radius: 12px; margin: 20px auto; display: block; }

/* 内链导航与相关推荐 */
.post-nav { display: flex; justify-content: space-between; gap: 20px; margin: 40px 0; padding-top: 20px; border-top: 1px dashed rgba(255,255,255,0.85); font-size: 14px; }
.post-nav a { color: #a57e00; text-decoration: none; max-width: 45%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: 0.2s; }
.post-nav a:hover { color: #fff; text-decoration: underline; }
.post-nav .disabled { color: #64748b; }
.related-box { margin-top: 40px; background: rgb(255 255 255 / 50%); padding: 24px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); }
.related-box h3 { font-size: 16px; margin: 0 0 16px 0; color: #222; border-left: 4px solid #fcd34d; padding-left: 10px; }
.related-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.related-list li a { color: #434343; text-decoration: none; display: flex; align-items: center; }
.related-list li a::before { content: "•"; color: #fcd34d; margin-right: 8px; font-weight: bold; }
.related-list li a:hover { color: #b98e00; text-decoration: underline; }

/* ===== 7. 分页、广告与页脚 ===== */
.pagination { text-align: center; margin-top: 40px; }
.pagination a, .pagination span { display: inline-block; padding: 8px 16px; background: rgba(30, 41, 59, 0.85); color: #cbd5e1; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; margin: 0 4px; text-decoration: none; font-size: 14px; transition: 0.2s; }
.pagination a:hover { border-color: #fcd34d; color: #fcd34d; }
.pagination span.current { background: #b45309; color: #fff; border-color: #fcd34d; }

.ad-banner { margin-bottom: 20px; background: rgba(15, 23, 42, 0.6); border: 1px dashed rgba(245, 158, 11, 0.5); padding: 20px; text-align: center; border-radius: 12px; box-shadow: inset 0 0 20px rgba(0,0,0,0.3); }
.ad-banner a { color: #fcd34d; font-weight: bold; font-size: 16px; text-decoration: none; transition: 0.2s; }
.ad-banner a:hover { text-decoration: underline; }

.site-footer { background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(5px);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);text-align: center; padding: 40px 0 20px; color: #64748b; font-size: 13px; border-top: 1px solid rgba(255,255,255,0.1); margin-top: 40px; }
.site-footer a { color: #64748b; text-decoration: none; transition: 0.2s; }
.site-footer a:hover { color: #fcd34d; }
.footer-links { margin-top: 10px; }
.footer-links a { margin: 0 10px; }

/* ===== 8. 移动端适配 ===== */
@media (max-width: 768px) {
    .portal-layout { flex-direction: column; }
    .sidebar { width: 100%; }
    .article-card { flex-direction: column; }
    .article-card img { width: 100%; height: 180px; }
}

/* ===== 右侧悬浮客服 ===== */
.kefu-float { position: fixed; top: 50%; right: 0; transform: translateY(-50%); z-index: 9999; display: flex; align-items: center; }
.kefu-float-content { position: absolute; right: 40px; top: 50%; transform: translate(100%, -50%); background: #ffffff; padding: 10px; border-radius: 12px 0 0 12px; box-shadow: -2px 4px 15px rgba(0,0,0,0.2); display: flex; flex-direction: column; align-items: center; opacity: 0; transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); width: 110px; pointer-events: none; }
.kefu-float:hover .kefu-float-content { opacity: 1; transform: translate(0, -50%); pointer-events: auto; }
.kefu-float-content img { width: 100%; height: auto; border-radius: 4px; display: block; }
.kefu-float-content span { font-size: 12px; color: #333; font-weight: bold; margin-top: 6px; }
/* 默认显示的按钮（垂直竖排） */
.kefu-float-btn { width: 42px; height: 120px; background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; border-radius: 12px 0 0 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; box-shadow: -2px 0 10px rgba(239, 68, 68, 0.4); padding: 15px 0; box-sizing: border-box; transition: 0.3s; }
/* 文字竖排，图标保持横向 */
.kefu-float-btn span { writing-mode: vertical-rl; letter-spacing: 3px; font-size: 14px; font-weight: bold; line-height: 1; }
.kefu-float-btn:hover { background: linear-gradient(135deg, #ef4444, #dc2626); }
