/* 卡密授权系统 - 拟态毛玻璃风格 */

/* ====== CSS Variables ====== */
:root {
    --primary: #1f2937;
    --primary-light: #374151;
    --primary-dark: #111827;
    --accent: #0d9488;
    --accent-light: #14b8a6;
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;

    --bg-body: #f5f5f4;
    --bg-card: rgba(255, 255, 255, 0.72);
    --bg-card-solid: #ffffff;
    --bg-dark: #18181b;
    --bg-dark-card: rgba(39, 39, 42, 0.85);

    --text-primary: #18181b;
    --text-secondary: #52525b;
    --text-muted: #71717a;

    --border-color: rgba(255, 255, 255, 0.6);
    --border-dark: rgba(255, 255, 255, 0.08);

    --shadow-neu: 6px 6px 12px rgba(0, 0, 0, 0.06), -6px -6px 12px rgba(255, 255, 255, 0.8);
    --shadow-neu-inset: inset 4px 4px 8px rgba(0, 0, 0, 0.05), inset -4px -4px 8px rgba(255, 255, 255, 0.7);
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.1);

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-blur: blur(16px);
}

/* ====== 基础重置 ====== */
*, *::before, *::after { box-sizing: border-box; }
body {
    font-family: var(--font-sans);
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* ====== 毛玻璃卡片 ====== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-glass);
    transition: var(--transition);
}
.glass-card:hover {
    box-shadow: var(--shadow-hover);
}

/* ====== 拟态提示框 ====== */
.alert-glass {
    background: rgba(5, 150, 105, 0.08);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(5, 150, 105, 0.2);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    color: #065f46;
    font-weight: 500;
    font-size: 14px;
}
.alert-glass-danger {
    background: rgba(220, 38, 38, 0.08);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    color: #991b1b;
    font-weight: 500;
    font-size: 14px;
}

/* ====== 购买/下单页：布局保留 + 尺寸随设备自适应 ====== */
.buy-page {
    padding-top: clamp(1.25rem, 3vw, 2rem) !important;
    padding-bottom: clamp(1.25rem, 3vw, 2rem) !important;
}
.buy-page .col-md-5 {
    width: 100%;
    max-width: min(100%, clamp(360px, 92vw, 520px));
}
@media (min-width: 768px) {
    .buy-page .col-md-5 {
        max-width: min(100%, clamp(420px, 48vw, 480px));
    }
}
@media (min-width: 1200px) {
    .buy-page .col-md-5 {
        max-width: 520px;
    }
}
.buy-page .glass-card {
    padding: clamp(1rem, 2.8vw, 1.45rem) clamp(1.05rem, 3vw, 1.55rem);
    border-radius: clamp(14px, 2vw, var(--radius-lg));
}
.buy-page .glass-card + .glass-card {
    margin-top: clamp(0.75rem, 2vw, 1rem);
}
.buy-summary {
    margin-bottom: 0 !important;
}
.buy-summary__row {
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 2.2vw, 1.15rem);
}
.buy-summary__thumb {
    flex-shrink: 0;
    width: clamp(64px, 14vw, 88px);
    height: clamp(64px, 14vw, 88px);
    border-radius: clamp(10px, 2vw, 14px);
    overflow: hidden;
    background: rgba(13, 148, 136, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}
.buy-summary__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.buy-summary__thumb i {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--accent);
}
.buy-summary__info {
    min-width: 0;
    flex: 1;
}
.buy-summary__name-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-bottom: 0.2rem;
}
.buy-summary__name {
    font-weight: 700;
    font-size: clamp(15px, 3vw, 18px);
    line-height: 1.3;
    margin: 0;
}
.buy-summary__badge {
    background: var(--accent);
    color: #fff;
    font-size: clamp(10px, 1.8vw, 12px);
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}
.buy-summary__price {
    line-height: 1;
    margin-bottom: 0.35rem;
}
.buy-summary__price .price-currency {
    font-size: clamp(14px, 2.4vw, 18px);
}
.buy-summary__price .price-amount {
    font-size: clamp(26px, 5.5vw, 36px);
    letter-spacing: -1px;
    font-weight: 800;
    color: var(--primary);
}
.buy-summary__price .price-period {
    font-size: clamp(11px, 1.9vw, 13px);
    color: var(--text-muted);
}
.buy-summary__feats {
    font-size: clamp(11px, 2vw, 13px);
    color: var(--text-muted);
    line-height: 1.45;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
}
.buy-page .form-label {
    margin-bottom: 0.4rem;
    font-size: clamp(12px, 2vw, 13px) !important;
}
.buy-page .pay-methods {
    gap: clamp(0.4rem, 1.2vw, 0.55rem) !important;
}
.buy-page .pay-methods .btn {
    padding: clamp(0.45rem, 1.2vw, 0.6rem) 0.35rem !important;
    font-size: clamp(12px, 2vw, 14px) !important;
    border-radius: 8px !important;
}
.buy-page .amount-box {
    padding: clamp(0.75rem, 2vw, 1rem) clamp(0.9rem, 2.2vw, 1.15rem) !important;
    margin-bottom: clamp(0.75rem, 2vw, 1rem) !important;
    border-radius: 10px !important;
}
.buy-page .amount-box .amount-label {
    font-size: clamp(13px, 2vw, 14px);
    color: var(--text-muted);
}
.buy-page .amount-box .amount-value {
    font-weight: 800;
    font-size: clamp(1.25rem, 3.4vw, 1.7rem);
    color: var(--danger);
    line-height: 1;
}
.buy-page .btn-pay {
    border-radius: 12px !important;
    padding: clamp(0.75rem, 2vw, 0.95rem) 1rem !important;
    font-size: clamp(15px, 2.6vw, 17px) !important;
}
.buy-page .pay-note {
    margin-top: clamp(0.7rem, 1.8vw, 0.9rem);
    font-size: clamp(12px, 1.9vw, 13px);
    color: var(--text-muted);
}

