* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: #f4f6fb;
    color: #1a1a2e;
}

/* HEADER */
header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-inner {
    max-width: 760px;
    margin: auto;
    padding: 0 20px;
    height: 65px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
}

.tagline {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-left: auto;
}

/* DONATE BUTTON */
.donate-btn {
    background: linear-gradient(135deg,#a855f7,#7c3aed);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(124,58,237,.25);
    transition: all .25s ease;
}

.donate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(124,58,237,.35);
}

/* MAIN */
main {
    max-width: 760px;
    margin: 40px auto;
    padding: 0 20px 60px;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 32px;
    line-height: 1.6;
}

/* SECTION LABELS */
.section-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #64748b;
    margin: 24px 0 10px;
}

/* CARD GRID */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 12px;
}

/* OPTION CARD */
.card-option {
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    cursor: pointer;
    text-align: center;
    transition: all .2s ease;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-option:hover {
    border-color: #a855f7;
    background: #faf5ff;
}

.card-option.active {
    border-color: #7c3aed;
    background: #f5f3ff;
}

.card-option input {
    display: none;
}

.card-option strong {
    font-size: 1.15rem;
    color: #1a1a2e;
}

.card-option small {
    font-size: 0.72rem;
    color: #64748b;
}

/* FORM */
.form-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 24px;
}

.field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.req {
    color: #7c3aed;
}

.field input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.92rem;
    transition: all .2s ease;
    background: #f8fafc;
}

.field input:focus {
    outline: none;
    border-color: #7c3aed;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(124,58,237,.08);
}

.field.full {
    grid-column: 1 / -1;
}

/* SUBMIT BUTTON */
.submit-btn {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg,#a855f7,#7c3aed);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s ease;
}

.submit-btn:hover {
    opacity: .92;
}

/* RESULT BOX */
.result-box {
    margin-top: 32px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 24px;
}

.result-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.badge {
    background: #f5f3ff;
    color: #7c3aed;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge.secondary {
    background: #f1f5f9;
    color: #475569;
}

/* CITATION TEXT */
.citation-text {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px;
    font-size: 0.95rem;
    line-height: 1.8;
    text-indent: -2rem;
    padding-left: calc(18px + 2rem);
    overflow-wrap: break-word;
}

/* RESULT ACTIONS */
.result-actions {
    margin-top: 16px;
}

/* COPY BUTTON */
.copy-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg,#a855f7,#7c3aed);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s ease;
}

.copy-btn:hover {
    opacity: .9;
}

/* DISCLAIMER */
.disclaimer {
    margin-top: 14px;
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
    line-height: 1.5;
}

/* =========================
   DONATE MODAL
========================= */

/* OVERLAY */
.modal-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(15,23,42,.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

/* SHOW MODAL */
.modal-overlay.show {
    display: flex;
}

/* MODAL BOX */
.donate-modal {
    background: #fff;
    width: 100%;
    max-width: 430px;
    border-radius: 22px;
    padding: 28px;
    position: relative;
    animation: popup .25s ease;
    box-shadow: 0 20px 40px rgba(0,0,0,.2);
}

/* ANIMATION */
@keyframes popup {
    from {
        transform: scale(.88);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* CLOSE BUTTON */
.close-modal {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 1.7rem;
    cursor: pointer;
    color: #64748b;
    transition: color .2s ease;
}

.close-modal:hover {
    color: #1a1a2e;
}

/* MODAL TITLE */
.donate-modal h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* MODAL TEXT */
.modal-text {
    color: #64748b;
    margin-bottom: 18px;
    line-height: 1.5;
}

/* WALLET BOX */
.wallet-box {
    display: flex;
    gap: 10px;
}

/* WALLET INPUT */
.wallet-box input {
    flex: 1;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 0.8rem;
    color: #1e293b;
}

/* WALLET BUTTON */
.wallet-box button {
    border: none;
    background: linear-gradient(135deg,#a855f7,#7c3aed);
    color: #fff;
    padding: 0 18px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: opacity .2s ease;
}

.wallet-box button:hover {
    opacity: .92;
}

/* MOBILE */
@media (max-width: 600px) {

    .header-inner {
        height: auto;
        padding: 14px 20px;
        flex-wrap: wrap;
    }

    .tagline {
        width: 100%;
        margin-left: 0;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .form-fields {
        grid-template-columns: 1fr;
    }

    .field.full {
        grid-column: 1;
    }

    h1 {
        font-size: 1.55rem;
    }

    .donate-modal {
        padding: 24px;
    }

    .wallet-box {
        flex-direction: column;
    }

    .wallet-box button {
        height: 46px;
    }
}