:root {
    --text-main: #3d4554;
    --text-light: #6b7280;
    --bg-body: #f8f9fa;
    --primary: #5f259f;
    --primary-hover: #4a1d7c;
    --danger: #e74c3c;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}
.header {
    width: 100%;
    background-color: #f8f9fa;
    padding: 20px 0 10px 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.header img {
    max-height: 90px;
    max-width: 90%;
    object-fit: contain;
}
.brand-subtitle {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 8px;
    font-weight: 500;
}
.brand-subtitle a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    transition: opacity 0.2s;
}
.brand-subtitle a:hover {
    opacity: 0.8;
    text-decoration: underline;
}
.card {
    background-color: #ffffff;
    width: 92%;
    max-width: 420px;
    padding: 25px 20px;
    margin: 10px 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border-radius: 12px;
    flex-grow: 1;
}
#view-payment, #view-generator {
    display: none;
    width: 100%;
}
.payment-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.qr-wrapper {
    background: #fff;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    width: 100%;
    max-width: 250px;
    aspect-ratio: 1 / 1;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid #eee;
    border-radius: 8px;
}
.qr-wrapper img, .qr-wrapper canvas {
    width: 100% !important;
    height: auto !important;
    max-width: 230px !important;
    pointer-events: none;
}
.upi-id {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 15px;
    letter-spacing: 0.3px;
    word-break: break-all;
    text-align: center;
}
.payment-info-box {
    background-color: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 20px;
    text-align: center;
    display: none;
}
.payee-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 5px;
    display: none;
}
.payee-amount {
    font-size: 26px;
    font-weight: 800;
    color: #27ae60;
    margin-bottom: 5px;
    display: none;
}
.payee-note {
    font-size: 14px;
    color: var(--text-light);
    font-style: italic;
    display: none;
}
.security-gate {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
}
.security-warning-large {
    background-color: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
    padding: 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    margin-bottom: 15px;
    line-height: 1.6;
    width: 100%;
    box-sizing: border-box;
}
.btn-danger {
    background-color: var(--danger);
}
.btn-danger:hover {
    background-color: #c0392b;
}
.secure-payment-area {
    display: none; 
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.payment-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.btn-pay-now {
    margin-bottom: 20px;
    font-size: 15px;
    padding: 12px;
}
.payment-steps {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 5px;
    margin-bottom: 15px;
}
.payment-steps h4 {
    margin: 0 0 10px 0;
    font-size: 15px;
    color: var(--text-main);
}
.payment-steps ol {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
}
.payment-steps li {
    margin-bottom: 6px;
}
.type-toggle {
    display: flex;
    width: 100%;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 20px;
    box-sizing: border-box;
}
.toggle-option {
    flex: 1;
    text-align: center;
    position: relative;
    cursor: pointer;
}
.toggle-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}
.toggle-option span {
    display: block;
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    border-radius: 6px;
    transition: all 0.2s;
}
.toggle-option input:checked + span {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.create-own-banner {
    background-color: #f4f0fa;
    border: 1px dashed var(--primary);
    border-radius: 8px;
    padding: 12px 15px;
    margin-top: 25px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    text-decoration: none;
    color: inherit;
}
.create-own-text { display: flex; flex-direction: column; }
.create-own-text strong { font-size: 14px; color: var(--primary); margin-bottom: 2px; }
.create-own-text span { font-size: 12px; color: var(--text-light); }
.btn-create-small { background-color: var(--primary); color: white; padding: 8px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.gen-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 20px;
    text-align: center;
}
.form-group { margin-bottom: 15px; width: 100%; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--text-main); }
.form-group input { width: 100%; padding: 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 15px; box-sizing: border-box; outline: none; transition: border-color 0.2s; }
.form-group input:focus { border-color: var(--primary); }
.btn { background-color: var(--primary); color: white; border: none; padding: 14px; border-radius: 8px; font-size: 16px; font-weight: 600; width: 100%; cursor: pointer; transition: background 0.2s; }
.btn:hover { background-color: var(--primary-hover); }
.btn-outline { background-color: transparent; color: var(--primary); border: 2px solid var(--primary); padding: 10px; margin-top: 10px; }
.btn-row { display: flex; gap: 10px; margin-top: 10px; }
.btn-row .btn { padding: 10px; font-size: 14px; }
#result-section { display: none; margin-top: 25px; padding-top: 20px; border-top: 1px solid #eee; width: 100%; text-align: center; }
.link-display { background: #f3f4f6; padding: 10px; border-radius: 6px; font-size: 13px; word-break: break-all; color: #374151; margin-bottom: 10px; }
.qr-gen-wrapper { margin-top: 25px; }
.qr-gen-label { font-size: 14px; font-weight: 600; color: var(--text-main); display: block; margin-bottom: 10px; }
.footer {
    margin-top: auto;
    padding: 15px;
    font-size: 13px;
    color: #9ca3af;
    text-align: center;
    width: 100%;
}
.heart { color: #e25555; }
.footer-links { margin-top: 8px; }
.footer-links a { color: #6b7280; text-decoration: underline; cursor: pointer; }
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    justify-content: center;
    align-items: center;
}
.modal-content {
    background: #fff;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    border-radius: 12px;
    padding: 20px;
    overflow-y: auto;
    position: relative;
    box-sizing: border-box;
    color: var(--text-main);
}
.modal-content h2 { margin-top: 0; font-size: 20px; color: var(--primary); }
.modal-content h3 { font-size: 16px; margin-bottom: 5px; }
.modal-content p, .modal-content li { font-size: 13px; line-height: 1.5; color: #4b5563; }
.close-modal {
    position: absolute;
    top: 15px; right: 15px;
    background: none; border: none; font-size: 24px; cursor: pointer; color: #9ca3af;
}
.modal-footer-brand { text-align: center; margin-top: 20px; font-weight: bold; }