:root {
  --404-font: "Noto Kufi Arabic", system-ui, -apple-system, Segoe UI, sans-serif;
  --404-purple: #4b1f6f;
  --404-purple-2: #3d1a5b;
  --404-aqua: #41e6c0;
  --404-muted: #e7dff3;
  --404-text: #2b2140;
  --404-radius-lg: 20px;
  --404-shadow-lg: 0 30px 60px rgba(0,0,0,.18);
}

.albahaa-404-wrap {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--404-font);
  background: #faf7ff;
  color: var(--404-text);
  margin: 0;
  padding: clamp(1rem, 3vw, 2rem);
}

.albahaa-404-card {
  width: min(100%, 1200px);
  background: #fff;
  border: 1.6px solid rgba(75,31,111,.12);
  border-radius: var(--404-radius-lg);
  box-shadow: 0 16px 40px rgba(0,0,0,.10);
  padding: clamp(1rem, 2.5vw, 2rem);
  display: grid;
  gap: 1.2rem;
}

/* Badge */
.albahaa-404-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
  padding: .5rem 1rem;
  border-radius: 999px;
  background: var(--404-muted);
  color: var(--404-purple);
  font-weight: 800;
  letter-spacing: .5px;
  box-shadow: var(--404-shadow-lg);
}

/* Titles */
.albahaa-404-big {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1;
  margin: .25rem 0;
  background: linear-gradient(135deg, var(--404-purple), var(--404-aqua));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.albahaa-404-title {
  font-weight: 800;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  color: var(--404-purple);
}
.albahaa-404-sub {
  color: #5a4a70;
  max-width: 70ch;
  margin-inline: auto;
  line-height: 1.9;
}

/* Illustration */
.albahaa-404-illu {
  width: min(420px, 90%);
  aspect-ratio: 1.6/1;
  margin: .25rem auto 0;
  background:
    radial-gradient(120px 60px at 70% 10%, rgba(65,230,192,.28), transparent 70%),
    radial-gradient(140px 70px at 20% 0%, rgba(75,31,111,.25), transparent 70%),
    linear-gradient(#fff,#fff);
  border: 1.5px dashed rgba(75,31,111,.25);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  animation: float404 6s ease-in-out infinite;
}
@keyframes float404 {
  0%,100% { transform: translateY(0) }
  50% { transform: translateY(-6px) }
}
.albahaa-404-illu::before {
  content: "\EF5A"; /* ri-compass-3-line */
  font-family: "remixicon";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(3rem, 10vw, 5rem);
  color: rgba(75,31,111,.35);
}

/* Actions */
.albahaa-404-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: center;
}
.albahaa-404-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.1rem;
  border-radius: 12px;
  border: 2px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s, box-shadow .25s, background .25s, color .25s, border-color .25s;
}
.albahaa-404-btn-primary {
  background: var(--404-aqua);
  color: #2b2140;
  box-shadow: 0 10px 24px rgba(65,230,192,.35);
}
.albahaa-404-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(65,230,192,.45);
}
.albahaa-404-btn-ghost {
  background: #fff;
  border-color: var(--404-purple);
  color: var(--404-purple);
}
.albahaa-404-btn-ghost:hover {
  color: #2b2140;
  border-color: var(--404-aqua);
}
.albahaa-404-btn i {
  font-size: 1.2rem;
}

/* Search */
.albahaa-404-search {
  max-width: 520px;
  margin: .3rem auto 0;
  display: flex;
  gap: .5rem;
}
.albahaa-404-search input {
  flex: 1;
  padding: .9rem 1rem;
  border-radius: 12px;
  border: 1.6px solid rgba(75,31,111,.2);
  outline: none;
  font-weight: 600;
  color: var(--404-text);
}
.albahaa-404-search button {
  white-space: nowrap;
}

/* Footnote */
.albahaa-404-footnote {
  color: #7a6a93;
  font-size: .9rem;
}

@media (max-width:560px) {
  .albahaa-404-card { padding: 1.2rem; }
  .albahaa-404-search { flex-direction: column; }
}
