/* ═══════════════════════════════════════════
   全民收藏网 — 全局样式
   玄幻古风 · 墨金朱砂 · 移动优先 · 瀑布流
   ═══════════════════════════════════════════ */

/* ── CSS 变量 ─────────────────────── */
:root {
    /* 金 — 主色调 */
    --gold: #D4A853;
    --gold-light: #F0D78C;
    --gold-dark: #A07828;
    --gold-glow: rgba(212,168,83,0.25);

    /* 墨 — 背景与卡片 */
    --bg: #0D0B08;
    --bg-light: #141210;
    --surface: #1A1712;
    --surface-light: #201C16;
    --surface-border: #2A2418;

    /* 朱砂 — 强调 */
    --vermillion: #C43A31;
    --vermillion-light: #E8554A;
    --vermillion-dark: #9B2822;

    /* 字 — 文本 */
    --text: #E8DCC8;
    --text-secondary: #A89880;
    --text-muted: #6B5F4F;

    /* 语义 */
    --success: #5B8C5A;
    --danger: #C0392B;

    /* 尺寸 */
    --nav-height: 48px;
    --banner-height: 36px;
    --category-height: 44px;
    --tab-bar-height: 56px;
    --card-radius: 8px;
    --btn-radius: 6px;
    --max-width: 1200px;

    /* 阴影 — 金光 */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
    --shadow-gold: 0 0 20px rgba(212,168,83,0.15);
    --shadow-gold-strong: 0 0 40px rgba(212,168,83,0.3);
    --shadow-overlay: 0 -4px 20px rgba(0,0,0,0.6);

    /* 动画 */
    --ease-out: cubic-bezier(0.25, 0.8, 0.25, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Reset ────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: "Noto Serif SC", "Source Han Serif CN", "STSong", "Songti SC",
                 "PingFang SC", "Microsoft YaHei", serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    padding-top: calc(var(--nav-height) + var(--banner-height));
    padding-bottom: var(--tab-bar-height);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* 背景纹理 — 墨韵暗纹 */
body::before {
    content: '';
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(212,168,83,0.04) 0%, transparent 70%),
        radial-gradient(ellipse at 85% 20%, rgba(212,168,83,0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 15% 60%, rgba(196,58,49,0.02) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(212,168,83,0.03) 0%, transparent 60%);
}

a { color: inherit; text-decoration: none; }
button { border: none; background: none; cursor: pointer; font: inherit; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
input, textarea { font: inherit; }

/* ── 通用组件 ─────────────────────── */
.icon-btn {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; color: var(--text-secondary);
}
.icon-btn:active { background: rgba(212,168,83,0.1); color: var(--gold); }
.icon-btn svg { width: 22px; height: 22px; }

/* 金钮 */
.btn-gold {
    background: linear-gradient(135deg, #C9A84C 0%, #B8922E 50%, #A07828 100%);
    color: #1A1410; font-size: 15px; font-weight: 700;
    border-radius: var(--btn-radius); padding: 12px 24px;
    transition: all 0.25s; letter-spacing: 1px;
    box-shadow: 0 4px 16px rgba(212,168,83,0.3);
    position: relative; overflow: hidden;
}
.btn-gold::after {
    content: ''; position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 1s;
}
.btn-gold:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(212,168,83,0.2);
}

.btn-primary {
    background: var(--gold-dark); color: var(--text);
    font-size: 15px; font-weight: 600;
    border-radius: var(--btn-radius); padding: 12px 24px;
    transition: all 0.2s; letter-spacing: 0.5px;
    border: 1px solid var(--gold);
}
.btn-primary:active { background: var(--gold); transform: scale(0.98); }

.btn-block { display: block; width: 100%; text-align: center; }

.btn-outline {
    display: inline-block; padding: 10px 18px;
    border: 1px solid var(--gold); border-radius: var(--btn-radius);
    color: var(--gold); font-size: 13px; font-weight: 600;
    text-align: center; transition: all 0.2s;
    background: rgba(212,168,83,0.05);
}
.btn-outline:active { background: rgba(212,168,83,0.15); }

.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 6px; }

.section-title {
    font-size: 15px; font-weight: 700; margin-bottom: 12px;
    color: var(--gold-light); padding-left: 2px;
    letter-spacing: 1px;
}

/* ── 顶部导航栏 ───────────────────── */
#top-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: var(--nav-height);
    background: rgba(13,11,8,0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(212,168,83,0.15);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 12px;
}

.nav-left { display: flex; align-items: center; gap: 8px; }
.logo-icon { width: 28px; height: 28px; filter: drop-shadow(0 0 6px rgba(212,168,83,0.4)); }
.logo-text {
    font-size: 17px; font-weight: 700; color: var(--gold-light);
    letter-spacing: 2px;
}

.nav-right { display: flex; gap: 4px; align-items: center; }

/* ── 理念横幅 ─────────────────────── */
#slogan-banner {
    position: fixed; top: var(--nav-height); left: 0; right: 0; z-index: 99;
    height: var(--banner-height);
    background: linear-gradient(90deg,
        rgba(160,120,40,0.15) 0%,
        rgba(212,168,83,0.25) 20%,
        rgba(212,168,83,0.3) 50%,
        rgba(212,168,83,0.25) 80%,
        rgba(160,120,40,0.15) 100%);
    border-bottom: 1px solid rgba(212,168,83,0.2);
    display: flex; align-items: center; justify-content: center;
    gap: 10px; overflow: hidden;
}
#slogan-banner .slogan-text {
    font-size: 12px; font-weight: 700; color: var(--gold-light);
    letter-spacing: 3px; white-space: nowrap;
    text-shadow: 0 0 10px rgba(212,168,83,0.5);
}
#slogan-banner .slogan-dot {
    width: 3px; height: 3px; border-radius: 50%;
    background: var(--gold); flex-shrink: 0;
    box-shadow: 0 0 4px var(--gold);
}

