/* ========== Reset ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
}

/* ========== Background ========== */
body {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(173, 216, 255, 0.45), transparent 60%),
        radial-gradient(ellipse at 70% 10%, rgba(200, 225, 255, 0.35), transparent 50%),
        linear-gradient(180deg, #e8f0fe 0%, #f4f7fb 40%, #f9fbfd 100%);
    color: #333;
}

.container {
    min-height: 100vh;
    padding: 40px 16px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* ========== Card ========== */
.payment-card {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
    padding: 28px 22px 18px;
    margin-top: 20px;
}

/* ========== Amount Section ========== */
.amount-section {
    text-align: center;
    padding-bottom: 18px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 18px;
}

.amount-label {
    font-size: 13px;
    color: #888;
    margin-bottom: 6px;
}

.amount-section h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.click-hint {
    font-size: 13px;
    color: #5b8def;
}

/* ========== Payment Methods ========== */
.payment-methods {
    margin-bottom: 20px;
}

#other-payment-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.payment-option:hover {
    border-color: #c5d8f8;
    background: #f7faff;
}

.payment-option.selected {
    border-color: #5b8def;
    background: #f0f5ff;
    box-shadow: 0 2px 12px rgba(91, 141, 239, 0.12);
}

/* Right arrow chevron */
.payment-option::after {
    content: "";
    position: absolute;
    right: 16px;
    width: 8px;
    height: 8px;
    border-top: 2px solid #bbb;
    border-right: 2px solid #bbb;
    transform: rotate(45deg);
    transition: border-color 0.2s;
}

.payment-option.selected::after {
    border-color: #5b8def;
}

.payment-icon {
    width: 36px;
    height: 36px;
    margin-right: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.payment-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.payment-name {
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

/* ========== QR Section ========== */
.qr-section {
    margin-bottom: 20px;
    text-align: center;
    display: none;
}

.qr-section.visible {
    display: block;
}

.qr-title {
    font-size: 13px;
    color: #5b8def;
    margin-bottom: 10px;
    font-weight: 500;
}

.qr-frame {
    width: 180px;
    height: 180px;
    margin: 0 auto 12px;
    padding: 12px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #eee;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

#payment-qr {
    width: 100%;
    height: 100%;
    display: block;
}

.qr-note {
    font-size: 12px;
    line-height: 1.5;
    color: #666;
}

/* ========== Pay Button ========== */
.pay-button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #5b8def, #4a7de0);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 20px;
}

.pay-button:hover {
    background: linear-gradient(135deg, #4a7de0, #3a6dd0);
    box-shadow: 0 4px 16px rgba(74, 125, 224, 0.3);
}

.pay-button:active {
    transform: translateY(1px);
}

/* ========== Footer ========== */
.page-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
}

.footer-lang {
    font-size: 12px;
    color: #999;
}

.footer-brand {
    font-size: 12px;
    color: #999;
    font-weight: 500;
}

/* ========== Loading Overlay ========== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s linear 0.2s, opacity 0.2s;
}

.loading-overlay.visible {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

.loading-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(91, 141, 239, 0.25);
    border-radius: 50%;
    border-top-color: #5b8def;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
