* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, "Microsoft YaHei", "PingFang SC", sans-serif; background: #f5f6fa; color: #333; line-height: 1.6; }
a { color: #e74c3c; text-decoration: none; }
a:hover { color: #c0392b; }
.container { max-width: 1400px; margin: 0 auto; padding: 0 30px; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid #e0e0e0; position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; flex-wrap: wrap; gap: 10px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: bold; color: #e74c3c; }
.logo-icon { font-size: 28px; }
.main-nav { display: flex; gap: 5px; }
.main-nav a { color: #555; padding: 8px 14px; border-radius: 4px; font-size: 14px; transition: all 0.2s; }
.main-nav a:hover { background: #f0f0f0; color: #e74c3c; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.search-form { display: flex; }
.search-form input { padding: 8px 12px; background: #f5f6fa; border: 1px solid #ddd; border-radius: 4px 0 0 4px; color: #333; font-size: 13px; width: 180px; outline: none; }
.search-form input:focus { border-color: #e74c3c; }
.search-form button { padding: 8px 14px; background: #e74c3c; color: #fff; border: none; border-radius: 0 4px 4px 0; cursor: pointer; font-size: 13px; }
.btn-enter { background: linear-gradient(135deg, #e74c3c, #c0392b); color: #fff; padding: 8px 20px; border-radius: 4px; font-weight: bold; font-size: 14px; white-space: nowrap; }
.btn-enter:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 4px 15px rgba(231,76,60,0.3); }

/* Hero Banner */
.hero-banner { background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); padding: 60px 0; text-align: center; }
.hero-content h1 { font-size: 42px; color: #fff; margin-bottom: 10px; text-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.hero-content p { color: rgba(255,255,255,0.9); font-size: 18px; margin-bottom: 25px; }
.btn-hero { display: inline-block; background: #fff; color: #e74c3c; padding: 14px 40px; border-radius: 6px; font-size: 18px; font-weight: bold; }
.btn-hero:hover { color: #e74c3c; transform: translateY(-2px); box-shadow: 0 6px 25px rgba(0,0,0,0.2); }

/* Layout */
.main-layout { display: grid; grid-template-columns: 1fr 280px; gap: 30px; padding: 30px 0; }
.content-area { min-width: 0; }

/* Section */
.section { margin-bottom: 35px; }
.section-title { font-size: 22px; color: #333; padding-bottom: 12px; border-bottom: 2px solid #e74c3c; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ''; width: 4px; height: 22px; background: #e74c3c; border-radius: 2px; }

/* Article Grid */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.article-card { background: #fff; border-radius: 8px; overflow: hidden; border: 1px solid #e8e8e8; transition: all 0.3s; }
.article-card:hover { border-color: #e74c3c; transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.08); }
.card-link { display: block; padding: 20px; color: inherit; }
.card-badge { display: inline-block; background: #fde8e8; color: #e74c3c; padding: 3px 10px; border-radius: 3px; font-size: 12px; margin-bottom: 10px; }
.card-title { font-size: 16px; color: #333; margin-bottom: 8px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-summary { font-size: 13px; color: #888; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 10px; }
.card-meta { font-size: 12px; color: #aaa; }

/* Article List */
.article-list { display: flex; flex-direction: column; gap: 15px; }
.article-list-item { background: #fff; border-radius: 8px; padding: 20px; border: 1px solid #e8e8e8; transition: all 0.3s; }
.article-list-item:hover { border-color: #e74c3c; }
.article-list-item h3 { font-size: 17px; color: #333; margin-bottom: 8px; }
.article-list-item h3:hover { color: #e74c3c; }
.article-list-item p { font-size: 14px; color: #888; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-meta { display: flex; gap: 15px; margin-top: 10px; font-size: 12px; color: #aaa; }
.tag { background: #fde8e8; color: #e74c3c; padding: 2px 8px; border-radius: 3px; font-size: 12px; }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-card { background: #fff; border-radius: 8px; padding: 20px; border: 1px solid #e8e8e8; }
.sidebar-card h3 { color: #333; font-size: 16px; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #eee; }
.recommend-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #f0f0f0; color: inherit; }
.recommend-item:last-child { border-bottom: none; }
.recommend-info h4 { color: #333; font-size: 14px; margin-bottom: 3px; }
.recommend-info p { color: #888; font-size: 12px; }
.recommend-btn { background: #e74c3c; color: #fff; padding: 5px 14px; border-radius: 4px; font-size: 12px; white-space: nowrap; }
.recommend-btn:hover { color: #fff; }
.category-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-tag { background: #f5f6fa; color: #666; padding: 6px 14px; border-radius: 4px; font-size: 13px; border: 1px solid #e8e8e8; }
.cat-tag:hover { background: #e74c3c; color: #fff; border-color: #e74c3c; }
.sidebar-linklist { list-style: none; }
.sidebar-linklist li { padding: 7px 0; border-bottom: 1px solid #f5f5f5; font-size: 14px; line-height: 1.5; }
.sidebar-linklist li:last-child { border-bottom: none; }
.sidebar-linklist a { color: #444; }
.sidebar-linklist a:hover { color: #e74c3c; }

/* CTA Card */
.cta-card { text-align: center; border-color: #e74c3c; background: linear-gradient(135deg, #fde8e8, #fff); }
.cta-card p { color: #666; font-size: 14px; margin-bottom: 5px; }
.btn-sidebar-cta { display: inline-block; background: linear-gradient(135deg, #e74c3c, #c0392b); color: #fff; padding: 10px 30px; border-radius: 4px; margin-top: 12px; font-weight: bold; }
.btn-sidebar-cta:hover { color: #fff; }

/* Article Page */
.breadcrumb { padding: 15px 0; font-size: 14px; color: #888; }
.breadcrumb a { color: #888; }
.article-title { font-size: 28px; color: #333; margin-bottom: 15px; line-height: 1.4; }
.article-meta { display: flex; gap: 15px; margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid #eee; font-size: 14px; color: #888; }
.article-body { font-size: 16px; line-height: 1.8; color: #444; }
.article-body h2 { color: #333; font-size: 22px; margin: 30px 0 15px; padding-left: 12px; border-left: 4px solid #e74c3c; }
.article-body h3 { color: #333; font-size: 18px; margin: 20px 0 10px; }
.article-body strong { color: #e74c3c; }
.article-body ul { margin: 10px 0 10px 20px; }
.article-body li { margin-bottom: 5px; }
.article-body blockquote { background: #f9f9f9; border-left: 4px solid #e74c3c; padding: 12px 20px; margin: 15px 0; border-radius: 0 4px 4px 0; }
.article-body table { width: 100%; border-collapse: collapse; margin: 15px 0; }
.article-body td { padding: 8px 12px; border: 1px solid #e8e8e8; font-size: 14px; }
.article-body img { display: block; max-width: 100%; height: auto; margin: 16px auto; border-radius: 6px; }
.article-body .figure { display: block; max-height: 78vh; overflow-y: auto; margin: 16px auto; border: 1px solid #e8e8e8; border-radius: 6px; background: #fafafa; }
.article-body .figure img { margin: 0; border-radius: 0; }

/* Embedded game page (search visitors only) */
.main-layout > .article-content { min-width: 0; }
.embed-bleed { position: relative; margin: 0 0 20px; background: #fff; border: 1px solid #e8e8e8; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.embed-frame { width: 100%; overflow-x: auto; }
.embed-frame iframe { display: block; border: 0; transform-origin: top left; }

/* Article CTA */
.article-cta { background: linear-gradient(135deg, #fde8e8, #fff5f5); border: 1px solid #e74c3c; border-radius: 8px; padding: 25px; text-align: center; margin: 30px 0; }
.article-cta p { color: #333; font-size: 16px; margin-bottom: 12px; }
.btn-cta { display: inline-block; background: linear-gradient(135deg, #e74c3c, #c0392b); color: #fff; padding: 12px 35px; border-radius: 6px; font-size: 16px; font-weight: bold; }
.btn-cta:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(231,76,60,0.3); }

/* Related */
.related-articles { background: #fff; border-radius: 8px; padding: 20px; margin-top: 25px; border: 1px solid #e8e8e8; }
.related-articles h3 { color: #333; margin-bottom: 12px; }
.related-articles ul { list-style: none; }
.related-articles li { padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
.related-articles li:last-child { border-bottom: none; }

/* Search */
.search-page-form { display: flex; gap: 0; margin-bottom: 25px; max-width: 500px; }
.search-page-form input { flex: 1; padding: 12px 16px; background: #fff; border: 1px solid #ddd; border-radius: 4px 0 0 4px; color: #333; font-size: 15px; outline: none; }
.search-page-form input:focus { border-color: #e74c3c; }
.search-page-form button { padding: 12px 24px; background: #e74c3c; color: #fff; border: none; border-radius: 0 4px 4px 0; cursor: pointer; font-size: 15px; }

/* Category */
.category-desc { color: #888; font-size: 15px; margin-bottom: 20px; }

/* Pagination */
.pager { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 28px; margin-top: 24px; padding-top: 20px; border-top: 1px solid #f0f0f0; }
.pager-info { color: #999; font-size: 14px; white-space: nowrap; }
.pager-info b { color: #333; font-weight: 600; }
.pager-pages { display: flex; align-items: center; gap: 10px; }
.pager-pages a, .pager-pages span { display: inline-block; min-width: 40px; height: 40px; line-height: 38px; padding: 0 10px; text-align: center; font-size: 15px; color: #666; background: #fff; border: 1px solid #e0e0e0; border-radius: 4px; }
.pager-pages a:hover { border-color: #e74c3c; color: #e74c3c; }
.pager-pages .pager-current { background: #e74c3c; border-color: #e74c3c; color: #fff; font-weight: 600; }
.pager-pages .pager-gap { min-width: 20px; padding: 0; border-color: transparent; background: none; color: #bbb; }
.pager-pages .pager-arrow.is-off { color: #ddd; }
@media (max-width: 600px) { .pager { justify-content: center; gap: 12px; } .pager-pages { gap: 8px; } .pager-pages a, .pager-pages span { min-width: 36px; height: 36px; line-height: 34px; } }

/* Empty */
.empty { text-align: center; color: #aaa; padding: 40px 0; font-size: 16px; }

/* Footer */
.site-footer { background: #fff; border-top: 1px solid #e0e0e0; padding: 30px 0; margin-top: 40px; }
.footer-links { display: flex; justify-content: center; gap: 25px; margin-bottom: 15px; flex-wrap: wrap; }
.footer-links a { color: #888; font-size: 14px; }
.footer-copy { text-align: center; color: #aaa; font-size: 13px; }
.footer-copy p { margin-bottom: 5px; }
.footer-friends { display: flex; justify-content: center; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 15px; padding-top: 14px; border-top: 1px dashed #ececec; }
.footer-friends-label { color: #999; font-size: 13px; }
.footer-friends a { color: #888; font-size: 13px; }
.footer-friends-apply { padding: 3px 12px; border: 1px solid #e74c3c; border-radius: 3px; background: #e74c3c; font-size: 12px; }
.footer-friends a.footer-friends-apply { color: #fff; font-size: 12px; }
.footer-friends a.footer-friends-apply:hover { color: #fff; border-color: #c0392b; background: #c0392b; }
.footer-friends-tip { width: 100%; margin-top: 8px; color: #bbb; font-size: 12px; }

/* Ad Slots */
.ad-slot { margin: 18px 0; text-align: center; }
.ad-content { margin: 5px 0; }
.ad-content img { max-width: 100%; height: auto; border-radius: 4px; }
.ad-content a { color: #e74c3c; }

/* Responsive */
@media (max-width: 768px) {
  .main-layout { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; }
  .main-nav { flex-wrap: wrap; justify-content: center; }
  .hero-content h1 { font-size: 28px; }
}
