/* ============ 未成年人保护模式 ============ */

/* 右侧悬浮入口按钮（跟随滚动固定显示） */
.minor-protect-btn {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 64px;
    padding: 16px 6px 14px;
    margin: 0;
    border: 1px solid #4facfe;
    border-right: none;
    border-radius: 14px 0 0 14px;
    background: rgba(255, 255, 255, 0.96);
    color: #4facfe;
    font-size: 12px;
    line-height: 1.35;
    cursor: pointer;
    transition: transform .25s, box-shadow .25s, background .25s;
    user-select: none;
    box-shadow: -3px 3px 14px rgba(79, 172, 254, 0.18);
}
.minor-protect-btn:hover {
    transform: translateY(-50%) translateX(-4px);
    background: #4facfe;
    color: #fff;
    box-shadow: -6px 4px 18px rgba(79, 172, 254, 0.35);
}
.minor-protect-btn .mp-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
    flex-shrink: 0;
}
.minor-protect-btn .mp-text {
    writing-mode: horizontal-tb;
    text-align: center;
    word-break: break-all;
}
/* 开启状态：贴边小竖条（未展开） */
.minor-protect-btn.mp-on {
    background: linear-gradient(180deg, #4facfe, #00c6ff);
    border-color: transparent;
    border-right: none;
    color: #fff;
    box-shadow: -3px 3px 14px rgba(79,172,254,0.45);
}
.minor-protect-btn.mp-on:hover {
    background: linear-gradient(180deg, #3aa0f0, #00b5ea);
}
/* 已开启展开为完整统计面板（宽度变宽，展开动画） */
.minor-protect-btn.mp-on.mp-expanded {
    width: 210px;
    padding: 16px 14px 14px;
    gap: 0;
    align-items: stretch;
    justify-content: flex-start;
    border-radius: 14px 0 0 14px;
    transition: width .28s ease, padding .28s ease, transform .25s, box-shadow .25s;
}
.minor-protect-btn.mp-on.mp-expanded:hover {
    transform: translateY(-50%) translateX(-4px);
}
/* 标题行：盾牌图标 + "保护中" + 呼吸点 */
.minor-protect-btn.mp-expanded .mp-icon {
    width: 22px;
    height: 22px;
    display: inline-block;
    vertical-align: middle;
}
.minor-protect-btn.mp-expanded .mp-text {
    display: inline-block;
    vertical-align: middle;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    text-align: left;
    margin-left: 6px;
}
/* 统计面板容器（仅展开态显示） */
.minor-protect-btn .mp-panel {
    display: none;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    font-size: 13px;
    color: #fff;
    text-align: left;
}
.minor-protect-btn.mp-expanded .mp-panel { display: block; }
.mp-panel__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 8px;
    line-height: 1.5;
}
.mp-panel__row:last-of-type { margin-bottom: 0; }
.mp-panel__label {
    color: rgba(255, 255, 255, 0.78);
    font-size: 12.5px;
}
.mp-panel__val {
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    letter-spacing: 0.3px;
}
.mp-panel__val--cd {
    font-family: "SF Mono", Consolas, "Courier New", monospace;
    font-size: 14px;
}
.mp-panel__foot {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed rgba(255, 255, 255, 0.3);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 11.5px;
    letter-spacing: 0.4px;
}
/* 面板内退出按钮（覆盖全局 a 样式） */
.mp-panel__exit,
.mp-panel__exit:link,
.mp-panel__exit:visited {
    display: block;
    margin-top: 12px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.9);
    color: #1a7fd4 !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background .2s, color .2s, transform .15s;
}
.mp-panel__exit:hover {
    background: #fff !important;
    color: #0b5fa5 !important;
    transform: translateY(-1px);
    text-shadow: none !important;
}
/* 未开启状态：计时/面板元素全部隐藏 */
.minor-protect-btn:not(.mp-on) .mp-panel,
.minor-protect-btn:not(.mp-on) .mp-timer { display: none; }
/* 已开启但未展开（过渡态）：panel 显示兜底 */
.minor-protect-btn.mp-on:not(.mp-expanded) .mp-panel { display: none; }
/* 状态呼吸点（绝对定位于右上角） */
.minor-protect-btn .mp-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #7CFC00;
    box-shadow: 0 0 6px #7CFC00;
    animation: mp-pulse 1.4s infinite;
}
@keyframes mp-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}
@media screen and (max-width: 767px) {
    .minor-protect-btn {
        width: 54px;
        padding: 12px 4px 10px;
        font-size: 11px;
        gap: 5px;
    }
    .minor-protect-btn .mp-icon { width: 20px; height: 20px; }
    .minor-protect-btn.mp-on.mp-expanded {
        width: 170px;
        padding: 14px 10px 12px;
    }
    .minor-protect-btn.mp-expanded .mp-text { font-size: 13px; }
    .mp-panel__label { font-size: 11.5px; }
    .mp-panel__val { font-size: 12.5px; }
    .mp-panel__val--cd { font-size: 13px; }
    .mp-panel__foot { font-size: 10.5px; }
}

