:root {
  --dl-pink: #ff4fd8;
  --dl-purple: #7f5cff;
  --dl-ink: #0c0a14;
  --dl-surface: rgba(18, 14, 26, 0.78);
  --dl-border: rgba(255, 255, 255, 0.08);
  --dl-text: #f3eafe;
  --dl-muted: #c8b9e3;
}

html, body {
  background: radial-gradient(circle at 8% 20%, rgba(255, 79, 216, 0.14), transparent 22%),
              radial-gradient(circle at 78% 12%, rgba(127, 92, 255, 0.16), transparent 24%),
              linear-gradient(145deg, #0c0a14 0%, #130f1f 40%, #0d0a16 100%);
  color: var(--dl-text);
  font-family: 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-size: 180% 180%;
  animation: dl-bg-pan 22s ease-in-out infinite alternate;
}

body {
  min-height: 100vh;
  background-attachment: fixed;
  letter-spacing: 0.01em;
}

.page-wrapper {
  background: transparent;
}

.navbar {
  background: linear-gradient(90deg, rgba(12,10,20,0.92), rgba(27,20,44,0.88));
  border: 1px solid var(--dl-border);
  box-shadow: 0 16px 38px rgba(0,0,0,0.35);
  backdrop-filter: blur(14px);
  position: relative;
  overflow: visible;
}

.navbar::after {
  content: "";
  position: absolute;
  inset: -40% -60%;
  background: radial-gradient(circle at 20% 20%, rgba(255,79,216,0.18), transparent 45%),
              radial-gradient(circle at 80% 10%, rgba(127,92,255,0.18), transparent 48%);
  filter: blur(30px);
  opacity: 0.9;
  animation: dl-nav-glow 16s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

.navbar > * {
  position: relative;
  z-index: 1;
}

.navbar .dropdown-menu {
  z-index: 2000;
  overflow: visible;
}

.navbar-brand .brand-mark {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(255, 79, 216, 0.5));
}

.navbar-brand .brand-wordmark {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}

.nav-link,
.dropdown-item {
  color: var(--dl-muted);
}

.nav-link:hover,
.nav-link:focus,
.dropdown-item:hover {
  color: #fff;
}

.btn-primary,
.btn-secondary,
.btn-outline-primary {
  border: none;
  background: linear-gradient(135deg, var(--dl-pink), var(--dl-purple));
  color: var(--dl-ink);
  box-shadow: 0 14px 34px rgba(255, 79, 216, 0.28);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.btn-secondary {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
  color: var(--dl-text);
  border: 1px solid var(--dl-border);
  box-shadow: 0 10px 26px rgba(0,0,0,0.25);
}

.btn-outline-primary {
  background: transparent;
  border: 1px solid var(--dl-pink);
  color: var(--dl-text);
}

.btn-outline-primary:hover {
  background: linear-gradient(135deg, var(--dl-pink), var(--dl-purple));
  color: var(--dl-ink);
}

.badge {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--dl-text);
}

.badge.bg-faded-primary,
.badge.bg-faded-success,
.badge.bg-faded-warning,
.badge.bg-faded-danger,
.badge.bg-faded-info,
.badge.bg-faded-light,
.badge.bg-faded-secondary,
.badge.bg-faded-primary.text-primary,
.badge.bg-secondary,
.badge.bg-light {
  background: linear-gradient(135deg, rgba(255, 79, 216, 0.18), rgba(140, 75, 255, 0.18));
  color: var(--dl-text);
}

.card,
.accordion-item,
.offcanvas,
.dropdown-menu,
.input-group .form-control,
.form-control,
.accordion-item .card,
.accordion-item .card-footer {
  background: var(--dl-surface);
  border: 1px solid var(--dl-border);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
  color: var(--dl-text);
  backdrop-filter: blur(10px);
}

.form-control,
.input-group .form-control {
  color: var(--dl-text);
}

.form-control:focus {
  border-color: var(--dl-pink);
  box-shadow: 0 0 0 0.2rem rgba(255, 79, 216, 0.2);
}

.accordion-button:not(.collapsed) {
  background: linear-gradient(135deg, rgba(255,79,216,0.18), rgba(140,75,255,0.18));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

h1, h2, h3, h4, h5, h6 {
  color: #fff;
  letter-spacing: 0.005em;
  font-weight: 700;
}

p, span, li, .fs-sm, .fs-lg {
  color: var(--dl-muted);
}

section {
  position: relative;
}

section::after {
  content: "";
  position: absolute;
  inset: 10% 6% -10% 6%;
  background: radial-gradient(circle at 30% 20%, rgba(255, 79, 216, 0.07), transparent 40%),
              radial-gradient(circle at 70% 50%, rgba(140, 75, 255, 0.08), transparent 45%);
  filter: blur(40px);
  z-index: 0;
  pointer-events: none;
}

section > * { position: relative; z-index: 1; }

.hero-title span.text-primary {
  background: linear-gradient(135deg, var(--dl-pink), var(--dl-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-fill-color: transparent;
}

footer,
.bg-light,
.border-light,
.rounded-3 {
  border-color: var(--dl-border) !important;
}

.list-unstyled a,
.dropdown-menu .dropdown-item {
  color: var(--dl-muted);
}

.list-unstyled a:hover,
.dropdown-menu .dropdown-item:hover {
  color: #fff;
}

.spinner-grow,
.page-spinner {
  color: var(--dl-pink);
}

/* Improve hover on cards */
.accordion-item:hover,
.card:hover {
  transform: translateY(-2px);
  transition: transform 160ms ease, box-shadow 160ms ease;
  box-shadow: 0 16px 50px rgba(255, 79, 216, 0.2);
}

/* Mobile tweaks */
@media (max-width: 768px) {
  .navbar-brand .brand-wordmark { font-size: 1rem; }
  .navbar { border-radius: 0; }
}

/* Hero + chips */
.hero {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 79, 216, 0.12), rgba(140, 75, 255, 0.14));
  border: 1px solid var(--dl-border);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

.hero::after {
  content: "";
  position: absolute;
  inset: -20% -30%;
  background: radial-gradient(circle at 30% 30%, rgba(255,79,216,0.2), transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(127,92,255,0.2), transparent 50%);
  filter: blur(40px);
  animation: dl-hero-float 18s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

.hero > * { position: relative; z-index: 1; }

.glassy-panel {
  background: linear-gradient(135deg, rgba(13,10,20,0.82), rgba(23,17,36,0.86));
  border: 1px solid var(--dl-border);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  backdrop-filter: blur(16px);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--dl-muted);
}

.chip,
.chip-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--dl-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--dl-text);
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.chip-ghost:hover,
.chip:hover {
  transform: translateY(-2px);
  border-color: var(--dl-pink);
  box-shadow: 0 12px 30px rgba(255, 79, 216, 0.25);
}

.chip-label { font-size: 0.8rem; color: var(--dl-muted); }
.chip-value { font-weight: 700; }

.hero-chips .chip { background: rgba(255,255,255,0.04); }

.glow-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--dl-border);
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(0,0,0,0.35);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.glow-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 79, 216, 0.55);
  box-shadow: 0 26px 70px rgba(255, 79, 216, 0.22);
}

