*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root { --primary: #FF6B6B; --primary-dark: #EE5A5A; --secondary: #4ECDC4; --accent: #FFE66D; --dark: #1A202C; --gray: #718096; --light: #F7FAFC; --white: #FFFFFF; --shadow: 0 4px 15px rgba(0,0,0,0.08); --radius: 12px; }
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; color: var(--dark); line-height: 1.6; background: var(--light); overflow-x: hidden; }
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1400px; margin: 0 auto; padding: 0 24px; }

.navbar { position: fixed; top: 0; left: 0; right: 0; height: 70px; background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); box-shadow: 0 2px 10px rgba(0,0,0,0.05); z-index: 1000; display: flex; align-items: center; }
.navbar .container { width: 100%; max-width: none; padding: 0 10px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 8px; }
.logo > img:first-child { height: 56px; width: auto; border-radius: 50%; object-fit: cover; }
.logo-text-img { height: 52px; width: auto; display: block; object-fit: contain; }
.nav-links { display: flex; align-items: center; gap: 16px; list-style: none; }
.nav-links a { font-size: 15px; color: #333; padding: 6px 12px; border-radius: 20px; }
.nav-links a:hover { color: #FF6B6B; background: rgba(255,107,107,0.08); }
.nav-links a.active { color: #fff !important; background: #FF6B6B; font-weight: 600; }
.nav-btn { background: #FF6B6B !important; color: #fff !important; }
.nav-btn:hover { background: #E55A5A !important; }
.mobile-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 5px; background: transparent; border: none; }
.mobile-toggle span { width: 24px; height: 2.5px; background: #333; border-radius: 2px; transition: 0.3s; }

.breadcrumb { padding: 90px 0 20px; font-size: 14px; background: var(--white); border-bottom: 1px solid #eee; }
.breadcrumb a { color: var(--gray); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--primary); font-weight: 600; margin-left: 4px; }

.blog-section { padding: 60px 0 80px; background: #FAFBFC; min-height: 60vh; }
.section-title { text-align: center; font-size: 32px; font-weight: 700; color: var(--dark); margin-bottom: 16px; }
.geo-summary { text-align: center; max-width: 800px; margin: 0 auto 40px; font-size: 15px; color: var(--dark); font-weight: 500; background: #FFF8F8; padding: 12px 20px; border-radius: 8px; border: 1px dashed #FFCDD2; }
.geo-summary a { color: var(--primary); font-weight: 600; border-bottom: 1px dashed var(--primary); }
.geo-summary a:hover { color: var(--primary-dark); border-bottom-style: solid; }
.update-time { text-align: center; font-size: 12px; color: #94A3B8; margin: 24px 0 0; }
.update-time time { font-weight: 500; color: #64748B; }
.wiki-tabs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 32px; }
.wiki-tabs button, .wiki-tabs a { padding: 8px 20px; background: white; border: 1px solid #E2E8F0; border-radius: 20px; font-size: 14px; color: #64748B; transition: all 0.2s ease; cursor: pointer; text-decoration: none; }
.wiki-tabs button:hover, .wiki-tabs a:hover, .wiki-tabs button.active, .wiki-tabs a.active { background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 2px 8px rgba(255,107,107,0.2); }
.articles-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; min-height: 420px; position: relative; }
.article-card { background: white; padding: 0; border-radius: 12px; border: 1px solid #F1F5F9; box-shadow: 0 2px 6px rgba(0,0,0,0.03); transition: opacity 0.3s ease, transform 0.3s ease; display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.article-card.hidden { display: none; }
.article-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); border-color: rgba(255,107,107,0.3); }
.article-card h3 { font-size: 16px; margin: 0; font-weight: 600; color: #1E293B; padding: 0 16px; }
.article-card h3 a { color: inherit; }
.article-card h3 a:hover { color: var(--primary); }
/* 分类色彩体系 */
.article-card[data-cat="xinshou"] { border-left: 4px solid #4ECDC4; }
.article-card[data-cat="bikeng"]  { border-left: 4px solid #FF6B6B; }
.article-card[data-cat="anli"]   { border-left: 4px solid #D97706; }
.article-card[data-cat="baike"]  { border-left: 4px solid #7F77DD; }
.article-card[data-cat="xinshou"] .wiki-cat { background: #D1FAE5; color: #059669; }
.article-card[data-cat="bikeng"]  .wiki-cat { background: #FEE2E2; color: #DC2626; }
.article-card[data-cat="anli"]   .wiki-cat { background: #FEF3C7; color: #D97706; }
.article-card[data-cat="baike"]  .wiki-cat { background: #EDE9FE; color: #7C3AED; }

/* 首篇文章突出 */
.article-card:first-child { background: linear-gradient(135deg, #FFFBEB 0%, #FFF5F5 100%); }

/* 交替行背景 */
.article-card:nth-child(even) { background: #F8FAFC; }
.article-card:first-child { background: linear-gradient(135deg, #FFFBEB 0%, #FFF5F5 100%) !important; }

/* 统一卡片结构：标题 → 媒体 → 脚注 */
.article-card h3 { flex: 1; min-height: 48px; height: auto; display: flex; align-items: center; overflow: hidden; }
.article-card h3 a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; }
.article-media { height: 150px; display: flex; align-items: center; }
.article-foot { flex: 1; display: flex; justify-content: space-between; align-items: center; padding: 6px 16px; }
.article-foot .wiki-cat { margin: 0; }
.article-foot time { font-size: 12px; color: #94A3B8; }
.article-thumb { width: 100%; height: 100%; border-radius: 8px; overflow: hidden; }
.article-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 8px; }
.article-excerpt { font-size: 14px; color: #64748B; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; padding: 0 16px; }
.wiki-cat { background: #FFF0F0; color: var(--primary); padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.5px; }
.blog-load-more { text-align: center; margin-top: 20px; }
.btn-outline { display: inline-block; padding: 10px 28px; border: 2px solid var(--primary); color: var(--primary); border-radius: 24px; font-weight: 600; transition: 0.3s; }
.btn-outline:hover { background: var(--primary); color: white; }
.wiki-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 24px; }
.btn-page { padding: 8px 20px; background: white; border: 1px solid #E2E8F0; border-radius: 20px; font-size: 14px; color: #64748B; cursor: pointer; transition: 0.2s; }
.btn-page:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.btn-page:disabled { opacity: 0.4; cursor: default; }
.page-info { font-size: 14px; color: #64748B; }

/* 文章详情页样式 */
.article-detail { max-width: 860px; margin: 0 auto; background: white; padding: 48px 56px; border-radius: 16px; box-shadow: 0 2px 12px rgba(0,0,0,0.04); }
.article-detail h1 { font-size: 30px; margin-bottom: 24px; color: var(--dark); line-height: 1.4; }
.article-detail h2 { font-size: 22px; margin: 40px 0 18px; padding-bottom: 8px; border-bottom: 2px solid #F1F5F9; color: var(--dark); }
.article-detail h3 { font-size: 18px; margin: 24px 0 12px; color: #334155; }
.article-detail p { font-size: 16px; line-height: 1.9; color: #4A5568; margin-bottom: 20px; }
.article-detail ul, .article-detail ol { margin-bottom: 20px; padding-left: 28px; font-size: 16px; color: #4A5568; line-height: 1.9; }
.article-detail li { margin-bottom: 10px; }
.article-detail table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.article-detail th, .article-detail td { border: 1px solid #E2E8F0; padding: 10px 14px; text-align: left; white-space: nowrap; }
.article-detail td:last-child { white-space: normal; min-width: 120px; }
.article-detail th { background: #F7FAFC; font-weight: 600; color: var(--dark); }
.article-detail blockquote { border-left: 4px solid var(--primary); padding: 16px 24px; margin: 24px 0; background: #FFF5F5; border-radius: 0 8px 8px 0; }
.article-detail blockquote p { margin: 0; color: #C0392B; }
.article-detail a { color: var(--primary); text-decoration: underline; }
.article-detail img { width: 25%; height: auto; border-radius: 8px; margin: 24px auto; }
.article-detail hr { border: none; border-top: 1px solid #E2E8F0; margin: 32px 0; }
.article-detail code { background: #F7FAFC; padding: 2px 6px; border-radius: 4px; font-size: 14px; font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; }

.footer { background: var(--dark); color: rgba(255,255,255,0.7); padding: 60px 0 30px; }
.footer-content { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand h3 { font-size: 22px; color: white; margin-bottom: 16px; }
.footer-links h4 { color: white; font-size: 16px; margin-bottom: 20px; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 14px; color: rgba(255,255,255,0.6); }
.footer-links a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; text-align: center; font-size: 13px; line-height: 1.8; }
.footer-bottom p { margin: 0; }
.badge-link { color: #FF6B6B !important; font-weight: 500; text-decoration: none; }
.badge-link:hover { color: #FF8A8A !important; }

@media (max-width: 1024px) { .articles-list { grid-template-columns: repeat(2, 1fr); } .footer-content { grid-template-columns: 1fr 1fr; } .article-detail { padding: 36px 32px; } }
@media (max-width: 768px) {
  .navbar .container { padding: 0 10px; }
  .nav-links { display: none; position: absolute; top: 70px; left: 0; right: 0; background: white; flex-direction: column; padding: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
  .nav-links.active { display: flex; }
  .mobile-toggle { display: flex; }
  .articles-list { grid-template-columns: 1fr; gap: 10px; }
  .article-card { padding: 0; display: flex; flex-direction: column; }
  .article-card h3 { flex: 1; min-height: 45px; height: auto; display: flex; align-items: center; padding: 0 16px; font-size: 15px; }
  .article-media { height: 120px; align-items: center; }
  .article-thumb img { height: 100%; border-radius: 0; }
  .article-excerpt { padding: 0 16px; -webkit-line-clamp: 2; }
  .article-foot { flex: 1; display: flex; align-items: center; padding: 4px 16px; }
  .article-foot .wiki-cat { padding: 2px 8px; font-size: 11px; }
  .article-foot time { font-size: 11px; }
  .footer-content { grid-template-columns: 1fr; }
  .wiki-tabs { gap: 8px; }
  .wiki-tabs button, .wiki-tabs a { padding: 6px 14px; font-size: 13px; }
  .article-detail { padding: 24px 20px; border-radius: 12px; }
  .article-detail h1 { font-size: 24px; }
  .article-detail h2 { font-size: 20px; }
  .article-detail img { width: 75%; }
}
.fade-in { opacity: 0; transform: translateY(30px); transition: all 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