.mission-panel {
    max-width: 860px;
    margin: 18px auto 16px;
    padding: 0 12px;
    position: relative;
    display: flex;
    justify-content: center;
}

.mission-panel-user {
    margin-top: 16px;
    margin-bottom: 8px;
}

.mission-panel::before {
    content: '';
    position: absolute;
    inset: 18px 32px auto;
    height: 160px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(212,168,83,0.18) 0%, rgba(212,168,83,0.05) 45%, transparent 72%);
    filter: blur(10px);
    pointer-events: none;
}

.mission-panel::after {
    content: '';
    position: absolute;
    inset: 0 12px;
    border: 1px solid rgba(212,168,83,0.2);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(34,27,21,0.96), rgba(21,17,13,0.96)),
        radial-gradient(circle at 50% 0%, rgba(240,215,140,0.12), transparent 45%);
    box-shadow:
        inset 0 1px 0 rgba(240,215,140,0.08),
        0 18px 40px rgba(0,0,0,0.34),
        0 0 30px rgba(212,168,83,0.08);
    pointer-events: none;
}

.mission-panel > * {
    position: relative;
    z-index: 1;
}

.mission-core {
    width: min(100%, 720px);
    min-height: 228px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.mission-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    margin: 0 auto 18px;
    padding: 7px 18px 6px;
    font-size: 11px;
    color: var(--gold-light);
    letter-spacing: 5px;
    text-align: center;
    border: 1px solid rgba(212,168,83,0.24);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(212,168,83,0.12), rgba(212,168,83,0.04));
    box-shadow: 0 0 16px rgba(212,168,83,0.08);
}

.mission-title,
.mission-body {
    margin: 0 auto;
    max-width: 700px;
    padding-left: 24px;
    padding-right: 24px;
    text-align: center;
}

.mission-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 32px;
    line-height: 1.35;
    letter-spacing: 4px;
    font-weight: 800;
    text-shadow: 0 12px 26px rgba(0,0,0,0.32);
}

.mission-title-gold,
.mission-title-red {
    display: block;
}

.mission-title-gold {
    color: #f6dc99;
    text-shadow:
        0 0 14px rgba(246,220,153,0.34),
        0 10px 20px rgba(0,0,0,0.28);
}

.mission-title-red {
    color: #f6dc99;
    text-shadow:
        0 0 14px rgba(246,220,153,0.34),
        0 10px 20px rgba(0,0,0,0.28);
}

.mission-body {
    margin-top: 14px;
    padding-bottom: 26px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.8;
    color: #f0d3a6;
    letter-spacing: 2px;
}

.heritage-banner {
    max-width: 980px;
    margin: 18px auto 12px;
    padding: 0 12px;
}

.heritage-banner-user {
    margin-top: 22px;
    margin-bottom: 16px;
}

.heritage-banner-text {
    margin: 0;
    padding: 18px 26px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: 3px;
    color: #f1de9e;
    border: 1px solid rgba(212,168,83,0.2);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(41,31,24,0.96), rgba(25,19,15,0.96)),
        radial-gradient(circle at 50% 50%, rgba(212,168,83,0.14), transparent 60%);
    box-shadow:
        inset 0 1px 0 rgba(255,243,206,0.06),
        0 14px 28px rgba(0,0,0,0.28),
        0 0 28px rgba(212,168,83,0.08);
    text-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

/* ── 分类检索栏 ───────────────────── */
#category-bar {
    position: sticky; top: calc(var(--nav-height) + var(--banner-height));
    z-index: 98; background: rgba(20,18,16,0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(212,168,83,0.1);
    height: var(--category-height); overflow: hidden;
}

.category-list {
    display: flex; gap: 0; overflow-x: auto;
    scroll-behavior: smooth; -webkit-overflow-scrolling: touch;
    padding: 0 12px; height: 100%; align-items: center;
    scrollbar-width: none;
}
.category-list::-webkit-scrollbar { display: none; }