/* ============ 通用弹窗 ============ */
.mp-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 19999999;
    display: none;
    align-items: center;
    justify-content: center;
}
.mp-mask.show { display: flex; }
.mp-dialog {
    width: 400px;
    max-width: 92%;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: mp-pop .25s ease;
}
@keyframes mp-pop {
    from { transform: scale(.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.mp-dialog__head {
    position: relative;
    padding: 22px 24px 14px;
    text-align: center;
    background: linear-gradient(135deg, #4facfe, #00c6ff);
    color: #fff;
}
.mp-dialog__close {
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 13px;
    line-height: 1;
    color: #fff;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 12px;
    padding: 5px 12px;
    cursor: pointer;
    user-select: none;
    transition: background .2s;
}
.mp-dialog__close:hover {
    background: rgba(255, 255, 255, 0.4);
}
.mp-dialog__head h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}
.mp-dialog__head p {
    margin: 6px 0 0;
    font-size: 12px;
    opacity: .9;
}
.mp-dialog__body {
    padding: 24px;
}
.mp-field {
    margin-bottom: 16px;
}
.mp-field label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
}
.mp-field input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
    transition: border-color .2s;
}
.mp-field input:focus {
    border-color: #4facfe;
}
.mp-tip {
    font-size: 12px;
    color: #999;
    margin: -8px 0 16px;
    line-height: 1.6;
    background: #f7f9fc;
    padding: 10px 12px;
    border-radius: 6px;
    border-left: 3px solid #4facfe;
}
.mp-dialog__foot {
    display: flex;
    gap: 12px;
    padding: 0 24px 24px;
}
.mp-btn {
    flex: 1;
    height: 42px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: all .2s;
}
.mp-btn-primary {
    background: linear-gradient(135deg, #4facfe, #00c6ff);
    color: #fff;
}
.mp-btn-primary:hover { opacity: .9; }
.mp-btn-ghost {
    background: #f2f4f8;
    color: #666;
}
.mp-btn-ghost:hover { background: #e6e9ef; }
.mp-err {
    color: #ef4444;
    font-size: 12px;
    margin-top: 6px;
    min-height: 16px;
}

/* ============ 全屏锁定遮罩（超时 / 夜间） ============ */
/* z-index 需高于 layui 弹层(19891014+)，避免被残留遮罩盖住导致链接不可点 */
.mp-lock {
    position: fixed;
    inset: 0;
    background: linear-gradient(160deg, #0b1e3f 0%, #1a2d5e 100%);
    z-index: 19999990;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    padding: 20px;
}
.mp-lock.show { display: flex; }

/* 内容卡片容器（默认透明，跟随外层居中布局） */
.mp-lock__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* ============ 夜间模式：内容置顶 + 背景透明，页面内容可见 ============ */
.mp-lock--night {
    background: transparent;
    justify-content: flex-start;
    pointer-events: auto;
}
.mp-lock--night .mp-lock__inner {
    width: 92%;
    max-width: 640px;
    margin: 24px auto 0;
    padding: 26px 32px 24px;
    background: rgba(11, 30, 63, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(126, 179, 255, 0.25);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
    box-sizing: border-box;
}
.mp-lock--night .mp-lock__icon {
    width: 60px;
    height: 60px;
    margin-bottom: 14px;
}
.mp-lock--night .mp-lock__icon svg {
    width: 32px;
    height: 32px;
}
.mp-lock--night .mp-lock__title {
    font-size: 20px;
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.mp-lock--night .mp-lock__desc {
    font-size: 13px;
    line-height: 1.7;
}
.mp-lock--night .mp-lock__countdown {
    margin-top: 18px;
}
.mp-lock--night .mp-lock__links {
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}
@media screen and (max-width: 767px) {
    .mp-lock--night .mp-lock__inner {
        margin-top: 14px;
        padding: 20px 18px 18px;
    }
    .mp-lock--night .mp-lock__title { font-size: 18px; }
    .mp-lock--night .mp-lock__links { gap: 12px; }
}
.mp-lock__icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}
.mp-lock__icon svg {
    width: 48px;
    height: 48px;
    fill: #7eb3ff;
}
.mp-lock__title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 12px;
    letter-spacing: 2px;
}
.mp-lock__desc {
    font-size: 15px;
    line-height: 1.8;
    max-width: 480px;
    opacity: .85;
    margin: 0;
}
.mp-lock__countdown {
    margin-top: 28px;
    font-size: 14px;
    color: #7eb3ff;
    font-family: monospace;
}
.mp-lock__links {
    margin-top: 30px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}
/* 三个链接统一胶囊按钮样式（!important 覆盖站点全局 a 样式） */
.mp-lock__links a,
.mp-lock__links a:link,
.mp-lock__links a:visited {
    color: #ffffff !important;
    font-weight: 600;
    text-decoration: none;
    font-size: 13.5px;
    padding: 4px 14px 5px;
    background: rgba(126, 179, 255, 0.22);
    border: 1px solid rgba(126, 179, 255, 0.55);
    border-radius: 16px;
    transition: background .2s, border-color .2s, color .2s;
}
.mp-lock__links a:hover {
    background: rgba(126, 179, 255, 0.38);
    border-color: #bad8ff;
    color: #ffffff !important;
}
/* 夜间模式卡片为深色半透明底，按钮底色稍亮 */
.mp-lock--night .mp-lock__links a,
.mp-lock--night .mp-lock__links a:link,
.mp-lock--night .mp-lock__links a:visited {
    background: rgba(126, 179, 255, 0.28);
    border-color: rgba(150, 195, 255, 0.6);
    color: #ffffff !important;
}
.mp-lock--night .mp-lock__links a:hover {
    background: rgba(126, 179, 255, 0.45);
    color: #ffffff !important;
}

/* ============ 功能受限提示条 ============ */
.mp-restricted-tip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #fff3e0;
    border: 1px dashed #ff9a00;
    border-radius: 6px;
    color: #e65100;
    font-size: 12px;
    cursor: not-allowed;
}

/* 被隐藏的受限元素 */
.mp-hidden { display: none !important; }

/* 受限的评论输入 */
.mp-comment-disabled {
    opacity: .5 !important;
    pointer-events: none !important;
}
.mp-comment-disabled::after {
    content: "未成年人保护模式已开启，暂不支持评论互动";
    display: block;
    padding: 12px;
    color: #999;
    font-size: 13px;
    text-align: center;
    background: #f7f9fc;
    border-radius: 6px;
    pointer-events: none;
}

/* 付费章节拦截 */
.mp-chapter-locked {
    pointer-events: none !important;
    opacity: .5 !important;
}

/* 响应式：窄屏弹窗适配 */
@media screen and (max-width: 767px) {
    .mp-dialog { width: 92%; }
}

/* ============ 首页未成年人保护模式引导弹窗 ============ */
.mp-notice-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 19999995;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.mp-notice-mask.show { display: flex; }
.mp-notice {
    position: relative;
    width: 460px;
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 18px;
    padding: 38px 36px 30px;
    box-sizing: border-box;
    text-align: center;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
    animation: mpNoticeIn .35s ease;
}
@keyframes mpNoticeIn {
    from { opacity: 0; transform: translateY(24px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.mp-notice__close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 28px;
    height: 28px;
    line-height: 26px;
    font-size: 22px;
    color: #bbb;
    cursor: pointer;
    border-radius: 50%;
    transition: all .2s;
}
.mp-notice__close:hover {
    color: #666;
    background: #f2f3f5;
}
/* 绿色雨伞 + 对勾图标 */
.mp-notice__icon {
    position: relative;
    width: 86px;
    height: 86px;
    margin: 0 auto 14px;
}
.mp-umbrella {
    width: 76px;
    height: 76px;
    display: block;
    margin: 4px auto 0;
}
.mp-umbrella-check {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 30px;
    height: 30px;
    background: #52c41a;
    border: 2px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(82, 196, 26, 0.4);
}
.mp-umbrella-check svg {
    width: 16px;
    height: 16px;
}
.mp-notice__title {
    margin: 0 0 22px;
    font-size: 21px;
    font-weight: 500;
    color: #9aa0a8;
    letter-spacing: 1px;
}
.mp-notice__list {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    text-align: left;
}
.mp-notice__list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 18px;
    font-size: 14.5px;
    line-height: 1.65;
    color: #4a4f55;
}
.mp-notice__list li:last-child { margin-bottom: 0; }
.mp-notice__list i {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-right: 12px;
    margin-top: 1px;
    line-height: 22px;
    font-style: normal;
    font-size: 13px;
    color: #fff;
    text-align: center;
    background: #c4c9cf;
    border-radius: 50%;
}
.mp-notice__list span { flex: 1; }
.mp-notice__btn {
    display: block;
    width: 100%;
    height: 52px;
    line-height: 52px;
    border: none;
    border-radius: 26px;
    background: linear-gradient(135deg, #4a93f7, #3d7ef0);
    color: #fff;
    font-size: 18px;
    letter-spacing: 2px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(74, 126, 240, 0.35);
    transition: transform .15s, box-shadow .15s;
}
.mp-notice__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(74, 126, 240, 0.45);
}
.mp-notice__btn:active { transform: translateY(0); }
.mp-notice__later {
    display: inline-block;
    margin-top: 16px;
    color: #9aa0a8;
    font-size: 14px;
    text-decoration: none;
}
.mp-notice__later:hover { color: #666; }
@media screen and (max-width: 767px) {
    .mp-notice { padding: 30px 22px 24px; }
    .mp-notice__title { font-size: 19px; }
    .mp-notice__list li { font-size: 13.5px; }
    .mp-notice__btn { height: 48px; line-height: 48px; font-size: 16px; }
}

/* 条例依据说明行 */
.mp-notice__law {
    margin: -10px 0 18px;
    font-size: 12.5px;
    color: #b6bac0;
    letter-spacing: 0.5px;
}

/* ============ 内容过滤隐藏（条例：内容分级） ============ */
.mp-content-hidden {
    display: none !important;
}

/* ============ 条例规则清单（设置密码弹窗） ============ */
.mp-rule-list {
    margin-bottom: 16px;
    padding: 12px 14px;
    background: #f5f9ff;
    border: 1px solid #e0ecff;
    border-radius: 10px;
    text-align: left;
}
.mp-rule-list__title {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: #3d7ef0;
}
.mp-rule-list ul {
    margin: 0;
    padding: 0 0 0 18px;
    list-style: disc;
}
.mp-rule-list li {
    font-size: 12.5px;
    line-height: 1.9;
    color: #5a6270;
}
/* 监护人同意条款 */
.mp-tip--consent {
    color: #9aa0a8;
    font-size: 12px;
}

/* ============ 监护人使用统计 ============ */
.mp-stat {
    margin-bottom: 14px;
    padding: 10px 12px;
    background: #fff8ec;
    border: 1px solid #ffe4b8;
    border-radius: 10px;
    font-size: 13px;
    color: #8a6d3b;
    text-align: left;
}
.mp-stat b { color: #e08600; }

/* ============ 定时休息提醒（条例：防沉迷提示） ============ */
.mp-rest {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-120%);
    z-index: 19999996;
    opacity: 0;
    transition: transform .35s ease, opacity .35s ease;
    pointer-events: none;
}
.mp-rest.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.mp-rest__card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    border: 1px solid #eef0f3;
    max-width: 480px;
}
.mp-rest__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: #f0f9eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mp-rest__icon svg { width: 26px; height: 26px; }
.mp-rest__text h4 {
    margin: 0 0 4px;
    font-size: 15px;
    color: #333;
}
.mp-rest__text p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: #777;
}
.mp-rest__text b { color: #52c41a; }
.mp-rest__cd { color: #b0b4ba !important; }
.mp-rest__cd span { font-weight: 600; color: #52c41a; }
.mp-rest__ok {
    flex-shrink: 0;
    padding: 8px 16px;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, #4a93f7, #3d7ef0);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: opacity .2s;
}
.mp-rest__ok:hover { opacity: .88; }
@media screen and (max-width: 767px) {
    .mp-rest { left: 12px; right: 12px; transform: translateY(-120%); }
    .mp-rest.show { transform: translateY(0); }
    .mp-rest__card { max-width: 100%; }
}

