:root {
  --bg: #0f1116;
  --card: #12131a;
  --accent: #ffcc00;
  --accent2: #e63946;
  --muted: #9aa0ad;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('../images/banners/banner.png') center/cover no-repeat, var(--bg);
  color: #fff;
  font-family: "Poppins", sans-serif;
  text-align: center;
  padding: 20px;
  overflow: hidden;
}

.wrapper {
  position: relative;
  width: 100%;
  max-width: 420px;
  border-radius: 20px;
  overflow: hidden;
  padding: 2px;
  background: linear-gradient(90deg, var(--accent2), var(--accent), var(--accent2));
  background-size: 300% 300%;
  animation: borderMove 5s linear infinite;
}

@keyframes borderMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.box {
  background: var(--card);
  padding: 40px 30px;
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(2,6,23,0.6);
  position: relative;
  z-index: 2;
}

.icon {
  font-size: 64px;
  color: var(--accent);
  margin-bottom: 16px;
  text-shadow: 0 0 10px rgba(255,204,0,0.5);
}

h1 {
  font-size: 90px;
  font-weight: 800;
  color: #ff2b2b;
  position: relative;
  letter-spacing: -2px;
  text-shadow:
    0 0 10px rgba(255,0,0,0.7),
    0 0 20px rgba(255,0,0,0.5),
    0 0 40px rgba(255,50,50,0.3);
  animation: pulseRed 2s ease-in-out infinite;
}

h1::before,
h1::after {
  content: "404";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  overflow: hidden;
  color: #ff2b2b;
  mix-blend-mode: screen;
}

h1::before {
  text-shadow: -2px 0 #ff0000;
  animation: glitchTopRed 2.1s infinite linear alternate-reverse;
}

h1::after {
  text-shadow: 2px 0 #ff4d4d;
  animation: glitchBottomRed 2.3s infinite linear alternate;
}

p {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

a.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, var(--accent) 0%, #ffb300 100%);
  color: #111;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .2s, box-shadow .3s;
  box-shadow: 0 0 10px rgba(255,204,0,0.4);
}

a.btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255,204,0,0.7);
}

@keyframes glitchTopRed {
  0% { clip-path: inset(0 0 0 0); transform: translate(0, 0); }
  20% { clip-path: inset(0 0 80% 0); transform: translate(-2px, -2px); }
  40% { clip-path: inset(20% 0 60% 0); transform: translate(2px, -1px); }
  60% { clip-path: inset(40% 0 20% 0); transform: translate(-1px, 1px); }
  80% { clip-path: inset(60% 0 0 0); transform: translate(1px, 2px); }
  100% { clip-path: inset(0 0 0 0); transform: translate(0, 0); }
}

@keyframes glitchBottomRed {
  0% { clip-path: inset(0 0 0 0); transform: translate(0, 0); }
  25% { clip-path: inset(50% 0 40% 0); transform: translate(2px, 1px); }
  50% { clip-path: inset(20% 0 60% 0); transform: translate(-2px, -1px); }
  75% { clip-path: inset(80% 0 0 0); transform: translate(1px, -2px); }
  100% { clip-path: inset(0 0 0 0); transform: translate(0, 0); }
}

@keyframes pulseRed {
  0%, 100% {
    text-shadow: 0 0 10px rgba(255,0,0,0.6),
                 0 0 25px rgba(255,0,0,0.4);
  }
  50% {
    text-shadow: 0 0 25px rgba(255,50,50,0.9),
                 0 0 50px rgba(255,20,20,0.6);
  }
}

@media (max-width: 480px) {
  h1 { font-size: 64px; }
  .box { padding: 32px 24px; }
}
