/* ============================================================
   声卡商城 v2 · 小程序风格前台样式（黑金科技风）
   移动端优先；PC 端内容居中窄栏（max-width 520px）+ 两侧黑金氛围
   ============================================================ */

:root {
    --bg: #0a0a0f;
    --bg-2: #101018;
    --bg-3: #16161f;
    --card: #15151f;
    --card-2: #1c1c28;
    --line: rgba(212, 175, 55, .14);
    --gold: #d4af37;
    --gold-2: #f0d080;
    --gold-grad: linear-gradient(135deg, #f0d080 0%, #d4af37 60%, #b8942e 100%);
    --green: #3ecf7a;
    --red: #ff5a5f;
    --text: #eceaf2;
    --text-2: #a5a2b3;
    --text-3: #6f6d80;
    --radius: 16px;
    --tabbar-h: 58px;
    --shadow-gold: 0 6px 22px rgba(212, 175, 55, .22);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.55;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 15px; }

/* ---------- PC 端两侧黑金氛围 ---------- */
.pc-ambient { display: none; }

@media (min-width: 600px) {
    body {
        background:
            radial-gradient(1200px 600px at 12% -10%, rgba(212, 175, 55, .12), transparent 60%),
            radial-gradient(1000px 500px at 88% 110%, rgba(212, 175, 55, .10), transparent 60%),
            #06060a;
    }
    .pc-ambient {
        display: block;
        position: fixed;
        inset: 0;
        pointer-events: none;
        z-index: 0;
        overflow: hidden;
    }
    .ambient-orb {
        position: absolute;
        border-radius: 50%;
        filter: blur(90px);
        opacity: .35;
    }
    .ambient-orb-1 {
        width: 460px; height: 460px;
        background: radial-gradient(circle, rgba(212,175,55,.5), transparent 70%);
        top: -120px; left: 6%;
        animation: floatOrb 12s ease-in-out infinite alternate;
    }
    .ambient-orb-2 {
        width: 520px; height: 520px;
        background: radial-gradient(circle, rgba(240,208,128,.4), transparent 70%);
        bottom: -160px; right: 6%;
        animation: floatOrb 15s ease-in-out infinite alternate-reverse;
    }
    .ambient-grid {
        position: absolute; inset: 0;
        background-image:
            linear-gradient(rgba(212,175,55,.05) 1px, transparent 1px),
            linear-gradient(90deg, rgba(212,175,55,.05) 1px, transparent 1px);
        background-size: 48px 48px;
        mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    }
    @keyframes floatOrb {
        from { transform: translateY(0) }
        to { transform: translateY(50px) }
    }
}

/* ---------- 小程序外壳 ---------- */
.app-shell {
    position: relative;
    z-index: 1;
    max-width: 520px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    box-shadow: 0 0 60px rgba(0,0,0,.55);
    padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 10px);
}

@media (min-width: 600px) {
    .app-shell {
        border-left: 1px solid rgba(212,175,55,.18);
        border-right: 1px solid rgba(212,175,55,.18);
    }
}

