/* ==================== 官方人设专区 v3 ==================== */

/* 入口按钮 */
.premium-zone-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 10px 12px 6px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 8px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #e8e8e8;
}
.premium-zone-btn .premium-icon { font-size: 15px; }

/* ==================== 遮罩 ==================== */
.premium-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}
.premium-overlay.show { opacity: 1; }

/* ==================== 主弹窗 ==================== */
.pm-modal {
    width: 92%;
    max-width: 380px;
    max-height: 88vh;
    background: #f5f6fa;
    border-radius: 16px;
    overflow: hidden;
    transform: scale(0.85) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 16px 48px rgba(0,0,0,0.25);
}
.premium-overlay.show .pm-modal { transform: scale(1) translateY(0); }

/* 头部 */
.pm-header {
    position: relative;
    padding: 28px 20px 22px;
    overflow: hidden;
}
.pm-header-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}
.pm-header-bg::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: -10%;
    width: 120%;
    height: 40px;
    background: #f5f6fa;
    border-radius: 50% 50% 0 0;
}
.pm-header-content { position: relative; z-index: 1; text-align: center; }
.pm-title { color: #fff; font-size: 20px; font-weight: 700; margin-bottom: 4px; text-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.pm-subtitle { color: rgba(255,255,255,0.85); font-size: 12px; }
.pm-close {
    position: absolute;
    top: 10px; right: 12px;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.pm-close:hover { background: rgba(255,255,255,0.35); }

/* 进度卡片 */
.pm-progress-card {
    margin: -8px 14px 0;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    position: relative;
    z-index: 1;
}
.pm-progress-left { text-align: center; flex-shrink: 0; }
.pm-progress-num { font-size: 28px; font-weight: 700; color: #667eea; line-height: 1; }
.pm-progress-num span { font-size: 14px; font-weight: 400; color: #bbb; }
.pm-progress-label { font-size: 11px; color: #999; margin-top: 2px; }
.pm-progress-right { flex: 1; }
.pm-progress-bar { height: 8px; background: #f0f0f0; border-radius: 4px; overflow: hidden; margin-bottom: 10px; }
.pm-progress-fill { height: 100%; background: linear-gradient(90deg, #667eea, #764ba2); border-radius: 4px; transition: width 0.6s ease; }
.pm-share-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.pm-share-btn:active { opacity: 0.85; }

/* 滚动区 */
.pm-body {
    max-height: 52vh;
    overflow-y: auto;
    padding: 14px 0;
    -webkit-overflow-scrolling: touch;
}
.pm-body::-webkit-scrollbar { width: 3px; }
.pm-body::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

/* 分组标题 */
.pm-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    padding: 8px 16px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pm-section-dot {
    display: inline-block;
    width: 4px;
    height: 14px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 2px;
}

/* 卡片网格 */
.pm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 14px 6px; }
.pm-card-wrap { position: relative; }
.pm-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid #f0f0f0;
    transition: border-color 0.2s, transform 0.15s;
}
.pm-card:active { transform: scale(0.97); }
.pm-card.unlocked { border-color: #667eea; }
.pm-card-cover { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; }
.pm-card-cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.pm-card-lock {
    position: absolute;
    top: 6px; right: 6px;
    width: 24px; height: 24px;
    background: rgba(0,0,0,0.55);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
    font-weight: 600;
}
.pm-card-badge {
    position: absolute;
    top: 6px; right: 6px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 9px;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 6px;
}
.pm-card-body { padding: 8px 6px 10px; text-align: center; }
.pm-card-name { color: #333; font-size: 12px; font-weight: 600; margin-bottom: 3px; }
.pm-card-desc {
    color: #999;
    font-size: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
    min-height: 28px;
}
.pm-card-btn {
    display: block;
    width: 100%;
    padding: 6px 4px;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}
.pm-card-btn:active { opacity: 0.8; }
.pm-card-btn.unlock { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; }
.pm-card-btn.use { background: #f0f2ff; color: #667eea; }

/* ==================== 分享面板 ==================== */
.share-panel-overlay { align-items: flex-end; }
.share-panel {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding-bottom: env(safe-area-inset-bottom, 12px);
    margin: 0 auto;
}
.share-panel-overlay.show .share-panel { transform: translateY(0); }

.sp-handle { width: 36px; height: 4px; background: rgba(255,255,255,0.4); border-radius: 2px; margin: 0 auto 10px; position: relative; z-index: 2; }

/* 分享面板头部 */
.sp-header { position: relative; padding: 14px 20px 22px; overflow: hidden; }
.sp-header-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.sp-header-bg::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: -10%;
    width: 120%;
    height: 20px;
    background: #fff;
    border-radius: 50% 50% 0 0;
}
.sp-header-inner { position: relative; z-index: 1; text-align: center; }
.sp-title { color: #fff; font-size: 18px; font-weight: 700; margin-bottom: 3px; }
.sp-desc { color: rgba(255,255,255,0.85); font-size: 12px; }

/* 渠道 */
.sp-channels { display: flex; justify-content: center; gap: 24px; padding: 18px 16px 16px; }
.sp-ch { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; transition: transform 0.15s; }
.sp-ch:active { transform: scale(0.93); }
.sp-ch-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}
.sp-qq { background: linear-gradient(135deg, #1296db, #0d7ec0); }
.sp-wx { background: linear-gradient(135deg, #07c160, #05a550); }
.sp-qz { background: linear-gradient(135deg, #ffbe00, #f5a623); }
.sp-cp { background: linear-gradient(135deg, #8e8e93, #636366); font-size: 16px; }
.sp-ch-name { font-size: 11px; color: #666; font-weight: 500; }

/* 文案预览 */
.sp-preview { margin: 0 16px 16px; }
.sp-preview-label { font-size: 11px; color: #999; margin-bottom: 6px; }
.sp-preview-box {
    background: #f8f8fa;
    border-radius: 10px;
    padding: 14px;
    border: 1px solid #f0f0f0;
}
.sp-preview-text { font-size: 12px; color: #555; line-height: 1.7; }

/* 确认按钮 */
.sp-btns { padding: 0 16px 18px; }
.sp-confirm {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.sp-confirm:disabled { background: #d0d0d0; cursor: not-allowed; }
.sp-confirm:active:not(:disabled) { opacity: 0.85; }

/* ==================== Toast ==================== */
.premium-toast {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    background: rgba(0,0,0,0.78);
    color: #fff;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s;
    text-align: center;
    max-width: 280px;
}
.premium-toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
