/* From Uiverse.io by jeremyssocial */ 
@import "https://unpkg.com/open-props/easings.min.css";
@keyframes blinkCursor {
    50% {
      border-right-color: transparent;
    }
  }
  
  @keyframes typeAndDelete {
    0%,
    10% {
      width: 0;
    }
    45%,
    55% {
      width: 6.2em;
    } /* adjust width based on content */
    90%,
    100% {
      width: 0;
    }
  }
  
  .terminal-loader {
    border: 0.1em solid #333;
    background-color: #1a1a1a;
    color: #0f0;
    font-family: "Courier New", Courier, monospace;
    font-size: 1em;
    padding: 1.5em 1em;
    width: 12em;
    margin: 100px auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
  }
  
  .terminal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1.5em;
    background-color: #333;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    padding: 0 0.4em;
    box-sizing: border-box;
  }
  
  .terminal-controls {
    float: right;
  }
  
  .control {
    display: inline-block;
    width: 0.6em;
    height: 0.6em;
    margin-left: 0.4em;
    border-radius: 50%;
    background-color: #777;
  }
  
  .control.close {
    background-color: #e33;
  }
  
  .control.minimize {
    background-color: #ee0;
  }
  
  .control.maximize {
    background-color: #0b0;
  }
  
  .terminal-title {
    float: left;
    line-height: 1.5em;
    color: #eee;
  }
  
  .text {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    border-right: 0.2em solid green; /* Cursor */
    animation: typeAndDelete 4s steps(11) infinite,
      blinkCursor 0.5s step-end infinite alternate;
    margin-top: 1.5em;
  }
  .loader{
    display: none;
    position: fixed; /* Ensure the div is relative to the viewport */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  .terminal-loader{
     /* Offset the div to center */
    display: flex;
    justify-content: center;
    align-items: center;
    /* Additional styles */
    width: 300px; /* Adjust width as needed */
    height: 200px; /* Adjust height as needed */
  }
  @keyframes bounceOut {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    20% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(0.9);
        opacity: 0.8;
    }
    80% {
        transform: scale(1.05);
        opacity: 0.4;
    }
    100% {
        transform: scale(0.3);
        opacity: 0;
    }
}

.l-off {
    animation: bounceOut 0.6s ease forwards;
}

@keyframes bounceIn {
  0% {
      transform: scale(0.3);
      opacity: 0;
  }
  20% {
      transform: scale(1.05);
      opacity: 0.4;
  }
  50% {
      transform: scale(0.9);
      opacity: 0.8;
  }
  80% {
      transform: scale(1.1);
  }
  100% {
      transform: scale(1);
      opacity: 1;
  }
}

.l-on {
  animation: bounceIn 0.6s ease forwards;
  display: block; /* Ensure the div is visible during the animation */
}
/*------------------------------------------------*/
.container {
  width: 46px;
  height: 46px;
  box-sizing: border-box;
  padding: 12px;
  background: none;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.sun {
  width: 50%;
  height: 50%;
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.6) rotate(0deg);
  transition: transform 0.3s ease-in, opacity 0.2s ease-in 0.1s;

  /*  white transparent for Safari  */
  background: radial-gradient(
    circle,
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 0) 50%,
    #f0f0f0 50%
  );
}

.sun:before {
  content: "";
  position: absolute;
  display: block;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    #f0f0f0 30%,
    rgba(0, 0, 0, 0) 31%,
    rgba(0, 0, 0, 0) 50%,
    #f0f0f0 50%
  );
  transform: rotate(45deg);
}

.sun.visible {
  pointer-events: auto;
  opacity: 1;
  transform: scale(1) rotate(180deg);
  transition: transform 0.3s ease-in, opacity 0.2s ease-in 0.1s;
}

.moon {
  width: 50%;
  height: 50%;
  pointer-events: none;
  position: absolute;
  left: 12.5%;
  top: 18.75%;
  background-color: rgba(0, 0, 0, 0);
  border-radius: 50%;
  box-shadow: 9px 3px 0px 0px #f0f0f0;
  opacity: 0;
  transform: scale(0.3) rotate(65deg);
  transition: transform 0.3s ease-in, opacity 0.2s ease-in 0.1s;
}

.moon.visible {
  pointer-events: auto;
  opacity: 1;
  transform: scale(1) rotate(0deg);
  transition: transform 0.3s ease-in, opacity 0.2s ease-in 0.1s;
}

.star {
  position: absolute;
  top: 25%;
  left: 5%;
  display: block;
  width: 0px;
  height: 0px;
  border-right: 7px solid rgba(0, 0, 0, 0);
  border-bottom: 5px solid #f0f0f0;
  border-left: 7px solid rgba(0, 0, 0, 0);
  transform: scale(0.55) rotate(35deg);
  opacity: 0;
  transition: all 0.2s ease-in 0.4s;
}

.star:before {
  border-bottom: 5px solid #f0f0f0;
  border-left: 3px solid rgba(0, 0, 0, 0);
  border-right: 3px solid rgba(0, 0, 0, 0);
  position: absolute;
  height: 0;
  width: 0;
  top: -3px;
  left: -5px;
  display: block;
  content: "";
  transform: rotate(-35deg);
}

.star:after {
  position: absolute;
  display: block;
  color: red;
  top: 0px;
  left: -7px;
  width: 0px;
  height: 0px;
  border-right: 7px solid rgba(0, 0, 0, 0);
  border-bottom: 5px solid #f0f0f0;
  border-left: 7px solid rgba(0, 0, 0, 0);
  transform: rotate(-70deg);
  content: "";
}

.moon.visible .star {
  opacity: 0.8;
}

.star.small {
  transform: scale(0.35) rotate(35deg);
  position: relative;
  top: 50%;
  left: 37.5%;
  opacity: 0;
  transition: all 0.2s ease-in 0.45s;
}

.moon.visible .star.small {
  opacity: 0.7;
  transform: scale(0.45) rotate(35deg);
}

