/* ---------- Funding form (fund-form.html was a standalone page; its look is kept under .fund-page) ---------- */

body:has(.fund-page) {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
}

.fund-page {
    --fund-success: #27ae60;
    --fund-secondary: #3498db;
    --fund-light: #ecf0f1;
    --fund-dark: #2c3e50;
    padding-top: 1.5rem;
    min-height: 60vh;
}

.fund-page .fund-back-link {
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.fund-page .fund-back-link:hover {
    color: white;
}

.fund-page .main-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin: 1rem auto 2rem;
    max-width: 1200px;
    overflow: hidden;
}

.fund-page .funding-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem !important;
    overflow: hidden;
}

.fund-page .card-header {
    background: linear-gradient(135deg, var(--fund-success), #2ecc71);
    color: white;
    border: none;
    padding: 2rem;
    text-align: center;
}

.fund-page .card-header h1 {
    margin: 0;
    font-weight: 600;
    font-size: 1.5rem;
}

.fund-page .form-label {
    font-weight: 600;
    color: var(--fund-dark);
    margin-bottom: 0.5rem;
}

.fund-page .form-control {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.fund-page .form-control:focus {
    border-color: var(--fund-success);
    box-shadow: 0 0 0 0.2rem rgba(39, 174, 96, 0.25);
}

.fund-page .amount-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem !important;
}

.fund-page .amount-btn {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #dee2e6;
    border-radius: 15px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    color: inherit;
}

.fund-page .amount-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--fund-success), #2ecc71);
    color: white;
    border-color: var(--fund-success);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3);
}

.fund-page .amount-btn.active {
    background: linear-gradient(135deg, var(--fund-success), #2ecc71);
    color: white;
    border-color: var(--fund-success);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3);
}

.fund-page .amount-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.fund-page .amount-btn i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.fund-page .amount-btn .amount {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.fund-page .btn-success {
    background: linear-gradient(135deg, var(--fund-success), #2ecc71);
    border: none;
    border-radius: 10px;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.fund-page .btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #2ecc71, var(--fund-success));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3);
}

.fund-page .btn-outline-primary {
    border: 2px solid var(--fund-secondary);
    color: var(--fund-secondary);
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.fund-page .btn-outline-primary:hover {
    background: var(--fund-secondary);
    color: white;
    transform: translateY(-2px);
}

.fund-page .stats-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

.fund-page .stats-card h5 {
    color: var(--fund-success);
    font-weight: 700;
    margin: 0;
}

.fund-page .project-info-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.fund-page .project-info-card h2 {
    color: var(--fund-dark);
    font-weight: 700;
    margin-bottom: 1rem;
}

.fund-page .project-info-card .project-link {
    color: inherit;
    text-decoration: none;
}

.fund-page .project-info-card .project-link:hover {
    text-decoration: underline;
}

.fund-page .project-description {
    white-space: pre-line;
    word-break: break-word;
}

.fund-page .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.fund-page .alert {
    border-radius: 10px;
    border: none;
}

.fund-page .form-text {
    color: #6c757d;
    font-size: 0.9rem;
}

.fund-page .input-group {
    margin-bottom: 1rem;
}

.fund-page .input-group-text {
    background: var(--fund-light);
    border: 2px solid #e9ecef;
    border-radius: 10px 0 0 10px;
    font-weight: 600;
}

.fund-page fieldset:disabled .form-control {
    background-color: #f1f3f5;
}

@media (max-width: 768px) {
    .fund-page .amount-buttons {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.75rem;
    }

    .fund-page .amount-btn {
        padding: 1rem 0.5rem;
    }

    .fund-page .amount-btn i {
        font-size: 1.25rem;
    }

    .fund-page .amount-btn .amount {
        font-size: 1rem;
    }
}

/* ---------- Success page ---------- */

.success-container {
    max-width: 600px;
    margin: 50px auto;
    text-align: center;
}

.success-icon {
    font-size: 5rem;
    color: #28a745;
    margin-bottom: 20px;
    animation: checkmark 0.6s ease-in-out;
}

@keyframes checkmark {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-card {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 2px solid #28a745;
}

.transaction-details {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
    text-align: left;
}

.transaction-details .row {
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.transaction-details .row:last-child {
    border-bottom: none;
}

.action-buttons {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

@media (max-width: 576px) {
    .success-card {
        padding: 2rem 1.25rem;
    }
}