/* ---------- 顶部导航 ---------- */
.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    background: rgba(10, 10, 15, .88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.header-back {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    color: var(--gold-2);
    border-radius: 50%;
    transition: background .15s;
}
.header-back:active { background: rgba(212,175,55,.12); }
.header-logo { display: flex; align-items: center; color: var(--gold); }
.header-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    flex: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.header-slot { width: 34px; }

.app-main { padding: 14px 12px 20px; }

/* ---------- Toast ---------- */
.app-toast {
    margin: 10px 2px;
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.5;
    animation: toastIn .25s ease;
}
.app-toast-success { background: rgba(62, 207, 122, .12); border: 1px solid rgba(62,207,122,.4); color: #7ee294; }
.app-toast-error   { background: rgba(255, 90, 95, .1); border: 1px solid rgba(255,90,95,.38); color: #ff9aa0; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- 首页 Banner ---------- */
.home-banner {
    position: relative;
    border-radius: var(--radius);
    padding: 24px 18px 22px;
    overflow: hidden;
    background:
        radial-gradient(420px 180px at 85% -20%, rgba(240,208,128,.22), transparent 65%),
        linear-gradient(160deg, #1a1710 0%, #12121b 55%, #0d0d15 100%);
    border: 1px solid rgba(212,175,55,.28);
    margin-bottom: 14px;
}
.banner-glow {
    position: absolute;
    width: 200px; height: 200px;
    right: -60px; top: -60px;
    background: radial-gradient(circle, rgba(212,175,55,.35), transparent 70%);
    filter: blur(10px);
}
.banner-badge {
    display: inline-block;
    font-size: 11.5px;
    color: var(--gold-2);
    border: 1px solid rgba(212,175,55,.4);
    border-radius: 999px;
    padding: 3px 10px;
    margin-bottom: 12px;
    letter-spacing: .5px;
}
.banner-title {
    font-size: 23px;
    line-height: 1.35;
    background: var(--gold-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    margin-bottom: 8px;
}
.banner-sub { font-size: 12.5px; color: var(--text-2); margin-bottom: 16px; }
.banner-actions { display: flex; gap: 10px; }

.btn-gold-mini {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    color: #1a1505;
    background: var(--gold-grad);
    box-shadow: var(--shadow-gold);
    transition: transform .12s;
}
.btn-gold-mini:active { transform: scale(.96); }
.btn-ghost-mini {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gold-2);
    border: 1px solid rgba(212,175,55,.45);
    background: rgba(212,175,55,.06);
    transition: transform .12s;
}
.btn-ghost-mini:active { transform: scale(.96); }

/* ---------- 快捷入口 ---------- */
.quick-cats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}
.quick-cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 4px 10px;
    border-radius: 14px;
    background: var(--card);
    border: 1px solid var(--line);
    transition: transform .12s, border-color .2s;
}
.quick-cat:active { transform: scale(.95); border-color: rgba(212,175,55,.5); }
.quick-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: var(--gold-2);
    background: rgba(212,175,55,.1);
    margin-bottom: 4px;
}
.quick-cat span { font-size: 13px; font-weight: 600; }
.quick-cat small { font-size: 10.5px; color: var(--text-3); }

/* ---------- 区块标题 ---------- */
.section-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 2px 12px;
}
.section-bar h3 {
    font-size: 17px;
    font-weight: 700;
    position: relative;
    padding-left: 12px;
}
.section-bar h3::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 4px; height: 16px;
    border-radius: 2px;
    background: var(--gold-grad);
}
.section-bar a {
    font-size: 12.5px;
    color: var(--text-2);
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

/* ---------- 商品双列卡片 ---------- */
.goods-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.goods-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .15s, border-color .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
}
.goods-card:active {
    transform: scale(.975);
    border-color: rgba(212,175,55,.55);
    box-shadow: 0 8px 24px rgba(212,175,55,.14);
}
.goods-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #0d0d15;
    overflow: hidden;
}
.goods-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.goods-card:hover .goods-img-wrap img { transform: scale(1.05); }
.goods-sales {
    position: absolute;
    right: 8px; bottom: 8px;
    font-size: 10.5px;
    color: var(--text-2);
    background: rgba(10,10,15,.72);
    border: 1px solid rgba(255,255,255,.06);
    padding: 2px 8px;
    border-radius: 999px;
}
.goods-info { padding: 10px 10px 12px; display: flex; flex-direction: column; gap: 5px; }
.goods-name {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
    height: 2.9em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.goods-prices {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
}
.price-jd-line { color: var(--text-3); font-size: 11px; }
.price-jd-line del { text-decoration: line-through; }
.price-guild-green { color: var(--green); font-weight: 600; font-size: 12.5px; }
.goods-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: 2px;
}
.price-our-gold {
    color: var(--gold-2);
    font-weight: 800;
    font-size: 19px;
    line-height: 1;
}
.price-our-gold small { font-size: 12px; font-weight: 600; margin-right: 1px; }
.goods-buy-btn {
    font-size: 12px;
    font-weight: 700;
    color: #1a1505;
    background: var(--gold-grad);
    padding: 5px 14px;
    border-radius: 999px;
    box-shadow: 0 3px 10px rgba(212,175,55,.28);
}

/* ---------- 服务保障 ---------- */
.home-assure {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin: 20px 0 10px;
    padding: 14px 6px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--line);
}
.assure-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: var(--text-2);
}
.home-footer {
    text-align: center;
    color: var(--text-3);
    font-size: 11.5px;
    line-height: 1.9;
    padding: 16px 20px 4px;
}

/* ---------- 空状态 ---------- */
.empty-box {
    text-align: center;
    color: var(--text-2);
    font-size: 13.5px;
    padding: 48px 20px;
    line-height: 2;
}