.text-muted { color: var(--dl-muted) !important; }

.bot-hero {
  position: relative;
  overflow: hidden;
}

.bot-hero > * { position: relative; z-index: 1; }

.hero-glow {
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  z-index: 0;
}

.hero-glow-1 {
  background: radial-gradient(circle, rgba(255,79,216,0.4), transparent 60%);
  top: -60px;
  left: -80px;
  animation: dl-hero-float 14s ease-in-out infinite alternate;
}

.hero-glow-2 {
  background: radial-gradient(circle, rgba(127,92,255,0.35), transparent 60%);
  bottom: -80px;
  right: -60px;
  animation: dl-bg-pan 18s ease-in-out infinite alternate;
}

.avatar-ring {
  position: relative;
  display: inline-flex;
  padding: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,79,216,0.5), rgba(98,73,255,0.5));
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}
.profile-anim-avatar img { position: relative; z-index: 1; }
.hero-animation.profile-scope { border-radius: 50%; opacity: 0.72; }
.hero-animation.preview-scope { border-radius: inherit; opacity: 0.65; }
.banner-animation-layer { mix-blend-mode: screen; opacity: 0.6; }
.animation-preview-circle {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #0f0d18;
  border: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}
.animation-preview-rect {
  position: relative;
  height: 72px;
  border-radius: 14px;
  background: #0f0d18;
  border: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
}

