:root {
    --primary: #8f1d14;
    --primary-dark: #6f130d;
    --primary-soft: #fff2f0;
    --accent: #b62a1d;
    --ink: #202124;
    --muted: #6b7280;
    --border: #e8e4e2;
    --page: #f7f3f1;
    --card: #ffffff;
    --success: #1f7a4d;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 10% 0%, rgba(182, 42, 29, .05), transparent 30%),
        var(--page);
    color: var(--ink);
    font-family: "Noto Sans Bengali", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.form-container {
    max-width: 820px;
}

.hero-card,
.info-card,
.question-card,
.form-footer {
    border: 1px solid rgba(32, 33, 36, .07);
    background: var(--card);
    box-shadow: 0 8px 28px rgba(32, 33, 36, .055);
}

.hero-card {
    overflow: hidden;
    border-radius: 20px;
}

.hero-image {
    width: 100%;
    height: auto;
    min-height: 150px;
    max-height: 300px;
    display: block;
    object-fit: cover;
}

.info-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.accent-line {
    height: 7px;
    background: linear-gradient(90deg, var(--primary), #d84b3c, var(--primary));
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.eyebrow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
}

.display-title {
    margin: 12px 0 0;
    font-size: clamp(1.55rem, 4vw, 2.25rem);
    line-height: 1.35;
    font-weight: 800;
    letter-spacing: -.02em;
}

.event-copy {
    font-size: .98rem;
    line-height: 1.8;
}

.event-copy p {
    margin-bottom: 13px;
}

.emoji {
    width: 25px;
    display: inline-block;
}

.payment-number {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: .05em;
    color: var(--primary);
}

.notice-box {
    margin: 14px 0;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fff8e9;
    border: 1px solid #f4dfac;
}

.notice-soft {
    background: #f7f9fc;
    border-color: #e2e7ef;
}

.notice-title {
    font-weight: 800;
    margin-bottom: 4px;
}

.thank-you {
    font-weight: 700;
    color: var(--primary);
}

.question-card {
    position: relative;
    border-radius: 18px;
    padding: 25px;
    margin-bottom: 14px;
}

.question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: .82rem;
    font-weight: 800;
    margin-bottom: 14px;
}

.question-number.optional {
    background: #f2f4f7;
    color: #667085;
}

.question-label {
    display: block;
    margin-bottom: 8px;
    font-size: 1.02rem;
    line-height: 1.65;
    font-weight: 800;
}

.required {
    color: #c5221f;
    margin-left: 3px;
}

.optional-badge {
    display: inline-block;
    vertical-align: middle;
    margin-left: 7px;
    padding: 3px 8px;
    border-radius: 999px;
    color: #667085;
    background: #f2f4f7;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.field-help {
    color: var(--muted);
    font-size: .84rem;
    margin-bottom: 12px;
}

.custom-input {
    min-height: 54px;
    border-color: #d9d6d4;
    border-radius: 13px;
    font-size: .96rem;
    background: #fff;
}

.custom-input:focus,
.form-control:focus {
    border-color: rgba(143, 29, 20, .55);
    box-shadow: 0 0 0 .25rem rgba(143, 29, 20, .10);
}

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

.choice-card,
.guest-option {
    cursor: pointer;
    user-select: none;
}

.choice-card {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 15px;
    transition: .2s ease;
}

.choice-card:hover,
.guest-option:hover {
    border-color: rgba(143, 29, 20, .35);
    background: #fffaf9;
}

.choice-card input,
.guest-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-ui {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #c8cdd3;
    font-size: 22px;
}

.choice-card input:checked + .choice-ui {
    color: var(--primary);
}

.choice-card:has(input:checked) {
    border-color: rgba(143, 29, 20, .45);
    background: var(--primary-soft);
}

.choice-card strong {
    display: block;
    font-size: .92rem;
}

.choice-card small {
    color: var(--muted);
}

.guest-list {
    display: grid;
    gap: 9px;
}

.guest-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: 13px;
    transition: .2s ease;
    font-size: .93rem;
}

.radio-ui {
    width: 20px;
    height: 20px;
    border: 2px solid #b9bec5;
    border-radius: 50%;
    position: relative;
    flex: 0 0 auto;
}

