/* CORVONOVEL - Login Gateway Animated */

:root {
  --bg: #000000;
  --panel: rgba(10, 0, 4, 0.78);
  --pink: #f3e600;
  --cyan: #55ead4;
  --text: #f0f0f0;
  --muted: #1a0208;
  --dim: #880425;
  --error: #c5003c;
}

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

html,
body {
  min-height: 100%;
}

body {
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Courier New', 'Lucida Console', monospace;
  color: var(--text);
  background-color: var(--bg);
  background-image:
          radial-gradient(circle at 50% 50%, rgba(85, 234, 212, 0.16), transparent 24%),
          radial-gradient(circle at 18% 20%, rgba(243, 230, 0, 0.09), transparent 22%),
          linear-gradient(rgba(85, 234, 212, 0.055) 1px, transparent 1px),
          linear-gradient(90deg, rgba(85, 234, 212, 0.055) 1px, transparent 1px);
  background-size:
          100% 100%,
          100% 100%,
          42px 42px,
          42px 42px;
  animation: bg-move 14s ease-in-out infinite;
}

/* Visible moving scanlines */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
          repeating-linear-gradient(
                  to bottom,
                  rgba(85, 234, 212, 0.025) 0,
                  rgba(85, 234, 212, 0.025) 1px,
                  transparent 1px,
                  transparent 8px
          );
  opacity: 0.55;
  animation: scanlines-move 4.5s linear infinite;
}

/* Moving glowing orb */
body::after {
  content: '';
  position: fixed;
  z-index: 0;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(85, 234, 212, 0.16), transparent 60%);
  filter: blur(20px);
  opacity: 0.55;
  animation: orb-move 12s ease-in-out infinite;
}

.gate {
  position: relative;
  z-index: 2;
  width: min(420px, 88vw);
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  background: var(--panel);
  border: 1px solid rgba(85, 234, 212, 0.36);
  box-shadow:
          0 0 30px rgba(85, 234, 212, 0.24),
          inset 0 0 30px rgba(85, 234, 212, 0.055);
  overflow: hidden;
  animation:
          gate-enter 0.65s ease-out both,
          gate-breathe 6s ease-in-out infinite 0.65s;
}


/* Strong sweep over the panel */
/* Effetto onda più fluido e diffuso */
.gate::before {
  content: '';
  position: absolute;
  inset: -100%; /* Aumentato per una transizione più dolce */
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
          115deg,
          transparent 40%,
          rgba(85, 234, 212, 0.08) 48%,
          rgba(243, 230, 0, 0.06) 50%,
          rgba(85, 234, 212, 0.08) 52%,
          transparent 60%
  );
  filter: blur(15px); /* Aggiunto blur per ammorbidire la luce */
  animation: panel-sweep 10s ease-in-out infinite;
}

@keyframes panel-sweep {
  0% {
    transform: translateX(-50%) translateY(-50%) rotate(0deg);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateX(50%) translateY(50%) rotate(0deg);
    opacity: 0;
  }
}

/* Animated top signal */
.gate::after {
  content: '';
  position: absolute;
  top: 0;
  left: 1.5rem;
  right: 1.5rem;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(to right, transparent, var(--cyan), var(--pink), transparent);
  box-shadow: 0 0 16px rgba(85, 234, 212, 0.9);
  transform-origin: center;
  animation: signal-pulse 4s ease-in-out infinite;
}

.corner {
  position: absolute;
  z-index: 3;
  width: 24px;
  height: 24px;
}

.corner.tl {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--cyan);
  border-left: 2px solid var(--cyan);
  animation: corner-tl 5s ease-in-out infinite;
}

.corner.br {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid var(--cyan);
  border-bottom: 2px solid var(--cyan);
  animation: corner-br 5s ease-in-out infinite;
}

.header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.tag {
  color: var(--cyan);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  white-space: nowrap;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(85, 234, 212, 0.85);
  animation: tag-blink 4.5s steps(2, end) infinite;
}

.header-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--cyan), transparent);
  box-shadow: 0 0 12px rgba(85, 234, 212, 0.7);
  transform-origin: left;
  animation:
          line-enter 0.9s ease-out both,
          line-pulse 4s ease-in-out infinite 0.9s;
}

.title {
  font-size: clamp(1.4rem, 5.2vw, 2.1rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--pink);
  line-height: 1;
  text-align: center;
  text-shadow:
          0 0 12px rgba(243, 230, 0, 0.7),
          0 0 26px rgba(243, 230, 0, 0.22);
  animation: title-breathe 5.5s ease-in-out infinite;
}

.sep {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sep-line {
  flex: 1;
  height: 1px;
  background: var(--muted);
}

.sep-dot {
  color: var(--cyan);
  font-size: 0.7rem;
  text-shadow: 0 0 10px rgba(85, 234, 212, 0.9);
  animation: diamond-spin 7s linear infinite;
}

.field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field-label {
  font-size: 0.65rem;
  color: var(--dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.25s, text-shadow 0.25s;
}

.field:focus-within .field-label {
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(85, 234, 212, 0.55);
}

input[type="password"] {
  width: 100%;
  padding: 0.4rem 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  letter-spacing: 0.1em;
  caret-color: var(--pink);
}

input[type="password"]::placeholder {
  color: rgba(204, 64, 96, 0.75);
}

.field-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  overflow: hidden;
  background: var(--muted);
}

.field-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent, var(--pink), transparent);
  transform: translateX(-105%);
}