.stat-chip {
  min-width: 120px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--dl-border);
  box-shadow: 0 10px 28px rgba(0,0,0,0.3);
}

.stat-chip .label {
  display: block;
  font-size: 0.78rem;
  color: var(--dl-muted);
}

.stat-chip .value {
  font-weight: 700;
  font-size: 1.05rem;
}

.bg-success-soft { background: rgba(40, 199, 111, 0.14); color: #3dd598; }
.bg-warning-soft { background: rgba(255, 193, 7, 0.18); color: #f5c451; }
.bg-danger-soft { background: rgba(255, 99, 132, 0.18); color: #ff6b8b; }
.bg-secondary-soft { background: rgba(255,255,255,0.08); color: var(--dl-text); }
.bg-gradient-pink { background: linear-gradient(135deg, #ff4fd8, #7f5cff); color: #fff; }

.glassy-alert {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--dl-border);
  backdrop-filter: blur(10px);
}

.content-card .richtext p {
  margin-bottom: 1rem;
  color: var(--dl-text);
}

.sidebar-card {
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}

.coowner-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--dl-border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--dl-text);
  background: rgba(255,255,255,0.03);
  transition: transform 120ms ease, border-color 120ms ease;
}

/* Cosmetics: frames */
.avatar-ring.frame-glow-electric,
.frame-sample.frame-glow-electric {
  background: conic-gradient(from 200deg, #0f1b2d 0%, #5cf1ff 45%, #0f1b2d 80%);
  box-shadow: 0 0 18px rgba(92,241,255,0.75), 0 0 32px rgba(92,241,255,0.32);
  animation: frame-arc 4s ease-in-out infinite;
}

.avatar-ring.frame-pulse-sunset,
.frame-sample.frame-pulse-sunset {
  background: conic-gradient(from 40deg, #1b0f1c 0%, #ff7ac3 38%, #ffb86c 68%, #1b0f1c 100%);
  box-shadow: 0 0 18px rgba(255,122,195,0.7), 0 0 32px rgba(255,184,108,0.35);
  animation: frame-spin 9s linear infinite;
}

.avatar-ring.frame-aurora-loop,
.frame-sample.frame-aurora-loop {
  background: linear-gradient(135deg, #1a1330, #7f5cff, #35c7ff);
  box-shadow: 0 0 18px rgba(127,92,255,0.65), 0 0 32px rgba(53,199,255,0.35);
  animation: frame-pulse 3s ease-in-out infinite;
}

.avatar-ring.frame-matrix-neon,
.frame-sample.frame-matrix-neon {
  background: radial-gradient(circle at 30% 30%, #35ffb0, #0b1d16 70%);
  box-shadow: 0 0 18px rgba(53,255,176,0.65), 0 0 32px rgba(53,255,176,0.3);
  animation: frame-circuit 3.4s linear infinite;
}

@keyframes frame-arc {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(6deg) scale(1.02); }
}

@keyframes frame-spin {
  to { transform: rotate(360deg); }
}

@keyframes frame-pulse {
  0%, 100% { box-shadow: 0 0 18px rgba(127,92,255,0.5), 0 0 32px rgba(127,92,255,0.2); }
  50% { box-shadow: 0 0 24px rgba(127,92,255,0.9), 0 0 42px rgba(127,92,255,0.35); }
}

@keyframes frame-circuit {
  0% { box-shadow: 0 0 16px rgba(53,255,176,0.5), 0 0 28px rgba(53,255,176,0.25); }
  50% { box-shadow: 0 0 24px rgba(53,255,176,0.85), 0 0 46px rgba(53,255,176,0.35); }
  100% { box-shadow: 0 0 16px rgba(53,255,176,0.5), 0 0 28px rgba(53,255,176,0.25); }
}

/* Cosmetics: banners */
.banner-overlay,
.banner-layer { position: absolute; inset: 0; z-index: 0; opacity: 0.75; pointer-events: none; mix-blend-mode: screen; }
.banner-layer.banner-gradient,
.banner-overlay.banner-gradient {
  background: linear-gradient(120deg, var(--banner-color-a, #ff4fd8), var(--banner-color-b, #5cf1ff));
  background-size: 220% 220%;
  animation: banner-gradient-shift 9s ease-in-out infinite;
}

.banner-layer.banner-static,
.banner-overlay.banner-static {
  background: linear-gradient(120deg, var(--banner-color-a, #4b5563), var(--banner-color-b, #111827));
  background-size: 140% 140%;
  animation: none;
}

.banner-layer.custom-gif,
.banner-overlay.custom-gif,
.banner-layer.custom-banner,
.banner-overlay.custom-banner {
  background-image: var(--banner-url);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  mix-blend-mode: normal;
  opacity: 0.95;
  animation: none;
}

@keyframes banner-gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Cosmetics: hero animations (shared with shop previews) */
.hero-animation { position: absolute; inset: 0; pointer-events: none; z-index: 0; animation-play-state: running; will-change: transform, background-position; }
.page-animation-layer { position: fixed; inset: 0; z-index: -1; opacity: 0.4; pointer-events: none; }
.hero-animation.anim-snow { background-image:
  radial-gradient(2px 2px at 20% 20%, rgba(255,255,255,0.8), transparent),
  radial-gradient(2px 2px at 40% 10%, rgba(255,255,255,0.7), transparent),
  radial-gradient(3px 3px at 60% 30%, rgba(255,255,255,0.6), transparent),
  radial-gradient(2px 2px at 80% 0%, rgba(255,255,255,0.8), transparent),
  radial-gradient(3px 3px at 50% 50%, rgba(255,255,255,0.75), transparent);
  background-size: 200% 200%; animation: snowfall 12s linear infinite; opacity: 0.5;
}
.hero-animation.anim-stars { background-image:
  radial-gradient(1.5px 1.5px at 15% 15%, rgba(255,255,255,0.9), transparent),
  radial-gradient(1.5px 1.5px at 70% 20%, rgba(255,255,255,0.8), transparent),
  radial-gradient(2px 2px at 45% 40%, rgba(255,255,255,0.7), transparent),
  radial-gradient(2px 2px at 85% 60%, rgba(255,255,255,0.9), transparent);
  background-size: 120% 120%; animation: twinkle 6s ease-in-out infinite alternate; opacity: 0.45;
}
.hero-animation.anim-bubbles { background-image:
  radial-gradient(10px 10px at 20% 90%, rgba(255,255,255,0.12), transparent),
  radial-gradient(8px 8px at 60% 100%, rgba(255,255,255,0.1), transparent),
  radial-gradient(12px 12px at 80% 85%, rgba(255,255,255,0.14), transparent),
  radial-gradient(9px 9px at 40% 95%, rgba(255,255,255,0.1), transparent);
  background-size: 120% 120%; animation: rise 9s ease-in-out infinite; opacity: 0.5;
}
.hero-animation.anim-confetti { background-image:
  radial-gradient(3px 8px at 20% 20%, rgba(255,79,216,0.9), transparent),
  radial-gradient(3px 8px at 60% 10%, rgba(127,92,255,0.9), transparent),
  radial-gradient(3px 8px at 80% 30%, rgba(255,214,102,0.9), transparent),
  radial-gradient(3px 8px at 40% 50%, rgba(76,255,171,0.9), transparent),
  radial-gradient(3px 8px at 70% 70%, rgba(255,127,177,0.9), transparent);
  background-size: 160% 160%; animation: confetti 6.8s linear infinite; opacity: 0.6;
}
.hero-animation.anim-aurora { background: conic-gradient(from 120deg, rgba(127,92,255,0.28), rgba(255,79,216,0.22), rgba(79,220,255,0.22), rgba(127,92,255,0.28)); filter: blur(28px); animation: aurora 14s ease-in-out infinite alternate; opacity: 0.55; }
.hero-animation.anim-pulse { background: radial-gradient(circle, rgba(255,79,216,0.28), transparent 60%); animation: pulse 4s ease-in-out infinite; opacity: 0.6; }
.hero-animation.anim-grid { background-image: linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px); background-size: 22px 22px; animation: gridmove 12s linear infinite; opacity: 0.35; }
.hero-animation.anim-spark { background-image:
  radial-gradient(3px 3px at 10% 20%, rgba(255,255,255,0.95), transparent),
  radial-gradient(4px 4px at 60% 60%, rgba(255,79,216,0.9), transparent),
  radial-gradient(3px 3px at 80% 40%, rgba(127,92,255,0.9), transparent),
  radial-gradient(2px 2px at 30% 70%, rgba(255,255,255,0.9), transparent);
  background-size: 120% 120%; animation: spark 5.6s ease-in-out infinite alternate; filter: drop-shadow(0 0 6px rgba(255,255,255,0.4)); opacity: 0.5;
}
.hero-animation.anim-hearts { background-image:
  radial-gradient(8px 8px at 20% 90%, rgba(255,115,161,0.9), transparent),
  radial-gradient(7px 7px at 50% 95%, rgba(255,79,216,0.8), transparent),
  radial-gradient(9px 9px at 80% 88%, rgba(255,192,203,0.85), transparent);
  background-size: 140% 140%; animation: heartsRise 9s ease-in-out infinite; opacity: 0.55;
}
.hero-animation.anim-rain { background-image: repeating-linear-gradient(190deg, rgba(255,255,255,0.28) 0 2px, transparent 2px 12px); background-size: 120% 120%; animation: rainFall 5s linear infinite; opacity: 0.35; }
.hero-animation.anim-fireflies { background-image:
  radial-gradient(4px 4px at 15% 40%, rgba(255,255,255,0.9), transparent),
  radial-gradient(5px 5px at 70% 60%, rgba(127,255,212,0.9), transparent),
  radial-gradient(3px 3px at 45% 20%, rgba(255,255,200,0.85), transparent),
  radial-gradient(4px 4px at 80% 30%, rgba(255,215,140,0.9), transparent);
  background-size: 120% 120%; animation: firefly 8s ease-in-out infinite alternate; opacity: 0.5;
}

@keyframes banner-wave {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes banner-drift {
  0% { background-position: 0% 0%; }
  50% { background-position: 40% 60%; }
  100% { background-position: 80% 20%; }
}

@keyframes banner-scan {
  0% { background-position: 0 0; }
  100% { background-position: 120px 0; }
}

@keyframes banner-aurora {
  0% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-6px) scale(1.02); }
  100% { transform: translateY(6px) scale(1); }
}

@keyframes heartsRise { to { background-position-y: -60%; transform: translateY(-8px); opacity: 0.4; } }
@keyframes rainFall { to { background-position: 0 140%; } }
@keyframes firefly { 50% { transform: translate(6px, -4px); opacity: 0.4; } 100% { transform: translate(-8px, 6px); opacity: 0.65; } }

/* 404 page */
.error-hero {
  background: radial-gradient(circle at 12% 18%, rgba(255, 79, 216, 0.16), transparent 32%),
              radial-gradient(circle at 82% 28%, rgba(127, 92, 255, 0.18), transparent 36%),
              linear-gradient(150deg, #0c0a14 0%, #130f1f 48%, #0d0a16 100%);
}

.error-card {
  border-radius: 22px;
  border: 1px solid var(--dl-border);
  background: linear-gradient(135deg, rgba(13,10,20,0.88), rgba(23,17,36,0.9));
  box-shadow: 0 26px 74px rgba(0,0,0,0.42);
  position: relative;
  overflow: hidden;
}

.error-card::after {
  content: "";
  position: absolute;
  inset: -20% -30% auto auto;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255,79,216,0.28), transparent 55%);
  filter: blur(70px);
  opacity: 0.8;
  pointer-events: none;
}

.error-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--dl-border);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  box-shadow: 0 12px 28px rgba(0,0,0,0.25);
}

.error-actions .btn {
  min-width: 180px;
}

.error-quick-links .chip {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.08);
}

.error-quick-links .chip:hover {
  border-color: var(--dl-pink);
  box-shadow: 0 12px 34px rgba(255,79,216,0.2);
}

.error-illustration {
  position: relative;
  max-width: 520px;
}

.error-visual {
  position: relative;
  width: 100%;
  padding-top: 75%;
  margin: 0 auto;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(14,11,24,0.9), rgba(22,17,34,0.92));
  border: 1px solid var(--dl-border);
  box-shadow: 0 28px 80px rgba(0,0,0,0.45);
  overflow: hidden;
}

.error-glow {
  position: absolute;
  inset: -10% -20% auto auto;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,79,216,0.25), transparent 60%);
  filter: blur(70px);
  opacity: 0.8;
  pointer-events: none;
}