.guest-option:has(input:checked) {
    border-color: rgba(143, 29, 20, .45);
    background: var(--primary-soft);
}

.guest-option input:checked + .radio-ui {
    border-color: var(--primary);
}

.guest-option input:checked + .radio-ui::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: var(--primary);
}

.fee-preview {
    margin-top: 14px;
    padding: 12px 14px;
    display: flex;
    gap: 9px;
    border-radius: 12px;
    background: #f7f9fc;
    color: #56616f;
    font-size: .82rem;
}

.upload-box {
    padding: 15px;
    border: 1.5px dashed #cfd4da;
    border-radius: 15px;
    background: #fafbfc;
}

.upload-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 9px;
    color: #7b8490;
    font-size: .75rem;
}

.image-preview {
    margin-top: 14px;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
}

.image-preview img {
    display: block;
    width: 100%;
    max-height: 340px;
    object-fit: contain;
}

.form-footer {
    padding: 20px;
    border-radius: 18px;
}

.security-note {
    color: #68717c;
    font-size: .82rem;
    margin-bottom: 14px;
}

.submit-btn {
    width: 100%;
    min-height: 56px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    font-weight: 800;
    box-shadow: 0 10px 22px rgba(143, 29, 20, .18);
    transition: transform .2s ease, box-shadow .2s ease;
}

.submit-btn:hover,
.submit-btn:focus {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 13px 28px rgba(143, 29, 20, .22);
}

.submit-btn:disabled {
    opacity: .75;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 5px 8px;
    color: #7c838c;
    font-size: .72rem;
}

.success-modal {
    border: 0;
    border-radius: 24px;
    overflow: hidden;
}

.success-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: var(--success);
    font-size: 2rem;
    box-shadow: 0 12px 25px rgba(31, 122, 77, .22);
}

.success-kicker {
    color: var(--success);
    font-size: .74rem;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.success-modal h2 {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 8px 0;
}

.registration-id-box {
    position: relative;
    padding: 15px;
    border-radius: 15px;
    background: #f7f8fa;
    border: 1px solid #e4e7eb;
}

.registration-id-box span {
    display: block;
    color: #737b85;
    font-size: .66rem;
    letter-spacing: .08em;
    font-weight: 800;
}

.registration-id-box strong {
    display: block;
    margin-top: 4px;
    color: var(--primary);
    font-size: 1.3rem;
    letter-spacing: .04em;
}

.copy-btn {
    margin-top: 9px;
    border-radius: 999px;
}

.qr-wrapper {
    width: 220px;
    height: 220px;
    margin: 20px auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e7e8ea;
    border-radius: 18px;
    background: #fff;
}

#qrcode img,
#qrcode canvas {
    display: block;
    max-width: 190px;
    max-height: 190px;
}

@media (max-width: 575.98px) {
    .form-container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .hero-card {
        border-radius: 14px;
    }

    .hero-image {
        min-height: 105px;
        max-height: 180px;
    }

    .info-card,
    .question-card,
    .form-footer {
        border-radius: 15px;
    }

    .info-card .p-4 {
        padding: 22px !important;
    }

    .question-card {
        padding: 20px 17px;
    }

    .display-title {
        font-size: 1.42rem;
    }

    .event-copy {
        font-size: .88rem;
    }

    .choice-grid {
        grid-template-columns: 1fr;
    }

    .site-footer {
        flex-direction: column;
        text-align: center;
    }
}

/* Added required attribute to gift choice radio buttons and removed optional badge from the gift choice question. */

.total-payment-preview {
    background: #fff8f6;
    border: 1px solid #f1d2cc;
    border-radius: 14px;
    padding: 16px 18px;
}

.payment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 6px 0;
    color: #555;
}

.payment-row strong {
    color: #333;
}

.payment-divider {
    border-top: 1px dashed #d8b8b2;
    margin: 10px 0;
}

.payment-row.total {
    font-size: 1.08rem;
    color: #8f1d14;
}

.payment-row.total strong {
    color: #8f1d14;
    font-size: 1.25rem;
}

.cashout-note {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ead9d5;
    color: #777;
    font-size: 0.85rem;
}

.cashout-note i {
    color: #8f1d14;
    margin-right: 5px;
}
