:root {
    --background: #07111f;
    --background-soft: #0c1c2d;
    --card: #f6f2e9;
    --text: #122536;
    --muted: #6f7f8c;
    --line: rgba(18, 37, 54, 0.14);
    --gold: #f4b942;
    --gold-light: #ffd77d;
    --white: #ffffff;
    --error: #922b2b;
    --info: #175270;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 12%, rgba(60, 146, 203, 0.18), transparent 30%),
        radial-gradient(circle at 84% 82%, rgba(244, 185, 66, 0.10), transparent 28%),
        var(--background);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.donation-page {
    width: 100%;
    min-height: 100vh;
    padding: 38px 18px;
    display: grid;
    place-items: center;
}

.donation-box {
    width: min(100%, 620px);
    padding: 34px;
    border-radius: 30px;
    background: var(--card);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.34);
}

.logo-link {
    width: 100%;
    min-height: 58px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.donation-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: min(100%, 240px);
    max-height: 76px;
    object-fit: contain;
}

.box-heading {
    margin: 22px 0 28px;
    text-align: center;
}

.box-heading > span {
    color: #8a6318;
    font-size: 0.70rem;
    font-weight: 850;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.box-heading h1 {
    margin: 6px 0 0;
    color: var(--text);
    font-size: clamp(1.85rem, 5vw, 2.55rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.field {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.field > span {
    color: #3d5262;
    font-size: 0.78rem;
    font-weight: 800;
}

.field input,
.field select {
    width: 100%;
    min-height: 51px;
    padding: 12px 14px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--line);
    border-radius: 13px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field input:focus,
.field select:focus {
    background: var(--white);
    border-color: #b57f17;
    box-shadow: 0 0 0 4px rgba(244, 185, 66, 0.19);
}

.amount-input-wrap {
    position: relative;
}

.amount-input-wrap b {
    position: absolute;
    top: 50%;
    left: 14px;
    z-index: 1;
    transform: translateY(-50%);
    color: var(--text);
}

.amount-input-wrap input {
    padding-left: 52px;
    font-weight: 850;
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.preset-button {
    min-height: 42px;
    padding: 7px;
    color: #2b4152;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid var(--line);
    border-radius: 11px;
    font-weight: 800;
}

.preset-button:hover,
.preset-button.active {
    color: var(--text);
    background: #ffe4a1;
    border-color: #c99126;
}

.amount-help {
    min-height: 18px;
    margin: 8px 0 21px;
    color: var(--muted);
    font-size: 0.74rem;
}

.check-row {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 10px;
    align-items: start;
    margin: 6px 0 0;
    color: #526574;
    font-size: 0.76rem;
    line-height: 1.45;
}

.check-row input {
    width: 17px;
    height: 17px;
    margin: 2px 0 0;
    accent-color: #b98016;
}

.form-message {
    display: none;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.80rem;
}

.form-message:not(:empty) {
    display: block;
}

.form-message.error {
    color: var(--error);
    background: #ffe3e3;
    border: 1px solid #ffc1c1;
}

.form-message.info {
    color: var(--info);
    background: #e0f4ff;
    border: 1px solid #b9e7ff;
}

.pay-button {
    width: 100%;
    min-height: 58px;
    margin-top: 20px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--white);
    background: var(--background);
    border: 0;
    border-radius: 15px;
    font-weight: 900;
    transition: transform 0.2s ease, background 0.2s ease;
}

.pay-button:hover {
    background: var(--background-soft);
    transform: translateY(-1px);
}

.pay-button:disabled {
    cursor: wait;
    opacity: 0.65;
    transform: none;
}

.pay-button b {
    color: var(--gold);
    font-size: 1.4rem;
}

.box-links {
    margin-top: 24px;
    padding-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 9px 17px;
    border-top: 1px solid var(--line);
}

.box-links a {
    color: #526574;
    font-size: 0.75rem;
    text-decoration: none;
}

.box-links a:hover {
    color: #8a6010;
    text-decoration: underline;
}

.copyright {
    margin: 15px 0 0;
    color: #87949e;
    font-size: 0.68rem;
    text-align: center;
}

@media (max-width: 620px) {
    .donation-page {
        padding: 18px 12px;
        place-items: center;
    }

    .donation-box {
        width: 100%;
        padding: 24px 18px;
        border-radius: 23px;
    }

    .donation-logo {
        max-width: min(100%, 210px);
        max-height: 68px;
    }

    .box-heading {
        margin: 18px 0 24px;
    }

    .field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .preset-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


.box-links .donors-link {
    color: #7a5206;
    font-weight: 900;
}

.box-links .donors-link::before {
    content: "♡";
    margin-right: 5px;
    color: #b98016;
}
