/* ===================== 全屏文章阅读 / 编辑页 ===================== */
#article-reader-view {
    display: none;
    flex-direction: column;
    height: 100%;
    background: var(--background-color);
    overflow: hidden;
}

#article-reader-view.active {
    display: flex;
}

.reader-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    flex-wrap: wrap;
}

.reader-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.reader-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 46vw;
}

.reader-format-badge {
    font-size: 12px;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1px 8px;
    flex: none;
}

.reader-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.reader-btn {
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.reader-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.reader-btn.primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.reader-btn.primary:hover {
    background: var(--primary-hover);
    color: #fff;
}

.reader-btn.danger:hover {
    border-color: var(--error-color);
    color: var(--error-color);
}

.reader-layout {
    flex: 1;
    display: flex;
    min-height: 0;
    overflow: hidden;
}

.reader-body {
    flex: 1;
    overflow-y: auto;
    padding: 40px 24px 80px;
    background: var(--background-color);
}

/* 阅读区：居中专栏，庄重排版 */
.reader-body > * {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.reader-body {
    font-size: 17px;
    line-height: 1.9;
    color: var(--text-primary);
}

.reader-body h1, .reader-body h2, .reader-body h3 {
    line-height: 1.4;
    margin: 1.4em auto 0.6em;
    font-weight: 700;
}

.reader-body p {
    margin: 0 auto 1.1em;
}

.reader-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
    margin: 1.2em auto;
}

.reader-body pre.reader-plain {
    white-space: pre-wrap;
    word-break: break-word;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 18px;
    font-size: 14px;
    line-height: 1.7;
}

.reader-empty {
    color: var(--text-secondary);
    text-align: center;
    margin-top: 80px;
}

.reader-side {
    width: 320px;
    flex: none;
    border-left: 1px solid var(--border-color);
    background: var(--surface-color);
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.reader-card {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
}

.reader-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.reader-card-head h3 {
    margin: 0;
    font-size: 15px;
    color: var(--text-primary);
}

.reader-score-overall {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-color);
}

.reader-score-overall.good { color: var(--success-color); }
.reader-score-overall.mid { color: var(--warning-color); }
.reader-score-overall.bad { color: var(--error-color); }

.reader-muted {
    color: var(--text-secondary);
    font-size: 13px;
}

.reader-score-row {
    margin-bottom: 12px;
}

.reader-score-row .reader-score-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.reader-score-bar {
    height: 8px;
    border-radius: 6px;
    background: var(--border-color);
    overflow: hidden;
}

.reader-score-bar > span {
    display: block;
    height: 100%;
    border-radius: 6px;
    background: var(--primary-color);
}

.reader-score-verdict {
    font-size: 14px;
    color: var(--text-primary);
    margin: 10px 0;
    padding: 10px 12px;
    background: var(--surface-color);
    border-left: 3px solid var(--primary-color);
    border-radius: 6px;
}

.reader-list-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 12px 0 6px;
}

.reader-list {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.reader-list li { margin-bottom: 4px; }

.reader-meta {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.9;
}

.reader-meta .meta-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.reader-meta .meta-row span:first-child { color: var(--text-secondary); }
.reader-meta .meta-row span:last-child { color: var(--text-primary); text-align: right; }

.reader-loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px;
    font-size: 13px;
}

.reader-optimize-card-btn {
    width: 100%;
    margin-top: 14px;
    padding: 9px 12px;
    border: 1px solid var(--primary-color);
    background: var(--primary-color);
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.reader-optimize-card-btn:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.reader-optimize-card-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
