/* ==========================================================================
   index 模块样式（单篇文章展示版）
   只服务一个场景：把一篇文章读舒服。窄栏、大留白、无导航。
   注意：这是新模块专用样式，原 style.css 保留给 app/index_20261013 备份使用。
   ========================================================================== */

:root {
    --c-bg: #f7f8fb;
    --c-panel: #ffffff;
    --c-border: #e8ebf2;
    --c-text: #1f2733;
    --c-text-2: #5d6879;
    --c-text-3: #98a2b3;
    --c-primary: #2f6fed;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
    --wrap: 820px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    background: var(--c-bg);
    color: var(--c-text);
    font: 15px/1.75 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------------- 主体 ---------------- */
/* 页面没有页头与页脚，正文直接作为整页内容居中显示 */
.main { padding: 40px 20px 56px; }

/* ---------------- 正文卡片 ---------------- */
.detail {
    background: var(--c-panel);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 34px 38px 34px;
}

.detail-title { margin: 0 0 14px; font-size: 25px; line-height: 1.42; letter-spacing: .2px; }

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    color: var(--c-text-3);
    padding-bottom: 18px;
    border-bottom: 1px solid var(--c-border);
}

.chip {
    display: inline-block;
    font-size: 12px;
    color: var(--c-primary);
    background: #eaf1ff;
    border-radius: 20px;
    padding: 2px 10px;
}

.detail-summary {
    margin: 20px 0 0;
    padding: 14px 18px;
    background: #f7f9fd;
    border-left: 3px solid var(--c-primary);
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    color: var(--c-text-2);
}

.detail-content { margin-top: 22px; font-size: 15.5px; line-height: 1.9; color: #2b3446; }

.detail-content h2 {
    font-size: 19px;
    margin: 28px 0 12px;
    padding-left: 11px;
    border-left: 3px solid var(--c-primary);
}

.detail-content h3 { font-size: 16.5px; margin: 22px 0 10px; }
.detail-content p { margin: 14px 0; }
.detail-content ul, .detail-content ol { padding-left: 24px; margin: 14px 0; }
.detail-content li { margin: 6px 0; }
.detail-content img { max-width: 100%; height: auto; border-radius: 8px; }
.detail-content a { color: var(--c-primary); text-decoration: underline; }

.detail-content blockquote {
    margin: 18px 0;
    padding: 12px 18px;
    background: #f7f9fd;
    border-left: 3px solid #cddcff;
    border-radius: 0 8px 8px 0;
    color: var(--c-text-2);
}

.detail-content code {
    background: #f1f3f8;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 13.5px;
}

.detail-content pre {
    background: #f1f3f8;
    border-radius: 8px;
    padding: 14px 16px;
    overflow-x: auto;
}

.detail-content pre code { background: none; padding: 0; }

.detail-content table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; }

.detail-content th, .detail-content td {
    border: 1px solid var(--c-border);
    padding: 8px 12px;
    text-align: left;
}

.detail-content th { background: #f7f9fd; font-weight: 600; }

/* ---------------- 看不到文章时的红字提示 ---------------- */
/* 这种情况页面里只有一行文字，居中显示并标红（view/error/notice.html） */
.notice-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    background: var(--c-bg);
}

.notice-text {
    margin: 0;
    padding: 0 20px;
    color: #e03131;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: .5px;
    text-align: center;
}

/* ---------------- 微信授权引导弹窗 ---------------- */
/* 初始隐藏，用户第一次触碰屏幕后由 wx-auth.js 加上 .is-show 才显示 */
.wx-auth-mask {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 34px;
    background: rgba(0, 0, 0, .45);
    -webkit-tap-highlight-color: transparent;
}

.wx-auth-mask.is-show { display: flex; }

.wx-auth-dialog {
    width: 100%;
    max-width: 300px;
    padding: 26px 22px 20px;
    background: #fff;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
    animation: wx-auth-in .18s ease-out;
}

@keyframes wx-auth-in {
    from { opacity: 0; transform: scale(.94); }
    to   { opacity: 1; transform: scale(1); }
}

.wx-auth-tip {
    margin: 0 0 22px;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.wx-auth-btn {
    display: block;
    width: 100%;
    padding: 12px 0;
    border: 0;
    border-radius: 8px;
    background: #07c160;
    color: #fff;
    font-size: 16px;
    line-height: 1;
    font-family: inherit;
    cursor: pointer;
    -webkit-appearance: none;
}

.wx-auth-btn:active { background: #06ad56; }
.wx-auth-btn[disabled] { opacity: .7; cursor: default; }

/* 弹窗打开期间锁住页面滚动 */
html.wx-auth-lock,
body.wx-auth-lock { overflow: hidden; }

@media (max-width: 640px) {
    .main { padding: 20px 14px 34px; }
    .detail { padding: 24px 20px; }
    .detail-title { font-size: 21px; }
}
