* { box-sizing: border-box; }

.novel-body {
    background: #f6f7f9;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #333;
    margin: 0;
    line-height: 1.7;
}
.novel-wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* 顶部 */
.novel-header { background: #fff; border-bottom: 1px solid #e5e7eb; padding: 14px 0; position: sticky; top: 0; z-index: 20; }
.novel-header .novel-wrap { display: flex; align-items: center; gap: 24px; }
.novel-logo { font-size: 20px; font-weight: 700; color: #1a1a1a; text-decoration: none; }
.novel-nav { display: flex; gap: 16px; }
.novel-nav a { color: #555; text-decoration: none; font-size: 14px; }
.novel-nav a:hover { color: #2563eb; }
.novel-search { margin-left: auto; display: flex; gap: 6px; }
.novel-search input { padding: 7px 12px; border: 1px solid #e5e7eb; border-radius: 6px; font-size: 13px; width: 200px; outline: 0; }
.novel-search input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.novel-search button { background: #2563eb; color: #fff; border: 0; padding: 7px 14px; border-radius: 6px; cursor: pointer; font-size: 13px; }

.novel-main { padding: 28px 20px 60px; }

/* Hero */
.novel-hero { text-align: center; padding: 40px 0 30px; }
.novel-hero-title { font-size: 36px; margin: 0 0 8px; letter-spacing: -.02em; }
.novel-hero-sub { color: #888; margin: 0; font-size: 15px; }

/* Section */
.novel-section { margin-bottom: 40px; }
.novel-section-title { font-size: 20px; margin: 0 0 18px; }

/* Grid */
.novel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; }
.novel-grid-featured { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

/* Card */
.novel-card { display: block; text-decoration: none; color: inherit; transition: transform .2s; }
.novel-card:hover { transform: translateY(-4px); }
.novel-card-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(15,23,42,.08);
    margin-bottom: 10px;
}
.novel-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.novel-card-placeholder { color: #fff; font-size: 42px; font-weight: 700; }
.novel-card-title { font-weight: 600; font-size: 14.5px; line-height: 1.4; margin-bottom: 3px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.novel-card-author { color: #888; font-size: 12.5px; }
.novel-card-meta { color: #aaa; font-size: 12px; margin-top: 2px; }
.novel-badge-off { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 10px; }

/* 布局 */
.novel-layout { display: flex; gap: 28px; }
.novel-sidebar { width: 180px; flex-shrink: 0; }
.novel-sidebar h3 { font-size: 14px; margin: 0 0 10px; color: #666; font-weight: 500; }
.novel-cat-list { list-style: none; padding: 0; margin: 0; }
.novel-cat-list li { margin-bottom: 4px; }
.novel-cat-list a { display: block; padding: 7px 12px; border-radius: 6px; color: #555; text-decoration: none; font-size: 13.5px; transition: all .15s; }
.novel-cat-list a:hover { background: #eef2f7; color: #2563eb; }
.novel-cat-list a.active { background: #2563eb; color: #fff; }
.novel-content { flex: 1; min-width: 0; }

.novel-empty { text-align: center; padding: 60px 20px; color: #999; font-size: 14px; }

/* 书籍详情 */
.novel-book-head { display: flex; gap: 28px; background: #fff; padding: 28px; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.04); margin-bottom: 24px; }
.novel-book-cover { width: 200px; flex-shrink: 0; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, #6366f1, #a855f7); display: flex; align-items: center; justify-content: center; }
.novel-book-cover img { width: 100%; height: 100%; object-fit: cover; }
.novel-book-cover .novel-card-placeholder { font-size: 60px; }
.novel-book-info { flex: 1; min-width: 0; }
.novel-book-info h1 { margin: 0 0 12px; font-size: 26px; }
.novel-book-meta { color: #666; font-size: 13.5px; margin-bottom: 16px; }
.novel-book-meta span { margin-right: 16px; }
.novel-book-summary { color: #555; line-height: 1.8; margin-bottom: 20px; }
.novel-book-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.novel-btn { display: inline-flex; align-items: center; padding: 9px 20px; border-radius: 8px; border: 1px solid #e5e7eb; background: #fff; color: #333; font-size: 14px; cursor: pointer; text-decoration: none; transition: all .15s; font-family: inherit; }
.novel-btn:hover { border-color: #2563eb; color: #2563eb; }
.novel-btn.primary { background: #2563eb; color: #fff; border-color: #2563eb; }
.novel-btn.primary:hover { background: #1d4ed8; }

/* 目录 */
.novel-chapter-list { list-style: none; padding: 0; margin: 0; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.novel-chapter-list li { border-bottom: 1px solid #f1f5f9; }
.novel-chapter-list li:last-child { border-bottom: 0; }
.novel-chapter-list a { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; color: #333; text-decoration: none; font-size: 14px; transition: all .15s; }
.novel-chapter-list a:hover { background: #f8fafc; color: #2563eb; }
.novel-chapter-vip { background: #fbbf24; color: #fff; font-size: 11px; padding: 1px 8px; border-radius: 10px; font-weight: 600; }

/* 阅读器 */
.novel-reader { max-width: 760px; margin: 0 auto; }
.novel-reader-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.novel-reader-top a { color: #555; text-decoration: none; font-size: 14px; }
.novel-reader-tools { display: flex; gap: 6px; }
.novel-reader-tools button { background: #fff; border: 1px solid #e5e7eb; padding: 5px 12px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.novel-reader-article { background: #fff; padding: 40px 48px; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.novel-reader-title { font-size: 24px; margin: 0 0 24px; text-align: center; }
.novel-reader-content { font-size: 16px; line-height: 1.8; color: #333; }
.novel-reader-content p { margin: 14px 0; text-indent: 2em; }
.novel-reader-nav { display: flex; justify-content: space-between; margin-top: 24px; font-size: 14px; }
.novel-reader-nav a { color: #2563eb; text-decoration: none; }

/* 阅读器主题 */
.novel-reader.theme-sepia { background: #fbf3e0; padding: 20px; border-radius: 12px; }
.novel-reader.theme-sepia .novel-reader-article { background: #fdf8ec; }
.novel-reader.theme-sepia .novel-reader-content { color: #5b4b32; }
.novel-reader.theme-dark { background: #1a1a1a; padding: 20px; border-radius: 12px; }
.novel-reader.theme-dark .novel-reader-article { background: #262626; }
.novel-reader.theme-dark .novel-reader-title,
.novel-reader.theme-dark .novel-reader-content { color: #d0d0d0; }
.novel-reader.theme-dark .novel-reader-top a { color: #aaa; }
.novel-reader.theme-dark .novel-reader-tools button { background: #333; border-color: #444; color: #ccc; }

/* Tabs */
.novel-tabs { display: flex; gap: 4px; border-bottom: 1px solid #e5e7eb; margin-bottom: 24px; }
.novel-tab { background: transparent; border: 0; padding: 12px 20px; cursor: pointer; font-size: 14.5px; color: #666; border-bottom: 2px solid transparent; margin-bottom: -1px; font-family: inherit; }
.novel-tab.active { color: #2563eb; border-color: #2563eb; font-weight: 600; }
.novel-tab-panel { display: block; }
.novel-tab-panel[hidden] { display: none; }

/* 历史 */
.novel-history-list { list-style: none; padding: 0; margin: 0; }
.novel-history-list li { background: #fff; margin-bottom: 8px; border-radius: 8px; padding: 0; box-shadow: 0 1px 3px rgba(0,0,0,.03); }
.novel-history-list a { display: flex; justify-content: space-between; padding: 14px 20px; color: #333; text-decoration: none; font-size: 14px; }
.novel-history-list a:hover { background: #f8fafc; }
.novel-history-book { font-weight: 600; }
.novel-history-chapter { color: #888; flex: 1; text-align: center; }
.novel-history-time { color: #aaa; font-size: 12.5px; }

/* 分页 */
.novel-body .pagination { margin: 30px 0; text-align: center; }
.novel-body .pagination a, .novel-body .pagination .current { display: inline-block; padding: 6px 12px; margin: 0 3px; background: #fff; border: 1px solid #e5e7eb; border-radius: 5px; color: #333; text-decoration: none; font-size: 13.5px; }
.novel-body .pagination .current { background: #2563eb; color: #fff; border-color: #2563eb; }

/* 页脚 */
.novel-footer { text-align: center; padding: 24px 0; color: #999; font-size: 13px; border-top: 1px solid #e5e7eb; background: #fff; }

@media (max-width: 768px) {
    .novel-header .novel-wrap { flex-wrap: wrap; gap: 12px; }
    .novel-search { width: 100%; }
    .novel-search input { flex: 1; width: auto; }
    .novel-layout { flex-direction: column; }
    .novel-sidebar { width: 100%; }
    .novel-book-head { flex-direction: column; }
    .novel-book-cover { width: 140px; margin: 0 auto; }
    .novel-reader-article { padding: 24px 20px; }
    .novel-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
}