/* ================= 常用工具基础调整 ================= */
.pt-15 { padding-top: 15px; }

/* ================= PC端双栏常规大布局 ================= */
.novel-detail-wrapper { display: flex; gap: 20px; margin-bottom: 35px; }
.novel-main-left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.novel-sidebar-right { width: 340px; flex-shrink: 0; }

/* ================= 小说主信息卡片布局 ================= */
.novel-profile-card { background: var(--card); border-radius: 12px; padding: 25px; display: flex; gap: 25px; box-shadow: 0 4px 20px rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.02); }
.novel-cover { width: 180px; height: 250px; border-radius: 8px; overflow: hidden; flex-shrink: 0; position: relative; box-shadow: 0 5px 15px rgba(0,0,0,0.4); }
.novel-cover img { width: 100%; height: 100%; object-fit: cover; }
.novel-status-badge { position: absolute; top: 8px; left: 8px; font-size: 11px; color: #fff; padding: 2px 6px; border-radius: 4px; font-weight: bold; background: #28a745; }

/* 基础元信息 */
.novel-meta-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.novel-title { font-size: 24px; color: #fff; font-weight: 700; margin: 0 0 12px 0; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.novel-author-row { font-size: 14px; color: #999; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.novel-author-row strong { color: #ddd; }
.novel-author-row .highlight { color: var(--main); }
.novel-author-row .cat-link:hover { color: var(--main); text-decoration: underline; }
.novel-author-row .split-line { color: #444; }

/* 数据展示区：精简保留独栋人气 */
.novel-stats-grid { display: flex; gap: 12px; margin-bottom: 18px; }
.stat-item { background: rgba(0,0,0,0.18); padding: 8px 15px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.03); display: flex; align-items: center; gap: 6px; font-size: 14px; color: #ccc; }
.text-main { color: var(--main); }

/* 小说简介区 */
.novel-intro { font-size: 14px; color: #aaa; line-height: 1.6; text-align: justify; margin: 0 0 20px 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* 按钮组 */
.novel-actions { display: flex; gap: 12px; margin-top: auto; }
.btn { height: 42px; padding: 0 22px; border-radius: 6px; font-size: 14.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: none; transition: all 0.2s ease; white-space: nowrap; }
.btn-primary { background: var(--main); color: #fff; }
.btn-primary:hover { background: var(--logo-accent); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(66,199,122,0.3); }
.btn-secondary { background: #4e4e58; color: #eee; }
.btn-secondary:hover { background: #5a5a66; color: #fff; }

/* ================= 章节目录核心架构 ================= */
.chapters-section { background: var(--card); border-radius: 12px; padding: 25px; box-shadow: 0 4px 20px rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.02); }
.chapters-header { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 1px solid #444; padding-bottom: 12px; margin-bottom: 20px; }
.chapters-header h3 { font-size: 18px; color: #fff; font-weight: 600; display: flex; align-items: center; gap: 8px; margin: 0; }
.chapters-header h3 i { color: var(--main); font-size: 20px; }
.chapters-header .update-time { font-size: 13px; color: #777; }

/* PC端默认采用高密度 3列网格 */
.chapters-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 18px; }
.chapter-item { font-size: 14px; color: #bbb; padding: 10px 12px; border-radius: 6px; background: rgba(0,0,0,0.15); border: 1px solid transparent; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.chapter-item:hover { color: #fff; background: #232328; border-color: rgba(47,158,98,0.3); }

/* 全端基础通用：章节超出部分严格省略号单行隐藏 */
.chapter-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* 最新章节状态 */
.chapter-item.latest { border-color: rgba(66, 199, 122, 0.25); background: rgba(66, 199, 122, 0.05); color: #fff; font-weight: 500; }
.chapter-item.latest:hover { background: rgba(66, 199, 122, 0.12); border-color: var(--logo-accent); }
.new-tag { background: var(--logo-accent); color: #fff; font-size: 11px; font-weight: bold; padding: 1px 4px; border-radius: 3px; transform: scale(0.85); flex-shrink: 0; }

/* 查看全部章节：跳转外链高拟真质感按钮 */
.chapters-more { text-align: center; margin-top: 25px; border-top: 1px dashed #444; padding-top: 20px; }
.btn-more-chapters { display: inline-flex; align-items: center; gap: 8px; background: none; border: 1px solid #555; color: #aaa; font-size: 13.5px; padding: 8px 32px; border-radius: 20px; transition: all 0.2s; text-decoration: none; font-weight: 500; }
.btn-more-chapters:hover { color: #fff; border-color: var(--main); background: rgba(47,158,98,0.1); box-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.btn-more-chapters i { font-size: 14px; color: var(--main); }

/* ================= 右侧边栏排行榜 ================= */
.sidebar-block { background: var(--card); border-radius: 12px; padding: 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.02); }
.sidebar-block-header { border-bottom: 1px solid #444; padding-bottom: 12px; margin-bottom: 15px; }
.sidebar-block-header h3 { font-size: 16px; color: #fff; font-weight: 600; display: flex; align-items: center; gap: 8px; margin: 0; }
.sidebar-block-header h3 i { color: var(--main); font-size: 18px; }

.rank-list { display: flex; flex-direction: column; gap: 2px; }
.rank-item { display: flex; align-items: center; padding: 10px 6px; border-radius: 6px; transition: background 0.2s; gap: 10px; }
.rank-item:hover { background: rgba(255,255,255,0.03); }
.rank-num { width: 22px; height: 22px; border-radius: 4px; background: #444; color: #aaa; font-size: 12px; font-weight: bold; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rank-num.num-1 { background: var(--logo-accent); color: #fff; }
.rank-num.num-2 { background: var(--main); color: #fff; }
.rank-num.num-3 { background: #5f9f76; color: #fff; }
.rank-name { font-size: 14px; color: #ccc; flex-grow: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-item:hover .rank-name { color: var(--main); }
.rank-value { font-size: 12px; color: #666; font-weight: 500; flex-shrink: 0; }

/* ================= 核心自适应响应式断点规则 ================= */
@media(max-width: 1200px) {
    .novel-detail-wrapper { flex-direction: column; }
    .novel-sidebar-right { width: 100%; }
    .rank-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

@media(max-width: 768px) {
    /* 1. 小说信息模块自适应：左封面右信息一体化 */
    .novel-profile-card { flex-direction: row; align-items: flex-start; padding: 12px; gap: 12px; text-align: left; }
    
    .novel-cover { width: 95px; height: 135px; border-radius: 6px; } 
    .novel-status-badge { top: 4px; left: 4px; font-size: 10px; padding: 1px 4px; }
    
    .novel-meta-info { width: calc(100% - 107px); align-items: flex-start; height: 135px; }
    .novel-title { font-size: 16px; margin-bottom: 4px; font-weight: bold; }
    .novel-author-row { font-size: 11px; flex-wrap: wrap; justify-content: flex-start; gap: 2px 6px; margin-bottom: 8px; }
    .novel-stats-grid { width: 100%; justify-content: flex-start; gap: 6px; margin-bottom: 0; }
    .stat-item { padding: 4px 8px; font-size: 11px; border-radius: 4px; background: rgba(0,0,0,0.25); }
    
    .novel-intro { display: none; } 

    /* 两大核心操作按钮，移动端并排按 1:1 分割扩展 */
    .novel-actions { width: 100%; gap: 6px; margin-top: auto; display: flex; flex-direction: row; }
    .btn { height: 32px; padding: 0 4px; font-size: 11.5px; border-radius: 4px; flex: 1; min-width: 0; justify-content: center; }
    .btn i { font-size: 12px; gap: 2px; }

    /* 2. 方案1重构：移动端强制一行只显示 1 个章节，配合省略号逻辑完美通栏 */
    .chapters-section { padding: 12px; border-radius: 8px; }
    .chapters-header { flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 12px; }
    .chapters-header h3 { font-size: 15px; }
    .chapters-header .update-time { font-size: 11px; color: #666; }
    
    /* 核心变动：改为单列通栏流布局 (1行1章) */
    .chapters-grid { grid-template-columns: repeat(1, 1fr); gap: 6px; width: 100%; } 
    .chapter-item { font-size: 12.5px; padding: 8px 10px; border-radius: 4px; gap: 6px; min-width: 0; }
    .new-tag { font-size: 8px; padding: 0 2px; }

    .rank-list { grid-template-columns: repeat(1, 1fr); gap: 0; }
}
