﻿:root {
    --bg: #f5f8ff;
    --surface: #ffffff;
    --surface-soft: #eef4ff;
    --text: #101828;
    --muted: #667085;
    --line: #d8e2f2;
    --primary: #3b82f6;
    --primary-strong: #1d4ed8;
    --primary-soft: #dbeafe;
    --success: #1d4ed8;
    --warning: #ca8a04;
    --danger: #dc2626;
    --shadow: 0 24px 64px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 28%),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.1), transparent 22%),
        linear-gradient(180deg, #f8fbff 0%, #f2f6fd 48%, #edf3fb 100%);
}

.page-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 20px 60px;
}

.page-header {
    text-align: center;
    margin-bottom: 32px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 20px;
}

.page-title {
    margin: 0;
    font-size: clamp(36px, 5vw, 52px);
    line-height: 1.05;
}

.page-subtitle {
    max-width: 760px;
    margin: 16px auto 0;
    font-size: 18px;
    line-height: 1.8;
    color: var(--muted);
}

.member-container {
    display: grid;
    gap: 18px;
}

.hero-panel,
.products-section,
.modal-content,
.fixed-kefu {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.hero-panel {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    border-radius: 28px;
    padding: 28px;
}

.compact-hero {
    grid-template-columns: 1fr;
    padding: 22px 26px;
}

.hero-kicker,
.section-kicker,
.meta-label {
    margin: 0 0 10px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-copy h2,
.section-head h2,
.contact-title,
.info-title {
    margin: 0;
    font-size: clamp(26px, 3vw, 34px);
}

.products-headline-compact {
    font-size: clamp(18px, 2vw, 24px) !important;
    line-height: 1.45;
    font-weight: 700;
    max-width: 620px;
}

.hero-copy p,
.page-log,
.redeem-note,
.product-desc {
    color: var(--muted);
    line-height: 1.75;
}

.hero-copy p:last-child {
    margin-bottom: 0;
}

.products-section {
    border-radius: 28px;
    padding: 28px;
}

.products-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.payment-toolbar {
    display: grid;
    gap: 8px;
    justify-items: end;
}

.payment-toolbar-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.channel-switch {
    display: inline-grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.price-explain-panel {
    margin-top: 20px;
    padding: 18px 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(16, 185, 129, 0.08) 100%);
    border: 1px solid rgba(59, 130, 246, 0.16);
}

.price-explain-title {
    margin: 0 0 6px;
    color: var(--primary-strong);
    font-size: 15px;
    font-weight: 800;
}

.price-explain-text {
    margin: 0;
    color: #344054;
    line-height: 1.75;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 22px;
}

.redeem-entry-panel {
    margin-top: 24px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 22px;
    padding: 24px;
    border-radius: 24px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
    border: 1px solid #dce7fb;
}

.redeem-entry-copy {
    display: grid;
    gap: 10px;
    align-content: start;
}

.redeem-entry-copy h3 {
    margin: 0;
    font-size: clamp(24px, 3vw, 30px);
}

.redeem-entry-text {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.redeem-entry-form {
    display: grid;
    gap: 12px;
    align-content: start;
    padding: 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(59, 130, 246, 0.12);
}

.redeem-entry-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.redeem-entry-input {
    width: 100%;
    min-height: 50px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid #cddbf4;
    background: #fff;
    color: var(--text);
    font: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.redeem-entry-input:focus {
    border-color: rgba(59, 130, 246, 0.7);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.redeem-entry-button {
    min-height: 50px;
    border: none;
    border-radius: 16px;
    font: inherit;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
}

.redeem-entry-button:disabled {
    cursor: wait;
    opacity: 0.78;
}

.redeem-entry-status {
    margin: 0;
    min-height: 26px;
    color: var(--muted);
    line-height: 1.7;
}

.redeem-entry-status[data-state="success"] {
    color: var(--success);
    font-weight: 700;
}

.redeem-entry-status[data-state="error"] {
    color: var(--danger);
    font-weight: 700;
}

.redeem-entry-status[data-state="loading"] {
    color: var(--primary-strong);
    font-weight: 700;
}

.product-card {
    position: relative;
    display: grid;
    gap: 18px;
    padding: 28px 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
    -webkit-tap-highlight-color: transparent;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.product-card:hover,
.product-card.is-selected {
    border-color: rgba(59, 130, 246, 0.28);
    box-shadow: 0 28px 48px rgba(59, 130, 246, 0.16);
}

.product-card.is-selected::before {
    content: "已选择";
    position: absolute;
    top: 18px;
    right: 18px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-strong);
    font-size: 12px;
    font-weight: 700;
}

.product-card.is-featured {
    background: linear-gradient(180deg, #f6f9ff 0%, #eef5ff 100%);
}

.product-card.is-featured::after {
    content: "推荐";
    position: absolute;
    top: 18px;
    left: 18px;
    padding: 6px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.product-head {
    display: grid;
    gap: 8px;
}

.product-title {
    margin: 0;
    font-size: 28px;
}

.product-tagline {
    margin: 0;
    color: var(--muted);
}

.product-price {
    font-size: 42px;
    font-weight: 800;
    color: var(--primary-strong);
    line-height: 1;
}

.product-price small {
    font-size: 16px;
    font-weight: 600;
    color: var(--muted);
}

.feature-list {
    display: grid;
    gap: 12px;
}

.feature-item {
    position: relative;
    padding-left: 18px;
    color: #344054;
}

.feature-item::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 0;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--primary);
}

.buy-button,
.secondary-button,
.channel-tab,
.kefu-button {
    border: none;
    border-radius: 16px;
    font: inherit;
    cursor: pointer;
}

.buy-button,
.kefu-button {
    padding: 14px 18px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
}

.buy-button:hover,
.create-order-button:hover,
.kefu-button:hover {
    transform: translateY(-1px);
}

.page-footer {
    margin-top: 40px;
    text-align: center;
}

.footer-nav {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
}

.footer-nav a {
    color: inherit;
    text-decoration: none;
}

.fixed-kefu {
    position: fixed;
    top: 180px;
    right: 24px;
    z-index: 20;
    width: 170px;
    padding: 16px;
    border-radius: 22px;
    text-align: center;
}

.fixed-kefu img {
    display: block;
    width: 100%;
    border-radius: 16px;
    background: #fff;
    padding: 8px;
}

.fixed-kefu p {
    margin: 12px 0 0;
    font-size: 15px;
    font-weight: 600;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.55);
}

.modal.active {
    display: flex;
}

.modal-content {
    position: relative;
    width: min(100%, 520px);
    max-height: calc(100vh - 40px);
    overflow: auto;
    border-radius: 28px;
    padding: 24px;
}

.support-modal {
    width: min(100%, 420px);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    color: var(--muted);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.modal-header {
    margin-bottom: 14px;
}

.modal-title {
    margin: 0;
    font-size: 28px;
}

.modal-subtitle {
    margin: 10px 0 0;
}

.product-info {
    text-align: center;
    padding: 16px;
    border-radius: 20px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
    border: 1px solid #dde7fb;
}

.product-name {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.product-info .product-price {
    margin: 12px 0 8px;
}

.channel-tab {
    padding: 13px 14px;
    font-weight: 600;
    color: var(--muted);
    background: #f3f6fb;
    border: 1px solid transparent;
}

.channel-tab.active {
    color: var(--primary-strong);
    background: #dbeafe;
    border-color: #93c5fd;
}

.order-panel {
    margin-top: 16px;
    padding: 16px;
    border-radius: 22px;
    background: #f9fbff;
    border: 1px solid #dce7fb;
}

.hidden {
    display: none !important;
}

.order-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.order-no {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    word-break: break-all;
}

.order-status {
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.order-status.pending {
    color: var(--warning);
    background: #fef3c7;
}

.order-status.approved {
    color: var(--success);
    background: #dbeafe;
}

.order-status.rejected {
    color: var(--danger);
    background: #fee2e2;
}

.order-countdown-text {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    color: #166534;
    background: #ecfdf3;
    border: 1px solid #bfdbfe;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.qrcode-container {
    margin: 18px 0;
    text-align: center;
}

.qrcode-image {
    display: block;
    width: 100%;
    max-width: 220px;
    margin: 0 auto;
    border-radius: 20px;
    background: #fff;
    padding: 10px;
    border: 1px solid #dde7fb;
}

.qrcode-label {
    margin: 12px 0 0;
    color: var(--muted);
}

.redeem-result {
    margin-top: 14px;
    padding: 14px;
    border-radius: 18px;
    background: #ecfdf3;
    border: 1px solid #bfdbfe;
}

.redeem-code-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.redeem-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.redeem-actions .secondary-button {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    color: #fff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.redeem-use-button {
    width: 100%;
    margin-top: 12px;
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    color: #fff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.redeem-code-line code {
    font-size: 18px;
    font-weight: 700;
    color: #166534;
    word-break: break-all;
}

.redeem-note {
    margin-bottom: 0;
}

.secondary-button {
    padding: 12px 14px;
    background: #eff4fb;
    color: #344054;
    font-weight: 600;
}

.secondary-button.compact {
    width: auto;
    min-width: 84px;
}

.secondary-button.redeem-use-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 58px;
    margin-top: 16px;
    padding: 16px 18px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #0f766e 100%);
    border: 1px solid rgba(255, 255, 255, 0.46);
    box-shadow: 0 18px 34px rgba(37, 99, 235, 0.3);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.secondary-button.redeem-use-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 42px rgba(37, 99, 235, 0.38);
    filter: brightness(1.03);
}

.secondary-button.redeem-use-button:active {
    transform: translateY(0);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.26);
}

.secondary-button.redeem-use-button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.28);
    outline-offset: 3px;
}

.order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.order-actions .secondary-button {
    flex: 1;
    min-width: 160px;
}

.page-log {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 18px;
    background: #f3f6fb;
    border: 1px solid #dde7fb;
}

.page-log-prefix {
    color: var(--text);
    font-weight: 700;
}

.page-log-alert {
    color: var(--danger);
    font-weight: 800;
}

.modal-footer {
    margin-top: 14px;
    text-align: center;
}

@media (max-width: 1100px) {
    .fixed-kefu {
        display: none;
    }
}

@media (max-width: 820px) {
    .hero-panel {
        grid-template-columns: 1fr;
    }

    .redeem-entry-panel {
        grid-template-columns: 1fr;
        padding: 20px;
    }
}

@media (max-width: 720px) {
    .page-shell {
        padding: 20px 14px 40px;
    }

    .hero-panel,
    .products-section,
    .modal-content {
        border-radius: 22px;
        padding: 20px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .products-head {
        align-items: stretch;
        flex-direction: column;
    }

    .payment-toolbar {
        justify-items: start;
    }

    .product-card {
        padding: 24px 20px;
    }

    .order-topline,
    .redeem-code-line,
    .order-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .redeem-actions {
        justify-content: stretch;
    }

    .redeem-actions .secondary-button {
        flex: 1;
    }

    .order-actions .secondary-button {
        min-width: 0;
    }
}