/* ---------- 分类页 chips ---------- */
.cat-chips {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    position: sticky;
    top: 58px;
    z-index: 10;
    padding: 4px 0 8px;
    background: linear-gradient(var(--bg) 70%, transparent);
}
.cat-chip {
    padding: 7px 18px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-2);
    background: var(--card);
    border: 1px solid var(--line);
    transition: all .15s;
}
.cat-chip.active {
    color: #1a1505;
    background: var(--gold-grad);
    border-color: transparent;
    box-shadow: var(--shadow-gold);
}

/* ---------- 分页 ---------- */
.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 22px 0 6px;
    font-size: 13px;
}
.pager a {
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid rgba(212,175,55,.4);
    color: var(--gold-2);
    background: rgba(212,175,55,.06);
}
.pager a:active { transform: scale(.96); }
.pager-disabled { color: var(--text-3); padding: 8px 18px; }
.pager-info { color: var(--text-2); }

/* ---------- 商品详情 ---------- */
.detail-gallery {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: #0d0d15;
    margin-bottom: 12px;
    border: 1px solid var(--line);
}
.detail-gallery img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.gallery-dots {
    position: absolute;
    bottom: 12px; left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}
.gallery-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,.35);
    cursor: pointer;
    transition: all .2s;
}
.gallery-dot.active { background: var(--gold-2); width: 16px; border-radius: 999px; }

.detail-panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 12px;
}
.detail-prices { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.d-price-our {
    color: var(--gold-2);
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
}
.d-price-our small { font-size: 17px; }
.d-price-guild { color: var(--green); font-size: 13px; font-weight: 600; }
.d-price-jd { color: var(--text-3); font-size: 12px; }
.detail-name { font-size: 17px; font-weight: 700; line-height: 1.45; margin-bottom: 6px; }
.detail-summary { font-size: 13px; color: var(--text-2); margin-bottom: 10px; }
.detail-meta {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: var(--text-3);
    padding-top: 10px;
    border-top: 1px dashed rgba(255,255,255,.07);
}

.detail-block {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 12px;
}
.block-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-left: 10px;
    position: relative;
}
.block-title::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3.5px; height: 14px;
    border-radius: 2px;
    background: var(--gold-grad);
}
.desc-body p { color: var(--text-2); font-size: 13.5px; margin-bottom: 10px; }
.desc-body .feature-list { list-style: none; margin-bottom: 12px; }
.desc-body .feature-list li {
    position: relative;
    padding-left: 16px;
    font-size: 13.5px;
    color: var(--text-2);
    margin-bottom: 7px;
}
.desc-body .feature-list li::before {
    content: '';
    position: absolute;
    left: 0; top: 9px;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--gold);
}
.desc-subtitle {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--gold-2);
    margin: 14px 0 8px;
}
.detail-spacer { height: 12px; }

/* 详情底部购买条 */
.buy-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 520px;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(16, 16, 24, .94);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
}
.buy-bar-icon {
    width: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    font-size: 10.5px;
    color: var(--text-2);
}
.buy-bar-icon small { line-height: 1; }
.buy-bar-btn {
    flex: 1;
    margin-left: 6px;
    text-align: center;
    padding: 12px;
    border-radius: 999px;
    font-size: 15.5px;
    font-weight: 800;
    color: #1a1505;
    background: var(--gold-grad);
    box-shadow: var(--shadow-gold);
}
.buy-bar-btn:active { transform: scale(.98); }

/* ---------- 下单确认页 ---------- */
.confirm-goods {
    display: flex;
    gap: 12px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 12px;
}
.confirm-goods img { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; background: #0d0d15; flex-shrink: 0; }
.confirm-goods-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.confirm-goods-info h3 { font-size: 14.5px; font-weight: 700; line-height: 1.4; margin-bottom: 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.confirm-sales { font-size: 12px; color: var(--text-3); margin-bottom: auto; }
.confirm-goods-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.confirm-qty { font-size: 13px; color: var(--text-2); }

.form-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 12px;
}
.form-card-title { font-size: 14.5px; font-weight: 700; margin-bottom: 10px; }
.field-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,.05);
}
.field-row:last-child { border-bottom: none; padding-bottom: 2px; }
.field-label {
    flex-shrink: 0;
    width: 72px;
    font-size: 13.5px;
    color: var(--text-2);
    padding-top: 7px;
}
.field-row input, .field-row textarea {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 14px;
    padding: 7px 0;
    resize: none;
    width: 100%;
}
.field-row input::placeholder, .field-row textarea::placeholder { color: var(--text-3); }

