* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", Arial, sans-serif;
    background: #f3f4fb;
    color: #1f2236;
    overflow-x: hidden;
    user-select: none;
    -webkit-font-smoothing: antialiased;
}
#main {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 0;
}
.card {
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    box-shadow: 0 0 30px rgba(0,0,0,0.06);
}
@media (min-width: 768px) {
    #main { padding: 24px; align-items: flex-start; }
    .card { min-height: auto; border-radius: 22px; overflow: hidden; }
}

.top-banner {
    background: linear-gradient(135deg, #5b6cff 0%, #7c5bff 100%);
    color: #fff;
    padding: 22px 22px 26px;
    position: relative;
}
.top-banner .title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
}
.top-banner .title-icon {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.18);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.top-banner .title-icon svg {
    width: 22px;
    height: 22px;
    fill: #ffffff;
}
.order-pill {
    display: inline-block;
    margin-top: 16px;
    padding: 6px 14px;
    background: rgba(255,255,255,0.18);
    border-radius: 999px;
    font-size: 13px;
    color: #fff;
    letter-spacing: 0.5px;
}
.order-pill .label { opacity: 0.9; margin-right: 4px; }

.body {
    padding: 24px 22px 30px;
    flex: 1;
}

.field {
    margin-bottom: 18px;
}
.field-label {
    color: #9298b0;
    font-size: 13px;
    margin-bottom: 6px;
}
.field-value {
    color: #1f2236;
    font-size: 15px;
    font-weight: 600;
    word-break: break-all;
}

.price-box {
    background: #f4f5fa;
    border-radius: 14px;
    padding: 16px 18px;
    margin: 18px 0 4px;
}
.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
}
.price-row .price-label { color: #6b7088; }
.price-row .price-value { font-weight: 600; color: #1f2236; font-variant-numeric: tabular-nums; }
.price-row.total .price-value {
    color: #ff4757;
    font-size: 19px;
    font-weight: 700;
}

.divider {
    border-top: 1px dashed #e3e5ef;
    margin: 24px 0 20px;
}

.section-title {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #5b6cff;
    margin: 0 0 18px;
    letter-spacing: 1px;
}

.wallet-selection ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
@media (max-width: 420px) {
    .wallet-selection ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .wallet-selection li:nth-child(3):last-child {
        grid-column: 1 / -1;
        max-width: calc(50% - 5px);
        justify-self: center;
    }
}
.wallet-selection li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 12px;
    border: 1.5px solid #e6e8f0;
    border-radius: 14px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}
.wallet-selection li:active {
    transform: scale(0.98);
}
.wallet-selection li.selected {
    border-color: #5b6cff;
    box-shadow: 0 0 0 3px rgba(91, 108, 255, 0.12);
}
.wallet-selection li img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #eef0ff;
    padding: 4px;
    flex-shrink: 0;
    object-fit: contain;
}
.wallet-selection li span {
    font-size: 14px;
    font-weight: 600;
    color: #2a2d4a;
    line-height: 1.3;
}
.wallet-selection li input[type="radio"] {
    display: none;
}

.pay-approvalbutton,
#payButton {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 22px;
    padding: 16px 18px;
    border: none;
    outline: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #5b6cff 0%, #7c5bff 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(91, 108, 255, 0.28);
    transition: transform 0.15s ease, opacity 0.15s ease;
    -webkit-appearance: none;
}
.pay-approvalbutton:active,
#payButton:active {
    transform: scale(0.99);
}
.pay-approvalbutton.disabled,
#payButton.disabled,
#payButton:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

#paymentInterface {
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: 14px;
    background: #f4f5fa;
}
#paymentInterface .order-info p {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    font-size: 14px;
    color: #4a4f6e;
}
#paymentInterface .order-info p span:last-child { color: #1f2236; font-weight: 600; }
#paymentInterface .usdt-icon {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin-right: 4px;
}

.hidden { display: none !important; }

.debug-window {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    height: 200px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 8px;
    padding: 10px;
    z-index: 99999;
    display: none;
    flex-direction: column;
    font-size: 12px;
    line-height: 1.2;
    overflow: hidden;
}
.debug-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    cursor: move;
}
.debug-title { font-weight: bold; }
.debug-close { cursor: pointer; background: none; border: none; color: white; font-size: 16px; }
.debug-export { cursor: pointer; background: #007bff; border: none; color: white; font-size: 12px; padding: 2px 8px; border-radius: 3px; margin-left: 8px; }
.debug-export:hover { background: #0056b3; }
.debug-content { flex: 1; overflow-y: auto; padding-top: 5px; }
.debug-resize { position: absolute; bottom: 0; right: 0; width: 15px; height: 15px; cursor: se-resize; background: transparent; border-right: 2px solid white; border-bottom: 2px solid white; }
.debug-toggle { display: none; }
.debug-toggle:hover { opacity: 1; }

/* ==================== 主页钱包引导区（无跳转逻辑） ==================== */
.wallet-guide {
    text-align: center;
}
.wallet-guide .guide-tip {
    color: #9298b0;
    font-size: 13px;
    margin: 0 0 14px;
}
.wallet-guide .guide-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.wallet-guide .guide-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1.5px solid #e6e8f0;
    border-radius: 12px;
    margin-bottom: 10px;
    background: #ffffff;
}
.wallet-guide .guide-list li img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #eef0ff;
    padding: 3px;
    flex-shrink: 0;
    object-fit: contain;
}
.wallet-guide .guide-list .guide-name {
    font-size: 14px;
    font-weight: 600;
    color: #2a2d4a;
}
.wallet-guide .guide-list .guide-code {
    margin-left: auto;
    color: #5b6cff;
    font-size: 13px;
    background: #f4f5fa;
    border-radius: 6px;
    padding: 3px 8px;
    user-select: all;
}