.error-ring {
  position: absolute;
  inset: 8% 10%;
  border: 1px dashed rgba(255,255,255,0.12);
  border-radius: 50%;
  animation: ring-spin 18s linear infinite;
}
.ring-2 { inset: 16% 18%; animation-duration: 22s; opacity: 0.5; }
.ring-3 { inset: 26% 28%; animation-duration: 28s; opacity: 0.35; }

.error-planet {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff 6%, #ffb7f5 20%, #7f5cff 55%, #211833 100%);
  top: 30%;
  left: 18%;
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
  animation: float 6s ease-in-out infinite alternate;
}

.error-ship {
  position: absolute;
  width: 80px;
  height: 42px;
  top: 58%;
  left: 60%;
  transform: rotate(-8deg);
  background: linear-gradient(135deg, #ff4fd8, #7f5cff);
  clip-path: polygon(0 50%, 75% 0, 100% 50%, 75% 100%);
  box-shadow: 0 12px 26px rgba(255,79,216,0.35);
  animation: ship-drift 5.5s ease-in-out infinite alternate;
}

.error-asteroid {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff 10%, #c9b8ff 40%, #4c3b70 90%);
  box-shadow: inset -8px -10px 18px rgba(0,0,0,0.35);
  animation: orbit 14s linear infinite;
  opacity: 0.9;
}
.error-asteroid::after {
  content: "";
  position: absolute;
  inset: 20%;
  border-radius: 50%;
  background: rgba(0,0,0,0.18);
}
.a1 { top: 10%; left: 60%; animation-duration: 14s; }
.a2 { top: 68%; left: 18%; animation-duration: 18s; }
.a3 { top: 22%; left: 78%; animation-duration: 20s; }
.a4 { top: 76%; left: 64%; animation-duration: 16s; }

.error-digits {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 900;
  font-size: 5.8rem;
  color: #fff;
  text-shadow: 0 18px 40px rgba(0,0,0,0.35);
  letter-spacing: 0.05em;
  mix-blend-mode: screen;
}

.error-digits span:nth-child(2) {
  background: linear-gradient(135deg, #ff4fd8, #7f5cff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pulse 2.8s ease-in-out infinite;
}

.error-visual::after {
  content: "";
  position: absolute;
  inset: 12% 8% 8% 12%;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.04);
  pointer-events: none;
}

@media (max-width: 768px) {
  .error-visual { padding-top: 82%; }
  .error-digits { font-size: 4.4rem; }
  .error-planet { width: 100px; height: 100px; }
  .error-ship { width: 68px; height: 36px; }
}

@keyframes ring-spin { to { transform: rotate(360deg); } }
@keyframes float { from { transform: translateY(-6px); } to { transform: translateY(10px); } }
@keyframes ship-drift { from { transform: translateY(-6px) translateX(-4px) rotate(-10deg); } to { transform: translateY(6px) translateX(6px) rotate(-4deg); } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }

@media (max-width: 768px) {
  .error-actions .btn { width: 100%; }
  .error-card { text-align: center; }
}

.coowner-row:hover { transform: translateY(-2px); border-color: rgba(255,79,216,0.6); }

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.stat-tile {
  padding: 10px;
  border: 1px solid var(--dl-border);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  box-shadow: 0 10px 26px rgba(0,0,0,0.25);
}

.stat-tile.compact {
  padding: 8px 10px;
  border-radius: 9px;
}

.stat-tile .label { margin: 0; color: var(--dl-muted); font-size: 0.85rem; }
.stat-tile .value { margin: 0; font-weight: 700; }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: linear-gradient(120deg, rgba(127,92,255,0.65), rgba(255,79,216,0.65), rgba(127,92,255,0.65));
  background-size: 200% 200%;
  color: #fff;
  animation: dl-pill-shift 8s ease-in-out infinite;
  font-size: 0.85rem;
}

