/* Crew PIN gate overlay — deep-ocean styling to match the Lupo Di Mare brand.
   Self-contained (no external assets) so it renders identically on every page. */

#crew-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* Deep-ocean gradient + soft top glow */
  background:
    radial-gradient(120% 90% at 50% 0%, #15263f 0%, #0a1120 55%, #060a13 100%);
  transition: opacity 0.4s ease;
}

#crew-gate-overlay.crew-gate-fade {
  opacity: 0;
}

/* Faint horizon/wave band behind the card for depth (pure CSS, no asset). */
#crew-gate-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 40% at 50% 42%, rgba(79, 132, 255, 0.10) 0%, transparent 70%);
  pointer-events: none;
}

.crew-gate-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 2.75rem 2.5rem 2.5rem;
  width: min(380px, 92vw);
  background: rgba(18, 25, 38, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: crew-gate-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes crew-gate-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

/* Compass mark */
.crew-gate-mark {
  color: #5b8cff;
  margin-bottom: 0.35rem;
  filter: drop-shadow(0 2px 8px rgba(91, 140, 255, 0.45));
}
.crew-gate-mark svg { display: block; width: 44px; height: 44px; }

.crew-gate-logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #f1f5fb;
  line-height: 1.1;
  text-align: center;
}

.crew-gate-subtitle {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #9bb0cc;
  white-space: nowrap;
  margin-top: 0.45rem;
}

/* Hairline accent under the wordmark */
.crew-gate-rule {
  width: 40px;
  height: 2px;
  border-radius: 2px;
  margin: 0.9rem 0 1.1rem;
  background: linear-gradient(90deg, transparent, #5b8cff, transparent);
}

#crew-gate-input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(6, 10, 19, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  color: #f1f5fb;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.35em;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

#crew-gate-input:focus {
  border-color: #5b8cff;
  background: rgba(6, 10, 19, 0.85);
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.25);
}

#crew-gate-input::placeholder {
  color: #4a566b;
  font-weight: 500;
  letter-spacing: 0.12em;
}

#crew-gate-input.shake {
  animation: shake 0.45s ease;
  border-color: #f0616d;
}

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

.crew-gate-error {
  font-size: 0.78rem;
  color: #f0616d;
  min-height: 1.1em;
  margin-top: 0.7rem;
  opacity: 0;
  transition: opacity 0.2s;
}

#crew-gate-submit {
  width: 100%;
  margin-top: 0.9rem;
  padding: 0.8rem 1rem;
  background: linear-gradient(180deg, #4f7df3 0%, #3a63dd 100%);
  border: none;
  border-radius: 11px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  -webkit-appearance: none;
  box-shadow: 0 6px 18px rgba(58, 99, 221, 0.4);
  transition: transform 0.12s ease, box-shadow 0.15s, filter 0.15s;
}

#crew-gate-submit:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(58, 99, 221, 0.5);
}

#crew-gate-submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.45);
}

#crew-gate-submit:active {
  transform: translateY(0);
  filter: brightness(0.95);
  box-shadow: 0 4px 12px rgba(58, 99, 221, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .crew-gate-box { animation: none; }
  #crew-gate-input.shake { animation: none; }
}
