/*
Theme Name: 吃瓜网 Chigua
Theme URI: http://kvnxf.com
Author: chigua team
Author URI: http://kvnxf.com
Description: 吃瓜网专属主题 - 借鉴时光网（Mtime）视觉布局，主打明星八卦、娱乐资讯、热门瓜料的中文 SEO 站点主题。
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chigua
Tags: blog, news, entertainment, chinese, seo, custom-header, custom-menu, featured-images, translation-ready
*/

/* ===== 重置与全局 ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: #f5f5f5; color: #333; font-family: "Microsoft YaHei","PingFang SC","Helvetica Neue",Arial,sans-serif; font-size: 14px; line-height: 1.7; }
a { color: #005ea7; text-decoration: none; transition: color .2s; }
a:hover { color: #e60012; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ===== 顶部导航（Mtime 风格：黑底 + 橙色 LOGO） ===== */
.cg-topbar { background: #2b2b2b; color: #ccc; font-size: 12px; }
.cg-topbar .inner { max-width: 1200px; margin: 0 auto; padding: 6px 12px; display: flex; justify-content: space-between; }
.cg-topbar a { color: #ccc; margin: 0 6px; }
.cg-topbar a:hover { color: #ffb400; }

.cg-header { background: #000; color: #fff; }
.cg-header .inner { max-width: 1200px; margin: 0 auto; padding: 16px 12px; display: flex; align-items: center; }
.cg-logo { font-size: 28px; font-weight: bold; color: #ffb400; letter-spacing: 2px; margin-right: 32px; }
.cg-logo a { color: #ffb400; }
.cg-logo small { color: #bbb; font-size: 12px; font-weight: normal; margin-left: 6px; letter-spacing: 0; }
.cg-search { flex: 1; max-width: 420px; position: relative; }
.cg-search input[type=search] { width: 100%; height: 34px; padding: 0 44px 0 12px; border: 2px solid #ffb400; border-radius: 2px; outline: none; font-size: 13px; }
.cg-search button { position: absolute; right: 0; top: 0; height: 34px; width: 44px; border: 0; background: #ffb400; color: #000; cursor: pointer; font-size: 14px; }
.cg-header .right { margin-left: auto; }
.cg-header .right a { color: #fff; margin: 0 6px; }

/* ===== 主导航 ===== */
.cg-nav { background: #e60012; }
.cg-nav .inner { max-width: 1200px; margin: 0 auto; padding: 0 12px; }
.cg-nav ul { display: flex; }
.cg-nav li { position: relative; }
.cg-nav a { display: block; color: #fff; padding: 10px 18px; font-size: 15px; font-weight: bold; }
.cg-nav a:hover, .cg-nav .current-menu-item > a { background: #b8000f; color: #ffb400; }

/* ===== 主体布局 ===== */
.cg-wrap { max-width: 1200px; margin: 20px auto; padding: 0 12px; display: grid; grid-template-columns: 1fr 320px; gap: 20px; }
@media (max-width: 960px) { .cg-wrap { grid-template-columns: 1fr; } .cg-side { order: 2; } }

/* ===== 焦点图 banner ===== */
.cg-banner { background: linear-gradient(135deg,#ffb400,#e60012); color: #fff; padding: 30px 24px; border-radius: 4px; margin-bottom: 20px; }
.cg-banner h1 { font-size: 24px; margin-bottom: 8px; }
.cg-banner p { font-size: 14px; opacity: .9; }

/* ===== 列表页卡片 ===== */
.cg-list .cg-post { background: #fff; border-radius: 4px; overflow: hidden; margin-bottom: 16px; display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding: 14px; border: 1px solid #eee; transition: box-shadow .2s; }
.cg-list .cg-post:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.cg-list .cg-thumb { width: 220px; height: 140px; background: #f0f0f0 url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 220 140"><rect width="220" height="140" fill="%23ffb400"/><text x="50%25" y="50%25" text-anchor="middle" dy=".35em" font-family="Microsoft YaHei" font-size="24" fill="%23000" font-weight="bold">吃瓜</text></svg>') center/cover no-repeat; border-radius: 3px; }
.cg-list .cg-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cg-list .cg-info h2 { font-size: 18px; margin-bottom: 8px; line-height: 1.4; }
.cg-list .cg-info h2 a { color: #222; }
.cg-list .cg-info h2 a:hover { color: #e60012; }
.cg-list .cg-meta { color: #888; font-size: 12px; margin-bottom: 8px; }
.cg-list .cg-meta span { margin-right: 12px; }
.cg-list .cg-excerpt { color: #555; font-size: 13px; }

/* ===== 单篇文章 ===== */
.cg-single { background: #fff; padding: 30px; border-radius: 4px; border: 1px solid #eee; }
.cg-single h1.cg-title { font-size: 28px; color: #111; margin-bottom: 14px; line-height: 1.4; }
.cg-single .cg-meta { color: #888; font-size: 13px; padding-bottom: 14px; border-bottom: 1px dashed #ddd; margin-bottom: 20px; }
.cg-single .cg-meta span { margin-right: 14px; }
.cg-content { font-size: 15px; line-height: 1.9; color: #333; }
.cg-content p { margin-bottom: 16px; text-indent: 2em; }
.cg-content h2 { font-size: 20px; color: #e60012; border-left: 4px solid #ffb400; padding-left: 10px; margin: 24px 0 12px; }
.cg-content h3 { font-size: 17px; color: #333; margin: 18px 0 10px; }
.cg-content blockquote { background: #fff8e1; border-left: 4px solid #ffb400; padding: 12px 16px; margin: 16px 0; color: #555; }
.cg-content ul, .cg-content ol { margin: 10px 0 16px 30px; }
.cg-content ul li { list-style: disc; margin-bottom: 6px; }
.cg-content strong { color: #e60012; }

/* ===== 侧栏 ===== */
.cg-side .widget { background: #fff; border-radius: 4px; border: 1px solid #eee; margin-bottom: 16px; }
.cg-side .widget h3 { background: #ffb400; color: #000; font-size: 15px; padding: 10px 14px; border-radius: 4px 4px 0 0; }
.cg-side .widget ul { padding: 10px 14px; }
.cg-side .widget li { padding: 8px 0; border-bottom: 1px dashed #eee; font-size: 13px; }
.cg-side .widget li:last-child { border-bottom: 0; }
.cg-side .widget a { color: #333; }
.cg-side .widget a:hover { color: #e60012; }
.cg-tag-cloud a { display: inline-block; background: #f5f5f5; color: #555; padding: 4px 10px; margin: 4px 4px 4px 0; border-radius: 12px; font-size: 12px !important; }
.cg-tag-cloud a:hover { background: #e60012; color: #fff; }

/* ===== 分页 ===== */
.cg-pagination { text-align: center; padding: 20px 0; }
.cg-pagination a, .cg-pagination .current { display: inline-block; padding: 6px 12px; margin: 0 3px; background: #fff; border: 1px solid #ddd; border-radius: 3px; color: #555; }
.cg-pagination .current, .cg-pagination a:hover { background: #e60012; color: #fff; border-color: #e60012; }

/* ===== 页脚 ===== */
.cg-footer { background: #2b2b2b; color: #aaa; text-align: center; padding: 26px 12px; font-size: 13px; margin-top: 30px; }
.cg-footer a { color: #ffb400; }
.cg-footer p { margin: 6px 0; }

/* ===== 评论区简化 ===== */
.comments-area { background: #fff; padding: 20px; border-radius: 4px; border: 1px solid #eee; margin-top: 20px; }
.comments-area h3 { font-size: 17px; margin-bottom: 12px; }