.category-item {
    flex-shrink: 0; padding: 6px 14px; font-size: 13px;
    color: var(--text-secondary); border-radius: 20px;
    transition: all 0.3s; white-space: nowrap; cursor: pointer;
    font-weight: 500; letter-spacing: 1px;
}
.category-item.active {
    color: var(--gold-light); font-weight: 700;
    background: rgba(212,168,83,0.12);
    box-shadow: 0 0 12px rgba(212,168,83,0.1);
}
.category-item:active { transform: scale(0.95); }

/* ═══════════════════════════════════
   瀑布流网格
   ═══════════════════════════════════ */
#item-feed {
    max-width: var(--max-width); margin: 0 auto;
    padding: 10px 8px; columns: 2; column-gap: 8px;
}

/* ── 商品卡片 — 墨金 ══════════════ */
.item-card {
    break-inside: avoid; margin-bottom: 8px;
    background: var(--surface);
    border: 1px solid rgba(212,168,83,0.12);
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    cursor: pointer;
    position: relative;
}
/* 卡片四角装饰 */
.item-card::before,
.item-card::after {
    content: ''; position: absolute; z-index: 1; pointer-events: none;
    width: 16px; height: 16px;
    border-color: rgba(212,168,83,0.25);
    border-style: solid;
    transition: border-color 0.3s;
}
.item-card::before { top: 4px; left: 4px; border-width: 1px 0 0 1px; border-radius: 2px 0 0 0; }
.item-card::after  { bottom: 4px; right: 4px; border-width: 0 1px 1px 0; border-radius: 0 0 2px 0; }

.item-card:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-md), var(--shadow-gold);
    border-color: rgba(212,168,83,0.3);
}

.card-cover {
    position: relative; background: #1a1712; overflow: hidden;
}
.card-cover img {
    width: 100%; display: block; aspect-ratio: 4/3;
    object-fit: cover; background: #1a1712;
    transition: transform 0.5s;
}

.card-category-tag {
    position: absolute; top: 8px; left: 8px;
    background: rgba(13,11,8,0.75); color: var(--gold-light);
    font-size: 10px; padding: 2px 8px; border-radius: 2px;
    font-weight: 500; letter-spacing: 1px;
    border: 1px solid rgba(212,168,83,0.2);
}

.card-body { padding: 10px 12px 12px; }

.card-title {
    font-size: 14px; font-weight: 700; line-height: 1.3;
    margin-bottom: 4px; color: var(--text);
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}

.card-desc {
    font-size: 11px; color: var(--text-secondary);
    line-height: 1.4; margin-bottom: 8px;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}

