html{
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
  /* *------------------------------- BackStars Start ------------------------------- */
  body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: linear-gradient(calc( 90deg * var(--direction-num)), hsl(from var(--primary-50) h s 3) 0%, hsl(from var(--primary-50) h s 10) 100%);
    z-index: -1;
  }
  
  .star {
    position: absolute;
    background-color: #fff;
    width: 1px;
    height: 1px;
    border-radius: 50%;
  }
  .star:before {
    content: "";
    position: absolute;
    top: -2.5px;
    left: -2.5px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.8);
    opacity: 0;
    animation: starTwinkle 2s infinite;
  }
  
  .shooting-star {
    position: absolute;
    width: 2px;
    height: 10px;
    background-color: #fff;
    opacity: 1;
    z-index: 1;
    transform: rotate(45deg);
    animation: shootingStarAnimation 0.5s linear forwards;
  }
  
  @keyframes starTwinkle {
    0% {
      transform: scale(0.1);
      opacity: 0;
    }
    50% {
      transform: scale(0.7);
      opacity: 1;
    }
    100% {
      transform: scale(0.1);
      opacity: 0;
    }
  }
  @keyframes shootingStarAnimation {
    0% {
      opacity: 1;
      transform: translateX(-200px) translateY(-200px) rotate(70deg);
    }
    100% {
      opacity: 0;
      transform: translateX(200px) translateY(-300px) rotate(70deg);
    }
  }

  body {
    overflow:hidden;
  }

  /* Randomized twinkle delays */
.star:nth-child(10n-9):before {
    animation-delay: 0.8s;
  }
  
  .star:nth-child(10n-8):before {
    animation-delay: 1.2s;
  }
  
  .star:nth-child(10n-7):before {
    animation-delay: 0.9s;
  }
  
  .star:nth-child(10n-6):before {
    animation-delay: 1.4s;
  }
  
  .star:nth-child(10n-5):before {
    animation-delay: 1.1s;
  }
  
  .star:nth-child(10n-4):before {
    animation-delay: 0.7s;
  }
  
  /* Add more star:nth-child(n):before rules for additional stars */
  .star:nth-child(10n-3):before {
    animation-delay: 1.3s;
  }
  
  .star:nth-child(10n-2):before {
    animation-delay: 0.6s;
  }
  
  .star:nth-child(10n-1):before {
    animation-delay: 1.5s;
  }
  
  .star:nth-child(10n):before {
    animation-delay: 0.5s;
  }
  
  /* Continue adding star:nth-child(n):before rules for more delays */
  .star:nth-child(15):before {
    animation-delay: 0.8s;
  }
  
  .star:nth-child(16):before {
    animation-delay: 1.2s;
  }
  
  .star:nth-child(17):before {
    animation-delay: 0.9s;
  }
  
  .star:nth-child(18):before {
    animation-delay: 1.4s;
  }
  
  .star:nth-child(19):before {
    animation-delay: 1.1s;
  }
  
  .star:nth-child(20):before {
    animation-delay: 0.7s;
  }
  
  /* Add more star:nth-child(n):before rules for additional stars */
  .star:nth-child(11):before {
    animation-delay: 1.3s;
  }
  
  .star:nth-child(12):before {
    animation-delay: 0.6s;
  }
  
  .star:nth-child(13):before {
    animation-delay: 1.5s;
  }
  
  .star:nth-child(14):before {
    animation-delay: 0.5s;
  }

  
  
  /* !------------------------------- BackStars End --------------------------------- */

  /* *------------------------------- 404 Start ------------------------------- */

.p404__Title{
    color: var(--primary-99);
}
.p404__Wrapper{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50% , -50%);
    display: flex;
    flex-direction: column;
}

.p404__Numbers{
    height: calc(3 * var(--main-space));
    display: flex;
    align-items: center;
    font-size: 100px;
    width: 50%;
    gap: 3rem;
}

.p404__Numbers>span{
    --aniamtion-dur:15s;
    animation: float var(--aniamtion-dur) infinite var(--num-animation-delay) ease,
    rotate calc(var(--aniamtion-dur) * 1.5) infinite var(--num-animation-delay , 0s) ease;
    rotate: var(--num-rotate , 0deg);
}

.p404__Numbers>span:nth-child(1){
    --num-animation-delay:calc(var(--aniamtion-dur)*-1*0.3);
    translate: -0.5rem -1rem;
}

.p404__Numbers>span:nth-child(2){
    --num-animation-delay:calc(var(--aniamtion-dur)*-1*0.5);
}

.p404__Numbers>span:nth-child(3){
    --num-animation-delay:calc(var(--aniamtion-dur)*-1*1.5);
    translate: 0.75rem 1rem;
}

@media (max-width: 992px) {
 .p404__Numbers{
    width: 100%;
 }

 .p404__Wrapper{
    align-items: center;
 }

 .p404__Numbers{
    justify-content: center;
 }
}

@keyframes float {
	0% {
		transform: translatey(0px);
	}
	50% {
		transform: translatey(-1rem);
	}
	100% {
		transform: translatey(0px);
	}
}
@keyframes rotate {
	0% {
        rotate: -10deg;
    }
	50% {
        rotate: 10deg;
    }
	100% {
        rotate: -10deg;
    }
}


/* !------------------------------- 404 End --------------------------------- */


body{
  --p404-title-text:"Page Not Found";
  --p404-button-text:"Go Back!";
}
body.rtl{
  --p404-title-text:"صفحه مورد نظر یافت نشد";
  --p404-button-text:"بازگشت";
}

.p404__Title::after{
  content: var(--p404-title-text);
}
#backLink::after{
  content: var(--p404-button-text);
}