.pay-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 4px;
    border-bottom: 1px solid rgba(255,255,255,.05);
    cursor: pointer;
}
.pay-option:last-child { border-bottom: none; }
.pay-option input { position: absolute; opacity: 0; pointer-events: none; }
.pay-icon {
    width: 34px; height: 34px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.pay-icon-alipay { background: rgba(62,140,255,.15); color: #4ea1ff; }
.pay-icon-wx { background: rgba(62,207,122,.15); color: #3ecf7a; }
.pay-name { flex: 1; font-size: 14.5px; font-weight: 600; }
.pay-check {
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.22);
    position: relative;
    transition: all .15s;
}
.pay-option input:checked ~ .pay-check {
    border-color: var(--gold);
    background: var(--gold-grad);
    box-shadow: inset 0 0 0 3px var(--card);
}

.guest-tip {
    font-size: 12px;
    color: var(--text-2);
    line-height: 1.8;
    padding: 10px 14px;
    background: rgba(212,175,55,.06);
    border: 1px dashed rgba(212,175,55,.3);
    border-radius: 12px;
    margin-bottom: 12px;
}
.guest-tip svg { vertical-align: -2px; color: var(--gold-2); }
.guest-tip a { color: var(--gold-2); text-decoration: underline; }
.guest-tip b { color: var(--gold-2); }

.confirm-bar-spacer { height: 76px; }
.confirm-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 520px;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(16, 16, 24, .94);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
}
.confirm-total { font-size: 13px; color: var(--text-2); }
.confirm-total b { color: var(--gold-2); font-size: 20px; font-weight: 800; margin-left: 4px; }
.confirm-submit {
    padding: 11px 28px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 800;
    color: #1a1505;
    background: var(--gold-grad);
    box-shadow: var(--shadow-gold);
}
.confirm-submit:active { transform: scale(.97); }

/* ---------- 订单卡片 ---------- */
.order-list { display: flex; flex-direction: column; gap: 12px; }
.order-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    transition: border-color .2s;
}
.order-card:active { border-color: rgba(212,175,55,.4); }
.order-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.order-no { font-size: 12px; color: var(--text-3); word-break: break-all; }
.order-status { font-size: 12.5px; font-weight: 700; flex-shrink: 0; margin-left: 8px; }
.st-pending  { color: #ffb84d; }
.st-paid     { color: #4ea1ff; }
.st-shipped  { color: var(--gold-2); }
.st-done     { color: var(--green); }
.st-canceled { color: var(--text-3); }

.order-goods { display: flex; gap: 12px; }
.order-goods img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: #0d0d15; flex-shrink: 0; }
.order-goods-info { flex: 1; min-width: 0; }
.order-goods-info h4 { font-size: 14px; font-weight: 600; line-height: 1.4; margin-bottom: 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.order-meta { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.order-amount { font-size: 13px; color: var(--text-2); }
.order-amount b { color: var(--gold-2); font-size: 16px; }

.order-ship {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    background: rgba(212,175,55,.09);
    border: 1px solid rgba(212,175,55,.3);
    font-size: 12.5px;
    color: var(--gold-2);
}
.order-ship b { word-break: break-all; }

.order-card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,.05);
}
.order-time { font-size: 11.5px; color: var(--text-3); }
.order-actions { display: flex; gap: 8px; }
.mini-btn {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
}
.mini-btn-ghost { color: var(--text-2); border: 1px solid rgba(255,255,255,.18); }
.mini-btn-gold { color: #1a1505; background: var(--gold-grad); font-weight: 700; }
.mini-btn:active { transform: scale(.95); }

/* ---------- 查订单页 ---------- */
.query-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card);
    border: 1px solid rgba(212,175,55,.35);
    border-radius: 999px;
    padding: 6px 6px 6px 16px;
    margin-bottom: 8px;
}
.query-box svg { color: var(--gold-2); flex-shrink: 0; }
.query-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 15px;
    min-width: 0;
}
.query-box input::placeholder { color: var(--text-3); }
.query-box button {
    flex-shrink: 0;
    padding: 9px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    color: #1a1505;
    background: var(--gold-grad);
}
.query-tip { text-align: center; font-size: 12px; color: var(--text-3); margin-bottom: 16px; }