.card-price {
    font-size: 18px; font-weight: 700;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.card-footer {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 10px; color: var(--text-muted);
    border-top: 1px solid rgba(212,168,83,0.08); padding-top: 8px;
}
.card-auth {
    display: flex; align-items: center; gap: 3px;
    color: var(--gold); font-weight: 600; font-size: 10px;
}
.card-auth svg { width: 12px; height: 12px; }

/* ── 加载提示 ─────────────────────── */
#load-more { text-align: center; padding: 24px; color: var(--text-muted); font-size: 13px; }

.loading-spinner {
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.spinner {
    width: 18px; height: 18px; border: 2px solid rgba(212,168,83,0.15);
    border-top-color: var(--gold); border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════
   底部导航栏 — 中央发布按钮
   ═══════════════════════════════════ */
#bottom-tab-bar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    height: var(--tab-bar-height);
    background: rgba(13,11,8,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(212,168,83,0.12);
    display: flex; align-items: center; padding-bottom: env(safe-area-inset-bottom);
}

.tab-item {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 2px;
    color: var(--text-muted); font-size: 10px; transition: color 0.3s;
    position: relative;
}
.tab-item svg { width: 22px; height: 22px; }
.tab-item.active { color: var(--gold); }
.tab-item.active svg { filter: drop-shadow(0 0 4px rgba(212,168,83,0.4)); }

/* 中央发布钮 — 金环突起 */
.tab-item-publish {
    flex: 0 0 auto;
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, #E8C860, #C9A84C, #A07828);
    box-shadow: 0 -2px 16px rgba(212,168,83,0.5), 0 0 0 6px rgba(13,11,8,0.92);
    display: flex; align-items: center; justify-content: center;
    margin-top: -20px;
    transition: all 0.3s var(--ease-spring);
    animation: publish-glow 2.5s ease-in-out infinite;
}
.tab-item-publish svg { width: 26px; height: 26px; color: #1A1410; }
.tab-item-publish:active {
    transform: scale(0.9);
    box-shadow: 0 -2px 24px rgba(212,168,83,0.7), 0 0 0 6px rgba(13,11,8,0.92);
}

@keyframes publish-glow {
    0%, 100% { box-shadow: 0 -2px 16px rgba(212,168,83,0.5), 0 0 0 6px rgba(13,11,8,0.92); }
    50% { box-shadow: 0 -2px 28px rgba(212,168,83,0.7), 0 0 0 6px rgba(13,11,8,0.92); }
}

/* ═══════════════════════════════════
   商品详情浮层
   ═══════════════════════════════════ */
.detail-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: 200; background: var(--bg);
    transform: translateX(100%);
    transition: transform 0.35s var(--ease-out);
    display: flex; flex-direction: column; overflow: hidden;
}
.detail-overlay.open { transform: translateX(0); }

.detail-header {
    position: absolute; top: 0; left: 0; right: 0; z-index: 10;
    display: flex; justify-content: space-between; padding: 8px 12px;
}
.detail-header .icon-btn {
    background: rgba(13,11,8,0.85); backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm); color: var(--gold-light);
}

.detail-header-actions { display: flex; gap: 8px; }

/* 滚动容器 */
.detail-scroll {
    flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: 80px;
}

/* 封面 */
.detail-cover {
    width: 100%; aspect-ratio: 4/3; background: #1a1712; overflow: hidden;
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }

/* 基本信息 */
.detail-basic {
    background: var(--surface); padding: 16px; margin-bottom: 8px;
    border-bottom: 1px solid rgba(212,168,83,0.08);
}
.detail-basic .detail-category {
    display: inline-block; font-size: 11px;
    color: var(--gold-light); background: rgba(212,168,83,0.1);
    padding: 3px 10px; border-radius: 2px;
    margin-bottom: 8px; font-weight: 600; letter-spacing: 1px;
    border: 1px solid rgba(212,168,83,0.15);
}
.detail-title {
    font-size: 20px; font-weight: 700; line-height: 1.3; margin-bottom: 8px;
    color: var(--text); letter-spacing: 1px;
}
.detail-seller {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--text-secondary);
}
.seller-avatar {
    width: 24px; height: 24px; border-radius: 50%;
    background: rgba(212,168,83,0.15);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; color: var(--gold);
    border: 1px solid rgba(212,168,83,0.3);
}
.seller-badge {
    font-size: 10px; color: var(--gold-light);
    border: 1px solid rgba(212,168,83,0.3);
    border-radius: 2px; padding: 1px 6px;
    background: rgba(212,168,83,0.08);
}

/* 价格与属性 */
.detail-price-block {
    background: var(--surface); padding: 16px; margin-bottom: 8px;
}
.detail-price {
    font-size: 32px; font-weight: 700;
    background: linear-gradient(135deg, #F0D78C, #C9A84C, #D4A853);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px; letter-spacing: 2px;
}
.detail-attrs {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px;
}
.detail-attr {
    font-size: 13px; color: var(--text-secondary);
    padding: 8px 10px; background: rgba(212,168,83,0.04);
    border-radius: 4px; border-left: 2px solid rgba(212,168,83,0.2);
}
.detail-attr strong {
    color: var(--gold-light); font-weight: 600; margin-right: 4px;
}

/* 保真承诺区块 */
.detail-authenticity { background: var(--surface); padding: 16px; margin-bottom: 8px; }
.auth-card {
    background: linear-gradient(135deg, rgba(212,168,83,0.06), rgba(212,168,83,0.02));
    border: 1px solid rgba(212,168,83,0.2); border-radius: var(--btn-radius);
    padding: 16px; position: relative;
}
/* 封印装饰 */
.auth-card::after {
    content: '保真'; position: absolute; top: 10px; right: 12px;
    font-size: 11px; font-weight: 700; color: var(--vermillion);
    border: 1px solid var(--vermillion); border-radius: 2px;
    padding: 2px 8px; transform: rotate(8deg);
    opacity: 0.7; letter-spacing: 1px;
}
.auth-card-title {
    font-size: 13px; font-weight: 700; color: var(--gold-light);
    margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
    letter-spacing: 1px;
}
.auth-card-title svg { width: 16px; height: 16px; color: var(--gold); }
.auth-items { display: flex; flex-direction: column; gap: 8px; }
.auth-item {
    font-size: 12px; color: var(--text-secondary);
    display: flex; align-items: center; gap: 8px;
}
.auth-item svg { width: 14px; height: 14px; flex-shrink: 0; }
.auth-item .check { color: var(--gold); }
.auth-item .shield { color: var(--success); }

/* Tab 切换 */
.detail-tabs { background: var(--surface); margin-bottom: 8px; }
.tab-nav {
    display: flex; border-bottom: 1px solid rgba(212,168,83,0.1);
    position: sticky; top: 0; background: var(--surface);
}
.tab-btn {
    flex: 1; padding: 12px 0; font-size: 13px;
    color: var(--text-secondary); text-align: center;
    transition: all 0.3s; position: relative; font-weight: 500;
    letter-spacing: 1px;
}
.tab-btn::after {
    content: ''; position: absolute; bottom: 0; left: 50%;
    transform: translateX(-50%); width: 0; height: 2px;
    background: var(--gold); transition: width 0.3s;
    box-shadow: 0 0 6px rgba(212,168,83,0.5);
}
.tab-btn.active { color: var(--gold-light); font-weight: 700; }
.tab-btn.active::after { width: 32px; }

.tab-content { padding: 16px; }
.story-content { font-size: 14px; line-height: 1.8; color: var(--text-secondary); }
.story-content h3 {
    font-size: 16px; color: var(--gold-light); margin: 18px 0 10px;
    letter-spacing: 1px;
    padding-left: 10px; border-left: 2px solid var(--gold);
}
.story-content h3:first-child { margin-top: 0; }
.story-content p { margin-bottom: 10px; }
.story-content ul { padding-left: 18px; list-style: none; margin-bottom: 10px; }
.story-content li {
    margin-bottom: 4px; position: relative; padding-left: 14px;
}
.story-content li::before {
    content: '◆'; position: absolute; left: 0; color: var(--gold);
    font-size: 6px; top: 6px;
}

/* 留言 */
.comment-item {
    display: flex; gap: 10px; margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(212,168,83,0.06);
}
.comment-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(212,168,83,0.12); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: var(--gold); font-weight: 600;
    border: 1px solid rgba(212,168,83,0.2);
}
.comment-body { flex: 1; min-width: 0; }
.comment-author { font-size: 13px; font-weight: 600; display: inline; color: var(--text); }
.comment-time { font-size: 11px; color: var(--text-muted); display: inline; margin-left: 8px; }
.comment-text { font-size: 13px; color: var(--text-secondary); margin-top: 4px; line-height: 1.5; }
.comment-reply {
    margin-top: 8px; padding: 8px 10px;
    background: rgba(212,168,83,0.04);
    border-radius: 4px; font-size: 12px; color: var(--text-secondary);
    border-left: 2px solid rgba(212,168,83,0.2);
}
.reply-badge {
    font-size: 10px; color: var(--gold); font-weight: 600;
    display: block; margin-bottom: 2px;
}

/* 详情底部固定栏 */
.detail-bottom-bar {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 10px 16px; padding-bottom: max(10px, env(safe-area-inset-bottom));
    background: rgba(26,23,18,0.95); backdrop-filter: blur(12px);
    border-top: 1px solid rgba(212,168,83,0.15);
    box-shadow: var(--shadow-overlay); display: flex; gap: 10px;
}
.detail-bottom-bar .btn-outline { flex-shrink: 0; }
.detail-bottom-bar .btn-gold { flex: 1; }

/* ═══════════════════════════════════
   购买弹窗
   ═══════════════════════════════════ */
.modal-overlay {
    position: fixed; inset: 0; z-index: 300;
    background: rgba(0,0,0,0.7);
    display: flex; align-items: flex-end; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal-sheet {
    background: var(--surface);
    border: 1px solid rgba(212,168,83,0.15);
    border-bottom: none;
    border-radius: 16px 16px 0 0;
    width: 100%; max-width: 480px; max-height: 85vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.35s var(--ease-spring);
}
.modal-overlay.open .modal-sheet { transform: translateY(0); }

.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px;
    border-bottom: 1px solid rgba(212,168,83,0.1);
}
.modal-header h3 { font-size: 16px; color: var(--gold-light); letter-spacing: 1px; }
.modal-close {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
}
.modal-close svg { width: 20px; height: 20px; }

.modal-body { padding: 16px; }

.modal-item-summary {
    padding: 12px; background: rgba(212,168,83,0.06);
    border: 1px solid rgba(212,168,83,0.1);
    border-radius: var(--btn-radius); font-size: 14px;
    font-weight: 600; color: var(--gold-light); margin-bottom: 16px;
    display: flex; justify-content: space-between; align-items: center;
}

.modal-field { margin-bottom: 16px; }
.modal-field label {
    display: block; font-size: 13px; font-weight: 600;
    margin-bottom: 8px; color: var(--text-secondary);
}
.modal-field input[type="text"] {
    width: 100%;
    border: 1px solid rgba(212,168,83,0.15);
    border-radius: var(--btn-radius); padding: 10px 12px;
    font-size: 15px; outline: none;
    background: var(--bg-light); color: var(--text);
    transition: border-color 0.2s;
}
.modal-field input:focus { border-color: var(--gold); }

.payment-options { display: flex; gap: 12px; }
.payment-option {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 16px;
    border: 1px solid rgba(212,168,83,0.15);
    border-radius: var(--btn-radius); font-size: 13px;
    cursor: pointer; transition: all 0.2s;
    flex: 1; justify-content: center; color: var(--text-secondary);
    background: rgba(212,168,83,0.03);
}
.payment-option.selected {
    border-color: var(--gold); background: rgba(212,168,83,0.1);
    color: var(--gold-light);
}

.modal-total {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0; font-size: 15px; font-weight: 600;
}
.total-price {
    font-size: 24px; font-weight: 700;
    background: linear-gradient(135deg, #F0D78C, #C9A84C);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-agreement {
    font-size: 11px; color: var(--text-muted);
    text-align: center; margin-top: 12px;
}
.modal-agreement a { color: var(--gold); }

/* ═══════════════════════════════════
   登录弹窗
   ═══════════════════════════════════ */
.auth-tabs {
    display: flex; margin-bottom: 20px;
    background: var(--bg-light); border-radius: 8px; padding: 3px;
}
.auth-tab {
    flex: 1; padding: 8px 0; text-align: center;
    font-size: 14px; font-weight: 600; border-radius: 6px;
    color: var(--text-muted); transition: all 0.2s;
}
.auth-tab.active {
    background: var(--surface); color: var(--gold-light);
    box-shadow: var(--shadow-sm);
}

.flex-grow { flex: 1; }

.input-row { display: flex; gap: 8px; }
.btn-code {
    padding: 10px 14px;
    border: 1px solid var(--gold); border-radius: var(--btn-radius);
    color: var(--gold); font-size: 13px; white-space: nowrap;
    font-weight: 600; transition: all 0.2s; flex-shrink: 0;
    background: rgba(212,168,83,0.05);
}
.btn-code:disabled { opacity: 0.4; border-color: var(--text-muted); color: var(--text-muted); }

.btn-lg { padding: 14px 24px; font-size: 16px; border-radius: 8px; }

/* ═══════════════════════════════════
   导航扩展（子页面）
   ═══════════════════════════════════ */
.back-link {
    display: flex; align-items: center; gap: 4px;
    font-size: 14px; color: var(--text-secondary);
    padding: 4px 0;
}
.back-link svg { width: 20px; height: 20px; }

.nav-title { font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: 1px; }

.admin-badge {
    font-size: 10px;
    background: linear-gradient(135deg, var(--vermillion-dark), var(--vermillion));
    color: #F5E6D3; padding: 2px 10px; border-radius: 2px;
    font-weight: 600; letter-spacing: 1px;
}

/* ═══════════════════════════════════
   用户页
   ═══════════════════════════════════ */
.user-body { padding-top: var(--nav-height); padding-bottom: var(--tab-bar-height); }
.user-main { padding: 0 12px 40px; }

/* 用户卡片 */
.profile-card {
    background: var(--surface); border-radius: var(--card-radius);
    padding: 20px; margin-top: 12px;
    display: flex; align-items: center; gap: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(212,168,83,0.1);
}
.profile-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, #C9A84C, #7A5230);
    color: #1A1410; font-size: 20px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.profile-info { flex: 1; min-width: 0; }
.profile-name { font-size: 16px; font-weight: 700; margin-bottom: 2px; color: var(--text); }
.profile-phone { font-size: 13px; color: var(--text-muted); }

.btn-logout {
    font-size: 12px; color: var(--vermillion);
    padding: 6px 12px; border: 1px solid rgba(196,58,49,0.3);
    border-radius: var(--btn-radius); transition: all 0.2s;
    flex-shrink: 0; background: rgba(196,58,49,0.05);
}
.btn-logout:active { background: rgba(196,58,49,0.15); }

/* 页面内 Tab */
.page-tabs {
    display: flex;
    background: var(--surface);
    border-bottom: 1px solid rgba(212,168,83,0.1);
    position: sticky; top: var(--nav-height); z-index: 99;
    margin: 12px -12px 0;
}
.page-tab {
    flex: 1; padding: 12px 0; font-size: 13px; font-weight: 600;
    text-align: center; color: var(--text-secondary);
    position: relative; transition: all 0.3s; letter-spacing: 1px;
}
.page-tab::after {
    content: ''; position: absolute; bottom: 0; left: 50%;
    transform: translateX(-50%); width: 0; height: 2px;
    background: var(--gold); transition: width 0.3s;
    box-shadow: 0 0 6px rgba(212,168,83,0.4);
}
.page-tab.active { color: var(--gold-light); }
.page-tab.active::after { width: 32px; }

.tab-badge {
    font-size: 10px; background: var(--vermillion); color: #F5E6D3;
    padding: 1px 6px; border-radius: 8px; margin-left: 4px;
    font-weight: 700;
}

.page-panel { display: none; }
.page-panel.active { display: block; }

/* 表单系统 */
.form-section {
    background: var(--surface); padding: 16px; margin-bottom: 8px;
    border-radius: var(--card-radius);
    border: 1px solid rgba(212,168,83,0.08);
}

.form-group { margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }

.form-label {
    display: block; font-size: 13px; font-weight: 600;
    margin-bottom: 6px; color: var(--text-secondary);
}
.form-label.required::after { content: ' *'; color: var(--vermillion); }

.form-input, .form-textarea, .form-select {
    width: 100%;
    border: 1px solid rgba(212,168,83,0.12);
    border-radius: var(--btn-radius); padding: 10px 12px;
    font-size: 15px; outline: none;
    background: var(--bg-light); color: var(--text);
    transition: border-color 0.2s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: var(--gold);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23D4A853' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
    padding-right: 36px;
}

.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.form-row { display: flex; gap: 12px; }
.form-col { flex: 1; }
.form-col-sm { flex: 0 0 100px; }

/* 封面上传 */
.cover-upload { display: flex; align-items: center; gap: 8px; }
.cover-upload .form-input { flex: 1; }
.upload-divider { font-size: 12px; color: var(--text-muted); }

.btn-upload {
    padding: 10px 16px;
    border: 1px solid var(--gold); border-radius: var(--btn-radius);
    color: var(--gold); font-size: 13px; cursor: pointer;
    white-space: nowrap; transition: all 0.2s;
    background: rgba(212,168,83,0.05);
}
.btn-upload:active { background: rgba(212,168,83,0.15); }

.cover-preview {
    margin-top: 8px; position: relative; display: inline-block;
}
.cover-preview img {
    width: 200px; height: 120px; object-fit: cover;
    border-radius: 8px; border: 1px solid rgba(212,168,83,0.15);
}
.cover-remove {
    position: absolute; top: -6px; right: -6px;
    width: 22px; height: 22px; border-radius: 50%;
    background: rgba(0,0,0,0.7); color: var(--gold-light);
    font-size: 14px; line-height: 22px; text-align: center;
    cursor: pointer; border: 1px solid rgba(212,168,83,0.3);
}

.submit-bottom-spacer { height: 80px; }

/* 商品列表 */
.product-list-item {
    background: var(--surface); border-radius: var(--card-radius);
    padding: 14px; margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(212,168,83,0.08);
}
.product-list-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 6px;
}
.product-list-header h4 { font-size: 15px; font-weight: 600; flex: 1; margin-right: 8px; color: var(--text); }
.product-list-meta {
    display: flex; gap: 16px; font-size: 12px; color: var(--text-muted);
}
.product-list-stats {
    display: flex; gap: 16px; font-size: 12px; color: var(--text-secondary);
    margin-top: 6px; padding-top: 6px;
    border-top: 1px solid rgba(212,168,83,0.06);
}

/* 状态标签 */
.status-badge {
    display: inline-block; font-size: 11px; font-weight: 600;
    padding: 2px 8px; border-radius: 2px; letter-spacing: 1px;
}
.status-pending { background: rgba(212,168,83,0.1); color: var(--gold-light); border: 1px solid rgba(212,168,83,0.2); }
.status-approved { background: rgba(91,140,90,0.1); color: #7CB87B; border: 1px solid rgba(91,140,90,0.2); }
.status-rejected { background: rgba(196,58,49,0.08); color: var(--vermillion-light); border: 1px solid rgba(196,58,49,0.15); }

.profile-reject-reason {
    font-size: 12px; color: var(--vermillion-light);
    margin-top: 6px; padding-top: 6px;
    border-top: 1px solid rgba(196,58,49,0.1);
}

/* 审核管理 */
.admin-card {
    background: var(--surface); margin: 8px 0; padding: 16px;
    border-radius: var(--card-radius); box-shadow: var(--shadow-sm);
    border: 1px solid rgba(212,168,83,0.1);
}
.admin-card-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 8px;
}
.admin-card-title { font-size: 16px; font-weight: 600; flex: 1; margin-right: 8px; color: var(--text); }
.admin-card-meta {
    display: flex; flex-wrap: wrap; gap: 6px 16px;
    font-size: 12px; color: var(--text-muted); margin-bottom: 8px;
}
.admin-review-note {
    font-size: 13px; color: var(--gold-light);
    padding: 8px 10px; background: rgba(212,168,83,0.06);
    border-radius: 4px; margin-bottom: 8px;
}
.admin-actions { display: flex; gap: 10px; margin-top: 12px; }
.admin-actions button { flex: 1; text-align: center; }

.btn-success {
    background: var(--success); color: #fff;
    border-radius: var(--btn-radius); padding: 8px 16px;
    font-size: 13px; font-weight: 600; transition: all 0.2s;
}
.btn-success:active { opacity: 0.85; }

.btn-danger {
    background: var(--danger); color: #fff;
    border-radius: var(--btn-radius); padding: 8px 16px;
    font-size: 13px; font-weight: 600; transition: all 0.2s;
}
.btn-danger:active { opacity: 0.85; }

.admin-empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.profile-empty { text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 14px; }

/* ═══════════════════════════════════
   页脚 — 联系方式 + APP下载
   ═══════════════════════════════════ */
#site-footer {
    background: var(--surface);
    border-top: 1px solid rgba(212,168,83,0.15);
    padding: 0; margin-top: 4px;
    margin-bottom: 8px;
    position: relative;
}

