Payment Failed Page Design Html Codepen «Ultra HD»
.message text-align: center; color: #475569; font-weight: 500; font-size: 1rem; line-height: 1.5; margin: 1rem 0 0.6rem; background: #f8fafc; padding: 0.9rem 1rem; border-radius: 1.2rem; border: 1px solid #e9eef3;
.error-icon svg width: 48px; height: 48px; stroke: #dc2626; stroke-width: 1.7; fill: none;
/* responsive */ @media (max-width: 500px) .fail-content padding: 1.5rem; h1 font-size: 1.6rem; .action-buttons flex-direction: column; .btn width: 100%; .error-detail flex-direction: column; align-items: flex-start; </style> </head> <body> <div class="fail-card"> <div class="status-bar"></div> <div class="fail-content"> <!-- animated error icon with cross --> <div class="icon-circle"> <div class="error-icon"> <svg viewBox="0 0 24 24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"> <circle cx="12" cy="12" r="10" stroke="currentColor" fill="white" stroke-width="1.7"/> <line x1="15" y1="9" x2="9" y2="15" stroke="currentColor" stroke-width="1.8"/> <line x1="9" y1="9" x2="15" y2="15" stroke="currentColor" stroke-width="1.8"/> </svg> </div> </div>
body background: linear-gradient(145deg, #f9fafc 0%, #eff2f8 100%); font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, sans-serif; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; payment failed page design html codepen
.error-icon background: #fee2e2; width: 88px; height: 88px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px -6px rgba(239, 68, 68, 0.2); transition: all 0.2s;
const toast = document.createElement('div'); toast.className = 'custom-toast'; const bgColor = type === 'error' ? '#ef4444' : (type === 'success' ? '#10b981' : '#3b82f6'); toast.style.cssText = ` position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: $bgColor; color: white; padding: 12px 24px; border-radius: 60px; font-weight: 500; font-size: 0.9rem; box-shadow: 0 12px 22px -10px rgba(0,0,0,0.2); z-index: 2000; backdrop-filter: blur(4px); font-family: 'Inter', sans-serif; letter-spacing: -0.2px; transition: all 0.2s ease; pointer-events: none; `; toast.innerText = message; document.body.appendChild(toast); setTimeout(() => if(toast && toast.remove) toast.remove(); , 2800);
.suggestion-list li display: flex; align-items: center; gap: 12px; font-size: 0.9rem; color: #1f2a44; font-weight: 500; .message text-align: center
.btn-primary background: #1e293b; color: white; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); border: 1px solid #1e293b;
.support-link a:hover color: #b91c1c;
.support-link text-align: center; margin-top: 2rem; font-size: 0.8rem; color: #5b6e8c; margin: 1rem 0 0.6rem
.suggestion-title font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; color: #475569; margin-bottom: 0.8rem; display: flex; align-items: center; gap: 6px;
/* main card container */ .fail-card max-width: 520px; width: 100%; background: #ffffff; border-radius: 2rem; box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.25), 0 8px 18px rgba(0, 0, 0, 0.05); overflow: hidden; transition: transform 0.2s ease, box-shadow 0.2s ease;
<h1>Payment Failed</h1> <!-- dynamic amount display (example) --> <div style="display: flex; justify-content: center;"> <div class="amount-badge">Attempted: $89.00 USD</div> </div>
.suggestion-list list-style: none; display: flex; flex-direction: column; gap: 10px;
/* action buttons */ .action-buttons display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.8rem; justify-content: center;