/* ---------- 订单详情 ---------- */
.detail-status {
    border-radius: var(--radius);
    padding: 20px 16px;
    margin-bottom: 12px;
    text-align: center;
    border: 1px solid var(--line);
}
.detail-status h2 { font-size: 19px; margin-bottom: 6px; }
.detail-status p { font-size: 12.5px; color: var(--text-2); }
.status-banner-pending  { background: linear-gradient(160deg, rgba(255,184,77,.14), var(--card)); }
.status-banner-pending h2 { color: #ffb84d; }
.status-banner-paid     { background: linear-gradient(160deg, rgba(78,161,255,.14), var(--card)); }
.status-banner-paid h2 { color: #4ea1ff; }
.status-banner-shipped  { background: linear-gradient(160deg, rgba(212,175,55,.18), var(--card)); border-color: rgba(212,175,55,.4); }
.status-banner-shipped h2 { color: var(--gold-2); }
.status-banner-done     { background: linear-gradient(160deg, rgba(62,207,122,.14), var(--card)); }
.status-banner-done h2 { color: var(--green); }
.status-banner-canceled { background: var(--card); }
.status-banner-canceled h2 { color: var(--text-3); }

.ship-box {
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 12px;
    background: rgba(212,175,55,.1);
    border: 1px solid rgba(212,175,55,.4);
}
.ship-box-head {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--gold-2);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
}
.ship-company { font-size: 13px; color: var(--text-2); margin-bottom: 4px; }
.ship-no {
    font-size: 20px;
    font-weight: 800;
    color: var(--gold-2);
    letter-spacing: 1px;
    word-break: break-all;
    margin-bottom: 6px;
}
.ship-time { font-size: 11.5px; color: var(--text-3); }

.detail-goods-block { margin-bottom: 12px; }
.info-line {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    font-size: 13.5px;
    padding: 7px 0;
}
.info-line span { color: var(--text-2); flex-shrink: 0; }
.info-line b { font-weight: 500; text-align: right; word-break: break-all; }
.info-line-address b { white-space: normal; }
.info-line .gold-text { color: var(--gold-2); font-weight: 800; font-size: 15px; }
.info-total { border-top: 1px dashed rgba(255,255,255,.08); margin-top: 4px; padding-top: 10px; }
.order-no-text { font-size: 12.5px; color: var(--text-2); }

.detail-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}
.inline-action { display: inline; }
.inline-action button { padding: 10px 18px; }

