:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  overflow: hidden;
}

body {
  background-color: #05040b;
  background-image: url("./date-background.png");
  background-size: cover;
  background-position: center;
  font-family: Arial, sans-serif;
}

.scene {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(24px, env(safe-area-inset-top))
    max(24px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left));
}

.field-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(88vw, 340px);
}

.field-label {
  margin-bottom: 12px;
  color: rgba(223, 232, 248, 0.76);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 0 16px rgba(201, 220, 255, 0.22);
}

.input-container {
  position: relative;
  width: 260px;
  max-width: 100%;
}

.field-label,
.input-container {
  opacity: 0;
  transform: translateY(10px) scale(0.985);
  transition:
    opacity 520ms ease,
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.field-wrapper.is-revealed .field-label,
.field-wrapper.is-revealed .input-container {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.date-input {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 14px 20px;
  border: 1px solid rgba(231, 239, 255, 0.22);
  border-radius: 16px;
  background: rgba(234, 242, 255, 0.075);
  color: #eef5ff;
  font-family: "Courier New", monospace;
  font-size: 28px;
  letter-spacing: 4px;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  outline: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 12px 32px rgba(11, 18, 34, 0.42);
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.date-input::placeholder {
  color: rgba(223, 232, 246, 0.42);
}

.date-input:focus {
  border-color: rgba(214, 230, 255, 0.8);
  box-shadow:
    inset 0 0 0 1px rgba(242, 247, 255, 0.16),
    0 0 0 4px rgba(201, 219, 255, 0.14),
    0 18px 42px rgba(78, 106, 160, 0.22);
}

.date-input.is-complete {
  border-color: rgba(222, 236, 255, 0.9);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 0 0 4px rgba(213, 230, 255, 0.14),
    0 18px 38px rgba(85, 120, 173, 0.24);
}

.input-glow {
  position: absolute;
  inset: 8px 16px -2px 16px;
  z-index: 1;
  border-radius: 18px;
  background:
    radial-gradient(circle, rgba(232, 241, 255, 0.52) 0%, rgba(204, 223, 255, 0.24) 45%, rgba(140, 170, 218, 0.08) 100%);
  filter: blur(22px);
  opacity: 0.5;
  animation: glowPulse 3s infinite;
  pointer-events: none;
}

.particles-canvas {
  position: absolute;
  inset: -180px;
  overflow: visible;
  pointer-events: none;
}

.magic-particle {
  will-change: left, top, opacity;
}

@keyframes glowPulse {
  0% {
    opacity: 0.28;
  }
  50% {
    opacity: 0.72;
  }
  100% {
    opacity: 0.28;
  }
}

@media (max-width: 420px) {
  .date-input {
    font-size: 24px;
    letter-spacing: 3px;
  }

  .input-container {
    width: min(260px, 78vw);
  }
}
