/* ========================================
   SimplePay Knowledge – 主样式表 (v3.2 最终版)
   无远程字体 · 自动调用用户本地字体
   ======================================== */

:root {
    --gold: #d4af37;
    --gold-dark: #b89b2b;
    --brown: #5a3e2b;
    --brown-dark: #3e2723;
    --cream: #fffdf7;
    --border-gold: #e8d5b5;
    --text: #334155;
    --text-light: #64748b;
    --white: #ffffff;
    --shadow-sm: 0 4px 10px rgba(139,90,43,0.05);
    --shadow: 0 12px 30px rgba(139,90,43,0.08);
    --radius: 16px;
    --transition: 0.25s ease;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue", Helvetica, Arial, "Noto Sans CJK SC", "WenQuanYi Micro Hei", sans-serif;
    color: var(--text);
    background: #faf7f2;
    line-height: 1.7;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--brown);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--gold-dark); }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.site-content { background: #faf7f2; }

/* 侧边栏（不再强制固定宽度，由插件页面自身控制） */
.content-container { display: flex; flex-wrap: wrap; gap: 30px; padding-top: 40px; padding-bottom: 60px; }
.content-area { flex: 1; min-width: 0; }
.widget-area { width: 160px; flex-shrink: 0; font-size: 0.8rem; }
@media (max-width: 992px) { .content-container { flex-direction: column; } .widget-area { width: 100%; } }

/* 小工具 */
.widget { background: var(--cream); border-radius: 10px; padding: 12px 10px; margin-bottom: 15px; border: 1px solid var(--border-gold); word-break: break-word; box-shadow: var(--shadow-sm); }
.widget-title { font-size: 0.85rem; font-weight: 700; margin: 0 0 8px; color: var(--brown-dark); border-bottom: 2px solid var(--gold); padding-bottom: 4px; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 4px 0; border-bottom: 1px solid #f0e8d5; font-size: 0.75rem; line-height: 1.4; }
.widget li:last-child { border-bottom: none; }

/* 搜索 */
.spk-search-form { display: flex; align-items: center; border: 1px solid var(--border-gold); border-radius: 50px; overflow: hidden; background: var(--cream); }
.spk-search-field { border: none; padding: 10px 16px; font-size: 14px; outline: none; width: 160px; transition: width 0.3s; background: transparent; color: var(--brown); }
.spk-search-field:focus { width: 200px; }
.spk-search-submit { background: var(--gold); color: var(--white); border: none; padding: 10px 16px; cursor: pointer; font-size: 16px; transition: background var(--transition); }
.spk-search-submit:hover { background: var(--gold-dark); }

/* 文章网格（仅用于非自定义页面） */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; margin: 30px 0; }
.article-card { background: var(--cream); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform var(--transition), box-shadow var(--transition); border: 1px solid var(--border-gold); display: flex; flex-direction: column; }
.article-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--gold); }
.article-card .post-thumbnail img { width: 100%; height: 200px; object-fit: cover; border-bottom: 1px solid var(--border-gold); }
.card-content { padding: 20px 24px; display: flex; flex-direction: column; flex-grow: 1; }
.entry-title { font-size: 1.2rem; font-weight: 700; margin: 0 0 10px; line-height: 1.4; color: var(--brown-dark); }
.entry-title a { color: inherit; text-decoration: none; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 0.8rem; color: var(--text-light); margin-bottom: 12px; }
.paid-badge, .price-tag { background: var(--gold); color: var(--brown-dark); padding: 2px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; display: inline-block; align-self: flex-start; }
.read-more { margin-top: auto; font-weight: 600; font-size: 0.9rem; color: var(--brown); text-decoration: none; }

/* 单篇文章 */
.single-post .entry-header { margin-bottom: 30px; }
.single-post .entry-title { font-size: 2rem; margin-bottom: 15px; color: var(--brown-dark); }
.post-thumbnail-full { margin-bottom: 30px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.featured-image { width: 100%; border-radius: var(--radius); }
.entry-content { font-size: 1.05rem; line-height: 1.8; color: var(--text); }
.entry-footer { margin-top: 30px; padding-top: 15px; border-top: 1px solid var(--border-gold); }

/* 图片文章居中 */
.image-single .entry-header, .image-single .entry-content, .image-single .entry-footer { text-align: center; }
.image-single .entry-title { font-size: 2.2rem; }
.image-single .entry-meta { justify-content: center; }

/* 古典分页 */
.navigation.pagination { display: flex; justify-content: center; gap: 10px; margin: 50px 0 30px; }
.navigation.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border: 1px solid var(--gold); border-radius: 30px; background: var(--cream); color: var(--brown); font-weight: 600; text-decoration: none; transition: all var(--transition); font-size: 0.95rem; }
.navigation.pagination .page-numbers:hover { background: var(--gold); color: var(--white); border-color: var(--gold-dark); box-shadow: 0 4px 12px rgba(212,175,55,0.3); }
.navigation.pagination .page-numbers.current { background: var(--gold); color: var(--white); border-color: var(--gold-dark); box-shadow: 0 4px 12px rgba(212,175,55,0.4); }
.navigation.pagination .page-numbers.dots { border: none; background: transparent; color: var(--brown); }

/* 响应式 */
@media (max-width: 768px) {
    .article-grid { grid-template-columns: 1fr; }
    .single-post .entry-title { font-size: 1.6rem; }
}
/* 普通文章段落首行缩进（不包括作品章节和作品详情页） */
body:not(.single-novel):not(.single-novel_book) .entry-content p {
    text-indent: 2em;
}

