* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
body {
    background-color: #0f172a;
    color: #f8fafc;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 16px;
    background-image: radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.08) 0px, transparent 50%);
}
.pay-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 14px;
    padding: 28px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
}
.header {
    text-align: center;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid #334155;
}
.header h3 {
    font-size: 19px;
    color: #f8fafc;
    margin-bottom: 4px;
}
.amount-tag {
    font-size: 28px;
    font-weight: 700;
    color: #38bdf8;
}
.form-group {
    margin-bottom: 14px;
}
label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 6px;
}
input, select {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #475569;
    background: #0f172a;
    color: #fff;
    font-size: 14px;
    outline: none;
}
input:focus, select:focus {
    border-color: #38bdf8;
}
.row-2 {
    display: flex;
    gap: 12px;
}
.row-2 .form-group {
    flex: 1;
}
.btn-submit {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #0284c7, #2563eb);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
}
.btn-submit:hover {
    opacity: 0.9;
}
.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.output-box {
    background: #090d16;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 12px;
    font-family: monospace;
    font-size: 12px;
    color: #a7f3d0;
    margin-top: 16px;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 150px;
    overflow-y: auto;
    display: none;
}
.hint-text {
    font-size: 11px;
    color: #64748b;
    margin-top: 4px;
}
.alert-box {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 14px;
    display: none;
    line-height: 1.4;
}
body.modal-open {
    overflow: hidden;
}

/* BOOTSTRAP-STYLE MODAL OVERLAY FOR 3DS */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1055;
    display: none;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    outline: 0;
    background-color: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s linear;
    opacity: 0;
}
.modal.show {
    display: flex;
    opacity: 1;
}
.modal-dialog {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 1rem;
    pointer-events: auto;
    transform: translateY(-30px);
    transition: transform 0.3s ease-out;
}
.modal.show .modal-dialog {
    transform: none;
}
.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #1e293b;
    background-clip: padding-box;
    border: 1px solid #475569;
    border-radius: 0.5rem;
    outline: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    height: 80vh;
    max-height: 540px;
    min-height: 420px;
}
.modal-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #334155;
    border-top-left-radius: calc(0.5rem - 1px);
    border-top-right-radius: calc(0.5rem - 1px);
    background: #151f32;
}
.modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #38bdf8;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-close {
    box-sizing: content-box;
    width: 1em;
    height: 1em;
    padding: 0.25em 0.25em;
    color: #94a3b8;
    background: transparent;
    border: 0;
    border-radius: 0.25rem;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}
.btn-close:hover {
    color: #f8fafc;
}
.modal-body {
    position: relative;
    flex: 1 1 auto;
    background: #fff;
    padding: 0;
    overflow: hidden;
}
.modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
}
.modal-footer {
    display: flex;
    flex-wrap: wrap;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.25rem;
    border-top: 1px solid #334155;
    border-bottom-right-radius: calc(0.5rem - 1px);
    border-bottom-left-radius: calc(0.5rem - 1px);
    background: #151f32;
}
.modal-fallback-link {
    color: #38bdf8;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}
.modal-fallback-link:hover {
    color: #60a5fa;
}
.btn-modal-close {
    background: #475569;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}
.btn-modal-close:hover {
    background: #64748b;
}
