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

@font-face {
  font-family: "Inter";
  font-weight: 100 900;
  font-display: block;
  src: url("/fonts/Inter.woff2") format("woff2");
}

@font-face {
  font-family: "Array";
  font-display: block;
  src: url("/fonts/Array.woff2") format("woff2");
}

@font-face {
  font-family: "CommitMono";
  font-display: block;
  font-weight: 100;
  src: url("/fonts/CommitMono.woff2") format("woff2");
}

.loader-wrapper {
  position: fixed;
  width: 100%;
  height: 100%;
  background: black;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out;
}

.loader-wrapper.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loader {
  position: relative;
  width: 200px;
  height: 200px;
  perspective: 1000px;
  transform-style: preserve-3d;
}

.loader-circle {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 4px solid white;
  border-radius: 50%;
  animation: loader-spin 2s ease-out forwards;
}

.content {
  opacity: 0;
  transition: opacity 1s ease-out;
}

.content.visible {
  opacity: 1;
}

@keyframes loader-spin {
  0% {
    transform: rotateX(0deg) rotateY(0deg) scale(0.5);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: rotateX(360deg) rotateY(360deg) scale(1);
    opacity: 0;
  }
}

body,
html {
  background-color: #000000;
  color: white;
  scroll-behavior: smooth;
  font-family: "Inter";
  width: 100%;
  height: 100%;
}

body {
  overflow: hidden;
  height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

body main {
  display: flex;
  flex-direction: column;
  gap: 40px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

body main header {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

body main header h1 {
  font-family: "Array", sans-serif;
  font-size: 64px;
  line-height: 48px;
}

body main header p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 16px;
}

body main .flow {
  display: flex;
  flex-direction: column;
  width: 400px;
  user-select: none;
}

body main .flow .group {
  display: flex;
  gap: 10px;
}

body main .flow .group.full-width .lets-go {
  width: 100%;
}

body main .flow .group .lets-go {
  height: 40px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: black;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 8px;
}


body main .flow .group .lets-go svg {
  width: 16px;
}

body main .flow input {
  width: 100%;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  outline: none;
  color: white;
  caret-color: white;
  padding-inline: 14px;
  font-family: "Inter";
  font-size: 16px;
  transition: all 0.2s ease-in-out;
  opacity: 1;
  margin-top: 10px;
}

body main .flow input:focus {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
}

body main .flow input:first-child {
  margin-top: 0;
}

body main .flow input.hidden {
  height: 0;
  margin-top: 0;
  padding: 0;
  border-color: transparent;
  opacity: 0;
}

body main .flow .register-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: all 0.2s ease-in-out;
  margin-top: 10px;
}

body main .flow .register-form.visible {
  max-height: 200px;
  opacity: 1;
}

body main .logged-in {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body main .logged-in p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 16px;
}

body main .logged-in .account {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  height: 40px;
  user-select: none;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.1);
}

body main .logged-in .account:hover {
  transform: scale(1.02);
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
}

body main .logged-in .account .image-container {
  min-width: 38px;
  min-height: 38px;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
}

body main .logged-in .account .image-container::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

body main .logged-in .account .image-container .image {
  background-image: var(--image);
  width: 36px;
  height: 36px;
  margin: 1px;
  background-size: contain;
  opacity: 0;
  transform: scale(1.2);
  transition: all 0.3s ease-out;
  border-radius: 4px;
}

body main .logged-in .account .image-container .image.loaded {
  opacity: 1;
  transform: scale(1);
}

body main .logged-in .account .image-container.loaded::after {
  display: none;
}

@media (max-width: 768px) {
  body main .flow {
    width: 100%;
    max-width: 400px;
    padding: 0 20px;
  }

  body main header h1 {
    font-size: 48px;
    line-height: 36px;
  }

  body main {
    margin: 20px;
    padding: 30px;
  }
}

body main .flow input[type="date"] {
  width: 100%;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  outline: none;
  color: white;
  caret-color: white;
  padding-inline: 14px;
  font-family: "Inter";
  font-size: 16px;
  transition: all 0.2s ease-in-out;
  opacity: 1;
  margin-top: 10px;
}

.passkey-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.passkey-section .section-label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  margin-bottom: 10px;
  text-align: center;
}

.passkey-button {
  width: 100%;
  padding: 12px 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 500;
}

.passkey-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.passkey-button.primary {
  background: #2ea043;
  border-color: transparent;
}

.passkey-button.primary:hover {
  background: #3fb950;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.visible {
  display: flex;
}

.modal-content {
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: white;
}

.close-modal {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s ease;
}

.close-modal:hover {
  color: white;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-body .description {
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 12px;
}

.action-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  background: none;
  color: white;
}

.action-button.primary {
  background: #2ea043;
  border-color: transparent;
}

.action-button.primary:hover {
  background: #3fb950;
  transform: translateY(-1px);
}

.action-button.secondary {
  background: rgba(255, 255, 255, 0.1);
}

.action-button.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 12px 24px;
  border-radius: 4px;
  color: white;
  font-size: 14px;
  z-index: 1000;
  animation: slideIn 0.3s ease-out;
}

.toast.error {
  background-color: #dc3545;
}

.toast.success {
  background-color: #28a745;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
