/* ============================================================
   DIPLOMATIC COMMAND NETWORK — PASSWORD PAGE STYLES
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@300;400;500&display=swap');

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

body {
  font-family: 'Inter', sans-serif;
  background: #060a14;
  color: #eaedf5;
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── Canvas Globe ──────────────────────────────────── */
#globeCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ─── Scanlines ─────────────────────────────────────── */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.03) 3px,
    rgba(0,0,0,0.03) 4px
  );
}

/* ─── Grid Overlay ──────────────────────────────────── */
.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(201,168,76,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ─── Main Container ────────────────────────────────── */
.access-container {
  position: relative;
  z-index: 10;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 30px;
}

/* ─── Brand Header ──────────────────────────────────── */
.brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  animation: fadeDown 1s ease both;
}
.crest-emblem svg {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 0 20px rgba(201,168,76,0.4));
  animation: rotateSlow 30s linear infinite;
}
@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.brand-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.classification-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: #c9a84c;
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.25);
  padding: 4px 16px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.brand-name {
  font-family: 'Cinzel', serif;
  font-size: clamp(1rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #eaedf5;
  text-shadow: 0 0 40px rgba(201,168,76,0.2);
}
.sub-brand {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: rgba(201,168,76,0.7);
  text-transform: uppercase;
}

/* ─── Status Bar ────────────────────────────────────── */
.status-bar {
  display: flex;
  gap: 30px;
  align-items: center;
  animation: fadeDown 1.2s ease 0.2s both;
}
.status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: rgba(136,153,187,0.8);
  text-transform: uppercase;
}
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
}
.status-dot.active {
  background: #2ecc71;
  box-shadow: 0 0 8px #2ecc71;
}
.status-dot.pulse {
  background: #c9a84c;
  box-shadow: 0 0 8px #c9a84c;
  animation: pulseDot 1.5s ease-in-out infinite;
}
@keyframes pulseDot {
  0%,100% { opacity: 1; box-shadow: 0 0 8px #c9a84c; }
  50%      { opacity: 0.4; box-shadow: 0 0 3px #c9a84c; }
}

/* ─── Access Form Wrapper ───────────────────────────── */
.access-form-wrapper {
  width: 100%;
  max-width: 480px;
  transition: opacity 0.5s ease, transform 0.5s ease;
  animation: fadeUp 1s ease 0.4s both;
}

/* ─── Form Header ───────────────────────────────────── */
.form-header {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
}
.form-decoration {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.4));
}
.form-decoration.right {
  background: linear-gradient(90deg, rgba(201,168,76,0.4), transparent);
}
.form-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 20px;
  text-align: center;
}
.title-line {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  color: #c9a84c;
  text-transform: uppercase;
}
.title-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  color: rgba(136,153,187,0.6);
  text-transform: uppercase;
}

/* ─── Form Styles ───────────────────────────────────── */
#accessForm {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.input-group {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(13,22,40,0.85);
  border: 1px solid rgba(201,168,76,0.3);
  transition: all 0.3s ease;
}
.input-group:focus-within {
  border-color: rgba(201,168,76,0.7);
  box-shadow: 0 0 20px rgba(201,168,76,0.08), inset 0 0 20px rgba(201,168,76,0.03);
}
.input-prefix {
  padding: 0 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: rgba(201,168,76,0.6);
  flex-shrink: 0;
  border-right: 1px solid rgba(201,168,76,0.15);
}
.access-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 18px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  letter-spacing: 0.2em;
  color: #c9a84c;
  text-align: center;
}
.access-input::placeholder {
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  color: rgba(201,168,76,0.3);
  text-transform: uppercase;
}

/* ─── Access Button ─────────────────────────────────── */
.access-btn {
  width: 100%;
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.4);
  color: #c9a84c;
  padding: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.access-btn:hover {
  background: rgba(201,168,76,0.2);
  border-color: #c9a84c;
  box-shadow: 0 0 30px rgba(201,168,76,0.2);
  letter-spacing: 0.35em;
}
.btn-arrow {
  transition: transform 0.3s;
}
.access-btn:hover .btn-arrow { transform: translateX(6px); }

/* ─── Error Message ─────────────────────────────────── */
.error-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: #e74c3c;
  text-transform: uppercase;
  padding: 12px;
  border: 1px solid rgba(231,76,60,0.3);
  background: rgba(231,76,60,0.08);
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  pointer-events: none;
}
.error-message.visible {
  opacity: 1;
  transform: translateY(0);
}
.error-icon { font-size: 1rem; }

/* ─── Shake Animation ───────────────────────────────── */
@keyframes shake {
  0%,100% { transform: translateX(0); }
  10%,50%,90% { transform: translateX(-8px); }
  30%,70% { transform: translateX(8px); }
}
.shake { animation: shake 0.5s ease both; }

/* ─── Access Footer ─────────────────────────────────── */
.access-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.16em;
  color: rgba(77,97,122,0.7);
  text-transform: uppercase;
  animation: fadeUp 1s ease 0.6s both;
}
.separator { color: rgba(201,168,76,0.3); }

/* ─── Access Granted Overlay ────────────────────────── */
.access-granted-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #060a14;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.access-granted-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.granted-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.granted-icon {
  font-size: 3rem;
  color: #2ecc71;
  animation: pulseIn 0.5s ease;
}
.granted-text {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  color: #2ecc71;
  letter-spacing: 0.1em;
}
.granted-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  color: rgba(201,168,76,0.7);
  text-transform: uppercase;
}
.loading-bar {
  width: 300px;
  height: 2px;
  background: rgba(201,168,76,0.15);
  margin-top: 8px;
  overflow: hidden;
}
.loading-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #c9a84c, #2ecc71);
  transition: width 0.05s linear;
  box-shadow: 0 0 8px rgba(201,168,76,0.6);
}

/* ─── Entrance Animations ───────────────────────────── */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulseIn {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ─── Responsive ────────────────────────────────────── */
@media (max-width: 600px) {
  .access-container { padding: 20px; gap: 20px; }
  .status-bar { gap: 16px; flex-wrap: wrap; justify-content: center; }
  .brand-name { font-size: 1.1rem; }
  .access-footer { flex-direction: column; gap: 4px; text-align: center; }
}
