* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.donation-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 480px;
    width: 100%;
    padding: 32px 24px;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.donation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.donation-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.donation-header h1::before {
    content: '✓';
    color: #4caf50;
    font-size: 28px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #1a1a1a;
}

/* Tab Navigation */
.tab-container {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
    background: #f0f0f0;
    padding: 4px;
    border-radius: 8px;
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.tab-btn.active {
    background: white;
    color: #1a1a1a;
    border: 2px solid #c4a377;
}

/* Donation Form */
.donation-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Amount Section */
.amount-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.preset-amounts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.amount-btn {
    padding: 16px;
    border: 2px solid #e0e0e0;
    background: #f9f9f9;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.amount-btn:hover {
    border-color: #c4a377;
    background: #faf9f7;
}

.amount-btn.active {
    background: #c4a377;
    color: white;
    border-color: #c4a377;
}

/* Suggested label */
.suggested {
    position: relative;
}

.suggested-label {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #c4a377;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.suggested.active .suggested-label {
    display: none;
}

/* Custom Amount */
.custom-amount {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 16px;
    background: #f9f9f9;
    transition: all 0.2s;
}

.custom-amount:focus-within {
    border-color: #c4a377;
    background: white;
}

.currency {
    font-size: 18px;
    font-weight: 500;
    color: #1a1a1a;
}

#customAmount {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    outline: none;
    font-weight: 500;
    color: #1a1a1a;
}

#customAmount::placeholder {
    color: #999;
}

.currency-label {
    font-size: 12px;
    color: #999;
    font-weight: 500;
}

/* Donor Info */
.donor-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.donor-info input {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: #f9f9f9;
    transition: all 0.2s;
}

.donor-info input:focus {
    outline: none;
    border-color: #c4a377;
    background: white;
}

.donor-info input::placeholder {
    color: #999;
}

/* Note Checkbox */
.note-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    user-select: none;
}

.note-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #c4a377;
}

/* Note Textarea */
.note-textarea {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    background: #f9f9f9;
    transition: all 0.2s;
}

.note-textarea:focus {
    outline: none;
    border-color: #c4a377;
    background: white;
}

.note-textarea::placeholder {
    color: #999;
}

/* Continue Button */
.continue-btn {
    padding: 16px;
    background: #c4a377;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.continue-btn:hover {
    background: #b3934a;
}

.continue-btn:active {
    transform: scale(0.98);
}

.continue-btn:disabled {
    background: #ddd;
    cursor: not-allowed;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: #c4a377;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-state p {
    font-size: 14px;
    color: #666;
}

/* Error State */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px;
    background: #fef2f2;
    border-radius: 8px;
    border: 1px solid #fecaca;
}

#errorMessage {
    font-size: 14px;
    color: #991b1b;
    text-align: center;
}

.retry-btn {
    padding: 10px 24px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.retry-btn:hover {
    background: #b91c1c;
}

/* Responsive */
@media (max-width: 480px) {
    .donation-container {
        padding: 24px 16px;
    }

    .donation-header h1 {
        font-size: 20px;
    }

    .preset-amounts {
        grid-template-columns: 1fr 1fr;
    }
}