.verify-box {
    text-align: center;
    padding: 36px 20px;
}
.verify-box svg { color: var(--gold); margin-bottom: 14px; }
.verify-box h3 { font-size: 17px; margin-bottom: 8px; }
.verify-box p { font-size: 13px; color: var(--text-2); margin-bottom: 20px; }
.verify-form { display: flex; flex-direction: column; gap: 12px; }
.verify-form input {
    background: var(--card);
    border: 1px solid rgba(212,175,55,.35);
    border-radius: 12px;
    padding: 13px 16px;
    color: var(--text);
    font-size: 15px;
    text-align: center;
    outline: none;
}
.verify-form button { padding: 13px; border-radius: 12px; font-size: 15px; font-weight: 700; color: #1a1505; background: var(--gold-grad); }
.verify-error { color: #ff9aa0; font-size: 12.5px; margin-top: 12px; }
.verify-back { display: inline-block; margin-top: 16px; font-size: 13px; color: var(--text-3); }

/* ---------- 支付结果 ---------- */
.pay-result { text-align: center; padding: 30px 16px; }
.pay-result-icon {
    width: 84px; height: 84px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.pay-result-ok { color: var(--green); background: rgba(62,207,122,.12); border: 2px solid rgba(62,207,122,.5); }
.pay-result-fail { color: #ffb84d; background: rgba(255,184,77,.1); border: 2px solid rgba(255,184,77,.5); }
.pay-result h2 { font-size: 20px; margin-bottom: 8px; }
.pay-result > p { font-size: 13px; color: var(--text-2); margin-bottom: 20px; }
.pay-result-order {
    text-align: left;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    font-size: 13.5px;
    line-height: 2;
    margin-bottom: 22px;
}
.pay-result-order p { display: flex; justify-content: space-between; gap: 12px; }
.gold-text { color: var(--gold-2); }
.pay-result-actions { display: flex; gap: 12px; justify-content: center; }

/* ---------- 我的 ---------- */
.me-guest {
    text-align: center;
    padding: 36px 20px 28px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 14px;
}
.me-guest-avatar {
    width: 72px; height: 72px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--gold-2);
    background: rgba(212,175,55,.12);
    border: 1.5px solid rgba(212,175,55,.4);
}
.me-guest h2 { font-size: 19px; margin-bottom: 8px; }
.me-guest p { font-size: 13px; color: var(--text-2); margin-bottom: 20px; }
.me-guest-actions { display: flex; gap: 12px; justify-content: center; }

.me-user-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 16px;
    border-radius: var(--radius);
    margin-bottom: 12px;
    background:
        radial-gradient(300px 120px at 90% -30%, rgba(240,208,128,.25), transparent 70%),
        linear-gradient(150deg, #1c1810, #12121b 70%);
    border: 1px solid rgba(212,175,55,.35);
}
.me-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: #1a1505;
    background: var(--gold-grad);
    flex-shrink: 0;
}
.me-user-info h2 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.me-user-info p { font-size: 13px; color: var(--text-2); }

.me-wallet {
    border-radius: var(--radius);
    padding: 18px 16px;
    margin-bottom: 12px;
    background: linear-gradient(160deg, #15130a, #101018);
    border: 1px solid rgba(212,175,55,.4);
    position: relative;
    overflow: hidden;
}
.me-wallet::after {
    content: '';
    position: absolute;
    width: 180px; height: 180px;
    right: -70px; top: -80px;
    background: radial-gradient(circle, rgba(212,175,55,.3), transparent 70%);
}
.me-wallet-top { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.me-wallet-label { font-size: 12.5px; color: var(--text-2); }
.me-wallet-rule { font-size: 12px; color: var(--gold-2); }
.me-wallet-balance {
    font-size: 38px;
    font-weight: 800;
    color: var(--gold-2);
    line-height: 1.2;
    margin: 6px 0 2px;
    position: relative; z-index: 1;
}
.me-wallet-tip { font-size: 12px; color: var(--text-3); margin-bottom: 14px; position: relative; z-index: 1; }
.me-wallet-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid rgba(212,175,55,.18);
    padding-top: 12px;
    margin-bottom: 14px;
    position: relative; z-index: 1;
}
.me-wallet-stats div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.me-wallet-stats b { font-size: 15px; color: var(--text); }
.me-wallet-stats span { font-size: 11px; color: var(--text-3); }
.me-withdraw-btn {
    position: relative; z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 12px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 800;
    color: #1a1505;
    background: var(--gold-grad);
    box-shadow: var(--shadow-gold);
}
.me-withdraw-btn:active { transform: scale(.98); }

.me-share {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 12px;
}
.me-share-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
}
.me-share-desc { font-size: 12.5px; color: var(--text-2); line-height: 1.7; margin-bottom: 12px; }
.me-share-link { display: flex; gap: 8px; margin-bottom: 12px; }
.me-share-link input {
    flex: 1;
    min-width: 0;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--text-2);
    font-size: 12px;
    outline: none;
}
.copy-btn {
    flex-shrink: 0;
    padding: 0 18px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    color: #1a1505;
    background: var(--gold-grad);
}
.copy-btn:active { transform: scale(.95); }
.me-share-rules {
    background: rgba(212,175,55,.05);
    border-radius: 10px;
    padding: 10px 12px;
}
.me-share-rules p { font-size: 11.5px; color: var(--text-3); line-height: 1.9; }

.me-menu {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.me-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px;
    border-bottom: 1px solid rgba(255,255,255,.05);
    transition: background .15s;
}
.me-menu-item:last-child { border-bottom: none; }
.me-menu-item:active { background: rgba(212,175,55,.06); }
.me-menu-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--gold-2);
    background: rgba(212,175,55,.1);
    flex-shrink: 0;
}
.me-menu-text { flex: 1; font-size: 14.5px; font-weight: 600; text-align: left; }
.me-arrow { color: var(--text-3); flex-shrink: 0; }
.me-logout-form { width: 100%; cursor: pointer; }
.me-logout-btn { background: none; border: none; font-size: 14.5px; font-weight: 600; color: #ff8a8f; }

/* ---------- 登录 / 注册 ---------- */
.auth-box {
    padding: 26px 8px;
    text-align: center;
}
.auth-logo {
    width: 66px; height: 66px;
    margin: 0 auto 14px;
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(212,175,55,.1);
    border: 1px solid rgba(212,175,55,.35);
}
.auth-box h2 { font-size: 21px; margin-bottom: 6px; }
.auth-sub { font-size: 13px; color: var(--text-2); margin-bottom: 22px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.auth-field {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 14px;
    transition: border-color .2s;
}
.auth-field:focus-within { border-color: rgba(212,175,55,.55); }
.auth-field svg { color: var(--gold-2); flex-shrink: 0; }
.auth-field input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 15px;
    padding: 14px 0;
    min-width: 0;
}
.auth-field input::placeholder { color: var(--text-3); }
.auth-submit {
    margin-top: 6px;
    padding: 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    color: #1a1505;
    background: var(--gold-grad);
    box-shadow: var(--shadow-gold);
}
.auth-submit:active { transform: scale(.98); }
.auth-switch { margin-top: 18px; font-size: 13px; color: var(--text-2); }
.auth-switch a { color: var(--gold-2); margin: 0 4px; }

.ref-tip {
    display: flex;
    align-items: center;
    gap: 7px;
    text-align: left;
    font-size: 12.5px;
    color: var(--green);
    background: rgba(62,207,122,.09);
    border: 1px solid rgba(62,207,122,.35);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 14px;
    line-height: 1.6;
}
.ref-tip b { font-weight: 700; }

/* ---------- 提现 ---------- */
.withdraw-balance-card {
    border-radius: var(--radius);
    padding: 22px 18px;
    text-align: center;
    margin-bottom: 12px;
    background:
        radial-gradient(300px 140px at 50% -40%, rgba(240,208,128,.28), transparent 70%),
        linear-gradient(160deg, #1a160c, #101018);
    border: 1px solid rgba(212,175,55,.4);
}
.wb-label { font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.wb-amount { font-size: 40px; font-weight: 800; color: var(--gold-2); line-height: 1.2; margin-bottom: 8px; }
.wb-rule { font-size: 12px; color: var(--text-3); }

.amount-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding: 6px 0 12px;
    margin-bottom: 10px;
}
.amount-unit { font-size: 24px; font-weight: 800; color: var(--gold-2); }
.amount-input-wrap input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 30px;
    font-weight: 800;
    width: 100%;
    min-width: 0;
}
.amount-input-wrap input::placeholder { font-size: 15px; font-weight: 400; color: var(--text-3); }
.all-in {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--gold-2);
    border: 1px solid rgba(212,175,55,.45);
    border-radius: 999px;
    padding: 6px 14px;
}
.fee-hint { font-size: 12.5px; color: var(--text-2); }
.fee-hint b { color: var(--gold-2); }

