/* ===== Password Gate Overlay ===== */
#gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  background-image:
    radial-gradient(900px 600px at 50% -10%, rgba(255, 140, 10, 0.10), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(63, 169, 245, 0.10), transparent 60%);
  font-family: "Poppins", system-ui, sans-serif;
  padding: 24px;
}

/* When unlocked, the gate is removed from the DOM entirely. */
html.gate-locked,
html.gate-locked body {
  overflow: hidden;
}

.gate-card {
  width: 100%;
  max-width: 420px;
  text-align: center;
  background: rgba(20, 20, 22, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 40px 34px 34px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}

.gate-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  display: block;
}

.gate-school {
  color: #cfd2d6;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 6px;
}

.gate-title {
  font-family: "Dancing Script", cursive;
  color: #ff8c0a;
  font-size: 2.1rem;
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 6px;
}

.gate-sub {
  color: #9aa0a6;
  font-size: 0.9rem;
  margin-bottom: 26px;
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gate-input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 10, 12, 0.85);
  color: #f3f4f5;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.gate-input::placeholder { color: #6b7077; }
.gate-input:focus {
  border-color: #3fa9f5;
  box-shadow: 0 0 0 3px rgba(63, 169, 245, 0.22);
}

.gate-btn {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 11px;
  background: #ff8c0a;
  color: #1a1205;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.18s ease;
}
.gate-btn:hover { background: #ffa033; }
.gate-btn:active { transform: scale(0.985); }

.gate-error {
  color: #ff6b6b;
  font-size: 0.86rem;
  min-height: 1.1em;
  margin-top: 2px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.gate-error.show { opacity: 1; }

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

.gate-foot {
  margin-top: 22px;
  color: #6b7077;
  font-size: 0.74rem;
}

@media (max-width: 480px) {
  .gate-card { padding: 32px 22px 26px; }
  .gate-title { font-size: 1.8rem; }
}
