:root {
  --gold-gradient: linear-gradient(180deg, #D4AF37 0%, #F9E498 50%, #B8860B 100%);
  --terminal-cyan: #00f5ff;
  --mi6-black: #0a0a0a;
}

body {
  background-color: #000;
  color: var(--terminal-cyan);
  font-family: 'JetBrains Mono', monospace;
  height: 100vh;
  margin: 0;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* --- THEMES & UTILS --- */
.gold-text {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
  font-family: 'Stardos Stencil', cursive;
}

.mission-stencil {
  font-family: 'Stardos Stencil', cursive;
  letter-spacing: 0.1em;
}

/* --- CINEMATIC INTRO --- */
.gun-barrel-overlay {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: iris-out 1.5s cubic-bezier(0.8, 0, 0.2, 1) forwards;
  animation-delay: 0.6s;
  pointer-events: none;
}

@keyframes iris-out {
  0% { transform: scale(1); opacity: 1; }
  85% { opacity: 1; }
  100% { transform: scale(30); opacity: 0; visibility: hidden; }
}

/* --- CRT EFFECTS --- */
.crt-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), 
              linear-gradient(90deg, rgba(255, 0, 0, 0.02), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.02));
  background-size: 100% 2px, 2px 100%;
  z-index: 50;
  opacity: 0.8;
}

.scanline {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 4px;
  background: rgba(0, 245, 255, 0.03);
  animation: scan 8s linear infinite;
  z-index: 51;
  pointer-events: none;
}

@keyframes scan { from { top: -10%; } to { top: 110%; } }

/* --- TACTILE BUTTONS --- */
.key-btn {
  background: rgba(25, 25, 25, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  touch-action: manipulation;
  height: clamp(2.5rem, 8vh, 3.8rem);
  box-shadow: 0 4px 0 rgba(0,0,0,0.8);
  font-family: 'Orbitron', sans-serif;
  color: white;
  border-radius: 4px;
}

.key-btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.8);
  background: rgba(45, 45, 45, 1);
  border-color: var(--terminal-cyan);
}

.key-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.key-btn.clr { color: #ef4444; }
.key-btn.ent { color: #22c55e; }

/* --- RESPONSIVE LAYOUT HELPERS --- */
.terminal-container {
  width: 100%;
  max-width: 380px;
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  padding: clamp(0.75rem, 3vw, 1.5rem);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

.status-bar {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.glow-text {
  text-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
}

@media (max-height: 720px) {
  .terminal-container { padding: 0.75rem; }
  .key-btn { height: 2.5rem; font-size: 1rem; }
  header { margin-top: 0 !important; }
  header h1 { font-size: 1.25rem !important; }
  header p { font-size: 6px !important; }
  footer { margin-bottom: 0 !important; }
}