+error.svelte 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <script>
  2. import { page } from "$app/state";
  3. import favicon from "$lib/assets/favicon.png";
  4. </script>
  5. <main>
  6. <div class="glow"></div>
  7. <img src={favicon} alt="ChatRPG logo" class="logo" />
  8. <div class="content">
  9. <p class="code">Error {page.status}</p>
  10. <p class="message">{page.error.message}</p>
  11. <a href={page.error.back} class="home-btn">Back</a>
  12. </div>
  13. </main>
  14. <style>
  15. main {
  16. min-height: 100vh;
  17. display: flex;
  18. flex-direction: column;
  19. align-items: center;
  20. justify-content: center;
  21. padding: 2rem;
  22. position: relative;
  23. overflow: hidden;
  24. background: #0b0b10;
  25. }
  26. .glow {
  27. position: absolute;
  28. top: 50%;
  29. left: 50%;
  30. transform: translate(-50%, -50%);
  31. width: 600px;
  32. height: 400px;
  33. background: radial-gradient(ellipse, rgba(192, 132, 252, 0.07) 0%, transparent 70%);
  34. pointer-events: none;
  35. }
  36. .content {
  37. position: relative;
  38. text-align: center;
  39. max-width: 480px;
  40. }
  41. .logo {
  42. width: 192px;
  43. height: 192px;
  44. position: absolute;
  45. top: 2rem;
  46. left: 50%;
  47. transform: translateX(-50%);
  48. }
  49. .code {
  50. font-size: 7rem;
  51. font-weight: 800;
  52. line-height: 1;
  53. letter-spacing: -4px;
  54. background: linear-gradient(135deg, #c084fc, #5a5aff);
  55. -webkit-background-clip: text;
  56. -webkit-text-fill-color: transparent;
  57. margin-bottom: 1rem;
  58. }
  59. h1 {
  60. font-size: clamp(1.6rem, 4vw, 2.2rem);
  61. font-weight: 800;
  62. letter-spacing: -1.5px;
  63. color: #e5e5ea;
  64. margin-bottom: 0.75rem;
  65. }
  66. .message {
  67. font-size: 1rem;
  68. color: #6b6b7a;
  69. margin-bottom: 2.5rem;
  70. line-height: 1.5;
  71. }
  72. .home-btn {
  73. display: inline-flex;
  74. align-items: center;
  75. gap: 8px;
  76. padding: 0.65rem 1.5rem;
  77. background: #1a1a26;
  78. border: 1px solid #2e2e4a;
  79. border-radius: 10px;
  80. color: #e5e5ea;
  81. font-size: 0.95rem;
  82. font-weight: 600;
  83. text-decoration: none;
  84. transition: background 0.15s, border-color 0.15s;
  85. }
  86. .home-btn:hover {
  87. background: #252535;
  88. border-color: #c084fc;
  89. }
  90. </style>