.pill.dropdown-toggle::after { filter: brightness(1.1); }

.dropdown-menu {
  background: rgba(20,15,30,0.96);
  border: 1px solid var(--dl-border);
  box-shadow: 0 18px 42px rgba(0,0,0,0.4);
}

.dropdown-menu .dropdown-item {
  color: var(--dl-text);
}

.dropdown-menu .dropdown-item:hover {
  background: linear-gradient(120deg, rgba(127,92,255,0.5), rgba(255,79,216,0.5));
  background-size: 200% 200%;
  animation: dl-pill-shift 10s ease-in-out infinite;
  color: #fff;
}

/* Gradient select for sort dropdown */
.form-select#sortSelect {
  background: linear-gradient(120deg, rgba(127,92,255,0.28), rgba(255,79,216,0.28), rgba(127,92,255,0.28));
  background-size: 200% 200%;
  border: 1px solid var(--dl-border);
  color: #fff;
  animation: dl-pill-shift 12s ease-in-out infinite;
}

.form-select#sortSelect:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 79, 216, 0.25);
  border-color: rgba(255, 79, 216, 0.6);
}

@keyframes dl-pill-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes dl-bg-pan {
  0% { background-position: 0% 20%; }
  50% { background-position: 50% 60%; }
  100% { background-position: 100% 30%; }
}

@keyframes dl-nav-glow {
  0% { transform: translate3d(-6%, 0, 0) rotate(0deg); }
  100% { transform: translate3d(6%, 4%, 0) rotate(3deg); }
}

@keyframes dl-hero-float {
  0% { transform: translate3d(-4%, -2%, 0); opacity: 0.9; }
  100% { transform: translate3d(5%, 4%, 0); opacity: 1; }
}

.dl-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  min-width: 260px;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(12,10,20,0.92), rgba(27,20,44,0.9));
  border: 1px solid var(--dl-border);
  box-shadow: 0 18px 42px rgba(0,0,0,0.35);
  color: var(--dl-text);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 9999;
}

.dl-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.dl-toast-success { border-color: rgba(40, 199, 111, 0.4); box-shadow: 0 18px 42px rgba(40,199,111,0.25); }
.dl-toast-danger { border-color: rgba(255, 99, 132, 0.35); box-shadow: 0 18px 42px rgba(255,99,132,0.25); }

.text-muted { color: var(--dl-muted) !important; }