/* ====== 下单页：支付失败客服提示 ====== */
.pay-fail-tip {
    margin-top: clamp(0.75rem, 2vw, 1rem);
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.1), rgba(220, 38, 38, 0.06));
    border: 1.5px solid rgba(217, 119, 6, 0.35);
    border-radius: clamp(12px, 2vw, 14px);
    padding: clamp(0.7rem, 2vw, 0.95rem) clamp(0.8rem, 2.2vw, 1.05rem);
    box-shadow: 0 2px 10px rgba(217, 119, 6, 0.08);
}
.pay-fail-tip__head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    font-size: clamp(13px, 2.2vw, 14.5px);
    color: #9a3412;
    margin-bottom: 0.3rem;
}
.pay-fail-tip__head i {
    color: var(--warning);
    font-size: clamp(1.05rem, 2.2vw, 1.15rem);
}
.pay-fail-tip__body {
    font-size: clamp(12px, 2vw, 13px);
    color: var(--text-secondary);
    line-height: 1.5;
}
.pay-fail-tip__wechat {
    margin-top: 0.55rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.75);
    border: 1px dashed rgba(217, 119, 6, 0.45);
    border-radius: 10px;
    padding: clamp(0.45rem, 1.4vw, 0.65rem) clamp(0.6rem, 1.6vw, 0.85rem);
}
.pay-fail-tip__wechat-label {
    font-size: clamp(11px, 1.8vw, 12px);
    color: var(--text-muted);
    margin-bottom: 2px;
}
.pay-fail-tip__wechat-id {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: clamp(14px, 2.6vw, 16px);
    color: var(--primary);
    letter-spacing: 0.4px;
    word-break: break-all;
    line-height: 1.25;
}
.pay-fail-tip__copy {
    flex-shrink: 0;
    border: 0;
    border-radius: 8px;
    padding: clamp(0.35rem, 1.2vw, 0.48rem) clamp(0.65rem, 1.8vw, 0.9rem);
    font-size: clamp(12px, 2vw, 13px);
    font-weight: 600;
    background: var(--warning);
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.pay-fail-tip__copy:hover {
    background: #b45309;
    color: #fff;
}
.pay-fail-tip__copy.is-copied {
    background: var(--success);
}

/* ====== 卡密展示框 ====== */
.card-key-box {
    background: rgba(13, 148, 136, 0.05);
    border: 1px solid rgba(13, 148, 136, 0.15);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
}
.card-key-value {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 1.5px;
    word-break: break-all;
    line-height: 1.8;
}

/* ====== 导航栏 ====== */
.navbar {
    background: rgba(24, 24, 27, 0.95) !important;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.75rem 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.navbar-brand {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.3px;
    color: #fff !important;
}
.navbar-brand i {
    color: var(--accent);
}
.nav-link {
    font-weight: 500;
    font-size: 14px;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    color: rgba(255, 255, 255, 0.6);
}
.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}
.nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

/* ====== Hero 区域 ====== */
.hero-section {
    background: linear-gradient(160deg, #18181b 0%, #27272a 50%, #18181b 100%);
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(13, 148, 136, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(161, 161, 170, 0.06) 0%, transparent 50%);
    pointer-events: none;
}
.hero-section .container { position: relative; z-index: 1; }
.hero-section h1 {
    color: #fff;
    font-weight: 800;
    letter-spacing: -1px;
    font-size: 2.5rem;
}
.hero-section .lead {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    max-width: 500px;
    margin: 0 auto;
    font-size: 1rem;
}
.hero-section .btn-light {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: white;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    transition: var(--transition);
}
.hero-section .btn-light:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ====== 产品卡片 ====== */
.product-card {
    border-radius: 16px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.5);
    overflow: hidden;
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow-neu);
    cursor: pointer;
}
.product-thumb {
    width: 100%;
    height: clamp(100px, 18vw, 150px);
    object-fit: contain;
    display: block;
    background: #f8f8f8;
}
.price-amount-sm {
    font-size: clamp(18px, 2.8vw, 22px);
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1px;
    font-family: var(--font-sans);
}
.product-card .card-body {
    padding: clamp(0.55rem, 1.6vw, 0.9rem) clamp(0.65rem, 1.8vw, 1rem) !important;
}
.product-card .card-title {
    font-size: clamp(12.5px, 2vw, 14px);
    font-weight: 700;
    margin-bottom: 0.2rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-card .card-text {
    font-size: clamp(11px, 1.7vw, 12.5px) !important;
    line-height: 1.4;
    margin-bottom: 0.35rem !important;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card .price-display {
    margin-bottom: clamp(0.4rem, 1.2vw, 0.65rem) !important;
}
.product-card .price-currency {
    font-size: clamp(12px, 1.8vw, 14px);
}
.product-card .price-period {
    font-size: clamp(10px, 1.5vw, 11.5px);
}
.product-card .btn-sm {
    padding: clamp(0.3rem, 0.9vw, 0.42rem) clamp(0.55rem, 1.4vw, 0.85rem);
    font-size: clamp(11px, 1.7vw, 12.5px);
    border-radius: 8px;
}
.product-card .mt-2 {
    margin-top: 0.4rem !important;
}
@media (min-width: 576px) {
    .product-thumb {
        height: clamp(120px, 16vw, 150px);
    }
}
@media (min-width: 992px) {
    .product-card .card-text {
        -webkit-line-clamp: 2;
        min-height: 2.4em;
    }
    .product-card .card-body {
        padding: 0.95rem 1rem !important;
    }
    .product-thumb {
        height: 150px;
    }
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: #d4d4d8;
}
.product-card.border-primary {
    border: 2px solid var(--accent);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.08), var(--shadow-glass);
}
.card-badge {
    position: absolute;
    top: -12px;
    right: 24px;
    background: var(--accent);
    color: white;
    padding: 4px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}
.product-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 148, 136, 0.06);
    border-radius: 50%;
    transition: var(--transition);
}
.product-card:hover .product-icon {
    transform: scale(1.08);
    background: rgba(13, 148, 136, 0.1);
}