.withdraw-submit {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    color: #1a1505;
    background: var(--gold-grad);
    box-shadow: var(--shadow-gold);
    margin-bottom: 10px;
}
.withdraw-submit:active { transform: scale(.98); }
.withdraw-note { font-size: 12px; color: var(--text-3); text-align: center; line-height: 1.8; margin-bottom: 14px; }

.wd-records {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
}
.wd-record {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,.05);
}
.wd-record:last-child { border-bottom: none; }
.wd-record-left { display: flex; flex-direction: column; gap: 2px; }
.wd-record-left b { font-size: 15px; }
.wd-record-left span { font-size: 12px; color: var(--text-2); }
.wd-record-left small { font-size: 11px; color: var(--text-3); }
.wd-status { font-size: 12.5px; font-weight: 700; flex-shrink: 0; }
.wd-pending  { color: #ffb84d; }
.wd-paid     { color: var(--green); }
.wd-rejected { color: #ff8a8f; }

/* ---------- 底部 Tab 栏 ---------- */
.tabbar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 520px;
    z-index: 70;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: rgba(14, 14, 20, .96);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 7px 0 6px;
    font-size: 10.5px;
    color: var(--text-3);
    transition: color .15s;
}
.tab-item.active, .tab-item:active { color: var(--gold-2); }

/* 详情页/下单页底部有操作条时隐藏 tabbar，避免双层底栏 */
body:has(.buy-bar) .tabbar,
body:has(.confirm-bar) .tabbar { display: none; }
body:has(.buy-bar) .app-shell,
body:has(.confirm-bar) .app-shell {
    padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
}
