/* NotFound.css */

.notFound-wrapper {
  /* Default: Light Mode color theme */
  --n404-bg: transparent;
  --n404-circle-bg-1: rgba(30, 41, 59, 0.05);
  --n404-circle-bg-2: rgba(30, 41, 59, 0.07);
  --n404-circle-shadow: inset 5px 20px 40px rgba(148, 163, 184, 0.3), 
                        inset 5px 0px 5px rgba(100, 116, 139, 0.2), 
                        inset 5px 5px 20px rgba(100, 116, 139, 0.25), 
                        2px 2px 5px rgba(255, 255, 255, 0.9);
  --n404-text-color: #3b82f6;
  --n404-text-shadow: 6px 6px 10px rgba(148, 163, 184, 0.4);
  
  --n404-num-color-1: #4f46e5;
  --n404-num-color-2: rgba(99, 102, 241, 0.25);
  
  --n404-btn-bg: white;
  --n404-btn-text: #4f46e5;
  --n404-btn-shadow: 0px 15px 20px rgba(148, 163, 184, 0.4);

  display: grid;
  grid-template-columns: 1fr;
  justify-content: center;
  align-items: center;
  height: 100vh;
  min-height: 700px;
  overflow: hidden;
  position: relative;
  background: var(--n404-bg);
  font-family: "Barlow", sans-serif;
  transition: background 0.3s ease;
}

/* Dark Mode overrides */
.dark .notFound-wrapper {
  --n404-bg: transparent;
  --n404-circle-bg-1: rgba(99, 102, 241, 0.05);
  --n404-circle-bg-2: rgba(168, 85, 247, 0.07);
  --n404-circle-shadow: inset 5px 20px 40px rgba(15, 18, 25, 0.55), 
                        inset 5px 0px 5px rgba(99, 102, 241, 0.25), 
                        inset 5px 5px 20px rgba(168, 85, 247, 0.2), 
                        2px 2px 5px rgba(255, 255, 255, 0.08);
  --n404-text-color: white;
  --n404-text-shadow: 6px 6px 10px #0f1219;
  
  --n404-num-color-1: white;
  --n404-num-color-2: #36184F;
  
  --n404-btn-bg: #2d354d;
  --n404-btn-text: white;
  --n404-btn-shadow: 0px 15px 20px rgba(15, 18, 25, 0.6);
}

.notFound-wrapper .container {
  margin: 0 auto;
  transition: all 0.4s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
  height: 100%;
}

.notFound-wrapper .container .scene {
  position: absolute;
  width: 100vw;
  height: 100vh;
  vertical-align: middle;
}

.notFound-wrapper .container .one,
.notFound-wrapper .container .two,
.notFound-wrapper .container .three,
.notFound-wrapper .container .circle,
.notFound-wrapper .container .p404 {
  width: 60%;
  height: 60%;
  top: 20% !important;
  left: 20% !important;
  min-width: 400px;
  min-height: 400px;
  position: absolute;
}

.notFound-wrapper .container .one .content,
.notFound-wrapper .container .two .content,
.notFound-wrapper .container .three .content,
.notFound-wrapper .container .circle .content,
.notFound-wrapper .container .p404 .content {
  width: 600px;
  height: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: content 0.8s cubic-bezier(1, 0.06, 0.25, 1) backwards;
}

@keyframes content {
  0% {
    width: 0;
  }
}

.notFound-wrapper .container .one .content .piece,
.notFound-wrapper .container .two .content .piece,
.notFound-wrapper .container .three .content .piece,
.notFound-wrapper .container .circle .content .piece,
.notFound-wrapper .container .p404 .content .piece {
  width: 200px;
  height: 80px;
  display: flex;
  position: absolute;
  border-radius: 80px;
  z-index: 1;
  animation: pieceLeft 8s cubic-bezier(1, 0.06, 0.25, 1) infinite both;
}

@keyframes pieceLeft {
  50% {
    left: 80%;
    width: 10%;
  }
}

@keyframes pieceRight {
  50% {
    right: 80%;
    width: 10%;
  }
}

@media screen and (max-width: 799px) {
  .notFound-wrapper .container .one,
  .notFound-wrapper .container .two,
  .notFound-wrapper .container .three,
  .notFound-wrapper .container .circle,
  .notFound-wrapper .container .p404 {
    width: 90%;
    height: 90%;
    top: 5% !important;
    left: 5% !important;
    min-width: 280px;
    min-height: 280px;
  }
}

@media screen and (max-height: 660px) {
  .notFound-wrapper .container .one,
  .notFound-wrapper .container .two,
  .notFound-wrapper .container .three,
  .notFound-wrapper .container .circle,
  .notFound-wrapper .container .p404 {
    min-width: 280px;
    min-height: 280px;
    width: 60%;
    height: 60%;
    top: 20% !important;
    left: 20% !important;
  }
}

.notFound-wrapper .container .text {
  width: 60%;
  height: 40%;
  min-width: 400px;
  min-height: 500px;
  position: absolute;
  margin: 40px 0;
  animation: text 0.6s 1.8s ease backwards;
}