/* ====== 价格显示 ====== */
.price-display { line-height: 1; }
.price-currency {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
    vertical-align: super;
}
.price-amount {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -2px;
    font-family: var(--font-sans);
}
.price-period {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ====== 卡密文本 ====== */
.card-key-text {
    font-family: var(--font-mono);
    font-size: 12px;
    background: rgba(0, 0, 0, 0.04);
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    color: var(--primary);
    font-weight: 500;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* ====== 步骤图标 ====== */
.step-icon {
    font-size: 24px;
    font-weight: 700;
    box-shadow: var(--shadow-neu);
    transition: var(--transition);
}
.step-icon:hover {
    transform: scale(1.08);
}

/* ====== 通用卡片 ====== */
.card {
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-neu);
    transition: var(--transition);
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}
.card:hover {
    box-shadow: var(--shadow-hover);
}
.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-weight: 600;
    padding: 1rem 1.25rem;
}
.card-body { padding: 1.25rem; }

/* ====== 统计卡片 ====== */
.text-bg-primary, .text-bg-success, .text-bg-info, .text-bg-warning {
    border: none;
    position: relative;
    overflow: hidden;
}
.text-bg-primary {
    background: linear-gradient(135deg, #1f2937, #374151) !important;
}
.text-bg-success {
    background: linear-gradient(135deg, #059669, #10b981) !important;
}
.text-bg-info {
    background: linear-gradient(135deg, #0d9488, #14b8a6) !important;
}
.text-bg-warning {
    background: linear-gradient(135deg, #d97706, #f59e0b) !important;
}

/* ====== 表格 ====== */
.table {
    margin-bottom: 0;
    font-size: 14px;
}
.table th {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.02);
    padding: 0.75rem 1rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.06);
}
.table td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-color: rgba(0, 0, 0, 0.04);
}
.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(0, 0, 0, 0.015);
}
.table-hover > tbody > tr:hover > * {
    background-color: rgba(0, 0, 0, 0.03);
}

