/* ============================================================
   Aurora 极光主题 — 独角数卡自定义模板
   ============================================================ */
:root {
    --a-indigo: #6366f1;
    --a-purple: #a855f7;
    --a-cyan: #06b6d4;
    --a-grad: linear-gradient(120deg, #6366f1 0%, #a855f7 50%, #06b6d4 100%);
    --a-grad-soft: linear-gradient(120deg, rgba(99,102,241,.12), rgba(168,85,247,.12), rgba(6,182,212,.12));
    --a-text: #1e2235;
    --a-text-2: #6b7086;
    --a-bg: #f5f6fa;
    --a-card: #ffffff;
    --a-border: rgba(30, 34, 53, .08);
    --a-danger: #f43f5e;
    --a-success: #10b981;
    --a-warning: #f59e0b;
    --a-radius: 16px;
    --a-shadow: 0 4px 20px rgba(30, 34, 53, .06);
    --a-shadow-hover: 0 16px 40px rgba(99, 102, 241, .18);
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--a-text);
    background: var(--a-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* 顶部极光装饰 */
.aurora-sky {
    position: fixed;
    inset: 0 0 auto 0;
    height: 420px;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.aurora-sky::before,
.aurora-sky::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .35;
}
.aurora-sky::before {
    width: 560px; height: 560px;
    background: #a5b4fc;
    top: -260px; left: -120px;
}
.aurora-sky::after {
    width: 520px; height: 520px;
    background: #99e9f2;
    top: -280px; right: -100px;
}

/* ---------- 导航栏 ---------- */
.a-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--a-border);
}
.a-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.a-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
}
.a-brand img {
    width: 34px; height: 34px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, .35);
}
.a-brand span {
    background: var(--a-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.a-nav-links { display: flex; align-items: center; gap: 10px; }

/* ---------- 按钮 ---------- */
.a-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: 999px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s ease;
    white-space: nowrap;
}
.a-btn-primary {
    background: var(--a-grad);
    color: #fff;
    box-shadow: 0 6px 18px rgba(99, 102, 241, .35);
}
.a-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(99, 102, 241, .45); }
.a-btn-ghost {
    background: rgba(99, 102, 241, .08);
    color: var(--a-indigo);
    border: 1px solid rgba(99, 102, 241, .25);
}
.a-btn-ghost:hover { background: rgba(99, 102, 241, .15); }
.a-btn-lg { padding: 14px 36px; font-size: 16px; }
.a-btn-block { width: 100%; }

/* ---------- 布局容器 ---------- */
.a-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}
.a-main { flex: 1; padding-bottom: 60px; }

/* ---------- Hero ---------- */
.a-hero {
    text-align: center;
    padding: 64px 20px 40px;
}
.a-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 5vw, 48px);
    font-weight: 900;
    letter-spacing: 1px;
    background: var(--a-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.a-hero p {
    margin: 0 auto 28px;
    max-width: 560px;
    color: var(--a-text-2);
    font-size: 15px;
    line-height: 1.8;
}
.a-search {
    max-width: 520px;
    margin: 0 auto;
    position: relative;
}
.a-search input {
    width: 100%;
    padding: 15px 52px 15px 24px;
    border-radius: 999px;
    border: 1px solid var(--a-border);
    background: #fff;
    font-size: 15px;
    outline: none;
    box-shadow: var(--a-shadow);
    transition: all .25s ease;
}
.a-search input:focus {
    border-color: var(--a-indigo);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .12);
}
.a-search svg {
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px; height: 20px;
    color: var(--a-text-2);
    pointer-events: none;
}

/* ---------- 公告条 ---------- */
.a-notice-bar {
    max-width: 1200px;
    margin: 0 auto 8px;
    padding: 0 20px;
}
.a-notice-bar button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    border-radius: 14px;
    border: 1px solid rgba(99, 102, 241, .18);
    background: var(--a-grad-soft);
    color: var(--a-text);
    font-size: 14px;
    cursor: pointer;
    text-align: left;
}
.a-notice-bar .megaphone { flex: none; width: 18px; height: 18px; color: var(--a-indigo); }
.a-notice-bar .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 分类标签 ---------- */
.a-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 26px 0 22px;
}
.a-chip {
    padding: 9px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: var(--a-text-2);
    background: #fff;
    border: 1px solid var(--a-border);
    cursor: pointer;
    transition: all .25s ease;
}
.a-chip:hover { color: var(--a-indigo); border-color: var(--a-indigo); }
.a-chip.active {
    background: var(--a-grad);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 16px rgba(99, 102, 241, .35);
}

