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

body, html {
  height: 100%;
  font-family: var(--font);
  background: #080808;
  color: #f5f5f5;
}

.highlight {
  color: #8b60cf;
}

.shadow-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.svg-filter {
  position: absolute;
  width: 0;
  height: 0;
}

.shadow-layer {
  position: absolute;
  inset: -80px;

  background: #8000ff30;

  filter: url(#etherealFilter) blur(6px);

  mask-image:
    radial-gradient(circle at 10% 20%, white 12%, transparent 30%),
    radial-gradient(circle at 85% 75%, white 10%, transparent 28%);

  -webkit-mask-image:
    radial-gradient(circle at 10% 20%, white 12%, transparent 30%),
    radial-gradient(circle at 85% 75%, white 10%, transparent 28%);
}

.noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  background-size: 300px;
  opacity: 0.3;
  pointer-events: none;
}

.container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.container .logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  cursor: pointer;
  transition: 0.2s ease-in-out;
  color: inherit;
  text-decoration: none;
}

.container .logo:hover {
  opacity: 0.8;
}

.container .logo img {
  height: 4rem;
  width: 4rem;
}

.container .logo b {
  font-size: 2rem;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 1em;
  width: 25rem;
  padding: 1.5rem 3rem;
  border: 2px solid #34303d50;
  border-radius: 1rem;
  backdrop-filter: blur(1rem);
}

.content b {
  width: 100%;
  font-size: 1.3rem;
  font-weight: 400;
  text-align: center;
}

.content .discord {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 0;
  border-radius: 0.75rem;
  color: #f5f5f5;
  background: #5865F2;
  font-size: 1.1rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease-in-out, transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.content .discord:hover {
  background: #6a75f4;
  transform: translateY(-1px);
  box-shadow: 0 0.5rem 1.25rem #5865f240;
}

.content .discord:active {
  transform: translateY(0);
  background: #4a56d8;
}

.content .discord:focus-visible {
  outline: 2px solid #f5f5f5;
  outline-offset: 2px;
}

.icon-discord {
  display: inline-block;
  height: 1.5rem;
  width: 1.5rem;
  background-color: #f5f5f5;
  -webkit-mask: url('/static/icon/discord.svg') no-repeat center;
  mask: url('/static/icon/discord.svg') no-repeat center;
  mask-size: contain;
  transition: 0.2s ease-in-out;
  animation: 1s ease-in-out 0s infinite alternate bounce;
}

.content .divider {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center ;
  width: 100%;
}

.content .divider hr {
  width: calc(100% - 13rem);
  border: none;
  border-top: 1px solid #34303d;
}

.content .divider p {
  font-size: 0.9rem;
  opacity: 0.6;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
}

form div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

form strong {
  font-weight: 400;
}

form input {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.75rem;
  outline: 1px solid #24202d;
  background: #24202d;
  color: #f5f5f5;
  font-size: 1rem;
  font-family: var(--font);
  transition: outline-color 0.2s ease-in-out, background 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

form input::placeholder {
  color: #f5f5f5;
  opacity: 0.35;
  transition: opacity 0.2s ease-in-out;
}

form input:hover {
  outline-color: #453d57;
  background: #292534;
}

form input:focus {
  outline-color: #8b60cf;
  background: #292534;
  box-shadow: 0 0 0 0.25rem #8b60cf26;
}

form input:focus::placeholder {
  opacity: 0.5;
}

form input:user-invalid {
  outline-color: #ff6b6b;
}

form input:user-invalid:focus {
  box-shadow: 0 0 0 0.25rem #ff6b6b26;
}

form div a {
  color: #f5f5f5;
  text-align: end;
  font-size: 0.85rem;
  font-weight: 300;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s ease-in-out, color 0.2s ease-in-out;
  width: fit-content;
  align-self: flex-end;
}

form div a:hover,
form div a:focus-visible {
  color: #bf98ff;
  opacity: 1;
}

.username {
  position: relative;
}

.username p {
  position: absolute;
  top: 0;
  left: 1rem;
  bottom: 0;
  display: flex;
  align-items: center;
  opacity: 0.5;
}

.username input {
  padding-left: 5rem;
}

form button {
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.75rem;
  outline: 2px solid #34303d;
  background: #24202d;
  color: #f5f5f5;
  font-size: 1rem;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.2s ease-in-out, outline-color 0.2s ease-in-out,
              transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, opacity 0.2s ease-in-out;
}

form button:hover:not(:disabled) {
  background: #322c40;
  outline-color: #8b60cf;
  transform: translateY(-1px);
  box-shadow: 0 0.5rem 1.25rem #8b60cf2e;
}

form button:active:not(:disabled) {
  transform: translateY(0);
  background: #201c28;
  box-shadow: none;
}

form button:focus-visible {
  outline-color: #8b60cf;
  box-shadow: 0 0 0 0.25rem #8b60cf26;
}

form button:disabled {
  opacity: 0.55;
  cursor: progress;
}

.checkbox {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
}

.checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.1rem;
  height: 1.1rem;
  padding: 0;
  border-radius: 0.35rem;
  background: #24202d;
  outline: 2px solid #34303d;
  cursor: pointer;
  position: relative;
  transition: 0.2s ease-in-out;
}

.checkbox input[type="checkbox"]:hover {
  outline-color: #8b60cf;
}

.checkbox input[type="checkbox"]:focus-visible {
  outline-color: #8b60cf;
  box-shadow: 0 0 0 0.25rem #8b60cf26;
}

.checkbox input[type="checkbox"]:checked {
  background: #8b60cf;
  outline-color: #8b60cf;
}

.checkbox input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: 45%;
  left: 50%;
  width: 0.3rem;
  height: 0.6rem;
  border: solid #f5f5f5;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -50%) rotate(45deg);
}

.checkbox span {
  font-size: 0.9rem;
  opacity: 0.85;
}

.checkbox a {
  color: #8b60cf;
  text-align: start;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  opacity: 1;
}

.checkbox a:hover,
.checkbox a:focus-visible {
  color: #bf98ff;
  text-decoration: underline;
}

.cf-turnstile {
  min-height: 65px;
}

.switch {
  font-size: 0.9rem;
  opacity: 0.9;
}

.switch a {
  color: #bf98ff;
  text-decoration: none;
}

.switch a.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.subtitle {
  font-size: 0.9rem;
  text-align: center;
  opacity: 0.7;
  margin-top: -0.5rem;
}

.subtitle strong {
  font-weight: 500;
  opacity: 1;
}

#message {
  font-size: 0.85rem;
  color: #ff6b6b;
  min-height: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  .content .discord,
  form input,
  form input::placeholder,
  form div a,
  form button,
  .checkbox input[type="checkbox"] {
    transition: none;
  }

  .content .discord:hover,
  .content .discord:active,
  form button:hover:not(:disabled),
  form button:active:not(:disabled) {
    transform: none;
  }
}