.field:focus-within .field-line {
  background: var(--pink);
  box-shadow: 0 0 10px var(--pink);
}

.field:focus-within .field-line::after {
  animation: input-scan 0.9s ease-in-out infinite;
}

.status {
  min-height: 1.2em;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
}

.status.denied {
  color: var(--error);
  text-shadow: 0 0 10px rgba(197, 0, 60, 0.7);
  animation: denied-shake 0.28s ease-in-out both;
}

.status.granted {
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(85, 234, 212, 0.8);
  animation: granted-pop 0.7s ease-out both;
}

.meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.6rem;
  color: var(--dim);
  letter-spacing: 0.1em;
}

.footnote {
  text-transform: uppercase;
  animation: footnote-pulse 3.5s ease-in-out infinite;
}

/* Animations */

@keyframes bg-move {
  0%, 100% {
    background-position:
            50% 50%,
            18% 20%,
            0 0,
            0 0;
  }

  50% {
    background-position:
            55% 54%,
            14% 24%,
            21px 21px,
            21px 21px;
  }
}

@keyframes scanlines-move {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(16px);
  }
}

@keyframes orb-move {
  0%, 100% {
    transform: translate(-24vw, -16vh) scale(0.95);
  }

  50% {
    transform: translate(18vw, 14vh) scale(1.05);
  }
}

@keyframes gate-enter {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes gate-breathe {
  0%, 100% {
    transform: translateY(0) scale(1);
    border-color: rgba(85, 234, 212, 0.36);
    box-shadow:
            0 0 24px rgba(85, 234, 212, 0.18),
            inset 0 0 26px rgba(85, 234, 212, 0.045);
  }

  50% {
    transform: translateY(-4px) scale(1.008);
    border-color: rgba(243, 230, 0, 0.25);
    box-shadow:
            0 0 34px rgba(85, 234, 212, 0.28),
            inset 0 0 30px rgba(243, 230, 0, 0.05);
  }
}

@keyframes panel-sweep {
  0%, 30% {
    transform: translateX(-85%);
    opacity: 0;
  }

  48% {
    opacity: 1;
  }

  72%, 100% {
    transform: translateX(85%);
    opacity: 0;
  }
}

@keyframes signal-pulse {
  0%, 100% {
    transform: scaleX(0.25);
    opacity: 0.35;
  }

  50% {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes corner-tl {
  0%, 100% {
    transform: translate(0, 0);
    box-shadow: -2px -2px 8px rgba(85, 234, 212, 0.28);
  }

  50% {
    transform: translate(-2px, -2px);
    box-shadow: -3px -3px 14px rgba(85, 234, 212, 0.58);
  }
}

@keyframes corner-br {
  0%, 100% {
    transform: translate(0, 0);
    box-shadow: 2px 2px 8px rgba(85, 234, 212, 0.28);
  }

  50% {
    transform: translate(2px, 2px);
    box-shadow: 3px 3px 14px rgba(85, 234, 212, 0.58);
  }
}

@keyframes tag-blink {
  0%, 100% {
    opacity: 1;
  }

  50% {
    opacity: 0.35;
  }
}

@keyframes line-enter {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

@keyframes line-pulse {
  0%, 100% {
    opacity: 0.45;
  }

  50% {
    opacity: 1;
  }
}

@keyframes title-breathe {
  0%, 100% {
    transform: translateX(0) scale(1);
    text-shadow:
            0 0 10px rgba(243, 230, 0, 0.55),
            0 0 22px rgba(243, 230, 0, 0.18);
  }

  50% {
    transform: translateX(1px) scale(1.008);
    text-shadow:
            0 0 16px rgba(243, 230, 0, 0.75),
            0 0 28px rgba(85, 234, 212, 0.18);
  }
}

@keyframes title-bar {
  0%, 100% {
    transform: scaleY(1);
    opacity: 0.75;
  }

  50% {
    transform: scaleY(0.58);
    opacity: 1;
  }
}

@keyframes diamond-spin {
  from {
    transform: rotate(0deg) scale(1);
  }

  50% {
    transform: rotate(180deg) scale(1.35);
  }

  to {
    transform: rotate(360deg) scale(1);
  }
}

@keyframes input-scan {
  from {
    transform: translateX(-105%);
  }

  to {
    transform: translateX(105%);
  }
}

@keyframes denied-shake {
  0%, 100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-6px);
  }

  40% {
    transform: translateX(6px);
  }

  60% {
    transform: translateX(-4px);
  }

  80% {
    transform: translateX(4px);
  }
}

@keyframes granted-pop {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes footnote-pulse {
  0%, 100% {
    opacity: 0.4;
  }

  50% {
    opacity: 1;
  }
}