/* ---------- 商品网格 ---------- */
.a-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}
@media (max-width: 1024px) { .a-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .a-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
@media (max-width: 420px)  { .a-grid { grid-template-columns: 1fr; } }

.a-card {
    position: relative;
    background: var(--a-card);
    border-radius: var(--a-radius);
    overflow: hidden;
    box-shadow: var(--a-shadow);
    border: 1px solid var(--a-border);
    transition: transform .3s ease, box-shadow .3s ease;
    display: flex;
    flex-direction: column;
}
.a-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--a-shadow-hover);
}
.a-card-img {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #eef0f8;
}
.a-card-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.a-card:hover .a-card-img img { transform: scale(1.06); }
.a-badge-auto {
    position: absolute;
    top: 12px; left: 12px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: rgba(30, 34, 53, .55);
    backdrop-filter: blur(6px);
}
.a-card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.a-card-name {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.a-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--a-text-2);
}
.a-card-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.a-price {
    font-size: 20px;
    font-weight: 800;
    background: var(--a-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.a-price::first-letter { font-size: 14px; }
.a-go {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--a-grad-soft);
    color: var(--a-indigo);
    transition: all .25s ease;
}
.a-card:hover .a-go { background: var(--a-grad); color: #fff; }
.a-soldout {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .72);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    color: var(--a-danger);
    letter-spacing: 4px;
}
.a-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 0;
    color: var(--a-text-2);
}

/* ---------- 卡片通用 ---------- */
.a-panel {
    background: var(--a-card);
    border-radius: var(--a-radius);
    border: 1px solid var(--a-border);
    box-shadow: var(--a-shadow);
    padding: 28px;
}
.a-panel-title {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}
.a-panel-title::before {
    content: "";
    width: 4px; height: 18px;
    border-radius: 2px;
    background: var(--a-grad);
}

/* ---------- 购买页 ---------- */
.a-buy {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 24px;
    padding-top: 34px;
    align-items: start;
}
@media (max-width: 900px) { .a-buy { grid-template-columns: 1fr; } }
.a-buy-product img {
    border-radius: 12px;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    width: 100%;
}
.a-buy-badges { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 10px; }
.a-badge {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.a-badge-indigo { background: rgba(99,102,241,.12); color: var(--a-indigo); }
.a-badge-green  { background: rgba(16,185,129,.12); color: var(--a-success); }
.a-badge-amber  { background: rgba(245,158,11,.14); color: var(--a-warning); }
.a-buy-price { margin: 8px 0 0; display: flex; align-items: baseline; gap: 12px; }
.a-buy-price .now { font-size: 30px; font-weight: 900; color: var(--a-danger); }
.a-buy-price .now small { font-size: 15px; font-weight: 700; }
.a-buy-price .old { color: var(--a-text-2); text-decoration: line-through; font-size: 14px; }
.a-buy-desc { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--a-border); color: var(--a-text-2); font-size: 14px; line-height: 1.9; }
.a-buy-desc img { border-radius: 10px; margin: 8px 0; }

