/* ============================================
   sagargupta.online — Dark Glassmorphism
   ============================================ */

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Dark Animated Background --- */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #0a0a0f;
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(88, 60, 180, 0.25) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(40, 80, 200, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(120, 40, 160, 0.12) 0%, transparent 50%);
  color: #e8e8f0;
  text-align: center;
  padding: 24px;
  overflow: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle 600px at 20% 30%, rgba(100, 80, 200, 0.08), transparent),
    radial-gradient(circle 500px at 80% 70%, rgba(60, 100, 220, 0.06), transparent);
  animation: ambientDrift 20s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes ambientDrift {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  50% { transform: translate(-30px, 20px) scale(1.05); opacity: 0.8; }
  100% { transform: translate(20px, -15px) scale(0.98); opacity: 1; }
}

body::after {
  content: '';
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 80, 220, 0.12) 0%, transparent 70%);
  filter: blur(60px);
  bottom: -100px;
  right: -60px;
  animation: orbFloat 16s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(-40px, -60px); }
  66% { transform: translate(30px, -30px); }
}

.container {
  position: relative;
  z-index: 1;
  max-width: 520px;
  width: 100%;
  padding: 52px 44px 44px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-radius: 24px;
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  animation: cardIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  pointer-events: none;
}

.container-404 { max-width: 560px; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.icon-wrap {
  margin-bottom: 20px;
  color: rgba(160, 140, 255, 0.7);
  animation: fadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.icon-wrap svg { animation: arrowPulse 2.5s ease-in-out infinite; }

@keyframes arrowPulse {
  0%, 100% { transform: translateX(0); opacity: 0.6; }
  50% { transform: translateX(6px); opacity: 1; }
}

h1 {
  font-size: 2.2em;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #f0f0f8;
  animation: fadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

p {
  font-size: 1.05em;
  line-height: 1.7;
  margin-bottom: 28px;
  color: rgba(220, 220, 235, 0.6);
  animation: fadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}

p strong { color: rgba(220, 220, 235, 0.9); font-weight: 600; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.divider {
  width: 48px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(140, 120, 255, 0.4), transparent);
  margin: 0 auto 24px;
  animation: fadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.btn-group {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  animation: fadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}

.btn {
  display: inline-block;
  padding: 13px 30px;
  color: #e0e0f0;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.92em;
  letter-spacing: 0.01em;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  cursor: pointer;
}

.btn-primary {
  background: rgba(120, 90, 255, 0.2);
  border: 1px solid rgba(140, 110, 255, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}

.btn-primary:hover {
  background: rgba(120, 90, 255, 0.35);
  border-color: rgba(140, 110, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(100, 60, 200, 0.2), 0 0 20px rgba(120, 90, 255, 0.1);
}

.btn-secondary { background: transparent; border: 1px solid rgba(255, 255, 255, 0.1); animation: fadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both; }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.2); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid rgba(140, 120, 255, 0.6); outline-offset: 3px; }

.error-code {
  font-size: 7.5em;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 12px;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, rgba(180, 160, 255, 0.9) 0%, rgba(100, 80, 180, 0.4) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  animation: glitchIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes glitchIn {
  0% { opacity: 0; transform: scale(0.6); filter: blur(12px); }
  40% { opacity: 1; transform: scale(1.04) skewX(-1.5deg); filter: blur(0); }
  60% { transform: scale(0.98) skewX(0.5deg); }
  100% { transform: scale(1) skewX(0); }
}

.error-code::before,
.error-code::after {
  content: '404';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(180, 160, 255, 0.9), rgba(100, 80, 180, 0.4));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.error-code::before { clip-path: inset(0 0 60% 0); animation: glitchSlice 5s ease-in-out infinite; }
.error-code::after { clip-path: inset(60% 0 0 0); animation: glitchSlice 5s ease-in-out 0.15s infinite; }

@keyframes glitchSlice {
  0%, 93%, 100% { transform: translate(0); }
  94% { transform: translate(-4px, -1px); }
  95.5% { transform: translate(4px, 1px); }
  97% { transform: translate(-2px, 0); }
  98.5% { transform: translate(2px, -1px); }
}

@media (max-width: 600px) {
  body { padding: 16px; }
  .container { padding: 40px 28px 36px; border-radius: 20px; }
  .error-code { font-size: 5em; }
  h1 { font-size: 1.7em; }
  p { font-size: 0.95em; }
  .btn { padding: 12px 24px; font-size: 0.88em; }
  .btn-group { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
