/* ================= Password Gate ================= */

/* Blur + freeze the real site while locked */
body.gate-locked #app {
  filter: blur(18px) brightness(0.6);
  pointer-events: none;
  user-select: none;
  height: 100vh;
  overflow: hidden;
}

body.gate-unlocked #app {
  filter: none;
  pointer-events: auto;
  user-select: auto;
  height: auto;
  overflow: visible;
}

.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(5,5,11,0.55);
}

body.gate-unlocked .gate-overlay {
  display: none;
}

.gate-box {
  width: 100%;
  max-width: 380px;
  border-radius: 1.25rem;
  padding: 2.25rem 1.75rem 1.75rem;
  text-align: center;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
  animation: fadeUp .5s cubic-bezier(.21,.6,.35,1);
}

.gate-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(139,92,246,0.5));
}

.gate-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: .35rem;
  background: linear-gradient(100deg,#c4b5fd 0%,#a78bfa 35%,#60a5fa 75%,#38bdf8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.gate-sub {
  font-size: .82rem;
  color: rgba(226,232,240,0.6);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

#gate-form {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.gate-input {
  width: 100%;
  padding: .75rem 1rem;
  border-radius: .75rem;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  color: #e2e8f0;
  font-size: .9rem;
  text-align: center;
  outline: none;
  transition: border-color .2s, background .2s;
}
.gate-input:focus {
  border-color: rgba(167,139,250,0.6);
  background: rgba(139,92,246,0.08);
}

.gate-btn {
  width: 100%;
  padding: .75rem 1rem;
  border-radius: .75rem;
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  border: none;
}

.gate-error {
  display: none;
  color: #f87171;
  font-size: .78rem;
  margin-top: .9rem;
}
.gate-box.shake .gate-error { display: block; }

@keyframes gateShake {
  10%,90% { transform: translateX(-1px); }
  20%,80% { transform: translateX(2px); }
  30%,50%,70% { transform: translateX(-4px); }
  40%,60% { transform: translateX(4px); }
}
.gate-box.shake { animation: gateShake .5s; }