/* APP 下载区 */
.footer-app-download {
    padding: 24px 16px;
    text-align: center;
}

.footer-section-title {
    font-size: 13px; font-weight: 600; color: var(--gold-light);
    letter-spacing: 2px; margin-bottom: 16px;
}

.app-download-grid {
    display: flex; gap: 10px;
    max-width: 520px; margin: 0 auto;
}

.app-download-card {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; gap: 4px;
    padding: 14px 8px;
    background: linear-gradient(180deg, rgba(212,168,83,0.06), rgba(212,168,83,0.02));
    border: 1px solid rgba(212,168,83,0.15);
    border-radius: var(--card-radius);
    transition: all 0.25s; cursor: pointer;
}
.app-download-card:active {
    border-color: var(--gold);
    background: rgba(212,168,83,0.12);
    transform: scale(0.97);
}
.app-download-card svg {
    width: 28px; height: 28px; color: var(--gold);
    margin-bottom: 4px;
}

.app-platform {
    font-size: 12px; font-weight: 700; color: var(--text);
    letter-spacing: 1px;
}
.app-store-name {
    font-size: 10px; color: var(--text-muted);
    margin-bottom: 6px;
}
.app-dl-btn {
    display: inline-block; font-size: 11px; font-weight: 700;
    color: var(--gold); border: 1px solid var(--gold);
    border-radius: 3px; padding: 2px 16px;
    letter-spacing: 2px;
    transition: all 0.2s;
}
.app-download-card:active .app-dl-btn {
    background: var(--gold); color: #1A1410;
}