.a-field { margin-bottom: 18px; }
.a-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; color: var(--a-text); }
.a-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--a-border);
    background: #fbfbfe;
    font-size: 14px;
    outline: none;
    transition: all .25s ease;
}
.a-input:focus { border-color: var(--a-indigo); background: #fff; box-shadow: 0 0 0 4px rgba(99,102,241,.10); }

.a-qty { display: inline-flex; align-items: center; border: 1px solid var(--a-border); border-radius: 12px; overflow: hidden; background: #fbfbfe; }
.a-qty button {
    width: 42px; height: 42px;
    border: none; background: transparent;
    font-size: 18px; cursor: pointer; color: var(--a-indigo);
    transition: background .2s;
}
.a-qty button:hover { background: rgba(99,102,241,.10); }
.a-qty input {
    width: 64px; height: 42px;
    border: none; background: transparent;
    text-align: center; font-size: 15px; font-weight: 700;
    outline: none;
}

.a-pays { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 560px) { .a-pays { grid-template-columns: repeat(2, 1fr); } }
.a-pay {
    padding: 12px 10px;
    border-radius: 12px;
    border: 1.5px solid var(--a-border);
    background: #fbfbfe;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all .2s ease;
    color: var(--a-text-2);
}
.a-pay:hover { border-color: var(--a-indigo); color: var(--a-indigo); }
.a-pay.active {
    border-color: var(--a-indigo);
    color: var(--a-indigo);
    background: rgba(99,102,241,.08);
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}

.a-buy-summary {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; margin: 6px 0 18px;
    border-radius: 12px;
    background: var(--a-grad-soft);
    font-size: 14px;
}
.a-buy-summary b { font-size: 20px; color: var(--a-danger); }

/* ---------- 表格行(结算页/详情页) ---------- */
.a-rows { display: flex; flex-direction: column; }
.a-row {
    display: flex; justify-content: space-between; gap: 16px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--a-border);
    font-size: 14px;
}
.a-row:last-child { border-bottom: none; }
.a-row .k { color: var(--a-text-2); flex: none; }
.a-row .v { font-weight: 600; text-align: right; word-break: break-all; }

/* ---------- 状态徽章 ---------- */
.a-status { padding: 4px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.a-status-wait    { background: rgba(245,158,11,.14); color: var(--a-warning); }
.a-status-ok      { background: rgba(16,185,129,.12); color: var(--a-success); }
.a-status-expired { background: rgba(107,112,134,.12); color: var(--a-text-2); }
.a-status-fail    { background: rgba(244,63,94,.12); color: var(--a-danger); }

/* ---------- 订单查询页 tabs ---------- */
.a-tabs { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }

/* ---------- 卡密框 ---------- */
.a-carmi {
    width: 100%;
    min-height: 110px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px dashed rgba(99,102,241,.4);
    background: rgba(99,102,241,.05);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 13px;
    line-height: 1.8;
    resize: vertical;
    outline: none;
    color: var(--a-text);
}

/* ---------- 弹窗 ---------- */
.a-modal-mask {
    position: fixed; inset: 0;
    background: rgba(20, 22, 40, .45);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}
.a-modal-mask.show { display: flex; }
.a-modal {
    background: #fff;
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    padding: 26px 28px;
    box-shadow: 0 30px 80px rgba(20, 22, 40, .3);
    animation: aPop .3s ease;
}
@keyframes aPop { from { transform: translateY(20px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.a-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px;
}
.a-modal-head h3 { margin: 0; font-size: 17px; }
.a-modal-close {
    border: none; background: rgba(30,34,53,.06);
    width: 30px; height: 30px; border-radius: 50%;
    cursor: pointer; font-size: 15px; color: var(--a-text-2);
}
.a-modal-body { font-size: 14px; line-height: 1.9; color: var(--a-text-2); }

/* ---------- Toast ---------- */
.a-toast-wrap {
    position: fixed;
    top: 24px; left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex; flex-direction: column; gap: 10px;
    pointer-events: none;
}
.a-toast {
    padding: 12px 24px;
    border-radius: 12px;
    background: rgba(30, 34, 53, .92);
    color: #fff;
    font-size: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
    animation: aPop .25s ease;
}

/* ---------- 页脚 ---------- */
.a-footer {
    border-top: 1px solid var(--a-border);
    background: rgba(255,255,255,.6);
    backdrop-filter: blur(10px);
    padding: 26px 20px;
    text-align: center;
    font-size: 13px;
    color: var(--a-text-2);
}
.a-footer a { color: var(--a-indigo); }
.a-footer .line { margin: 4px 0; }

/* ---------- 扫码页 ---------- */
.a-qr-wrap { text-align: center; }
.a-qr-wrap img {
    margin: 10px auto 18px;
    border-radius: 14px;
    border: 1px solid var(--a-border);
    padding: 10px;
    background: #fff;
}
.a-qr-amount { font-size: 26px; font-weight: 900; color: var(--a-danger); }

.a-center { display: flex; justify-content: center; padding-top: 40px; }
.a-narrow { max-width: 560px; width: 100%; }
.a-mid { max-width: 760px; width: 100%; }

.a-mt { margin-top: 18px; }
.a-text-center { text-align: center; }

/* 错误页 */
.a-error-code {
    font-size: 88px;
    font-weight: 900;
    background: var(--a-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
}

/* ---------- 会员体系：提示条 ---------- */
.a-alert {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 16px;
}
.a-alert-danger { background: rgba(244,63,94,.10); color: var(--a-danger); }
.a-alert-success { background: rgba(16,185,129,.10); color: var(--a-success); }

/* ---------- 用户中心布局 ---------- */
.a-user-wrap {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 22px;
    padding-top: 34px;
    align-items: start;
}
@media (max-width: 860px) { .a-user-wrap { grid-template-columns: 1fr; } }

.a-user-side {
    background: var(--a-card);
    border-radius: var(--a-radius);
    border: 1px solid var(--a-border);
    box-shadow: var(--a-shadow);
    overflow: hidden;
    position: sticky;
    top: 84px;
}
.a-user-card {
    padding: 24px 20px;
    text-align: center;
    background: var(--a-grad-soft);
    border-bottom: 1px solid var(--a-border);
}
.a-user-avatar {
    width: 56px; height: 56px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: var(--a-grad);
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}
.a-user-name { font-weight: 700; font-size: 15px; margin-bottom: 8px; word-break: break-all; }
.a-user-menu { padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.a-user-menu a {
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--a-text-2);
    transition: all .2s;
}
.a-user-menu a:hover { background: rgba(99,102,241,.08); color: var(--a-indigo); }
.a-user-menu a.active {
    background: var(--a-grad);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99,102,241,.3);
}
.a-user-logout {
    width: 100%;
    text-align: left;
    padding: 11px 14px;
    border: none;
    background: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--a-danger);
    cursor: pointer;
}
.a-user-logout:hover { background: rgba(244,63,94,.08); }

/* ---------- 会员英雄卡 ---------- */
.a-member-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 26px 28px;
    border-radius: var(--a-radius);
    background: var(--a-grad);
    color: #fff;
    box-shadow: 0 12px 32px rgba(99,102,241,.35);
    margin-bottom: 22px;
}
.a-member-hero-level { font-size: 24px; font-weight: 900; }
.a-member-hero-sub { font-size: 13px; opacity: .85; margin-top: 6px; }
.a-member-hero-growth { text-align: center; }
.a-member-hero-growth .num { font-size: 30px; font-weight: 900; }
.a-member-hero-growth .lbl { font-size: 12px; opacity: .85; }

/* ---------- 进度条 ---------- */
.a-progress {
    height: 8px;
    border-radius: 999px;
    background: rgba(99,102,241,.12);
    overflow: hidden;
}
.a-progress-bar {
    height: 100%;
    border-radius: 999px;
    background: var(--a-grad);
    transition: width .6s ease;
}

/* ---------- 统计卡 ---------- */
.a-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
@media (max-width: 640px) { .a-stats { grid-template-columns: repeat(2, 1fr); } }
.a-stat {
    background: var(--a-card);
    border: 1px solid var(--a-border);
    border-radius: var(--a-radius);
    box-shadow: var(--a-shadow);
    padding: 18px;
    text-align: center;
}
.a-stat-num { font-size: 20px; font-weight: 800; }
.a-stat-lbl { font-size: 12px; color: var(--a-text-2); margin-top: 4px; }

/* ---------- 表格 ---------- */
.a-table-wrap { overflow-x: auto; }
.a-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.a-table th, .a-table td { padding: 12px 10px; text-align: left; border-bottom: 1px dashed var(--a-border); }
.a-table th { color: var(--a-text-2); font-size: 12px; font-weight: 700; }
.a-table tr.current td { background: rgba(99,102,241,.06); }