/* ====== 按钮 ====== */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    padding: 0.5rem 1.25rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.btn:active {
    transform: translateY(0);
}
.btn-primary {
    background: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}
.btn-success {
    background: var(--success);
}
.btn-warning {
    background: var(--warning);
    color: #fff;
}
.btn-danger {
    background: var(--danger);
}
.btn-outline-primary {
    border: 1.5px solid var(--primary);
    color: var(--primary);
    background: transparent;
}
.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}
.btn-outline-secondary {
    border: 1.5px solid #d4d4d8;
    color: var(--text-secondary);
    background: transparent;
}
.btn-outline-secondary:hover {
    background: #f4f4f5;
    border-color: #a1a1aa;
}
.btn-selected {
    border: 2px solid var(--accent);
    color: var(--accent);
    background: rgba(13, 148, 136, 0.08);
    font-weight: 600;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
    position: relative;
}
.btn-selected:hover {
    background: rgba(13, 148, 136, 0.12);
    color: var(--accent);
    border-color: var(--accent);
}
.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 15px;
    border-radius: var(--radius-md);
}

/* ====== 表单 ====== */
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: 1.5px solid #e4e4e7;
    padding: 0.625rem 1rem;
    font-size: 14px;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.8);
}
.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
    background: #fff;
}
.form-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}
.input-icon {
    position: relative;
}
.input-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    z-index: 2;
}
.input-icon .form-control {
    padding-left: 2.75rem;
}

/* ====== 徽章 ====== */
.badge {
    font-weight: 600;
    font-size: 11px;
    padding: 0.35em 0.75em;
    border-radius: 50px;
    letter-spacing: 0.2px;
}
.bg-success {
    background: var(--success) !important;
}
.bg-secondary {
    background: #a1a1aa !important;
}
.bg-danger {
    background: var(--danger) !important;
}
.bg-info {
    background: var(--accent) !important;
}

/* ====== 警告框 ====== */
.alert {
    border-radius: var(--radius-md);
    border: none;
    font-weight: 500;
    padding: 1rem 1.25rem;
}
.alert-success {
    background: rgba(5, 150, 105, 0.08);
    color: #065f46;
    border-left: 3px solid var(--success);
}
.alert-danger {
    background: rgba(220, 38, 38, 0.08);
    color: #991b1b;
    border-left: 3px solid var(--danger);
}
.alert-info {
    background: rgba(13, 148, 136, 0.08);
    color: #115e59;
    border-left: 3px solid var(--accent);
}
.alert-secondary {
    background: rgba(113, 113, 122, 0.08);
    color: var(--text-secondary);
    border-left: 3px solid #71717a;
}

