/* ===== 404 Page ===== */
.not-found-page {
  background: #0a0a0a;
  min-height: 100vh;
  overflow-x: hidden;
}

.nf-main {
  padding: 140px 0 80px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.nf-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}

/* === Message side === */
.nf-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(220, 38, 38, .15);
  border: 1px solid rgba(220, 38, 38, .4);
  color: #f87171;
  padding: 9px 20px;
  border-radius: 50px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}
.nf-eyebrow .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f87171;
  box-shadow: 0 0 12px #f87171;
  animation: pulse 1.6s ease-in-out infinite;
}

.nf-code {
  font-family: var(--font-display);
  font-size: clamp(6rem, 18vw, 14rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -8px;
  margin-bottom: 16px;
  display: flex;
  gap: 0;
}
.nf-digit {
  background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,.4) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 30px rgba(255,255,255,.1);
  display: inline-block;
  animation: nfFloat 3.5s ease-in-out infinite;
}
.nf-digit:nth-child(2) { animation-delay: .2s; }
.nf-digit:nth-child(3) { animation-delay: .4s; }
.nf-digit--zero {
  background: linear-gradient(135deg, #ea580c 0%, #fb923c 50%, #fed7aa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px rgba(251,146,60,.5));
}
@keyframes nfFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.nf-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 500;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 18px;
}
.nf-title em {
  font-style: italic;
  color: var(--accent);
}

.nf-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(255,255,255,.7);
  margin-bottom: 32px;
  max-width: 540px;
}

.nf-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.nf-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 50px;
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  transition: all .3s var(--ease-out);
  cursor: pointer;
  border: none;
}
.nf-btn--primary {
  background: var(--accent);
  color: #0a0a0a;
  box-shadow: 0 12px 32px rgba(251,146,60,.3);
}
.nf-btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(251,146,60,.4);
}
.nf-btn--ghost {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
}
.nf-btn--ghost:hover {
  background: rgba(255,255,255,.12);
  transform: translateY(-2px);
}

/* === Game side === */
.nf-game {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 24px;
  padding: 24px;
  backdrop-filter: blur(20px);
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}

.nf-game__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}
.nf-game__title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
}
.nf-game__title .material-symbols-rounded { font-size: 1.3rem; }

.nf-game__stats {
  display: flex;
  gap: 18px;
}
.nf-game__stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1;
}
.nf-game__stat-label {
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,.4);
  margin-bottom: 4px;
}
.nf-game__stat-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
}

.nf-game__field {
  position: relative;
  width: 100%;
  height: 420px;
  background:
    linear-gradient(180deg, rgba(10,10,10,.4) 0%, rgba(10,10,10,.7) 100%),
    radial-gradient(ellipse at 50% 0%, rgba(251,146,60,.15) 0%, transparent 60%);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.06);
  cursor: none;
}
.nf-game__field.dragging { cursor: grabbing; }

.nf-game__catcher {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 78px;
  height: 56px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-deep) 100%);
  border-radius: 12px 12px 6px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 2px rgba(255,255,255,.15) inset,
    0 8px 24px rgba(251,146,60,.4),
    0 0 30px rgba(251,146,60,.3);
  transition: transform .08s linear;
  z-index: 5;
}
.nf-game__catcher .material-symbols-rounded {
  font-size: 1.6rem;
  color: #0a0a0a;
}
.nf-game__catcher::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 6px;
  right: 6px;
  height: 4px;
  background: var(--accent-hover);
  border-radius: 4px 4px 0 0;
}

/* Falling items */
.nf-item {
  position: absolute;
  top: -40px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  color: #0a0a0a;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 4px 16px rgba(251,146,60,.4), inset 0 1px 0 rgba(255,255,255,.3);
  z-index: 3;
  user-select: none;
}
.nf-item--fake {
  background: linear-gradient(135deg, #555, #333);
  color: rgba(255,255,255,.5);
  box-shadow: 0 4px 14px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.05);
}
.nf-item--bonus {
  background: linear-gradient(135deg, #fed7aa, #fb923c);
  box-shadow: 0 0 20px rgba(254,215,170,.6), 0 4px 16px rgba(251,146,60,.5);
  animation: bonusGlow 1s ease-in-out infinite alternate;
}
@keyframes bonusGlow {
  to { filter: brightness(1.2); }
}
.nf-item .material-symbols-rounded {
  font-size: 1.2rem;
}

/* Floating score popup */
.nf-pop {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  pointer-events: none;
  z-index: 10;
  animation: nfPop .9s ease-out forwards;
}
.nf-pop--good { color: var(--accent); }
.nf-pop--bad { color: #f87171; }
@keyframes nfPop {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-30px); }
}

/* Game overlay (start / game over) */
.nf-game__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,10,10,.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: opacity .3s ease;
}
.nf-game__overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}
.nf-game__overlay-inner {
  text-align: center;
  padding: 30px;
  max-width: 320px;
}
.nf-game__overlay-inner h3 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  color: #fff;
  margin-bottom: 12px;
}
.nf-game__overlay-inner p {
  color: rgba(255,255,255,.75);
  font-size: .9rem;
  line-height: 1.6;
  margin-bottom: 22px;
}
.nf-game__overlay-inner kbd {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 6px;
  font-family: monospace;
  font-size: .82rem;
  margin: 0 2px;
  color: #fff;
}

.nf-game__hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: .78rem;
  color: rgba(255,255,255,.55);
}
.nf-game__hint .material-symbols-rounded {
  font-size: 1.05rem;
  color: var(--accent);
}

/* Catcher shake on miss */
@keyframes nfShake {
  0%, 100% { transform: translateX(-50%); }
  25% { transform: translateX(calc(-50% - 6px)); }
  75% { transform: translateX(calc(-50% + 6px)); }
}
.nf-game__catcher.shake {
  animation: nfShake .25s ease;
}

@media (max-width: 1024px) {
  .nf-grid { grid-template-columns: 1fr; gap: 40px; }
  .nf-message { text-align: center; }
  .nf-message .nf-eyebrow,
  .nf-message .nf-actions { justify-content: center; }
  .nf-code { justify-content: center; }
  .nf-desc { margin-left: auto; margin-right: auto; }
}
@media (max-width: 768px) {
  .nf-main { padding: 100px 0 60px; }
  .nf-game__field { height: 360px; }
  .nf-game__stats { gap: 12px; }
  .nf-game__stat-value { font-size: 1.2rem; }
  .nf-actions { flex-direction: column; align-items: stretch; }
  .nf-actions a { justify-content: center; }
}
