/* ============================================================
   reader.css —— 阅读页样式
   配合 public.css 的深色主题使用
   ============================================================ */

.reader {
    max-width: 780px;
    margin: 0 auto;
    padding: 28px 22px 90px;
}

/* ---------- 顶部信息条 ---------- */
.reader-meta {
    font-size: 13px;
    opacity: 0.6;
    text-align: center;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

/* ---------- 章节标题 ---------- */
#chapter-title {
    text-align: center;
    font-size: 1.7em;
    line-height: 1.5;
    margin: 10px 0 6px;
    font-weight: 600;
}

.reader-rule {
    width: 60px;
    height: 2px;
    margin: 0 auto 38px;
    background-color: rgba(251, 255, 0, 0.55);
    border: 0;
}

/* ---------- 正文 ---------- */
/* 选择器带上 .reader 是为了盖过 public.css 里的 p 规则 */
.reader article p {
    font-size: 17px;
    line-height: 2;
    text-indent: 2em;
    margin: 0 0 20px 0;
    letter-spacing: 0.3px;
    word-break: break-word;
}

.reader article p:last-child {
    margin-bottom: 0;
}

.reader article strong {
    color: #fff9a0;
}

/* 本章还没有正文时的提示 */
.reader .empty-note {
    text-align: center;
    text-indent: 0;
    opacity: 0.5;
    font-size: 15px;
    padding: 40px 0;
}

/* ---------- 底部翻页 ---------- */
.reader-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 56px;
    padding-top: 26px;
    border-top: 1px solid rgba(240, 241, 224, 0.18);
}

.reader-nav a {
    flex: 0 0 auto;
    padding: 11px 20px;
    border-radius: 10px;
    font-size: 15px;
    white-space: nowrap;
    background-color: rgba(251, 255, 0, 0.16);
    color: rgb(240, 241, 224);
    transition: background-color 0.15s ease;
}

.reader-nav a:hover {
    background-color: rgba(255, 252, 0, 0.42);
    color: rgb(7, 7, 7);
}

.reader-nav a.center {
    background-color: transparent;
    border: 1px solid rgba(240, 241, 224, 0.3);
}

.reader-nav a.center:hover {
    background-color: rgba(240, 241, 224, 0.15);
    color: rgb(240, 241, 224);
}

/* 首章没有上一章 / 末章没有下一章：变灰且不可点 */
.reader-nav a.disabled {
    opacity: 0.28;
    pointer-events: none;
}

/* ---------- 加载中 / 出错 ---------- */
.reader-status {
    text-align: center;
    padding: 80px 20px;
    opacity: 0.7;
    line-height: 1.9;
}

.reader-status .hint {
    display: block;
    margin-top: 18px;
    font-size: 13px;
    opacity: 0.65;
}

.reader-status code {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

/* ---------- 手机 ---------- */
@media only screen and (max-width: 768px) {
    .reader {
        padding: 20px 16px 70px;
    }

    #chapter-title {
        font-size: 1.35em;
    }

    .reader article p {
        font-size: 16px;
        line-height: 1.95;
    }

    .reader-nav {
        flex-wrap: wrap;
        gap: 10px;
    }

    .reader-nav a {
        flex: 1 1 auto;
        text-align: center;
        padding: 12px 10px;
    }

    .reader-nav a.center {
        flex-basis: 100%;
        order: 3;
    }
}
