/* From Uiverse.io by craig_8499 */
:root {
  --bg-1: #1a1f2f;
  --bg-2: #2e1537;
  --ink: #000;
  --surface: #fff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% 20%, #ff336633 0, transparent 32%),
    radial-gradient(circle at 80% 70%, #ff6b3533 0, transparent 30%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
  color: var(--surface);
}

.scene {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-container {
  position: relative;
  perspective: 1000px;
  width: min(320px, 92vw);
}

.login-card {
  position: relative;
  width: 100%;
  height: 80px;
  background: linear-gradient(135deg, #ff3366, #ff6b35);
  border: 4px solid #000;
  box-shadow:
    8px 8px 0 #000,
    16px 16px 0 rgba(255, 51, 102, 0.3);
  cursor: pointer;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-style: preserve-3d;
}

.login-card:hover,
.login-card:focus-within {
  height: 240px;
  transform: translateZ(20px) rotateX(5deg) rotateY(-5deg);
  box-shadow:
    12px 12px 0 #000,
    24px 24px 0 rgba(255, 51, 102, 0.4),
    0 0 50px rgba(255, 51, 102, 0.6);
}

.login-title {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: inherit;
  transition: all 0.4s ease;
}

.login-text {
  color: #000;
  font-weight: 800;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.4s ease;
}

.login-card:hover .login-text,
.login-card:focus-within .login-text {
  opacity: 0;
  transform: translateY(-30px) scale(0.8);
}

.login-form {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(30px) scale(0.8);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.login-card:hover .login-form,
.login-card:focus-within .login-form {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.input-group {
  position: relative;
  width: 100%;
  margin-bottom: 14px;
}

.login-input {
  width: 100%;
  padding: 12px 10px;
  background: rgba(255, 255, 255, 0.8);
  border: 3px solid #000;
  font-weight: 700;
  color: #000;
  box-shadow: 4px 4px 0 #000;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.login-input:focus {
  outline: none;
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #000;
}

.login-input::placeholder {
  color: #000;
  opacity: 0.6;
}

.login-btn {
  width: 100%;
  padding: 12px;
  background: #000;
  color: #fff;
  border: none;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 4px 4px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.login-btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 rgba(255, 255, 255, 0.3);
  background: #333;
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: left 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.login-card:hover::before,
.login-card:focus-within::before {
  left: 100%;
}

.login-card::after {
  content: "";
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  background: #000;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  transition: all 0.6s ease;
}

.login-card:hover::after,
.login-card:focus-within::after {
  transform: scale(1) rotate(0deg);
  background: rgb(246, 168, 116);
}

.login-container::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 51, 102, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.6s ease;
  z-index: -1;
}

.login-container:hover::before,
.login-container:focus-within::before {
  width: 400px;
  height: 400px;
}

.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(8, 10, 15, 0.72);
  backdrop-filter: blur(5px);
  z-index: 20;
  padding: 16px;
}

.loader-wrap {
  display: grid;
  place-items: center;
}

/* From Uiverse.io by andrew-manzyk */
.loader {
  --color-one: #ffbf48;
  --color-two: #be4a1d;
  --color-three: #ffbf4780;
  --color-four: #bf4a1d80;
  --color-five: #ffbf4740;
  --time-animation: 2s;
  --size: 1;
  position: relative;
  border-radius: 50%;
  transform: scale(var(--size));
  box-shadow:
    0 0 25px 0 var(--color-three),
    0 20px 50px 0 var(--color-four);
  animation: colorize calc(var(--time-animation) * 3) ease-in-out infinite;
}

.loader::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border-top: solid 1px var(--color-one);
  border-bottom: solid 1px var(--color-two);
  background: linear-gradient(180deg, var(--color-five), var(--color-four));
  box-shadow:
    inset 0 10px 10px 0 var(--color-three),
    inset 0 -10px 10px 0 var(--color-four);
}

.loader .box {
  width: 100px;
  height: 100px;
  background: linear-gradient(
    180deg,
    var(--color-one) 30%,
    var(--color-two) 70%
  );
  mask: url(#clipping);
  -webkit-mask: url(#clipping);
}

.loader svg {
  position: absolute;
}

.loader svg #clipping {
  filter: contrast(15);
  animation: roundness calc(var(--time-animation) / 2) linear infinite;
}

.loader svg #clipping polygon {
  filter: blur(7px);
}

.loader svg #clipping polygon:nth-child(1) {
  transform-origin: 75% 25%;
  transform: rotate(90deg);
}

.loader svg #clipping polygon:nth-child(2) {
  transform-origin: 50% 50%;
  animation: rotation var(--time-animation) linear infinite reverse;
}

.loader svg #clipping polygon:nth-child(3) {
  transform-origin: 50% 60%;
  animation: rotation var(--time-animation) linear infinite;
  animation-delay: calc(var(--time-animation) / -3);
}

.loader svg #clipping polygon:nth-child(4) {
  transform-origin: 40% 40%;
  animation: rotation var(--time-animation) linear infinite reverse;
}

.loader svg #clipping polygon:nth-child(5) {
  transform-origin: 40% 40%;
  animation: rotation var(--time-animation) linear infinite reverse;
  animation-delay: calc(var(--time-animation) / -2);
}

.loader svg #clipping polygon:nth-child(6) {
  transform-origin: 60% 40%;
  animation: rotation var(--time-animation) linear infinite;
}

.loader svg #clipping polygon:nth-child(7) {
  transform-origin: 60% 40%;
  animation: rotation var(--time-animation) linear infinite;
  animation-delay: calc(var(--time-animation) / -1.5);
}

.modal {
  width: min(360px, 92vw);
}

.modal-card {
  width: 100%;
  background: linear-gradient(135deg, #ff3366, #ff6b35);
  border: 4px solid #000;
  box-shadow:
    8px 8px 0 #000,
    16px 16px 0 rgba(255, 51, 102, 0.3);
  padding: 22px;
}

.modal-title {
  margin: 0 0 14px;
  color: #000;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.3);
}

.modal-btn {
  margin-top: 8px;
}

[hidden] {
  display: none !important;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes roundness {
  0% {
    filter: contrast(15);
  }
  20% {
    filter: contrast(3);
  }
  40% {
    filter: contrast(3);
  }
  60% {
    filter: contrast(15);
  }
  100% {
    filter: contrast(15);
  }
}

@keyframes colorize {
  0% {
    filter: hue-rotate(0deg);
  }
  20% {
    filter: hue-rotate(-30deg);
  }
  40% {
    filter: hue-rotate(-60deg);
  }
  60% {
    filter: hue-rotate(-90deg);
  }
  80% {
    filter: hue-rotate(-45deg);
  }
  100% {
    filter: hue-rotate(0deg);
  }
}

@media (max-width: 480px) {
  .login-card:hover,
  .login-card:focus-within {
    transform: translateZ(8px) rotateX(2deg) rotateY(-2deg);
  }
}
