*,
*::after,
*::before {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

:root {
  --dark-color: #000;
}

.night {
  position: fixed;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
  filter: blur(0.1vmin);
  background-image: radial-gradient(ellipse at top, transparent 0%, var(--dark-color)), radial-gradient(ellipse at bottom, var(--dark-color), rgba(145, 233, 255, 0.2)), repeating-linear-gradient(220deg, rgb(0, 0, 0) 0px, rgb(0, 0, 0) 19px, transparent 19px, transparent 22px), repeating-linear-gradient(189deg, rgb(0, 0, 0) 0px, rgb(0, 0, 0) 19px, transparent 19px, transparent 22px), repeating-linear-gradient(148deg, rgb(0, 0, 0) 0px, rgb(0, 0, 0) 19px, transparent 19px, transparent 22px), linear-gradient(90deg, rgb(255, 255, 250), rgb(240, 240, 240));
}

.title {
  position: absolute;
  top: -20vh;
  left: 1%;
  color: white;
  font-family: 'Courier New', Courier, monospace;

  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  align-items: center;

  width: 100%;
  height: 100vh;
  text-shadow: 0 0 20px white;
  letter-spacing: 0px;
}

@media (min-width: 500px) {
  .title {
    letter-spacing: 20px;
  }
}

@keyframes typing {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Terapkan animasi dengan delay */
.title span {
  opacity: 0;
  animation: typing 1s ease forwards;
  animation-delay: var(--delay);
}

a {
  text-decoration: none;
}

.btn {
  border: none;
  width: 15em;
  height: 5em;
  border-radius: 3em;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  background: #1C1A1C;
  cursor: pointer;
  transition: all 450ms ease-in-out;
}

.sparkle {
  fill: #AAAAAA;
  transition: all 800ms ease;
}

.text {
  font-weight: 600;
  color: #AAAAAA;
  font-size: medium;
}

.btn:hover {
  background: linear-gradient(0deg, #A47CF3, #683FEA);
  box-shadow: inset 0px 1px 0px 0px rgba(255, 255, 255, 0.4),
    inset 0px -4px 0px 0px rgba(0, 0, 0, 0.2),
    0px 0px 0px 4px rgba(255, 255, 255, 0.2),
    0px 0px 180px 0px #9917FF;
  transform: translateY(-2px);
}

.btn:hover .text {
  color: white;
}

.btn:hover .sparkle {
  fill: white;
  transform: scale(1.2);
}


.password-panel {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.6);
  padding: 30px;
  border-radius: 20px;
  border: 2px solid white;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  animation: fadeIn 0.8s ease forwards;
  z-index: 10;
}

.password-panel p {
  font-size: 18px;
  color: white;
  margin-bottom: 15px;
  font-family: 'Courier New', Courier, monospace;
  text-shadow: 0 0 10px white;
}

.password-panel input {
  padding: 10px;
  font-size: 16px;
  border-radius: 10px;
  border: 1px solid #aaa;
  margin-bottom: 10px;
  background-color: transparent;
  color: white;
  text-align: center;
  font-family: 'Courier New', Courier, monospace;
}

.password-panel input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.password-panel button {
  padding: 8px 20px;
  font-size: 16px;
  border: 1px solid white;
  border-radius: 10px;
  background-color: transparent;
  color: white;
  cursor: pointer;
  font-family: 'Courier New', Courier, monospace;
  transition: background 0.3s, color 0.3s;
}

.password-panel button:hover {
  background-color: white;
  color: black;
}

.error-msg {
  color: #ff6b6b;
  margin-top: 10px;
  font-weight: bold;
  font-family: 'Courier New', Courier, monospace;
  animation: shake 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}
