/* =====================================================================
   Rifa Da Galera — páginas de erro (404 / 502)
   Usado pelo app (via index.html) e embutido em 404.html / 502.html.
   As variáveis têm valor reserva para funcionar sem o app.css.
   ===================================================================== */
.err { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  padding: 40px 20px; position: relative; overflow: hidden; color: var(--ink-800, #1e293b);
  font-family: var(--font, 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif);
  background: radial-gradient(circle at 12% 12%, rgba(99, 102, 241, .16), transparent 42%),
              radial-gradient(circle at 88% 85%, rgba(236, 72, 153, .12), transparent 40%), var(--bg, #f4f6fb); }
.err.inline { min-height: calc(100vh - 160px); background: transparent; padding: 24px 8px; }
.err.compact { min-height: 0; padding: 30px 16px 34px; gap: 0; }
.err.compact .err-art { width: min(200px, 56vw); margin-bottom: 16px; }
.err.compact h1 { font-size: 22px; margin-top: 12px; }
.err.compact p { font-size: 14px; }
.err.compact .err-actions { margin-top: 18px; }
.err.compact .err-verse { margin-top: 20px; }
.err-card { position: relative; z-index: 1; width: 100%; max-width: 560px; text-align: center; }
.err-art { width: min(340px, 86vw); margin: 0 auto 26px; filter: drop-shadow(0 22px 30px rgba(79, 70, 229, .28)); }
.err-art svg { width: 100%; height: auto; display: block; animation: errFloat 5s ease-in-out infinite; }
.err-502 .err-art { filter: drop-shadow(0 22px 30px rgba(239, 68, 68, .25)); }
@keyframes errFloat { 0%, 100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-8px) rotate(-3deg); } }
.err-code { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: 99px; font-size: 12px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; background: var(--brand-50, #eef2ff); color: var(--brand-700, #4338ca); }
.err-502 .err-code { background: #fff7ed; color: #c2410c; }
.err h1 { margin: 14px 0 0; font-size: clamp(26px, 4.4vw, 38px); line-height: 1.12; font-weight: 800; letter-spacing: -.03em; color: var(--ink-900, #0f172a); }
.err p { margin: 12px auto 0; max-width: 460px; font-size: 15.5px; line-height: 1.6; color: var(--ink-600, #475569); }
.err-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.err-btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 12px; font: inherit; font-size: 14.5px;
  font-weight: 700; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background .15s, transform .05s; }
.err-btn:active { transform: translateY(1px); }
.err-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.err-btn.primary { background: var(--brand-600, #4f46e5); color: #fff; box-shadow: 0 8px 20px -8px rgba(79, 70, 229, .7); }
.err-btn.primary:hover { background: var(--brand-700, #4338ca); color: #fff; }
.err-btn.secondary { background: #fff; color: var(--ink-800, #1e293b); border-color: var(--border, #e5e8ef); }
.err-btn.secondary:hover { background: var(--ink-50, #f8fafc); color: var(--ink-900, #0f172a); }
.err-hint { margin-top: 18px; font-size: 12.5px; color: var(--ink-400, #94a3b8); }
.err-foot { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; font-weight: 750; color: var(--ink-900, #0f172a); text-decoration: none; }
.err-foot .logo { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(135deg, #818cf8, #4f46e5); }
.err-foot .logo svg { width: 17px; height: 17px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.err-confetti { position: absolute; inset: 0; pointer-events: none; }
.err-confetti i { position: absolute; width: 10px; height: 10px; border-radius: 3px; opacity: .55; animation: errDrift 7s ease-in-out infinite; }
.err-confetti i:nth-child(1) { left: 8%; top: 18%; background: #818cf8; }
.err-confetti i:nth-child(2) { left: 86%; top: 14%; background: #f472b6; border-radius: 50%; animation-delay: -2s; }
.err-confetti i:nth-child(3) { left: 14%; top: 78%; background: #fbbf24; border-radius: 50%; animation-delay: -4s; }
.err-confetti i:nth-child(4) { left: 80%; top: 72%; background: #34d399; animation-delay: -1s; }
.err-confetti i:nth-child(5) { left: 50%; top: 6%; background: #a5b4fc; width: 7px; height: 7px; animation-delay: -3s; }
.err.inline .err-confetti { display: none; }
@keyframes errDrift { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(14px) rotate(90deg); } }
@media (prefers-reduced-motion: reduce) { .err-art svg, .err-confetti i { animation: none; } }
