/* ======================================================================
 *  鱼珠商城 / 排行榜 / 称号 / 头像框 / 隐藏主题（shop.css）
 * ====================================================================== */

.shop-wrap,
.lb-wrap,
.user-wrap.theme-zone {
    padding: 20px 0 60px;
    transition: background 0.4s ease, color 0.4s ease;
}
.shop-wrap .news-breadcrumb,
.lb-wrap .news-breadcrumb { margin-bottom: 20px; }

/* ===================== 商城 Hero ===================== */
.shop-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 24px 28px;
    border-radius: 20px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--c-primary, #0066ff) 8%, var(--c-bg-card, #fff)), var(--c-bg-card, #fff));
    border: 1px solid color-mix(in srgb, var(--c-primary, #0066ff) 16%, transparent);
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.05);
}
.shop-balance { display: flex; align-items: center; gap: 14px; }
.shop-balance-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    display: grid; place-items: center;
    font-size: 30px;
    background: linear-gradient(135deg, #ffe9c4, #ffd08a);
    box-shadow: 0 6px 14px rgba(255, 170, 60, 0.35);
}
.shop-balance-label { font-size: 13px; color: var(--c-text-sub, #5b6478); }
.shop-balance-num {
    font-size: 34px; font-weight: 900;
    color: var(--c-text, #1a1f36);
    letter-spacing: -0.02em;
    line-height: 1.05;
}
.shop-earn-btn { white-space: nowrap; }

.shop-preview { flex: 1; min-width: 240px; }
.shop-preview-title { font-size: 12px; color: var(--c-text-muted, #8a93a8); margin-bottom: 8px; letter-spacing: 0.08em; }
.shop-preview-row { display: flex; align-items: center; gap: 14px; }
.shop-avatar {
    width: 64px; height: 64px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--c-primary, #0066ff) 0%, var(--c-accent-cyan, #00d4ff) 100%);
    display: grid; place-items: center;
    color: #fff; font-size: 28px; font-weight: 800;
    flex-shrink: 0;
}
.shop-avatar .user-avatar-letter { line-height: 1; text-transform: uppercase; }
.shop-preview-meta { min-width: 0; }
.shop-preview-name {
    font-size: 18px; font-weight: 800;
    color: var(--c-text, #1a1f36);
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.shop-preview-sub { font-size: 13px; color: var(--c-text-sub, #5b6478); display: flex; gap: 6px; align-items: center; }
.shop-preview-sub .sep { color: var(--c-text-muted, #8a93a8); }

.shop-tip {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 22px;
    font-size: 13px;
    line-height: 1.7;
    background: color-mix(in srgb, var(--c-primary, #0066ff) 6%, transparent);
    color: var(--c-text-sub, #5b6478);
    border: 1px dashed color-mix(in srgb, var(--c-primary, #0066ff) 28%, transparent);
}
.shop-tip a { color: var(--c-primary, #0066ff); font-weight: 600; text-decoration: none; }

/* ===================== Tab ===================== */
.shop-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.shop-tab {
    padding: 10px 22px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--c-primary, #0066ff) 18%, transparent);
    background: var(--c-bg-card, #fff);
    color: var(--c-text-sub, #5b6478);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.shop-tab:hover { transform: translateY(-1px); }
.shop-tab.is-active {
    background: linear-gradient(135deg, var(--c-primary, #0066ff), var(--c-accent-cyan, #00d4ff));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--c-primary, #0066ff) 35%, transparent);
}
.shop-panel { display: none; }
.shop-panel.is-active { display: block; }

/* ===================== 商品卡 ===================== */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.shop-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 22px 18px 18px;
    background: var(--c-bg-card, #fff);
    border: 1px solid var(--c-border, #e8ebf3);
    border-radius: 18px;
    box-shadow: 0 4px 14px rgba(16, 24, 40, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.shop-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(16, 24, 40, 0.08); }
.shop-card.is-active {
    border-color: var(--c-primary, #0066ff);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-primary, #0066ff) 22%, transparent), 0 10px 24px rgba(16, 24, 40, 0.08);
}
.shop-card.is-owned { opacity: 0.92; }
.shop-card-icon { font-size: 46px; line-height: 1; margin: 6px 0 12px; }
.shop-card-name { font-size: 16px; font-weight: 800; color: var(--c-text, #1a1f36); margin-bottom: 6px; }
.shop-card-desc {
    font-size: 12.5px;
    color: var(--c-text-sub, #5b6478);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 10px;
}
.shop-card-price { font-size: 13px; margin-bottom: 12px; }
.shop-price-free { color: #10a37f; font-weight: 700; font-size: 12px; letter-spacing: 0.06em; }
.shop-price-num { color: var(--c-primary, #0066ff); font-weight: 800; }
.shop-btn { width: 100%; min-width: 0; }
.shop-btn[disabled] { opacity: 0.6; cursor: default; }

/* 头像框商品预览 */
.shop-frame-preview {
    width: 76px; height: 76px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #7fb3ff, #6be0ff);
    display: grid; place-items: center;
    font-size: 34px;
    margin: 0 auto;
}
.shop-frame-preview span { line-height: 1; }

/* 主题商品预览 */
.shop-theme-preview {
    width: 100%;
    height: 72px;
    border-radius: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
}
.shop-theme-emoji { font-size: 26px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25)); }
.shop-theme-bars { display: flex; flex-direction: column; gap: 4px; }
.shop-theme-bars i { display: block; width: 42px; height: 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.85); }

/* ===================== 称号徽章 ===================== */
.utitle-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    vertical-align: middle;
    white-space: nowrap;
}
.utitle-newbie    { background: #eef1f5; color: #7a8699; }
.utitle-smallfish { background: #e3f2fd; color: #1e88e5; }
.utitle-oldhand   { background: #fff3e0; color: #ef6c00; }
.utitle-killer    { background: #fce4ec; color: #d81b60; }
.utitle-master    { background: #ede7f6; color: #673ab7; }
.utitle-king      { background: linear-gradient(135deg, #ffd54f, #ff8f00); color: #5d3a00; }

/* ===================== 头像框 ===================== */
.uframe-wood {
    box-shadow: 0 0 0 3px #8b6a4f, 0 0 0 6px #e8d5b7, 0 6px 16px rgba(139, 106, 79, 0.35);
}
.uframe-shell {
    box-shadow: 0 0 0 3px #f2b8d8, 0 0 0 6px #fdeaf5, 0 0 18px rgba(255, 150, 210, 0.5);
}
.uframe-goldfish {
    box-shadow: 0 0 0 3px #f5b942, 0 0 0 6px #ffe9b8, 0 0 18px rgba(255, 180, 60, 0.55);
}
.uframe-rainbow {
    box-shadow: 0 0 0 3px #ff6b9d, 0 0 0 6px #ffb84d, 0 0 0 9px #4dd0e1, 0 0 20px rgba(255, 107, 157, 0.45);
}
.uframe-starry {
    box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px #2b2b55, 0 0 0 9px #6d5cae, 0 0 20px rgba(130, 150, 255, 0.7);
}

/* ===================== 排行榜 ===================== */
.lb-head { margin-bottom: 22px; }
.lb-title { font-size: 26px; font-weight: 900; color: var(--c-text, #1a1f36); margin-bottom: 6px; letter-spacing: -0.01em; }
.lb-sub { font-size: 13.5px; color: var(--c-text-sub, #5b6478); line-height: 1.7; max-width: 720px; }

.lb-me {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    padding: 20px 26px;
    border-radius: 18px;
    margin-bottom: 22px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--c-primary, #0066ff) 8%, var(--c-bg-card, #fff)), var(--c-bg-card, #fff));
    border: 1px solid color-mix(in srgb, var(--c-primary, #0066ff) 16%, transparent);
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.05);
}
.lb-me-rank { display: flex; flex-direction: column; align-items: center; }
.lb-me-rank-num {
    font-size: 34px; font-weight: 900;
    background: linear-gradient(135deg, var(--c-primary, #0066ff), var(--c-accent-cyan, #00d4ff));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
}
.lb-me-rank-label { font-size: 12px; color: var(--c-text-muted, #8a93a8); margin-top: 4px; }
.lb-me-stats { display: flex; gap: 28px; flex: 1; flex-wrap: wrap; }
.lb-stat { display: flex; flex-direction: column; }
.lb-stat b { font-size: 22px; font-weight: 800; color: var(--c-text, #1a1f36); }
.lb-stat span { font-size: 12px; color: var(--c-text-muted, #8a93a8); }

.lb-board { display: flex; flex-direction: column; gap: 10px; }
.lb-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: var(--c-bg-card, #fff);
    border: 1px solid var(--c-border, #e8ebf3);
    border-radius: 16px;
    box-shadow: 0 3px 10px rgba(16, 24, 40, 0.03);
    transition: transform 0.2s ease;
}
.lb-row:hover { transform: translateX(4px); }
.lb-row.lb-top { border-left: 4px solid var(--c-primary, #0066ff); }
.lb-rank {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: grid; place-items: center;
    font-size: 17px; font-weight: 900;
    color: #6b7280;
    background: #f1f3f8;
    flex-shrink: 0;
}
.lb-rank-1 { background: linear-gradient(135deg, #ffd54f, #ff9800); color: #5d3a00; }
.lb-rank-2 { background: linear-gradient(135deg, #e2e8f0, #b0b8c4); color: #334155; }
.lb-rank-3 { background: linear-gradient(135deg, #ffe0b2, #ffab40); color: #6d3f00; }
.lb-avatar {
    width: 46px; height: 46px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--c-primary, #0066ff) 0%, var(--c-accent-cyan, #00d4ff) 100%);
    display: grid; place-items: center;
    color: #fff; font-size: 20px; font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 4px 10px color-mix(in srgb, var(--c-primary, #0066ff) 28%, transparent);
}
.lb-avatar span { line-height: 1; text-transform: uppercase; }
.lb-user { flex: 1; min-width: 0; }
.lb-name {
    font-size: 15px; font-weight: 700;
    color: var(--c-text, #1a1f36);
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap;
}
.lb-meta { font-size: 12.5px; color: var(--c-text-muted, #8a93a8); margin-top: 3px; }
.lb-points { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; }
.lb-points b { font-size: 20px; font-weight: 900; color: var(--c-primary, #0066ff); }
.lb-points span { font-size: 11.5px; color: var(--c-text-muted, #8a93a8); }

.lb-empty { text-align: center; padding: 60px 20px; }
.lb-empty-icon { font-size: 60px; margin-bottom: 14px; }
.lb-empty p { color: var(--c-text-sub, #5b6478); margin-bottom: 18px; }
.lb-foot { margin-top: 22px; text-align: center; font-size: 12.5px; color: var(--c-text-muted, #8a93a8); }

/* ===================== 主题（作用于 theme-zone 容器） ===================== */
.theme-daily.shop-wrap,
.theme-daily.user-wrap { background: transparent; }
.shop-theme-preview.theme-daily,
.theme-daily.shop-wrap,
.theme-daily.user-wrap { background: linear-gradient(160deg, #eef4ff 0%, #f9fbff 60%, #eef8f3 100%); }
.shop-theme-preview.theme-daily { color: #1a1f36; }

/* 深海蓝 */
.shop-theme-preview.theme-deep { background: linear-gradient(160deg, #0a1e3c 0%, #10406e 55%, #0c2c52 100%); }
.shop-wrap.theme-deep,
.user-wrap.theme-deep {
    background: linear-gradient(180deg, #0a1e3c 0%, #10406e 55%, #0a1e3c 100%);
    color: #e8f0fb;
}
.shop-wrap.theme-deep .shop-hero,
.user-wrap.theme-deep .user-hero {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
}
.shop-wrap.theme-deep .shop-card,
.shop-wrap.theme-deep .shop-tab,
.user-wrap.theme-deep .user-card {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    color: #e8f0fb;
}
.shop-wrap.theme-deep .shop-card-name,
.shop-wrap.theme-deep .shop-tab,
.user-wrap.theme-deep .user-card-head h2,
.user-wrap.theme-deep .user-streak-num,
.user-wrap.theme-deep .user-streak-sub,
.user-wrap.theme-deep .user-asset-summary { color: #e8f0fb; }
.shop-wrap.theme-deep .shop-card-desc,
.shop-wrap.theme-deep .shop-price-free,
.user-wrap.theme-deep .user-card-body,
.user-wrap.theme-deep .user-quick-list a { color: #b8cbe2; }
.shop-wrap.theme-deep .shop-balance-num,
.shop-wrap.theme-deep .shop-balance-label { color: #f0f6ff; }
.shop-wrap.theme-deep .shop-preview-name,
.shop-wrap.theme-deep .shop-preview-sub { color: #dce8f8; }
.shop-wrap.theme-deep .shop-tip { background: rgba(255, 255, 255, 0.07); color: #b8cbe2; border-color: rgba(255, 255, 255, 0.2); }
.shop-wrap.theme-deep .shop-tip a { color: #7fd0ff; }
.shop-wrap.theme-deep .shop-tab.is-active { background: linear-gradient(135deg, #1b8fd8, #35b8e8); color: #fff; }
.shop-wrap.theme-deep .shop-card.is-active { border-color: #6fc8f0; box-shadow: 0 0 0 2px rgba(111, 200, 240, 0.3); }

/* 落日橙 */
.shop-theme-preview.theme-sunset { background: linear-gradient(160deg, #ff7e3d 0%, #ffb86b 55%, #ff9360 100%); }
.shop-wrap.theme-sunset,
.user-wrap.theme-sunset {
    background: linear-gradient(180deg, #fff3e2 0%, #ffe0c0 55%, #fff6ea 100%);
    color: #5b3a1e;
}
.shop-wrap.theme-sunset .shop-hero,
.user-wrap.theme-sunset .user-hero {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(230, 150, 80, 0.28);
}
.shop-wrap.theme-sunset .shop-card,
.shop-wrap.theme-sunset .shop-tab,
.user-wrap.theme-sunset .user-card {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(230, 150, 80, 0.24);
}
.shop-wrap.theme-sunset .shop-tab.is-active { background: linear-gradient(135deg, #ff8f3d, #ffb25e); color: #fff; }
.shop-wrap.theme-sunset .shop-card.is-active { border-color: #ff8f3d; box-shadow: 0 0 0 2px rgba(255, 143, 61, 0.3); }

/* 午夜星海 */
.shop-theme-preview.theme-night {
    background:
        radial-gradient(1.5px 1.5px at 20% 30%, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 45% 70%, rgba(255,255,255,0.8), transparent),
        radial-gradient(2px 2px at 70% 22%, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 88% 60%, rgba(255,255,255,0.7), transparent),
        linear-gradient(160deg, #101431 0%, #1d2450 55%, #0d1128 100%);
}
.shop-wrap.theme-night,
.user-wrap.theme-night {
    background:
        radial-gradient(1.5px 1.5px at 18% 20%, rgba(255,255,255,0.35), transparent),
        radial-gradient(1px 1px at 35% 55%, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 62% 18%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 78% 65%, rgba(255,255,255,0.28), transparent),
        radial-gradient(1.5px 1.5px at 92% 32%, rgba(255,255,255,0.3), transparent),
        linear-gradient(180deg, #101431 0%, #1d2450 55%, #0d1128 100%);
    color: #e9ecfb;
}
.shop-wrap.theme-night .shop-hero,
.user-wrap.theme-night .user-hero {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(160, 180, 255, 0.2);
}
.shop-wrap.theme-night .shop-card,
.shop-wrap.theme-night .shop-tab,
.user-wrap.theme-night .user-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(160, 180, 255, 0.2);
    color: #e9ecfb;
}
.shop-wrap.theme-night .shop-card-name,
.shop-wrap.theme-night .shop-tab,
.user-wrap.theme-night .user-card-head h2,
.user-wrap.theme-night .user-streak-num,
.user-wrap.theme-night .user-streak-sub,
.user-wrap.theme-night .user-asset-summary { color: #e9ecfb; }
.shop-wrap.theme-night .shop-card-desc,
.shop-wrap.theme-night .shop-price-free,
.user-wrap.theme-night .user-card-body,
.user-wrap.theme-night .user-quick-list a { color: #b9c2e8; }
.shop-wrap.theme-night .shop-balance-num,
.shop-wrap.theme-night .shop-balance-label { color: #f2f4ff; }
.shop-wrap.theme-night .shop-preview-name,
.shop-wrap.theme-night .shop-preview-sub { color: #dde2fb; }
.shop-wrap.theme-night .shop-tip { background: rgba(255, 255, 255, 0.06); color: #b9c2e8; border-color: rgba(160, 180, 255, 0.25); }
.shop-wrap.theme-night .shop-tip a { color: #9db4ff; }
.shop-wrap.theme-night .shop-tab.is-active { background: linear-gradient(135deg, #6c5ce7, #a29bfe); color: #fff; }
.shop-wrap.theme-night .shop-card.is-active { border-color: #a29bfe; box-shadow: 0 0 0 2px rgba(162, 155, 254, 0.35); }

/* 深色主题下徽章/按钮保持可读 */
.shop-wrap.theme-deep .utitle-badge,
.shop-wrap.theme-night .utitle-badge,
.user-wrap.theme-deep .utitle-badge,
.user-wrap.theme-night .utitle-badge { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35); }

/* 排行榜页跟随环境（无主题时保持默认） */

/* ===================== 用户中心资产卡 ===================== */
.user-asset-summary { list-style: none; margin: 10px 0 14px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.user-asset-summary li { font-size: 13px; color: var(--c-text-sub, #5b6478); }
.user-asset-summary li b { color: var(--c-text, #1a1f36); font-weight: 700; }
.user-asset-btn { display: inline-block; text-decoration: none; }

/* ===================== 响应式 ===================== */
@media (max-width: 640px) {
    .shop-hero { flex-direction: column; align-items: flex-start; }
    .shop-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
    .shop-card { padding: 16px 12px 14px; }
    .shop-card-icon { font-size: 38px; }
    .lb-row { gap: 12px; padding: 12px 14px; }
    .lb-points b { font-size: 17px; }
    .lb-me-stats { gap: 18px; }
}

/* ===================== 轻量 toast ===================== */
.shop-toast {
    position: fixed;
    left: 50%;
    bottom: 44px;
    transform: translateX(-50%) translateY(16px);
    z-index: 999;
    max-width: min(90vw, 480px);
    padding: 12px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--c-primary, #0066ff), var(--c-accent-cyan, #00d4ff));
    box-shadow: 0 10px 28px rgba(16, 24, 40, 0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
    line-height: 1.5;
}
.shop-toast.is-err { background: linear-gradient(135deg, #ef4444, #f97316); }
.shop-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===================== 无障碍：减弱动画 ===================== */
@media (prefers-reduced-motion: reduce) {
    .shop-wrap, .lb-wrap, .user-wrap.theme-zone,
    .shop-card, .shop-tab, .lb-row {
        transition: none;
    }
    .shop-card:hover, .lb-row:hover { transform: none; }
}
