/* =============================================
   PASSWORD GATE — Styling
   ============================================= */

#password-gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 11, 10, 0.92);
  backdrop-filter: blur(40px) saturate(120%);
  -webkit-backdrop-filter: blur(40px) saturate(120%);
  transition: opacity 0.5s ease, backdrop-filter 0.5s ease;
}

#password-gate.pw-gate-fade-out {
  opacity: 0;
  pointer-events: none;
}

.pw-gate-card {
  width: 100%;
  max-width: 400px;
  padding: 48px 40px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: center;
  transform: scale(1);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.4s ease;
}

.pw-gate-card.pw-gate-success {
  transform: scale(0.95);
  opacity: 0;
}

/* Lock icon */
.pw-gate-lock {
  margin: 0 auto 24px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
}

.pw-gate-title {
  font-family: var(--font-heading, 'Inter', sans-serif);
  font-size: 24px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.94);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.pw-gate-subtitle {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 15px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 32px;
  line-height: 1.5;
}

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

.pw-gate-input-wrapper {
  position: relative;
}

.pw-gate-input {
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.94);
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

.pw-gate-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.pw-gate-input:focus {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.pw-gate-btn {
  padding: 14px 24px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.94);
  font-family: var(--font-heading, 'Inter', sans-serif);
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.pw-gate-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.pw-gate-btn:active {
  transform: scale(0.97);
}

.pw-gate-error {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 13px;
  color: #ff6b6b;
  min-height: 20px;
  margin: 0;
  transition: opacity 0.3s ease;
}

/* Shake animation for wrong password */
@keyframes pw-gate-shake {
  0%, 100% { transform: translateX(0); }
  10%, 50%, 90% { transform: translateX(-6px); }
  30%, 70% { transform: translateX(6px); }
}

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

/* Accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {
  #password-gate,
  .pw-gate-card,
  .pw-gate-input,
  .pw-gate-btn {
    transition: none;
  }

  .pw-gate-card.pw-gate-shake {
    animation: none;
  }
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .pw-gate-card {
    margin: 0 24px;
    padding: 40px 24px;
  }
}
