/* 口令入口页：梦幻、朦胧、柔和 */
html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: linear-gradient(160deg, var(--gate-bg-1), var(--gate-bg-2) 55%, var(--gate-bg-3));
  background-attachment: fixed;
  color: var(--gate-text);
  overflow: hidden;
}

#particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.85;
}

/* 朦胧光斑 */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  background:
    radial-gradient(circle at 22% 28%, rgba(243, 198, 216, 0.28), transparent 42%),
    radial-gradient(circle at 78% 66%, rgba(201, 111, 143, 0.24), transparent 46%),
    radial-gradient(circle at 64% 18%, rgba(255, 255, 255, 0.1), transparent 36%);
  filter: blur(38px);
  animation: gate-breathe 9s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes gate-breathe {
  from {
    transform: scale(1);
    opacity: 0.85;
  }
  to {
    transform: scale(1.06);
    opacity: 1;
  }
}

.gate {
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: var(--space-md);
}

.gate-card {
  width: min(420px, 92vw);
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
  text-align: center;
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 24px 60px rgba(16, 8, 30, 0.35);
  backdrop-filter: blur(20px) saturate(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
  animation: gate-enter 1s cubic-bezier(0.22, 0.9, 0.32, 1) both;
}

@keyframes gate-enter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.gate-heart {
  font-size: 34px;
  line-height: 1;
  color: var(--gate-accent);
  animation: heart-float 3.2s ease-in-out infinite;
}

@keyframes heart-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.gate-title {
  margin: var(--space-sm) 0 var(--space-xs);
  font-size: clamp(26px, 7vw, 34px);
  font-weight: 600;
  letter-spacing: 0.14em;
}

.gate-subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--gate-text-soft);
  letter-spacing: 0.08em;
}

.gate-form {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.gate-input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  font: inherit;
  color: var(--gate-text);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(8px);
}

.gate-input::placeholder {
  color: var(--gate-text-soft);
}

.gate-button {
  padding: 12px 22px;
  font-weight: 600;
  color: #40273a;
  background: linear-gradient(135deg, var(--gate-accent), var(--gate-accent-2));
  border: none;
  border-radius: var(--radius-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.gate-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(232, 168, 196, 0.35);
}

.gate-button:active {
  transform: scale(0.98);
}

.gate-error {
  min-height: 20px;
  margin: var(--space-sm) 0 0;
  font-size: 13px;
  color: #ffd7e4;
}

.gate-card.shake {
  animation: gate-shake 0.4s ease;
}

@keyframes gate-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-8px);
  }
  75% {
    transform: translateX(8px);
  }
}

@media (max-width: 480px) {
  .gate-card {
    padding: var(--space-lg) var(--space-md) var(--space-md);
  }
}