/* 分隔线 */
.footer-divider {
    width: 60%; height: 1px; margin: 0 auto;
    background: linear-gradient(90deg, transparent, rgba(212,168,83,0.2), transparent);
}

.footer-inner {
    display: flex; flex-wrap: wrap; gap: 16px;
    max-width: var(--max-width); margin: 0 auto;
    padding: 20px 16px;
}

.footer-brand {
    flex: 1 1 100%;
    text-align: center; margin-bottom: 4px;
}
.footer-logo {
    display: block; font-size: 16px; font-weight: 700;
    color: var(--gold-light); letter-spacing: 3px;
}
.footer-slogan {
    display: block; font-size: 11px; color: var(--text-muted);
    margin-top: 4px; letter-spacing: 1px;
}

.footer-contact {
    flex: 1 1 200px;
    display: flex; flex-direction: column; gap: 8px;
}

.contact-item {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: var(--text-secondary);
}
.contact-item svg {
    width: 14px; height: 14px; flex-shrink: 0;
    color: var(--gold);
}

.footer-qr {
    flex: 0 0 auto;
    display: flex; flex-direction: column; align-items: center;
    gap: 6px; margin: 0 auto;
}
.qr-placeholder {
    width: 64px; height: 64px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(212,168,83,0.2);
    border-radius: 4px; background: rgba(212,168,83,0.03);
}
.qr-placeholder svg { width: 48px; height: 48px; color: var(--gold); }
.footer-qr span { font-size: 10px; color: var(--text-muted); }

