/* =========================================================
   付费体系样式：价格角标 / 会员卡 / 购买弹窗 / 试读遮罩 / 我的
   主色沿用站点橙色 #ff6b35，会员金色 #d4a017
   ========================================================= */

/* ---------- 广场卡片：价格角标与锁 ---------- */
.plaza-card-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    color: #fff;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(2px);
}
.plaza-card-tag.tag-vip { background: linear-gradient(135deg, #d4a017, #f5c211); color: #4a3500; }
.plaza-card-tag.tag-paid { background: linear-gradient(135deg, #ff6b35, #ff9563); }
.plaza-card-tag.tag-class { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.plaza-card-tag.tag-member { background: rgba(37, 99, 235, .85); }
.plaza-card-tag.tag-pwd { background: rgba(107, 114, 128, .85); }

.plaza-card-price {
    margin-top: 8px;
    font-size: 18px;
    font-weight: 700;
    color: #ff6b35;
}
.plaza-card-price .free-tip { font-size: 12px; font-weight: 400; color: #059669; margin-left: 6px; }
.plaza-card-price .bought-tip { font-size: 12px; font-weight: 400; color: #6b7280; margin-left: 6px; }

.plaza-buy-btn {
    margin-top: 10px;
    width: 100%;
    padding: 8px 0;
    border: 0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #ff6b35, #ff9563);
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
}
.plaza-buy-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(255, 107, 53, .32); }
.plaza-buy-btn.vip { background: linear-gradient(135deg, #d4a017, #f5c211); color: #4a3500; }
.plaza-buy-btn.owned { background: #e5e7eb; color: #6b7280; cursor: default; }
.plaza-buy-btn.owned:hover { transform: none; box-shadow: none; }

/* ---------- 会员条（广场顶部） ---------- */
.pay-member-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff7e6, #fffdf8);
    border: 1px solid #ffe0b2;
}
.pay-member-bar.is-member {
    background: linear-gradient(135deg, #2b2b2b, #4a3500);
    border-color: #4a3500;
    color: #ffe9a8;
}
.pay-member-bar .mb-left { font-size: 14px; }
.pay-member-bar .mb-title { font-weight: 700; font-size: 15px; }
.pay-member-bar .mb-sub { opacity: .8; font-size: 12px; margin-top: 2px; }
.pay-member-btn {
    padding: 7px 18px;
    border: 0;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: #4a3500;
    background: linear-gradient(135deg, #f5c211, #d4a017);
    cursor: pointer;
    white-space: nowrap;
}
.pay-member-bar.is-member .pay-member-btn { background: rgba(255,255,255,.16); color: #ffe9a8; }

/* ---------- 购买弹窗 ---------- */
.kbpay-mask {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, .5);
}
.kbpay-mask.show { display: flex; }
.kbpay-modal {
    width: 420px;
    max-width: 100%;
    max-height: 92vh;
    overflow: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.kbpay-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 10px;
}
.kbpay-head h3 { margin: 0; font-size: 17px; color: #1f2937; }
.kbpay-close { cursor: pointer; font-size: 18px; color: #9ca3af; line-height: 1; }
.kbpay-close:hover { color: #4b5563; }
.kbpay-body { padding: 4px 18px 18px; }

.kbpay-goods {
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff7f2;
    border: 1px solid #ffe0d1;
}
.kbpay-goods .g-name { font-size: 15px; font-weight: 600; color: #1f2937; }
.kbpay-goods .g-desc { margin-top: 4px; font-size: 12px; color: #6b7280; }
.kbpay-goods .g-price { margin-top: 8px; font-size: 24px; font-weight: 700; color: #ff6b35; }
.kbpay-goods .g-price small { font-size: 13px; font-weight: 400; color: #6b7280; margin-left: 6px; }

.kbpay-plans { margin-top: 14px; display: grid; gap: 10px; }
.kbpay-plan {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .12s ease, background .12s ease;
}
.kbpay-plan:hover { border-color: #ffb494; }
.kbpay-plan.active { border-color: #ff6b35; background: #fff7f2; }
.kbpay-plan .p-name { font-size: 15px; font-weight: 600; }
.kbpay-plan .p-desc { font-size: 12px; color: #6b7280; margin-top: 2px; }
.kbpay-plan .p-price { font-size: 18px; font-weight: 700; color: #ff6b35; }
.kbpay-plan.active .p-price { color: #ff6b35; }

.kbpay-paytype { margin-top: 14px; display: flex; gap: 10px; }
.kbpay-paytype button {
    flex: 1;
    padding: 10px 0;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
}
.kbpay-paytype button.active { border-color: #ff6b35; color: #ff6b35; font-weight: 600; }

.kbpay-qr { margin-top: 14px; text-align: center; }
.kbpay-qr .qr-box {
    width: 210px;
    height: 210px;
    margin: 0 auto;
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
}
.kbpay-qr .qr-box canvas, .kbpay-qr .qr-box img { width: 100%; height: 100%; display: block; }
.kbpay-qr .qr-tip { margin-top: 10px; font-size: 13px; color: #6b7280; }
.kbpay-qr .qr-tip b { color: #ff6b35; }
.kbpay-qr .qr-wx-link {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 18px;
    border-radius: 8px;
    background: #07c160;
    color: #fff;
    font-size: 13px;
    text-decoration: none;
}
.kbpay-qr .qr-expire { margin-top: 6px; font-size: 12px; color: #9ca3af; }

.kbpay-code { margin-top: 14px; display: flex; gap: 8px; }
.kbpay-code input {
    flex: 1;
    padding: 10px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.kbpay-code input:focus { outline: none; border-color: #ff6b35; }
.kbpay-code button {
    padding: 0 20px;
    border: 0;
    border-radius: 10px;
    background: #ff6b35;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.kbpay-submit {
    margin-top: 16px;
    width: 100%;
    padding: 12px 0;
    border: 0;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #ff6b35, #ff9563);
    cursor: pointer;
}
.kbpay-submit:disabled { background: #d1d5db; cursor: not-allowed; }
.kbpay-tip { margin-top: 10px; font-size: 12px; color: #9ca3af; text-align: center; }

/* ---------- 试读遮罩（付费内容被截断时的购买引导） ---------- */
.kb-preview-box { position: relative; }
.kb-preview-fade {
    margin-top: 18px;
    padding: 22px 18px;
    text-align: center;
    border-radius: 12px;
    background: linear-gradient(180deg, #fff, #fff7f2);
    border: 1px solid #ffe0d1;
}
.kb-preview-fade .pf-title { font-size: 16px; font-weight: 700; color: #1f2937; }
.kb-preview-fade .pf-desc { margin-top: 6px; font-size: 13px; color: #6b7280; }
.kb-preview-fade .pf-price { margin: 10px 0 2px; font-size: 26px; font-weight: 700; color: #ff6b35; }
.kb-preview-fade .pf-actions { margin-top: 14px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.kb-preview-fade .pf-btn {
    padding: 10px 26px;
    border: 0;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, #ff6b35, #ff9563);
}
.kb-preview-fade .pf-btn.vip { background: linear-gradient(135deg, #d4a017, #f5c211); color: #4a3500; }
.kb-preview-fade .pf-btn.ghost { background: #fff; color: #ff6b35; border: 1px solid #ffc4a7; }

/* 付费内容禁止复制 */
.kb-anticopy {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
@media print { .kb-anticopy { display: none !important; } }

/* ---------- 我的（订单 / 已购 / 会员 / 兑换） ---------- */
.my-wrap { max-width: 1000px; margin: 0 auto; padding: 24px 16px 60px; }
.my-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 20px 22px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #ff8a4c, #ff6b35);
}
.my-hero.vip { background: linear-gradient(135deg, #3a2f00, #6b5200); }
.my-hero .h-title { font-size: 20px; font-weight: 700; }
.my-hero .h-sub { margin-top: 6px; font-size: 13px; opacity: .92; }
.my-hero .h-btn {
    padding: 9px 22px;
    border-radius: 999px;
    border: 0;
    font-size: 14px;
    font-weight: 600;
    color: #ff6b35;
    background: #fff;
    cursor: pointer;
}
.my-hero.vip .h-btn { color: #4a3500; background: linear-gradient(135deg, #f5c211, #d4a017); }

.my-stats { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.my-stat {
    flex: 1;
    min-width: 130px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #f0f0f0;
}
.my-stat .s-num { font-size: 22px; font-weight: 700; color: #1f2937; }
.my-stat .s-label { margin-top: 4px; font-size: 12px; color: #6b7280; }

.my-tabs { display: flex; gap: 8px; margin: 22px 0 14px; flex-wrap: wrap; }
.my-tab {
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
}
.my-tab.active { background: #ff6b35; border-color: #ff6b35; color: #fff; }

.my-panel { background: #fff; border: 1px solid #f0f0f0; border-radius: 12px; overflow: hidden; }
.my-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.my-table th, .my-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #f3f4f6; }
.my-table th { background: #fafafa; font-weight: 600; color: #4b5563; font-size: 13px; }
.my-table tr:last-child td { border-bottom: 0; }
.my-table .t-price { color: #ff6b35; font-weight: 600; }

.my-status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; }
.my-status.paid { background: #ecfdf5; color: #059669; }
.my-status.wait { background: #fff7ed; color: #d97706; }
.my-status.closed { background: #f3f4f6; color: #6b7280; }
.my-status.refund { background: #fef2f2; color: #dc2626; }

.my-empty { padding: 50px 20px; text-align: center; color: #9ca3af; font-size: 14px; }
.my-empty .e-ico { font-size: 40px; display: block; margin-bottom: 10px; }

.my-redeem { display: flex; gap: 10px; padding: 16px; flex-wrap: wrap; }
.my-redeem input {
    flex: 1;
    min-width: 220px;
    padding: 11px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    letter-spacing: 1px;
}
.my-redeem input:focus { outline: none; border-color: #ff6b35; }
.my-redeem button {
    padding: 0 26px;
    border: 0;
    border-radius: 10px;
    background: #ff6b35;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.my-redeem-tip { padding: 0 16px 16px; font-size: 12px; color: #9ca3af; }

.my-space-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    border-bottom: 1px solid #f3f4f6;
    flex-wrap: wrap;
}
.my-space-item:last-child { border-bottom: 0; }
.my-space-item .si-left { display: flex; align-items: center; gap: 10px; }
.my-space-item .si-icon { font-size: 22px; }
.my-space-item .si-name { font-size: 15px; font-weight: 600; }
.my-space-item .si-meta { font-size: 12px; color: #6b7280; margin-top: 2px; }
.my-space-item .si-btn {
    padding: 7px 18px;
    border-radius: 999px;
    border: 1px solid #ffc4a7;
    background: #fff;
    color: #ff6b35;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
}

/* ---------- 左侧目录：节点角标与知识库解锁条 ---------- */
.kn-node-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 4px;
    font-size: 11px;
    line-height: 17px;
    vertical-align: middle;
}
.kn-node-tag.tag-trial { background: #ecfdf5; color: #059669; }
.kn-node-tag.tag-lock { background: #fff7ed; color: #d97706; }

.kn-lock-tip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 8px 10px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
}
.kn-lock-btn {
    padding: 4px 12px;
    border: 0;
    border-radius: 999px;
    background: #ff6b35;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

/* ---------- 表单补充（新建 / 编辑知识库的付费配置） ---------- */
.plaza-form-tip {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.6;
    color: #8a94a6;
}
.plaza-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
}
.plaza-check input { width: 15px; height: 15px; cursor: pointer; }

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
    .kbpay-modal { width: 100%; }
    .my-table th:nth-child(n+4), .my-table td:nth-child(n+4) { display: none; }
    .pay-member-bar { padding: 10px 12px; }
}

/* =========================================================
 * 个人中心升级：首屏 / 统计 / 面板视觉与信息密度增强
 * ========================================================= */

.my-wrap { max-width: 1080px; }

/* ---- 首屏：渐变底 + 装饰 + 头像问候 ---- */
.my-hero {
    position: relative;
    overflow: hidden;
    padding: 24px 26px;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(120deg, #ff9a62, #ff6b35 55%, #ff4d6d);
    box-shadow: 0 14px 34px rgba(255, 107, 53, .25);
}
.my-hero::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, #ffd166, #06d6a0, #00b4d8, #8338ec, #ff006e);
}
.my-hero-deco {
    position: absolute;
    right: -60px; top: -70px;
    width: 240px; height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
}
.my-hero-deco::after {
    content: '';
    position: absolute;
    left: -120px; bottom: -140px;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 70%);
}
.my-hero-main { position: relative; display: flex; align-items: center; gap: 16px; min-width: 0; }
.my-avatar {
    width: 56px; height: 56px;
    flex: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 800;
    color: #ff6b35;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
}
.my-hero.vip .my-avatar { color: #a4760a; background: linear-gradient(135deg, #fff7e0, #ffe9ad); }
.my-hero-txt { min-width: 0; }
.my-hero .h-title { font-size: 21px; font-weight: 800; letter-spacing: .3px; }
.my-hero .h-sub { margin-top: 6px; font-size: 13px; opacity: .94; line-height: 1.6; }
.my-hero-badge {
    display: inline-block;
    margin-top: 9px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #b45309;
    background: rgba(255, 255, 255, .92);
    border-radius: 999px;
}
.my-hero.vip .my-hero-badge { color: #7c5a04; background: linear-gradient(135deg, #fff7e0, #ffe9ad); }
.my-hero-side { position: relative; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.my-hero .h-btn {
    padding: 10px 24px;
    border-radius: 999px;
    border: 0;
    font-size: 14px;
    font-weight: 700;
    color: #ff6b35;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .14);
    transition: transform .18s ease;
}
.my-hero .h-btn:hover { transform: translateY(-2px); }
.my-hero.vip .h-btn { color: #7c5a04; background: linear-gradient(135deg, #f5c211, #d4a017); }
.my-hero-links { display: flex; gap: 8px; }
.my-hero-links a {
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    transition: background .18s ease;
}
.my-hero-links a:hover { background: rgba(255, 255, 255, .32); }
.my-hero.vip { background: linear-gradient(120deg, #6b5200, #a4760a 55%, #c9971d); box-shadow: 0 14px 34px rgba(164, 118, 10, .28); }

/* ---- 统计：六格图标卡 ---- */
.my-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 16px; }
.my-stat {
    position: relative;
    padding: 16px 14px 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #eef0f5;
    box-shadow: 0 4px 14px rgba(24, 30, 48, .04);
    transition: transform .18s ease, box-shadow .18s ease;
}
.my-stat:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(24, 30, 48, .09); }
.my-stat .s-ico { position: absolute; top: 12px; right: 12px; font-size: 18px; opacity: .85; }
.my-stat .s-num { font-size: 24px; font-weight: 800; color: #1f2937; letter-spacing: .3px; }
.my-stat .s-num small { font-size: 12px; font-weight: 600; color: #8a94a6; margin-left: 2px; }
.my-stat .s-label { margin-top: 4px; font-size: 12px; color: #6b7280; }

/* ---- 面板与标签页统一质感 ---- */
.my-tabs { margin-top: 24px; }
.my-tab {
    padding: 8px 20px;
    border: 1px solid #eceff5;
    background: #fff;
    font-weight: 600;
    transition: all .18s ease;
}
.my-tab:hover { border-color: #ffc4a7; color: #ff6b35; }
.my-tab.active { background: linear-gradient(135deg, #ff8a4c, #ff6b35); border-color: transparent; color: #fff; box-shadow: 0 6px 14px rgba(255, 107, 53, .28); }

.my-panel { border: 1px solid #eef0f5; border-radius: 16px; box-shadow: 0 6px 18px rgba(24, 30, 48, .04); }
.my-empty { padding: 60px 20px; color: #9ca3af; }
.my-empty .e-ico { font-size: 46px; }

.my-space-item { transition: background .15s ease; }
.my-space-item:hover { background: #fffaf6; }

.my-redeem input {
    border: 1.5px solid #eceff5;
    border-radius: 12px;
    background: #fbfcfe;
}
.my-redeem button {
    background: linear-gradient(135deg, #ff8a4c, #ff6b35);
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 6px 14px rgba(255, 107, 53, .28);
}

/* ---- 个人中心移动端 ---- */
@media (max-width: 860px) {
    .my-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
    .my-hero { padding: 18px 16px; }
    .my-hero-main { flex-direction: row; }
    .my-hero-side { flex-direction: row; width: 100%; align-items: center; justify-content: space-between; margin-top: 4px; }
    .my-hero .h-title { font-size: 18px; }
    .my-avatar { width: 46px; height: 46px; font-size: 20px; }
    .my-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .my-stat { padding: 12px 12px 10px; }
    .my-stat .s-num { font-size: 20px; }
    .my-hero-links a { padding: 3px 10px; font-size: 11px; }
}