/* ====== 分页 ====== */
.pagination { gap: 4px; }
.page-link {
    border: none;
    border-radius: var(--radius-sm) !important;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 13px;
    padding: 0.5rem 0.875rem;
    transition: var(--transition);
}
.page-link:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary);
}
.page-item.active .page-link {
    background: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ====== 代码标签 ====== */
code {
    font-family: var(--font-mono);
    font-size: 13px;
}

/* ====== 页脚 ====== */
footer {
    background: var(--bg-dark) !important;
    border: none;
}
footer p {
    color: rgba(255, 255, 255, 0.35);
    font-size: 13px;
}

/* ====== 使用流程区域 ====== */
.bg-light {
    background: rgba(0, 0, 0, 0.02) !important;
}

/* ====== 后台表格容器 ====== */
.card-body.p-0 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.card-body.p-0::-webkit-scrollbar {
    height: 4px;
}
.card-body.p-0::-webkit-scrollbar-thumb {
    background: #d4d4d8;
    border-radius: 2px;
}

/* ====== 后台侧边栏布局 ====== */
.admin-body {
    background: #f4f4f5;
}

.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 240px;
    background: linear-gradient(180deg, #18181b 0%, #1f1f23 100%);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 1.25rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.sidebar-brand i {
    color: var(--accent);
    font-size: 1.3rem;
}
.sidebar-nav {
    flex: 1;
    padding: 0.75rem 0;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.65rem 1.5rem;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    margin: 1px 0;
}
.sidebar-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.06);
}
.sidebar-link.active {
    color: #fff;
    background: rgba(13,148,136,0.12);
    border-left-color: var(--accent);
}
.sidebar-link i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}
.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 0.5rem 1.5rem;
}
.sidebar-footer {
    padding: 0.75rem 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.5rem 1.5rem;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
}
.sidebar-user i {
    font-size: 18px;
}
.sidebar-logout {
    color: rgba(255,255,255,0.35) !important;
}
.sidebar-logout:hover {
    color: #f87171 !important;
    background: rgba(248,113,113,0.08) !important;
}

/* 顶部栏 */
.admin-topbar {
    position: fixed;
    top: 0;
    left: 240px;
    right: 0;
    height: 56px;
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    z-index: 1030;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.sidebar-toggle {
    display: none;
    font-size: 1.4rem;
    color: var(--text-primary);
    padding: 0.25rem;
    line-height: 1;
}
.topbar-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}
.topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.topbar-user {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    transition: all 0.2s;
}
.topbar-user:hover {
    background: rgba(0,0,0,0.04);
    color: var(--text-primary);
}
.topbar-user i:first-child {
    font-size: 20px;
}

/* 主内容区 */
.admin-content {
    margin-left: 240px;
    margin-top: 56px;
    padding: 1.5rem;
    min-height: calc(100vh - 56px);
}

/* 遮罩 */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1035;
}

/* ====== 加载动画 ====== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.glass-card, .card { animation: fadeIn 0.3s ease-out; }

/* ====== 移动端导航栏 ====== */
@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    .admin-sidebar.open {
        transform: translateX(0);
    }
    .sidebar-toggle {
        display: block;
    }
    .sidebar-overlay.show {
        display: block;
    }
    .admin-topbar {
        left: 0;
    }
    .admin-content {
        margin-left: 0;
    }
}