.footer-bottom {
    text-align: center; margin-top: 16px; padding-top: 12px;
    border-top: 1px solid rgba(212,168,83,0.06);
    font-size: 11px; color: var(--text-muted); letter-spacing: 1px;
}

@media (min-width: 600px) {
    .footer-inner { flex-wrap: nowrap; align-items: flex-start; }
    .footer-brand { flex: 0 0 auto; text-align: left; }
    .footer-contact { flex: 1; }
    .footer-qr { margin: 0; }
}

/* ═══════════════════════════════════
   响应式
   ═══════════════════════════════════ */
@media (max-width: 360px) {
    #item-feed { columns: 1; padding: 8px 4px; }
    .item-card { margin-bottom: 6px; }
    .card-body { padding: 8px 10px 10px; }
}

@media (min-width: 600px) {
    #top-nav { padding: 0 20px; }
    .mission-panel { padding: 0 20px; }
    .heritage-banner { padding: 0 20px; }
    #item-feed { columns: 3; column-gap: 10px; padding: 12px 10px; }
    .item-card { margin-bottom: 10px; }
    .detail-cover { aspect-ratio: 16/9; }
}

@media (min-width: 960px) {
    #item-feed { columns: 4; column-gap: 12px; padding: 16px 12px; }
    .item-card { margin-bottom: 12px; }
    .item-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md), var(--shadow-gold);
        border-color: rgba(212,168,83,0.3);
    }
    .item-card:hover::before,
    .item-card:hover::after { border-color: rgba(212,168,83,0.5); }
    .app-download-card:hover {
        border-color: var(--gold);
        background: rgba(212,168,83,0.08);
    }
    .app-download-card:hover .app-dl-btn {
        background: var(--gold); color: #1A1410;
    }
}

@media (min-width: 1200px) {
    #item-feed { columns: 5; }
}

@media (max-height: 500px) and (orientation: landscape) {
    #item-feed { columns: 3; }
}

@media (max-width: 480px) {
    .mission-panel {
        margin-top: 14px;
    }

    .mission-panel::after {
        inset: 0 8px;
        border-radius: 16px;
    }

    .mission-core {
        min-height: 204px;
    }

    .mission-title {
        font-size: 21px;
        letter-spacing: 2px;
    }

    .mission-body {
        padding-bottom: 22px;
        font-size: 13px;
        letter-spacing: 1px;
    }

    .heritage-banner-text {
        padding: 15px 18px;
        font-size: 16px;
        letter-spacing: 2px;
    }
}