@keyframes text {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
}

@media screen and (max-width: 799px) {
  .notFound-wrapper .container .text {
    min-height: 400px;
    height: 80%;
  }
}

.notFound-wrapper .container .text article {
  width: 400px;
  position: absolute;
  bottom: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  left: 50%;
  transform: translateX(-50%);
}

@media screen and (max-width: 799px) {
  .notFound-wrapper .container .text article {
    width: 100%;
  }
}

.notFound-wrapper .container .text article p {
  color: var(--n404-text-color);
  font-size: 18px;
  letter-spacing: 0.6px;
  margin-bottom: 40px;
  text-shadow: var(--n404-text-shadow);
  font-family: "Barlow", sans-serif;
  font-weight: 500;
  line-height: 1.5;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.notFound-wrapper .container .p404 {
  font-size: 200px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--n404-num-color-1);
  display: flex !important;
  justify-content: center;
  align-items: center;
  position: absolute;
  z-index: 2;
  animation: anime404 0.6s cubic-bezier(0.3, 0.8, 1, 1.05) both;
  animation-delay: 1.2s;
  transition: color 0.3s ease;
}

@media screen and (max-width: 799px) {
  .notFound-wrapper .container .p404 {
    font-size: 100px;
  }
}

@keyframes anime404 {
  0% {
    opacity: 0;
    transform: scale(10) skew(20deg, 20deg);
  }
}

.notFound-wrapper .container .p404:nth-of-type(2) {
  color: var(--n404-num-color-2);
  z-index: 1;
  animation-delay: 1s;
  filter: blur(10px);
  opacity: 0.8;
  transition: color 0.3s ease;
}

.notFound-wrapper .container .circle {
  position: absolute;
}

.notFound-wrapper .container .circle:before {
  content: "";
  position: absolute;
  width: 800px;
  height: 800px;
  background-color: var(--n404-circle-bg-1);
  border-radius: 100%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: var(--n404-circle-shadow);
  animation: circle 0.8s cubic-bezier(1, 0.06, 0.25, 1) backwards;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

@media screen and (max-width: 799px) {
  .notFound-wrapper .container .circle:before {
    width: 400px;
    height: 400px;
  }
}

.notFound-wrapper .container .one .content:before {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  background-color: var(--n404-circle-bg-2);
  border-radius: 100%;
  box-shadow: var(--n404-circle-shadow);
  animation: circle 0.8s 0.4s cubic-bezier(1, 0.06, 0.25, 1) backwards;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

@media screen and (max-width: 799px) {
  .notFound-wrapper .container .one .content:before {
    width: 300px;
    height: 300px;
  }
}

.notFound-wrapper .container .one .content .piece {
  background: linear-gradient(90deg, #8077EA 13.7%, #EB73FF 94.65%);
}

.notFound-wrapper .container .one .content .piece:nth-child(1) {
  right: 15%;
  top: 18%;
  height: 30px;
  width: 120px;
  animation-delay: 0.5s;
  animation-name: pieceRight;
}

.notFound-wrapper .container .one .content .piece:nth-child(2) {
  left: 15%;
  top: 45%;
  width: 150px;
  height: 50px;
  animation-delay: 1s;
  animation-name: pieceLeft;
}

.notFound-wrapper .container .one .content .piece:nth-child(3) {
  left: 10%;
  top: 75%;
  height: 20px;
  width: 70px;
  animation-delay: 1.5s;
  animation-name: pieceLeft;
}

.notFound-wrapper .container .two .content .piece {
  background: linear-gradient(90deg, #FFEDC0 0%, #FF9D87 100%);
}

.notFound-wrapper .container .two .content .piece:nth-child(1) {
  left: 0%;
  top: 25%;
  height: 40px;
  width: 120px;
  animation-delay: 2s;
  animation-name: pieceLeft;
}

.notFound-wrapper .container .two .content .piece:nth-child(2) {
  right: 15%;
  top: 35%;
  width: 180px;
  height: 50px;
  animation-delay: 2.5s;
  animation-name: pieceRight;
}

.notFound-wrapper .container .two .content .piece:nth-child(3) {
  right: 10%;
  top: 80%;
  height: 20px;
  width: 160px;
  animation-delay: 3s;
  animation-name: pieceRight;
}

.notFound-wrapper .container .three .content .piece {
  background: #FB8A8A;
}

.notFound-wrapper .container .three .content .piece:nth-child(1) {
  left: 25%;
  top: 35%;
  height: 20px;
  width: 80px;
  animation-name: pieceLeft;
  animation-delay: 3.5s;
}

.notFound-wrapper .container .three .content .piece:nth-child(2) {
  right: 10%;
  top: 55%;
  width: 140px;
  height: 40px;
  animation-name: pieceRight;
  animation-delay: 4s;
}

.notFound-wrapper .container .three .content .piece:nth-child(3) {
  left: 40%;
  top: 68%;
  height: 20px;
  width: 80px;
  animation-name: pieceLeft;
  animation-delay: 4.5s;
}
