/* ----- crack the code ------ */
body {
  background: linear-gradient(135deg, #563a9c, #8b5dff);
  background-size: 200% 200%;
  animation: moveGradient 2s infinite linear;
}

@keyframes moveGradient {
  0% {
    background-position: 0% 0%;
  }
  50% {
    background-position: 100% 100%;
  }
  100% {
    background-position: 0% 0%;
  }
}
/* ---- crack the code heading ------ */
.crack-the-code-heading {
  background-color: #3b1e54;
  color: white;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
  text-align: center;
  max-width: 400px;
  margin: 10px auto 0 auto;

  display: flex;
  flex-direction: column;
  align-items: center;
}

.crack-the-code-h1 {
  font-size: 40px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
}
/* ------ crack the code img ------- */
.crack-the-code-lock-img-div {
  margin-top: 0;
  margin-bottom: 0;
  max-width: fit-content;
  margin-left: auto;
  margin-right: auto;
}
.crack-the-code-lock-img {
  margin-top: 0px;
  margin-bottom: 0;
  height: 400px;
  width: 400px;
}
/* ----- crack the code - code input ----- */

.crack-the-code-hint-code-code-box {
  width: 70px;
  height: 70px;
  text-align: center;
  font-size: 35px;
  font-weight: bold;
  border: 3px solid #3b1e54;
  border-radius: 10px;
  outline: none;
  transition: all 0.3s ease-in-out;
  background-color: #3b1e54;
  color: #fff;
  cursor: pointer;
  margin: 0 13px;
}

.crack-the-code-hint-code-code-box:hover {
  background-color: transparent;
  border-color: #3b1e54;
  color: #3b1e54;
  transform: scale(1.1);
  box-shadow: 0 0 10px black;
}

.crack-the-code-hint-code-code-box:focus {
  border-color: #3b1e54;
  box-shadow: 0 0 10px #3b1e54;
}
.crack-the-code-hint-code-code-box::placeholder {
  color: white;
  opacity: 1;
  font-size: 35px;
  font-weight: bold;
}
.crack-the-code-hint-code-code-box:hover::placeholder {
  color: #3b1e54;
}
.crack-the-code-hint-code-code-boxis {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* ------ crack the code button ------- */
.crack-the-code-enter-button-div {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 30px;
  width: 60px;
  margin-left: 130px;
}
.crack-the-code-button {
  background-color: #3d30a2;
  border: none;
  color: white;
  padding: 14px 28px;
  font-size: 18px;
  border-radius: 30px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  box-shadow: 2px 2px 6px black;
  margin: 80px 0 0 100px;
}
.crack-the-code-button:hover {
  color: white;
  background-color: #337ccf;
  transform: scale(1.05);
}
.crack-the-code-button:active {
  background-color: #192655;
  transform: scale(0.95);
}
/* ---- crack the code paraghraph ---- */
.crack-the-code-paragraph {
  max-width: fit-content;
  margin-left: auto;
  margin-right: auto;
  margin-top: 90px;
  background-color: #e48f45;
  color: white;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  font-weight: bold;
  width: fit-content;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.crack-the-code-pre {
  margin: 0;
  font-family: Arial, sans-serif;
  font-size: 25px;
}

/* ------ crack the code hint ------- */
.crack-the-code-hint-heading {
  max-width: fit-content;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 160px;
  margin-top: 40px;
  background-color: #3b1e54;
  color: white;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  width: fit-content;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.crack-the-code-head {
  margin: 0;
  font-family: Arial, sans-serif;
  font-size: 40px;
}

/* ------ crack the code hint boxis ------- */
/* Main container */
.crack-the-code-hints {
  display: flex;
  flex-direction: column; /* Stacks rows */
  align-items: center;
  gap: 30px; /* Space between rows */
  max-width: 400px;
  margin: 0;
}

/* First row (2 hint boxes in one line) */
.crack-the-code-box-hint-mix-1,
.crack-the-code-box-hint-mix-2 {
  display: flex;
  justify-content: center;
  gap: 25px; /* Increased space between hint boxes */
}

/* Individual hint box */
.crack-the-code-box-hint-mix {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #e48f45;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  width: 140px;
  text-align: center;
  transition: 1s;
}
.crack-the-code-box-hint-mix:hover {
  background-color: #e48f45;
  border-color: #e48f45;
  color: #e48f45;
  transform: scale(1.1);
  box-shadow: 0 0 10px black;
}

.crack-the-code-box-hint-mix:focus {
  border-color: #e48f45;
  box-shadow: 0 0 10px #e48f45;
}
/* Hint Box Styling */
.crack-the-code-hint-box {
  display: flex;
  gap: 8px; /* More space between numbers */
  justify-content: center;
  background-color: #e48f45;
  padding: 15px 15px;
  border-radius: 6px;
}

/* Number Box Styling */
.crack-the-code-hint-code-box {
  width: 38px;
  height: 38px;
  font-size: 30px;
  font-weight: bold;
  border: 2px solid #000;
  border-radius: 6px;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  color: black;
}

/* Hint Text Styling (Now Below Each Box) */
.crack-the-code-hint-text {
  font-size: 24px;
  font-weight: bold;
  color: white;
  margin-top: 8px; /* Spacing from the hint box */
  text-align: center;
  background-color: #e48f45;
  padding: 5px 0 0 0;
  border-radius: 5px;
  width: fit-content;
}
/* Animation for pop in and out */
@keyframes popInOut {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Apply animation to boxes */
.pop-animation {
  animation: popInOut 1s infinite ease-in-out;
}
.crack-the-code {
  text-align: center;
}
.crack-the-code-section1 {
  margin: 30px 200px 0 200px;
  display: inline-block;
  vertical-align: middle;
}
.crack-the-code-section2 {
  display: inline-block;
  vertical-align: middle;
  margin: 30px 200px 0 200px;
}
.home-button {
  position: absolute;
  top: 20px;
  left: 20px;
  display: inline-block;
  padding: 15px 30px;
  background: linear-gradient(135deg, #722afe, #2b86c5);
  color: white;
  font-size: 24px;
  text-decoration: none;
  border-radius: 50px;
  font-weight: bold;
  text-align: center;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 5px 15px rgba(43, 134, 197, 0.4);
  transition: all 0.3s ease;
}

.home-button:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2b86c5, #722afe);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
  border-radius: 50px;
}

.home-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(114, 42, 254, 0.6);
}

.home-button:hover:before {
  opacity: 1;
}

.home-button:active {
  transform: translateY(0);
  box-shadow: 0 5px 15px rgba(43, 134, 197, 0.4);
}

.home-button .icon {
  display: inline-block;
  margin-right: 10px;
  transition: transform 0.3s ease;
}

.home-button:hover .icon {
  transform: rotate(10deg);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(114, 42, 254, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(114, 42, 254, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(114, 42, 254, 0);
  }
}

.home-button:hover {
  animation: pulse 1.5s infinite;
}

/* Mobile Responsive Styles - Only Applied on Mobile Screens */
@media screen and (max-width: 768px) {
  body {
    margin: 0;
    padding: 0;
  }

  .crack-the-code-heading {
    max-width: 90%;
    padding: 15px;
  }

  .crack-the-code-h1 {
    font-size: 28px;
  }

  .crack-the-code-lock-img {
    width: 90%;
    height: auto;
    max-width: 300px;
  }

  .crack-the-code-hint-code-code-boxis {
    flex-wrap: wrap;
    justify-content: center;
  }

  .crack-the-code-hint-code-code-box {
    width: 50px;
    height: 50px;
    font-size: 24px;
    margin: 5px;
  }

  .crack-the-code-hint-code-code-box::placeholder {
    font-size: 24px;
  }

  .crack-the-code-enter-button-div {
    margin: 20px auto;
    width: 100%;
  }

  .crack-the-code-button {
    margin: 20px auto;
  }

  .crack-the-code-paragraph {
    margin-top: 30px;
    max-width: 90%;
  }

  .crack-the-code-pre {
    font-size: 18px;
  }

  .crack-the-code-hint-heading {
    margin-bottom: 40px;
    max-width: 90%;
  }

  .crack-the-code-head {
    font-size: 28px;
  }

  .crack-the-code-hints {
    max-width: 90%;
    margin: 0 auto;
  }

  .crack-the-code-box-hint-mix-1,
  .crack-the-code-box-hint-mix-2 {
    flex-wrap: wrap;
    gap: 15px;
  }

  .crack-the-code-box-hint-mix {
    padding: 20px;
    width: 100px;
  }

  .crack-the-code-hint-code-box {
    width: 30px;
    height: 30px;
    font-size: 20px;
  }

  .crack-the-code-hint-text {
    font-size: 18px;
  }

  .crack-the-code-section1,
  .crack-the-code-section2 {
    display: block;
    margin: 20px auto;
    width: 90%;
  }

  .home-button {
    position: relative;
    top: auto;
    left: auto;
    margin: 20px;
    padding: 10px 20px;
    font-size: 18px;
    display: block;
  }
}

/* Small Mobile Screens */
@media screen and (max-width: 480px) {
  .crack-the-code-h1 {
    font-size: 24px;
  }

  .crack-the-code-hint-code-code-box {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .crack-the-code-box-hint-mix {
    padding: 15px;
    width: 80px;
  }

  .crack-the-code-hint-code-box {
    width: 25px;
    height: 25px;
    font-size: 16px;
  }

  .crack-the-code-hint-text {
    font-size: 16px;
  }
}
