/* PlexPixel donation page */

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 24px 16px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background-color: #171e2b;
    background-image: radial-gradient(1200px 600px at 50% -10%, rgba(119, 77, 196, 0.18), transparent 60%);
    font-family: Arial, sans-serif;
    color: #ffffff;
}

.donate-card {
    width: 100%;
    max-width: 440px;
    background: rgba(23, 30, 43, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 28px 24px 22px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.donate-head { text-align: center; margin-bottom: 18px; }
.donate-logo { height: 46px; width: auto; margin-bottom: 10px; }
.donate-head h1 { font-size: 22px; margin: 4px 0 6px; font-weight: 700; }
.donate-sub { margin: 0; font-size: 13px; color: rgba(255, 255, 255, 0.6); }

/* Buy Me a Coffee button */
.bmc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 0;
    margin-bottom: 4px;
    font-size: 16px;
    font-family: inherit;
    font-weight: 700;
    color: #1a1a1a;
    background: #ffdd00;
    border: 0;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    transition: filter 0.15s;
}
.bmc-btn:hover { filter: brightness(1.06); }
.bmc-btn i { font-size: 17px; }

.donate-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
}
.donate-divider::before,
.donate-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
}

/* Frequency toggle */
.freq {
    display: flex;
    gap: 6px;
    border: 0;
    margin: 0 0 18px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}
.freq-opt { flex: 1; position: relative; }
.freq-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.freq-opt span {
    display: block;
    text-align: center;
    padding: 9px 0;
    font-size: 14px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    transition: background 0.15s, color 0.15s;
}
.freq-opt input:checked + span {
    background: #4d82c4;
    color: #fff;
    font-weight: 700;
}

.field { margin-bottom: 14px; }
.field > label {
    display: block;
    font-size: 12px;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 6px;
}

.row { display: flex; gap: 12px; }
.row .field { flex: 1; }
.field-zip, .field-cvv { max-width: 130px; }

input[type="text"], input[type="email"], select {
    width: 100%;
    padding: 11px 12px;
    font-size: 15px;
    font-family: inherit;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 9px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder { color: rgba(255, 255, 255, 0.35); }
select { appearance: none; cursor: pointer; }
input:focus, select:focus {
    border-color: #4d82c4;
    box-shadow: 0 0 0 3px rgba(77, 130, 196, 0.25);
}
input.invalid, select.invalid {
    border-color: #af4c5f;
    box-shadow: 0 0 0 3px rgba(175, 76, 95, 0.22);
}

/* Preset amounts */
.presets { display: flex; gap: 8px; margin-bottom: 10px; }
.preset {
    flex: 1;
    padding: 12px 0;
    font-size: 16px;
    font-family: inherit;
    font-weight: 700;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.preset:hover { background: rgba(255, 255, 255, 0.1); }
.preset:active { transform: translateY(1px); }
.preset.selected {
    background: #4d82c4;
    border-color: transparent;
}

.custom-amount { position: relative; }
.custom-amount .dollar {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
}
#custom-amount { padding-left: 26px; }

/* Submit */
.submit-btn {
    position: relative;
    width: 100%;
    margin-top: 6px;
    padding: 14px 0;
    font-size: 16px;
    font-family: inherit;
    font-weight: 700;
    color: #fff;
    background: #4d82c4;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    transition: filter 0.15s, opacity 0.15s;
}
.submit-btn:hover { filter: brightness(1.08); }
.submit-btn:disabled { opacity: 0.7; cursor: default; }
.submit-btn.loading .btn-label { visibility: hidden; }
.btn-spinner {
    display: none;
    position: absolute;
    top: 50%; left: 50%;
    width: 18px; height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
.submit-btn.loading .btn-spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Messages */
.donate-message {
    margin: 14px 0 0;
    padding: 0;
    font-size: 14px;
    text-align: center;
    min-height: 1px;
}
.donate-message.error { color: #f2a3ae; }
.donate-message.success { color: #86e3bd; }

.secure-note {
    margin: 16px 0 0;
    font-size: 11.5px;
    line-height: 1.5;
    text-align: center;
    color: rgba(255, 255, 255, 0.45);
}

@media (max-width: 420px) {
    .row { flex-wrap: wrap; }
    .row .field { flex: 1 1 100%; }
    .field-zip, .field-cvv { max-width: none; }
}