/* ====== 响应式 - 平板 ====== */
@media (max-width: 768px) {
    /* Hero */
    .hero-section {
        padding: 50px 0 40px;
    }
    .hero-section h1 {
        font-size: 1.75rem;
        letter-spacing: -0.5px;
    }
    .hero-section .lead {
        font-size: 0.9rem;
    }
    .hero-section .btn-light {
        padding: 0.625rem 1.5rem;
        font-size: 14px;
    }

    /* 价格 */
    .price-amount {
        font-size: 36px;
    }
    .price-currency {
        font-size: 18px;
    }

    /* 步骤 */
    .step-icon {
        width: 52px !important;
        height: 52px !important;
    }
    .step-icon span {
        font-size: 1.1rem !important;
    }

    /* 卡片 */
    .glass-card {
        padding: 1.25rem;
        border-radius: var(--radius-md);
    }
    .card-body {
        padding: 1rem;
    }
    .card-header {
        padding: 0.75rem 1rem;
    }

    /* 表格 - 水平滚动 */
    .table-responsive {
        border-radius: var(--radius-md);
    }
    .table {
        font-size: 13px;
    }
    .table th {
        padding: 0.625rem 0.75rem;
        font-size: 11px;
    }
    .table td {
        padding: 0.625rem 0.75rem;
    }

    /* 按钮 */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 13px;
    }
    .btn-lg {
        padding: 0.625rem 1.5rem;
        font-size: 14px;
    }

    /* 表单 */
    .form-control, .form-select {
        padding: 0.5rem 0.875rem;
        font-size: 14px;
    }

    /* 分页 */
    .page-link {
        padding: 0.4rem 0.7rem;
        font-size: 12px;
    }
}

