/* ===== 等级/成就页 ===== */
.level-card {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.level-avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--bg-elevated); display: flex; align-items: center; justify-content: center; font-size: 1.8em; overflow: hidden; border: 3px solid var(--border); flex-shrink: 0; }
.level-avatar img { width: 100%; height: 100%; object-fit: cover; }
.level-info { flex: 1; }
.level-name { font-size: 1.12em; font-weight: 800; }
.level-rank { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 0.9em; }
.level-rank img { width: 20px; height: 20px; }
.level-rank-text { color: var(--accent); font-weight: 700; }
.level-streak { font-size: 0.75em; color: #f97316; font-weight: 600; }

.level-progress { margin: 0; padding: 8px 16px; }
.level-prog-bar { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.level-prog-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), #6366f1); transition: width 0.5s; }
.level-prog-text { font-size: 0.78em; color: var(--text-muted); margin-top: 4px; }

.level-badges-title { display: none; }
.level-badges { padding: 0 16px 16px; }

/* ===== 签到系统 ===== */
.checkin-btn {
    padding: 6px 14px; border-radius: 14px; font-size: 0.78em; font-weight: 600;
    background: var(--accent); color: #fff; cursor: pointer; transition: all 0.2s;
    white-space: nowrap; margin-left: auto; align-self: center;
}
.checkin-btn.checked { background: var(--text-muted); opacity: 0.5; cursor: default; }
.checkin-streak-hint {
    font-size: 0.68em; color: #f97316; font-weight: 700;
    margin-left: 8px; animation: pulse-glow 1.5s infinite;
}
@keyframes pulse-glow {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.pts-inner { display: flex; gap: 10px; }
.pts-checkin {
    flex: 1; background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 10px; padding: 10px 12px;
}
.pts-checkin-header {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.82em; font-weight: 700; margin-bottom: 6px;
}
.pts-checkin-count { font-size: 0.78em; color: #f97316; font-weight: 600; }
.pts-cal-weekdays {
    display: grid; grid-template-columns: repeat(7, 1fr); text-align: center;
    font-size: 0.6em; color: var(--text-muted); margin-bottom: 2px;
}
.pts-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.pts-cal-empty { padding: 2px 0; }
.pts-cal-day { padding: 2px 0; font-size: 0.66em; border-radius: 4px; position: relative; }
.pts-cal-day.checked::after {
    content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 3px; height: 3px; border-radius: 50%; background: var(--accent);
}
.pts-cal-day.today { color: var(--accent); font-weight: 700; }

/* 连续签到进度条 */
.pts-streak-bar { height: 4px; background: var(--border); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.pts-streak-fill { height: 100%; background: linear-gradient(90deg, #f97316, #ef4444); border-radius: 2px; transition: width 0.5s; }
.pts-streak-label { font-size: 0.6em; color: var(--text-muted); margin-top: 3px; text-align: center; }

.pts-rules {
    width: 110px; flex-shrink: 0; background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 10px; padding: 10px 12px;
}
.pts-rules-title { font-size: 0.82em; font-weight: 700; margin-bottom: 6px; }
.pts-rule-item { display: flex; justify-content: space-between; font-size: 0.7em; padding: 2px 0; color: var(--text-secondary); }
.pts-rule-val { color: var(--accent); font-weight: 600; }
.pts-rule-sub { font-size: 0.6em; color: var(--text-muted); margin-top: 4px; }

/* ===== Tab 切换 ===== */
.pts-tabs { display: flex; gap: 6px; margin-top: 8px; }
.pts-tab {
    padding: 5px 12px; border-radius: 8px; font-size: 0.78em; font-weight: 600;
    background: var(--bg-hover); color: var(--text-muted); cursor: pointer; transition: all 0.2s;
}
.pts-tab.active { background: var(--accent); color: #fff; }

/* ===== 商城列表 ===== */
.pts-shop-group { margin-bottom: 8px; }
.pts-shop-group-title {
    font-size: 0.76em; font-weight: 700; color: var(--text-muted);
    padding: 4px 0 2px; margin-top: 6px;
}
.pts-shop-list { margin-top: 4px; }
.pts-shop-row {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 8px; margin-bottom: 4px; cursor: pointer; transition: border-color 0.2s;
}
.pts-shop-row:active { border-color: var(--accent); }
.pts-sr-icon { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; font-size: 1.1em; }
.pts-sr-info { flex: 1; min-width: 0; }
.pts-sr-name { font-size: 0.8em; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.pts-sr-desc { font-size: 0.64em; color: var(--text-muted); }
.pts-sr-price { font-size: 0.8em; color: var(--accent); font-weight: 700; flex-shrink: 0; }
.pts-sr-price::after { content: '积分'; font-size: 0.7em; font-weight: 400; color: var(--text-muted); margin-left: 1px; }

/* 预览按钮 */
.pts-sr-preview {
    font-size: 0.7em; font-weight: 600; color: var(--accent);
    background: rgba(var(--accent-rgb, 99,102,241), 0.1);
    padding: 1px 6px; border-radius: 4px; cursor: pointer;
}
.pts-sr-preview:active { opacity: 0.6; }

/* ===== 预览弹窗 ===== */
.pts-preview-overlay {
    display: none; position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,0.5); align-items: center; justify-content: center;
    padding: 20px; animation: fadeIn 0.2s;
}
.pts-preview-card {
    background: var(--bg-elevated); border-radius: 14px; width: 100%; max-width: 320px;
    border: 1px solid var(--border-color); overflow: hidden;
}
.pts-preview-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; font-weight: 700; font-size: 0.9em;
    border-bottom: 1px solid var(--border-color);
}
.pts-preview-close { cursor: pointer; font-size: 1.2em; color: var(--text-muted); padding: 0 4px; }
.pts-preview-body { padding: 8px 0; }
.pts-preview-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; border-top: 1px solid var(--border-color);
}
.pts-preview-price { font-weight: 700; color: var(--accent); }
.pts-preview-buy {
    padding: 6px 16px; border-radius: 8px; font-size: 0.82em; font-weight: 600;
    background: var(--accent); color: #fff; cursor: pointer;
}
.pts-preview-buy:active { opacity: 0.8; }

/* ===== 我的物品 ===== */
.my-item .pts-sr-info { flex: 1; }
.pts-item-status { font-weight: 600; }
.pts-item-status.active { color: #22c55e; }
.pts-item-status.inactive { color: var(--text-muted); }
.pts-item-status.expired { color: #ef4444; }
.pts-item-action {
    font-size: 0.72em; font-weight: 600; padding: 3px 10px;
    border-radius: 6px; cursor: pointer; flex-shrink: 0;
}
.pts-item-action.activate {
    background: rgba(34,197,94,0.12); color: #22c55e; border: 1px solid rgba(34,197,94,0.3);
}
.pts-item-action.deactivate {
    background: rgba(239,68,68,0.08); color: #ef4444; border: 1px solid rgba(239,68,68,0.2);
}

/* ===== 成就 ===== */
.pts-ach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 6px; }
.pts-ach-card {
    padding: 7px; background: var(--bg-card); border-radius: 8px;
    border: 1px solid var(--border-color); display: flex; align-items: center; gap: 6px;
}
.pts-ach-card.locked { opacity: 0.35; }
.pts-ach-icon { font-size: 1em; }
.pts-ach-info { flex: 1; min-width: 0; }
.pts-ach-name { font-size: 0.76em; font-weight: 700; }
.pts-ach-desc { font-size: 0.6em; color: var(--text-muted); }

/* ===== 头像框全量预览弹窗 ===== */
.fg-card { max-width: 440px !important; width: 92vw; }
.fg-body { padding: 10px 14px; max-height: 72vh; overflow-y: auto; }
.fg-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px;
}
.fg-item {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 8px 4px; border-radius: 10px; border: 2px solid transparent;
    transition: all .15s; cursor: pointer; background: var(--bg-elevated);
}
.fg-item:active { transform: scale(0.93); }
.fg-item:hover { border-color: var(--border-color); }
.fg-item.selected { border-color: #3b82f6; background: rgba(59,130,246,0.1); }
.fg-item.owned { opacity: 0.85; }
.fg-item.owned.active { border-color: #22c55e; background: rgba(34,197,94,0.08); }
.fg-item-av-wrap {
    width: 44px; height: 44px; border-radius: 50%; position: relative;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-secondary); font-size: 1.3em; overflow: visible;
}
.fg-item-av { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; position: relative; z-index: 1; }
.fg-item-av-text { position: relative; z-index: 1; font-weight: 700; }
.fg-item-frame {
    position: absolute; inset: -5px; width: calc(100% + 10px); height: calc(100% + 10px);
    pointer-events: none; z-index: 3; object-fit: contain;
}
.fg-item-frame.svg { inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); }
.fg-item-id { font-size: 0.72em; font-weight: 700; color: var(--text-secondary); }
.fg-item-price { font-size: 0.62em; color: var(--accent); font-weight: 600; }
.fg-item.owned .fg-item-price { color: #22c55e; }
.fg-item.active .fg-item-price { color: #22c55e; }
.fg-footer { padding: 8px 16px; text-align: center; }
.fg-tip { font-size: 0.76em; color: var(--text-dim); }



/* ===== 商品详情弹窗 ===== */
.si-card { max-width: 340px !important; }
.si-body { padding: 16px 20px; text-align: center; }
.si-preview-box { margin-bottom: 16px; }
.si-preview-label { font-size: 0.78em; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; text-align: left; }

/* 颜色预览 */
.si-color-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.si-color-chip { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border-color); }
.si-color-name { font-size: 0.82em; font-weight: 600; padding: 4px 8px; }

/* 称号预览 */
.si-title-demo { display: flex; align-items: center; gap: 6px; justify-content: center; }
.si-title-user { font-weight: 700; font-size: 0.9em; }
.si-title-badge { font-size: 0.72em; font-weight: 700; border-radius: 4px; padding: 2px 8px; }

/* 背景预览 */
.si-bg-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.si-bg-chip { width: 56px; height: 40px; border-radius: 8px; border: 1px solid var(--border-color); }

/* 文字说明 */
.si-desc-text { font-size: 0.84em; color: var(--text-secondary); line-height: 1.5; }

/* 价格+余额 */
.si-price { font-size: 1.15em; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.si-balance { font-size: 0.8em; color: var(--text-secondary); margin-bottom: 14px; }
.si-insufficient { color: #ef4444; font-weight: 700; }

/* 按钮 */
.si-btn-wrap { display: flex; gap: 10px; justify-content: center; }
.si-btn {
    padding: 8px 20px; border-radius: 8px; font-size: 0.88em; font-weight: 600;
    border: none; cursor: pointer; transition: all .15s;
}
.si-btn:active { transform: scale(0.95); }
.si-btn.buy { background: var(--accent); color: #fff; }
.si-btn.cancel { background: var(--bg-elevated); color: var(--text-secondary); border: 1px solid var(--border-color); }

/* 价格范围标签 */
.pts-sr-price-range {
    font-size: 0.78em; color: var(--text-muted); font-weight: 600; flex-shrink: 0;
}

/* ===== 头像框确认弹窗 ===== */
.fg-confirm-card { max-width: 320px !important; }
.fg-confirm-body { padding: 20px; text-align: center; }
.fg-confirm-preview {
    display: flex; justify-content: center; margin-bottom: 16px;
}
.fg-confirm-av-wrap {
    width: 72px; height: 72px; border-radius: 50%; position: relative;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-secondary); font-size: 2em; overflow: visible;
}
.fg-confirm-av { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; position: relative; z-index: 1; }
.fg-confirm-av-text { position: relative; z-index: 1; font-weight: 700; }
.fg-confirm-frame {
    position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px);
    pointer-events: none; z-index: 3; object-fit: contain;
}
.fg-confirm-frame.svg { inset: -9px; width: calc(100% + 18px); height: calc(100% + 18px); }
.fg-confirm-info { text-align: center; }
.fg-confirm-id { font-size: 1.1em; font-weight: 700; margin-bottom: 6px; }
.fg-confirm-price { font-size: 1.2em; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.fg-confirm-balance { font-size: 0.82em; color: var(--text-secondary); margin-bottom: 14px; }
.fg-confirm-insufficient { color: #ef4444; font-weight: 700; }
.fg-confirm-owned { font-size: 0.88em; color: #22c55e; margin-bottom: 14px; }
.fg-confirm-btn-wrap { display: flex; gap: 10px; justify-content: center; }
.fg-confirm-btn {
    padding: 8px 20px; border-radius: 8px; font-size: 0.88em; font-weight: 600;
    border: none; cursor: pointer; transition: all .15s;
}
.fg-confirm-btn:active { transform: scale(0.95); }
.fg-confirm-btn.buy {
    background: var(--accent); color: #fff;
}
.fg-confirm-btn.activate {
    background: #22c55e; color: #fff;
}
.fg-confirm-btn.cancel {
    background: var(--bg-elevated); color: var(--text-secondary); border: 1px solid var(--border-color);
}


/* ===== 打赏弹窗 ===== */
.gift-card { max-width: 300px !important; }
.gift-body { padding: 16px 20px; }
.gift-panel { text-align: center; }
.gift-title { font-size: 0.9em; font-weight: 700; margin-bottom: 12px; }
.gift-amounts { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px; }
.gift-amt {
    width: 48px; height: 48px; border-radius: 10px; border: 2px solid var(--border-color);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    font-size: 1.1em; font-weight: 700; cursor: pointer; transition: all .15s;
    background: var(--bg-card);
}
.gift-amt span { font-size: 0.5em; font-weight: 400; color: var(--text-muted); }
.gift-amt:active { transform: scale(0.93); }
.gift-amt:hover { border-color: var(--accent); }
.gift-amt.selected { border-color: var(--accent); background: rgba(var(--accent-rgb,99,102,241),0.12); }
.gift-amt.disabled { opacity: 0.4; cursor: not-allowed; }
.gift-balance { font-size: 0.78em; color: var(--text-secondary); margin-bottom: 14px; }
.gift-btns { display: flex; gap: 10px; justify-content: center; }
.gift-confirm-btn {
    padding: 8px 20px; border-radius: 8px; font-size: 0.88em; font-weight: 600;
    background: var(--accent); color: #fff; border: none; cursor: pointer;
}
.gift-confirm-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.gift-confirm-btn:active:not(:disabled) { transform: scale(0.95); }
.gift-cancel-btn {
    padding: 8px 20px; border-radius: 8px; font-size: 0.88em; font-weight: 600;
    background: var(--bg-elevated); color: var(--text-secondary); border: 1px solid var(--border-color); cursor: pointer;
}

/* 帖子详情打赏按钮 */
.gift-btn {
    background: none; border: none; cursor: pointer; font-size: 0.84em; color: var(--text-secondary);
    display: inline-flex; align-items: center; gap: 2px;
}
.gift-btn:hover { color: #d4a843; }


@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* 颜色选择器 */
.si-color-pick-grid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 8px 0; }
.si-color-pick-item { transition: transform 0.15s, border-color 0.15s; }
.si-color-pick-item:hover { transform: scale(1.1); }
.si-color-pick-item:active { transform: scale(0.95); }


/* 称号管理 */
.pts-title-section { margin-bottom: 12px; }
.pts-title-header { font-size: 0.9em; font-weight: 600; margin-bottom: 8px; padding: 0 4px; }
.pts-title-list { display: flex; flex-wrap: wrap; gap: 6px; }
.pts-title-item {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 8px; cursor: pointer;
    background: var(--card-bg); border: 1px solid var(--border-color);
    transition: all 0.2s; font-size: 0.85em;
}
.pts-title-item:hover { border-color: #6366f1; }
.pts-title-item.active { background: rgba(99,102,241,0.1); border-color: #6366f1; }
.pti-name { font-weight: 600; }
.pti-style { font-size: 0.75em; padding: 2px 6px; border-radius: 4px; }
.pti-style-common { background: rgba(142,142,147,0.15); color: #8E8E93; }
.pti-style-rare { background: rgba(59,130,246,0.15); color: #3B82F6; }
.pti-style-epic { background: rgba(168,85,247,0.15); color: #A855F7; }
.pti-style-legendary { background: rgba(245,158,11,0.15); color: #F59E0B; }
.pti-style-official { background: rgba(239,68,68,0.15); color: #EF4444; }
.pti-style-iron { background: rgba(168,162,158,0.15); color: #A8A29E; }
.pti-style-strategy { background: rgba(217,119,6,0.15); color: #D97706; }
.pti-style-builder { background: rgba(22,163,74,0.15); color: #16A34A; }
.pti-style-war { background: rgba(220,38,38,0.15); color: #DC2626; }
.pti-style-tactical { background: rgba(100,116,139,0.15); color: #64748B; }
.pti-style-commander { background: rgba(59,130,246,0.15); color: #3B82F6; }
