* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Header */
.header {
    background: #2c3e50;
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-circle {
    width: 40px;
    height: 40px;
    background: #3498db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.user-menu {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.user-link, .logout-link, .back-link {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.user-link:hover, .logout-link:hover, .back-link:hover {
    background: rgba(255,255,255,0.1);
}

/* Main Content */
.main-content {
    padding: 2rem 1rem;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #2c3e50;
}

h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

/* Payment Form */
.payment-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.amount-section label,
.fund-section label,
.frequency-section label,
.start-date-section label,
.note-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.amount-input {
    display: flex;
    align-items: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 0.75rem;
    background: white;
    transition: border-color 0.2s;
}

.amount-input:focus-within {
    border-color: #3498db;
}

.currency {
    font-size: 1.2rem;
    font-weight: bold;
    margin-right: 0.5rem;
    color: #2c3e50;
}

.amount-input input {
    border: none;
    outline: none;
    font-size: 1.2rem;
    font-weight: bold;
    width: 100%;
    color: #2c3e50;
}

.fund-section select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.2s;
}

.fund-section select:focus {
    border-color: #3498db;
    outline: none;
}

.frequency-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.freq-btn {
    padding: 0.75rem;
    border: 2px solid #ddd;
    background: white;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    color: #2c3e50;
}

.freq-btn:hover {
    border-color: #3498db;
}

.freq-btn.active {
    border-color: #2c3e50;
    background: #2c3e50;
    color: white;
}

.start-date-section input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.start-date-section input:focus {
    border-color: #3498db;
    outline: none;
}

.note-section textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s;
}

.note-section textarea:focus {
    border-color: #3498db;
    outline: none;
}

.continue-btn {
    background: #2c3e50;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.continue-btn:hover {
    background: #34495e;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #2c3e50;
    color: white;
}

.btn-primary:hover {
    background: #34495e;
}

.btn-secondary {
    background: #ecf0f1;
    color: #2c3e50;
    border: 2px solid #bdc3c7;
}

.btn-secondary:hover {
    background: #d5dbdb;
}

/* Profile Section */
.profile-section,
.giving-section,
.subscriptions-section,
.recent-payments {
    margin-bottom: 2rem;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.avatar {
    width: 50px;
    height: 50px;
    background: #3498db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Giving Options */
.giving-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.giving-option:hover {
    background: #f8f9fa;
}

.option-icon {
    width: 40px;
    height: 40px;
    background: #2c3e50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.option-link {
    color: #666;
    text-decoration: none;
    font-size: 1.2rem;
    margin-left: auto;
}

/* Subscriptions */
.subscription-item {
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: white;
}

.subscription-item h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.subscription-item p {
    color: #666;
    margin-bottom: 0.25rem;
}

/* Payment History */
.payment-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
}

.payment-info h3 {
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.payment-info p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.payment-info .date {
    color: #999;
    font-size: 0.8rem;
}

.payment-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-success {
    background: #d4edda;
    color: #155724;
}

.status-failed {
    background: #f8d7da;
    color: #721c24;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

/* Login Modal */
.login-modal {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-logo {
    margin-bottom: 1rem;
}

.modal-logo .logo-circle {
    margin: 0 auto;
}

.login-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.login-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    color: #2c3e50;
}

.login-btn:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.btn-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.google-btn .btn-icon {
    background: #4285f4;
    color: white;
    border-radius: 3px;
}

.facebook-btn .btn-icon {
    background: #1877f2;
    color: white;
    border-radius: 3px;
}

.apple-btn .btn-icon {
    background: #000;
    color: white;
    border-radius: 3px;
}

.terms {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

.terms a {
    color: #3498db;
    text-decoration: none;
}

/* Email Modal */
.email-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.email-modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    width: 90%;
    max-width: 400px;
}

.email-modal-content h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: #3498db;
    outline: none;
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    margin-bottom: 2rem;
    color: #666;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Info Section */
.info-section {
    margin-top: 2rem;
}

.funds-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.fund-item {
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    text-align: center;
}

.fund-item h3 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.fund-item p {
    font-size: 0.8rem;
    color: #666;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: #34495e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.2s;
}

.social-link:hover {
    background: #3498db;
}

.footer p {
    font-size: 0.9rem;
    color: #bdc3c7;
}

/* Status message styles */
#login-status {
    margin-top: 20px;
    text-align: center;
}

#status-message {
    padding: 10px;
    border-radius: 4px;
    font-weight: 500;
}

#status-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#status-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#status-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* No Payments */
.no-payments {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.no-payments .btn {
    margin-top: 1rem;
}

/* Payment Confirmation Styles */
.confirmation-container {
    text-align: center;
    padding: 2rem 1rem;
}

.success-icon {
    margin-bottom: 2rem;
}

.checkmark {
    width: 80px;
    height: 80px;
    background: #27ae60;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 2.5rem;
    color: white;
    font-weight: bold;
    animation: checkmarkPulse 0.6s ease-in-out;
}

@keyframes checkmarkPulse {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.success-message {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.payment-info-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: left;
}

.payment-info-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    text-align: center;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    font-weight: 600;
    color: #2c3e50;
}

.detail-row .value {
    color: #666;
    font-weight: 500;
}

.confirmation-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.receipt-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
    text-align: center;
}

.receipt-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.receipt-section p {
    color: #666;
    margin-bottom: 1rem;
}

.btn-outline {
    background: transparent;
    color: #2c3e50;
    border: 2px solid #2c3e50;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: #2c3e50;
    color: white;
}

/* Loading Indicator Styles */
#payment-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 480px) {
    .container {
        max-width: 100%;
    }
    
    .frequency-buttons {
        grid-template-columns: 1fr;
    }
    
    .funds-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        gap: 0.75rem;
    }
    
    .confirmation-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .confirmation-actions .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}