/* ====== 响应式 - 手机 ====== */
@media (max-width: 576px) {
    body {
        font-size: 14px;
    }

    /* Hero */
    .hero-section {
        padding: 40px 0 32px;
    }
    .hero-section h1 {
        font-size: 1.5rem;
    }
    .hero-section .lead {
        font-size: 0.85rem;
        padding: 0 0.5rem;
    }

    /* 产品卡片 */
    .product-card {
        margin-bottom: 0.75rem;
    }
    .product-thumb {
        height: clamp(96px, 22vw, 120px);
    }
    .product-card .card-text {
        -webkit-line-clamp: 1;
        min-height: 0;
    }
    .price-amount {
        font-size: 32px;
    }

    /* 购买页 */
    .buy-page .col-md-5 {
        max-width: min(100%, 420px);
    }
    .buy-summary__thumb {
        width: 60px;
        height: 60px;
    }
    .buy-summary__name {
        font-size: 15px;
    }
    .buy-summary__price .price-amount {
        font-size: 26px;
    }

    /* 步骤 - 两列 */
    .row.text-center .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* 卡密展示 */
    .card-key-box {
        padding: 1rem;
    }
    .card-key-value {
        font-size: 13px;
        letter-spacing: 1px;
    }

    /* 玻璃卡片 */
    .glass-card {
        padding: 1rem;
    }

    /* 表单 */
    .form-control, .form-select {
        padding: 0.5rem 0.75rem;
        font-size: 14px;
        border-radius: 8px;
    }
    .form-label {
        font-size: 12px;
    }

    /* 按钮 */
    .btn {
        padding: 0.5rem 0.875rem;
        font-size: 13px;
    }
    .btn-lg {
        padding: 0.625rem 1.25rem;
        font-size: 14px;
    }

    /* 后台统计卡片 - 单列 */
    .row.g-3 .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .text-bg-primary .card-body,
    .text-bg-success .card-body,
    .text-bg-info .card-body,
    .text-bg-warning .card-body {
        padding: 0.875rem;
    }
    .text-bg-primary .fw-bold,
    .text-bg-success .fw-bold,
    .text-bg-info .fw-bold,
    .text-bg-warning .fw-bold {
        font-size: 1.5rem !important;
    }

    /* 后台表格 */
    .card-body.p-0 {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .table {
        min-width: 600px;
    }

    /* 后台筛选 */
    .card-body.py-2 .row {
        gap: 0.5rem 0;
    }

    /* 分页 */
    .pagination {
        flex-wrap: wrap;
    }

    /* 徽章 */
    .badge {
        font-size: 10px;
        padding: 0.3em 0.6em;
    }

    /* 提示框 */
    .alert, .alert-glass, .alert-glass-danger {
        font-size: 13px;
        padding: 0.75rem 1rem;
    }
}

/* ====== 滚动条美化 ====== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #d4d4d8;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a1a1aa;
}

/* ====== 操作按钮增强 ====== */
.btn-action {
    padding: 0.45rem 1rem;
    font-size: 13px;
    font-weight: 600;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}
.btn-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.btn-action:active {
    transform: translateY(0);
}

/* 亮色卡片上的按钮（如深色渐变统计卡） */
.btn-glass {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.btn-glass:hover {
    background: rgba(255, 255, 255, 0.32) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* 状态切换按钮 */
.btn-status-toggle {
    font-size: 12px;
    font-weight: 600;
    padding: 0.375rem 0.875rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ====== 后台产品网格卡片 ====== */
.admin-product-card {
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: var(--bg-card);
    box-shadow: var(--shadow-neu);
    transition: var(--transition);
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}
.admin-product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: #d4d4d8;
    color: inherit;
}
.admin-product-card .product-img-wrap {
    height: 120px;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.admin-product-card .product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.admin-product-card .product-img-wrap .no-img {
    color: #d4d4d8;
    font-size: 2.5rem;
}
.admin-product-card .product-info {
    padding: 0.875rem 1rem;
}
.admin-product-card .product-name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-product-card .product-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.admin-product-card .stats-row {
    display: flex;
    gap: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}
.admin-product-card .stat-item {
    flex: 1;
    text-align: center;
    padding: 0.5rem 0;
    border-right: 1px solid rgba(0, 0, 0, 0.04);
}
.admin-product-card .stat-item:last-child {
    border-right: none;
}
.admin-product-card .stat-num {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}
.admin-product-card .stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ====== 工具类 ====== */
.text-sm {
    font-size: 13px;
}

.stat-card-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.85);
}

/* ====== 选中文本颜色 ====== */
::selection {
    background: rgba(13, 148, 136, 0.15);
    color: var(--primary);
}

/* ====== 二维码上传组件 ====== */
div.qr-upload-area {
    width: 130px !important;
    height: 130px !important;
    min-width: 130px;
    min-height: 130px;
    border: 2px dashed #e4e4e7 !important;
    border-radius: 14px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s;
    background: #fafafa !important;
    position: relative;
    display: inline-block;
    padding: 0 !important;
    box-sizing: border-box;
}
div.qr-upload-area:hover {
    border-color: var(--accent) !important;
}
div.qr-upload-area .qr-placeholder {
    width: 130px;
    height: 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #a1a1aa;
    font-size: 12px;
    gap: 4px;
}
div.qr-upload-area .qr-placeholder i {
    font-size: 24px;
}
div.qr-upload-area .qr-preview {
    width: 130px !important;
    height: 130px !important;
    position: relative;
    display: block;
}
div.qr-upload-area .qr-preview img {
    width: 130px !important;
    height: 130px !important;
    object-fit: cover !important;
    display: block;
    border-radius: 10px;
}
div.qr-upload-area .qr-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
    z-index: 2;
}
div.qr-upload-area .qr-remove:hover {
    background: rgba(220,53,69,0.85);
}
div.qr-upload-area .d-none {
    display: none !important;
}

/* ====== 安装包上传卡片 ====== */
.pkg-card {
    position: relative;
    border: 2px dashed #e4e4e7;
    border-radius: 14px;
    padding: 28px 16px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafafa;
}
.pkg-card:hover {
    border-color: var(--accent);
    background: #f0fdf9;
}
.pkg-card.pkg-has-file {
    border-style: solid;
    border-color: #bbf7d0;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
}
.pkg-card.pkg-has-file:hover {
    border-color: #86efac;
}
.pkg-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    line-height: 1;
}
.pkg-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}
.pkg-hint {
    font-size: 12px;
    color: #a1a1aa;
}
.pkg-filename {
    font-size: 12px;
    color: #64748b;
    word-break: break-all;
    margin-bottom: 6px;
    max-height: 32px;
    overflow: hidden;
}
.pkg-ok {
    font-size: 12px;
    font-weight: 600;
    color: #16a34a;
}
.pkg-ok i { margin-right: 2px; }

/* ====== 开关切换 ====== */
.toggle-switch {
    display: inline-block;
    width: 44px;
    height: 24px;
    background: #d1d5db;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
    vertical-align: middle;
    text-decoration: none;
}
.toggle-switch:hover { background: #c0c4cc; }
.toggle-switch.on {
    background: #10b981;
}
.toggle-switch.on:hover { background: #059669; }
.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle-switch.on .toggle-slider {
    transform: translateX(20px);
}
