/* =====================================================
   QUANTUM ACCESS GATE — PASSWORD ENTRY SCREEN
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500&family=Inter:wght@300;400;500&display=swap');

:root {
  --deep-space: #05070D;
  --cosmic-purple: #6A0DAD;
  --neon-blue: #00E5FF;
  --soft-white: #F5F7FA;
}

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

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
  background: var(--deep-space);
  color: var(--soft-white);
}

/* ── Gate Canvas ── */
#gate-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* ── Gate Container ── */
.gate-container {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  padding: 2rem;
  text-align: center;
}

/* ── Orb Background Effect ── */
.gate-orb {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  opacity: 0.3;
  animation: orb-breathe 8s ease-in-out infinite;
}

.gate-orb-1 {
  background: radial-gradient(circle, rgba(106, 13, 173, 0.6) 0%, transparent 70%);
  top: 20%;
  left: 30%;
}

.gate-orb-2 {
  background: radial-gradient(circle, rgba(0, 229, 255, 0.4) 0%, transparent 70%);
  bottom: 20%;
  right: 25%;
  animation-delay: -4s;
}

@keyframes orb-breathe {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.15); opacity: 0.5; }
}

/* ── Symbol ── */
.gate-symbol {
  width: 80px;
  height: 80px;
  margin-bottom: 2rem;
  position: relative;
}

.gate-symbol svg {
  width: 100%;
  height: 100%;
}

.gate-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: 50%;
  animation: ring-pulse 3s ease-out infinite;
}

.gate-ring:nth-child(2) {
  animation-delay: 1s;
}

.gate-ring:nth-child(3) {
  animation-delay: 2s;
}

@keyframes ring-pulse {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

/* ── Title ── */
.gate-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1rem, 2.5vw, 1.6rem);
  font-weight: 300;
  color: rgba(245, 247, 250, 0.7);
  letter-spacing: 0.15em;
  margin-bottom: 3rem;
  max-width: 500px;
  line-height: 1.6;
}

/* ── Input Group ── */
.gate-input-group {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin-bottom: 1rem;
}

.gate-input {
  width: 100%;
  padding: 1.1rem 1.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 60px;
  color: var(--soft-white);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.3em;
  text-align: center;
  outline: none;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gate-input::placeholder {
  color: rgba(245, 247, 250, 0.25);
  letter-spacing: 0.2em;
}

.gate-input:focus {
  border-color: var(--cosmic-purple);
  box-shadow: 0 0 30px rgba(106, 13, 173, 0.3), 0 0 60px rgba(106, 13, 173, 0.1);
  background: rgba(255, 255, 255, 0.06);
}

/* ── Enter Button ── */
.gate-enter {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0.9rem 2.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--soft-white);
  background: linear-gradient(135deg, var(--cosmic-purple), var(--neon-blue));
  border: none;
  border-radius: 60px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 4px 25px rgba(106, 13, 173, 0.4);
}

.gate-enter:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 40px rgba(106, 13, 173, 0.6);
}

/* ── Status Message ── */
.gate-status {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  height: 1.5rem;
  transition: all 0.3s ease;
}

.gate-status.denied {
  color: #ff4444;
  animation: shake 0.5s ease;
}

.gate-status.granted {
  color: var(--neon-blue);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%  { transform: translateX(-10px); }
  40%  { transform: translateX(10px); }
  60%  { transform: translateX(-6px); }
  80%  { transform: translateX(6px); }
}

/* ── Morph / Success Overlay ── */
.gate-morph-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.gate-morph-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.gate-morph-circle {
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, var(--cosmic-purple), var(--deep-space));
  transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.gate-morph-circle.expand {
  width: 300vmax;
  height: 300vmax;
}

/* ── Bottom HInt ── */
.gate-hint {
  position: absolute;
  bottom: 2rem;
  font-size: 0.7rem;
  color: rgba(245, 247, 250, 0.15);
  letter-spacing: 0.2em;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .gate-title {
    font-size: 1rem;
    padding: 0 1rem;
  }
  .gate-input {
    padding: 0.9rem 1.2rem;
    font-size: 0.9rem;
  }
  .gate-orb {
    width: 300px;
    height: 300px;
  }
}
