* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f5f7fb;
    color: var(--text);
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
}
.container-top,.container{
    min-width: 900px;
}
.container-novel {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding-right: -10px;
    padding-left: -10px;
    transition: all 0.3s ease;
}
.detail-info{
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 5px 20px;
    transition: all 0.3s ease;
    background: var(--bg);
    border-radius: 10px;
}

/* 居中布局 */
.reader-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    margin-top: 20px;
}

/* 阅读内容区域 —— 按钮挂载父容器 */
.content-area {
    position: relative;
    width: 100%;
    max-width: 1000px;
    padding: 60px 40px;
    background: var(--bg);
    min-height: 100vh;
    transition: all 0.3s ease;
    box-shadow: 0 0 12px rgba(0,0,0,0.08);
    border-radius: 10px;
}

.chapter-title {
    font-size: 26px;
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

.chapter-content {
    font-size: 18px;
    line-height: 2;
    text-align: justify;
    color:var(--text);
}

.chapter-content p {
    margin-bottom: 24px;
    text-indent: 2em;
    word-break: break-all;
}

/* 翻页按钮 */
.turn-page {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
}

.page-btn {
    padding: 12px 30px;
    background: #3f7cff;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
}
.page-btn:hover{
    color: #fff;
    text-decoration: none;
    opacity: 0.8;
}

/* ======================
   核心：按钮组 绝对定位在 .content-area 右侧边框
====================== */
.tool-group {
    position: fixed;
    top: 200px;
    right: 10%;
    transform: translateX(100%);
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 99;
}

.tool-btn {
    width: 44px;
    height: 44px;
    background: #2c3e50;
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 0 6px 6px 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    transition: 0.2s;
}

.tool-btn:hover {
    background: #34495e;
    text-decoration: none;
    color: #fff;
}

/* 样式设置抽屉 */
.style-drawer {
    position: fixed;
    top: 50px;
    right: -340px;
    width: 340px;
    height: 100vh;
    background: #2c3e50;
    background: var(--bg);
    color: var(--text);
    padding: 30px 25px;
    overflow-y: auto;
    z-index: 999;
    transition: right 0.3s ease;
    box-shadow: -3px 0 15px rgba(0,0,0,0.3);
}

.style-drawer.show {
    right: 0;
}

.style-title {
    font-size: 18px;
    text-align: center;
    padding-bottom: 15px;
    margin-bottom: 25px;
    border-bottom: 1px solid #555;
}

.style-item {
    display: inline-block;
    padding: 7px 12px;
    margin: 4px;
    background: #3498db;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
}

.style-item.active {
    background: #27ae60;
}

/* 皮肤 */
/* 根变量（皮肤切换核心） */
:root {
    --bg: #ffffff;
    --text: #333333;
    --second: #666666;
    --border: #eeeeee;
    --card: #f9f9f9;
    --goText:#999999;
}
/* 护眼模式 */
.skin-eye {
    --bg: #f7f5ef;
    --text: #4a453f;
    --second: #7a7368;
    --border: #e6e2d9;
    --card: #f1ede4;
}
/* 夜间模式 */
.skin-night {
    --bg: #252424;
    --text: #d1d1d1;
    --second: #999999;
    --border: #333333;
    --card: #242424;
}

.skin-item {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-block;
    margin: 6px;
    cursor: pointer;
    border: 2px solid transparent;
}
.skin-item.active { border-color: #da4f49; }
.skin-day { background: #fafaf9; }
.skin-eye { background: #ece9e2; }
.skin-night { background: #1a1a1a; }

/* 章节列表弹窗 - 双列 */
.chapter-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
}

.chapter-box {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    background: #fff;
    width: 700px;
    max-height: 80vh;
    border-radius: 8px;
    overflow: hidden;
}

.chapter-box-header {
    padding: 18px;
    background: #2c3e50;
    color: #fff;
    display: flex;
    justify-content: space-between;
}

.close-chapter {
    font-size: 24px;
    cursor: pointer;
}

.chapter-scroll {
    max-height: 70vh;
    overflow-y: auto;
    padding: 15px;
}

.chapter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.chapter-list-item {
    padding: 12px;
    background: #f7f7f7;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
}

.chapter-list-item.active,
.chapter-list-item:hover {
    background: #3498db;
    color: #fff;
}

/* 顶部工具栏 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 99;
}
.progress {
    font-size: 14px;
    color: var(--second);
}

/* 小说详情 */
.book-info {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}
.book-cover {
    width: 110px;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.info-right h2 {
    font-size: 20px;
    margin-bottom: 6px;
}
.info-right p {
    font-size: 14px;
    color: var(--second);
    margin-bottom: 4px;
}
.desc {
    margin-top: 8px;
    font-size: 14px;
    line-height: 26px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width:200px;
}
.tool-btns button {
    padding: 8px 12px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    border-radius: 6px;
    cursor: pointer;
    flex: 1;
    font-weight: 600;
    font-size: 14px;
}
.tool-btns span {
    padding: 8px 12px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--goText);
    border-radius: 6px;
    flex: 1;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
}
.tool-btns button:hover{
    color: #D9534F;
    border: 1px solid #D9534F;
}
.disabled{
    background: #95a5a6;
    cursor: not-allowed;
}