:root {
    --bg-start: #f9f5ee;
    --bg-end: #eef8ff;
    --panel: rgba(255, 255, 255, 0.88);
    --panel-strong: #ffffff;
    --text-main: #1a2530;
    --text-sub: #5a6e82;
    --line: rgba(26, 37, 48, 0.12);
    --line-strong: rgba(26, 37, 48, 0.22);
    --brand: #006ee8;
    --brand-dark: #004eae;
    --accent: #ff9d14;
    --ok-bg: #dcfce7;
    --ok-text: #166534;
    --err-bg: #fee2e2;
    --err-text: #991b1b;
    --pending-bg: #fff2d9;
    --pending-text: #8f5b00;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    color: var(--text-main);
    background: linear-gradient(165deg, var(--bg-start), var(--bg-end));
    font-family: 'MiSans', 'HarmonyOS Sans SC', 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
}

body {
    padding: 28px 14px 46px;
}

.grid-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -2;
    background-image:
        linear-gradient(to right, rgba(0, 110, 232, 0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 110, 232, 0.06) 1px, transparent 1px);
    background-size: 34px 34px;
}

.glow {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 999px;
    filter: blur(90px);
    opacity: 0.45;
    z-index: -1;
    pointer-events: none;
}

.glow.top {
    top: -170px;
    left: -150px;
    background: #ffc266;
}

.glow.bottom {
    right: -170px;
    bottom: -190px;
    background: #8dc2ff;
}

.container {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
}

.hero,
.section {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel);
    backdrop-filter: blur(8px);
    box-shadow: 0 18px 35px rgba(13, 36, 61, 0.08);
}

.hero {
    padding: 30px;
}

.section {
    margin-top: 16px;
    padding: 22px;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-dark);
    background: rgba(0, 110, 232, 0.12);
}

h1 {
    margin: 14px 0 10px;
    font-size: clamp(30px, 4.6vw, 46px);
    line-height: 1.12;
    letter-spacing: -0.02em;
}

h2 {
    margin: 0;
    font-size: 20px;
}

.sub,
.section-sub {
    margin: 0;
    color: var(--text-sub);
    line-height: 1.72;
}

.section-sub {
    margin-top: 6px;
    margin-bottom: 14px;
}

.hero-points {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-point {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.92);
    color: #2a3e52;
}

.product-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.product-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    background: var(--panel-strong);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(8, 41, 78, 0.08);
}

.product-card.active {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(0, 110, 232, 0.16);
}

.product-title {
    margin: 0;
    font-size: 24px;
    line-height: 1.1;
}

.price {
    margin: 8px 0 0;
    font-size: 30px;
    font-weight: 700;
}

.price span {
    margin-left: 4px;
    font-size: 15px;
    color: var(--text-sub);
    font-weight: 500;
}

.desc {
    margin-top: 10px;
    color: var(--text-sub);
    line-height: 1.68;
}

.channel-list {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.channel-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 11px 14px;
    cursor: pointer;
    background: #fff;
}

.channel-item input {
    margin: 0;
    width: 16px;
    height: 16px;
}

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

button,
.btn-primary,
.btn-secondary,
.btn {
    border: none;
    min-height: 46px;
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    white-space: nowrap;
    font-family: inherit;
}

button:disabled,
button.is-loading {
    opacity: 0.72;
    cursor: not-allowed;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.btn-secondary {
    color: var(--text-main);
    background: #fff;
    border: 1px solid var(--line-strong);
}

.order-box {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    display: none;
}

.order-box.show {
    display: block;
}

.kv {
    display: grid;
    grid-template-columns: 120px 1fr;
    row-gap: 7px;
    column-gap: 10px;
    font-size: 14px;
}

.kv .k {
    color: var(--text-sub);
}

.status-tag {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
}

.status-pending {
    background: var(--pending-bg);
    color: var(--pending-text);
}

.status-paid {
    background: var(--ok-bg);
    color: var(--ok-text);
}

.status-error {
    background: var(--err-bg);
    color: var(--err-text);
}

.notice {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(0, 110, 232, 0.08);
    color: var(--brand-dark);
    line-height: 1.66;
}

.support-box {
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: #fff;
    line-height: 1.72;
    font-size: 14px;
}

.support-box strong {
    color: var(--brand-dark);
}

.msg {
    margin-top: 12px;
    padding: 11px 12px;
    border-radius: 10px;
    font-size: 14px;
    display: none;
}

.msg.show {
    display: block;
}

.msg.ok {
    color: var(--ok-text);
    background: var(--ok-bg);
}

.msg.err {
    color: var(--err-text);
    background: var(--err-bg);
}

.assist-actions {
    margin-top: 10px;
    display: none;
    flex-wrap: wrap;
    gap: 8px;
}

.assist-actions.show {
    display: flex;
}

.assist-hint {
    width: 100%;
    color: var(--text-sub);
    font-size: 13px;
    line-height: 1.6;
}

.code-box {
    margin-top: 15px;
    border: 1px dashed rgba(22, 32, 42, 0.26);
    border-radius: 16px;
    background: #fff;
    padding: 20px;
    text-align: center;
}

.code-box p {
    margin: 0;
}

.code-box code {
    display: block;
    margin-top: 10px;
    font-size: 30px;
    letter-spacing: 0.09em;
    font-family: 'Consolas', 'Monaco', monospace;
}

.form-group {
    margin-bottom: 12px;
}

.form-label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    color: var(--text-sub);
}

.input {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    padding: 12px;
    background: #fff;
    font-size: 15px;
    color: var(--text-main);
}

.input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(0, 110, 232, 0.14);
}

.inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.input-mini {
    min-width: 170px;
    padding: 8px 10px;
    font-size: 13px;
}

.btn-mini {
    min-height: 36px;
    padding: 8px 10px;
    font-size: 13px;
}

.footer {
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-sub);
    text-align: center;
}

@media (max-width: 880px) {
    .hero,
    .section {
        border-radius: 18px;
        padding: 16px;
    }

    .product-list {
        grid-template-columns: 1fr;
    }

    .kv {
        grid-template-columns: 96px 1fr;
        font-size: 13px;
    }

    .actions .btn-primary,
    .actions .btn-secondary,
    .actions button {
        width: 100%;
        min-height: 48px;
    }

    .hero-point {
        width: 100%;
    }
}
