/* ══════════════════════════════════════════════════════════════════════════
   RED CODE: QUARANTINE (DEPTHS) — CYBERPUNK SILHOUETTE HORROR STYLING
   Authentic Red Code 3 Aesthetic: High Contrast, Obsidian Silhouette, Neon Bio-Glow
   ══════════════════════════════════════════════════════════════════════════ */

:root {
  --rc-bg: #050a06;
  --rc-surface: #0a140d;
  --rc-surface-elevated: #112217;
  --rc-border: #1d3d28;
  --rc-border-bright: #22c55e;
  --rc-neon-green: #00ff66;
  --rc-acid-green: #39ff14;
  --rc-neon-cyan: #00e5ff;
  --rc-neon-red: #ff2a55;
  --rc-amber: #f59e0b;
  --rc-text: #e2f5e8;
  --rc-text-muted: #648a70;
  --rc-glow-green:
    0 0 12px rgba(0, 255, 102, 0.55), 0 0 24px rgba(0, 255, 102, 0.25);
  --rc-glow-red:
    0 0 12px rgba(255, 42, 85, 0.55), 0 0 24px rgba(255, 42, 85, 0.25);
}

.rc-root {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--rc-bg);
  color: var(--rc-text);
  font-family: "Chakra Petch", "Courier New", monospace, sans-serif;
  user-select: none;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

/* CRT Scanlines Overlay */
.rc-crt-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
  background-size: 100% 4px;
  z-index: 80;
  pointer-events: none;
  opacity: 0.75;
}

/* Tactical Vignette & Grid Lines */
.rc-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    transparent 45%,
    rgba(0, 0, 0, 0.8) 100%
  );
  z-index: 75;
  pointer-events: none;
}

.rc-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 255, 102, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 102, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  z-index: 2;
  pointer-events: none;
}

/* Screens / Views Management */
.rc-screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
  z-index: 10;
  background: var(--rc-bg);
  overflow-y: auto;
  overflow-x: hidden;
}

.rc-screen.active {
  display: flex;
}

/* ══════════════════════════════════════════════════════════════════════════
   TITLE SCREEN & MENU COVER ART
   ══════════════════════════════════════════════════════════════════════════ */
#rc-screen-title {
  background-image: url("/static/images/games/red_code/cover_art.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

#rc-screen-missions,
#rc-screen-armory,
#rc-screen-lore,
#rc-screen-settings {
  background-image:
    linear-gradient(rgba(5, 10, 6, 0.88), rgba(5, 10, 6, 0.94)),
    url("/static/images/games/red_code/cover_art.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.rc-title-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 20px 20px 30px 20px;
  text-align: center;
  position: relative;
  z-index: 5;
}

.rc-bio-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(0, 255, 102, 0.5);
  color: var(--rc-neon-green);
  font-size: 0.85rem;
  letter-spacing: 3px;
  padding: 4px 14px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
}

.rc-main-title {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 4px;
  color: #ffffff;
  text-shadow:
    0 0 15px rgba(0, 255, 102, 0.9),
    0 0 35px rgba(0, 255, 102, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.9);
  margin: 0 0 4px 0;
  text-transform: uppercase;
}

.rc-sub-title {
  font-size: clamp(0.85rem, 1.8vw, 1.15rem);
  color: var(--rc-neon-green);
  letter-spacing: 5px;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 18px 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
  opacity: 0.95;
}

.rc-title-menu {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 680px;
  background: rgba(5, 10, 6, 0.72);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(0, 255, 102, 0.35);
  padding: 14px 18px;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.95);
}

/* ══════════════════════════════════════════════════════════════════════════
   TACTICAL BUTTONS & INPUTS
   ══════════════════════════════════════════════════════════════════════════ */
.rc-btn {
  position: relative;
  background: linear-gradient(180deg, #13261a 0%, #0a160e 100%);
  border: 1.5px solid #1f472d;
  color: var(--rc-text);
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.15s ease-out;
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(0, 255, 102, 0.2);
  outline: none;
}

.rc-btn:hover {
  background: linear-gradient(180deg, #1c3d28 0%, #102418 100%);
  border-color: var(--rc-neon-green);
  color: #ffffff;
  box-shadow:
    var(--rc-glow-green),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.rc-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}

.rc-btn-primary {
  background: linear-gradient(180deg, #155e34 0%, #0c381f 100%);
  border-color: var(--rc-neon-green);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(0, 255, 102, 0.4);
}

.rc-btn-primary:hover {
  background: linear-gradient(180deg, #16a34a 0%, #15803d 100%);
  box-shadow: 0 0 25px rgba(0, 255, 102, 0.8);
}

.rc-btn-danger {
  background: linear-gradient(180deg, #4c111e 0%, #26080e 100%);
  border-color: var(--rc-neon-red);
  color: #ffffff;
}

.rc-btn-danger:hover {
  background: linear-gradient(180deg, #991b1b 0%, #7f1d1d 100%);
  border-color: var(--rc-neon-red);
  box-shadow: var(--rc-glow-red);
}

.rc-btn-small {
  padding: 6px 12px;
  font-size: 0.8rem;
  letter-spacing: 1px;
}

/* ══════════════════════════════════════════════════════════════════════════
   HEADER BARS & CARDS
   ══════════════════════════════════════════════════════════════════════════ */
.rc-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #07120a;
  border-bottom: 2px solid #163621;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  z-index: 20;
}

.rc-bar-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--rc-neon-green);
  letter-spacing: 3px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.rc-resource-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0f2416;
  border: 1px solid var(--rc-neon-green);
  padding: 6px 14px;
  border-radius: 4px;
  font-weight: 800;
  color: var(--rc-neon-green);
  box-shadow: inset 0 0 8px rgba(0, 255, 102, 0.2);
}

/* ══════════════════════════════════════════════════════════════════════════
   SECTOR / MISSION SELECT
   ══════════════════════════════════════════════════════════════════════════ */
.rc-mission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  padding: 24px 20px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.rc-sector-card {
  background: linear-gradient(180deg, #0d1e13 0%, #07100a 100%);
  border: 2px solid #173b22;
  border-radius: 6px;
  padding: 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}

.rc-sector-card.unlocked:hover {
  border-color: var(--rc-neon-green);
  box-shadow: var(--rc-glow-green);
  transform: translateY(-3px);
}

.rc-sector-card.locked {
  opacity: 0.55;
  filter: grayscale(0.8);
}

.rc-sector-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.rc-sector-num {
  font-size: 0.8rem;
  color: var(--rc-neon-green);
  letter-spacing: 2px;
  font-weight: 800;
}

.rc-sector-threat {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 800;
  text-transform: uppercase;
}

.threat-low {
  background: #064e3b;
  color: #34d399;
}
.threat-med {
  background: #78350f;
  color: #fbbf24;
}
.threat-high {
  background: #7f1d1d;
  color: #f87171;
}
.threat-critical {
  background: #881337;
  color: #fb7185;
}

.rc-sector-name {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 8px 0;
  color: #ffffff;
  letter-spacing: 1px;
}

.rc-sector-desc {
  font-size: 0.85rem;
  color: var(--rc-text-muted);
  line-height: 1.4;
  margin-bottom: 16px;
}

/* ══════════════════════════════════════════════════════════════════════════
   ARMORY & UPGRADE LAB
   ══════════════════════════════════════════════════════════════════════════ */
.rc-armory-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 20px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 768px) {
  .rc-armory-layout {
    grid-template-columns: 1fr 1fr;
  }
}

.rc-armory-panel {
  background: #0a180e;
  border: 2px solid #163621;
  border-radius: 6px;
  padding: 16px;
}

.rc-panel-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--rc-neon-green);
  letter-spacing: 2px;
  border-bottom: 1px solid #163621;
  padding-bottom: 8px;
  margin-bottom: 14px;
}

.rc-upgrade-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  background: #061009;
  border: 1px solid #132a1b;
  border-radius: 4px;
  margin-bottom: 10px;
}

.rc-upgrade-info h4 {
  margin: 0 0 3px 0;
  font-size: 0.95rem;
  color: #ffffff;
}

.rc-upgrade-info p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--rc-text-muted);
}

.rc-upgrade-pips {
  display: flex;
  gap: 4px;
  margin-top: 5px;
}

.rc-pip {
  width: 12px;
  height: 6px;
  background: #193822;
  border-radius: 1px;
}

.rc-pip.filled {
  background: var(--rc-neon-green);
  box-shadow: 0 0 6px rgba(0, 255, 102, 0.8);
}

/* ══════════════════════════════════════════════════════════════════════════
   GAMEPLAY CANVAS & TACTICAL VISOR HUD
   ══════════════════════════════════════════════════════════════════════════ */
.rc-game-viewport-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  flex: 1;
  overflow: hidden;
  background: #020503;
}

#rc-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

/* Tactical Visor HUD Overlay: Top-Left Standardized Layout */
.rc-hud-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 16px;
  box-sizing: border-box;
}

.rc-hud-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  pointer-events: none;
}

.rc-hud-top-right {
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
}

.rc-flashlight-pill {
  background: rgba(4, 12, 7, 0.85);
  border: 1px solid #143620;
  border-radius: 4px;
  padding: 3px 8px;
  font-family: var(--rc-font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #94a3b8;
}

.rc-flashlight-pill.alert {
  border-color: #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

.rc-hud-top-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rc-hud-chips-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rc-hud-chip {
  background: rgba(5, 16, 9, 0.9);
  border: 1.5px solid #163821;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  color: var(--rc-text);
}

.rc-chip-score {
  border-color: #22c55e;
}

.rc-score-highlight {
  color: #fbbf24;
  font-size: 0.95rem;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
}

.rc-chip-plasma {
  color: var(--rc-neon-green);
  text-shadow: 0 0 6px rgba(0, 255, 102, 0.6);
}

.rc-hud-bars-grid {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 260px;
  background: rgba(4, 12, 7, 0.85);
  border: 1px solid #122c1b;
  border-radius: 4px;
  padding: 8px 10px;
}

.rc-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.rc-bar-label {
  width: 58px;
  flex-shrink: 0;
}

.rc-bar-numeric {
  font-size: 0.7rem;
  color: #94a3b8;
  width: 50px;
  text-align: right;
  flex-shrink: 0;
}

.rc-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.rc-bar-fill {
  height: 100%;
  transition: width 0.1s ease-out;
}

.rc-bar-health .rc-bar-fill {
  background: linear-gradient(90deg, #ff2a55 0%, #ef4444 100%);
  box-shadow: 0 0 8px rgba(255, 42, 85, 0.8);
}

.rc-bar-shield .rc-bar-fill {
  background: linear-gradient(90deg, #00e5ff 0%, #38bdf8 100%);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.8);
}

.rc-bar-battery .rc-bar-fill {
  background: linear-gradient(90deg, #00ff66 0%, #39ff14 100%);
  box-shadow: 0 0 8px rgba(0, 255, 102, 0.8);
}

.rc-hud-top-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rc-hud-menu-btn {
  pointer-events: auto;
  background: rgba(10, 26, 16, 0.92);
  border: 1.5px solid #1f472d;
  color: var(--rc-text);
  padding: 5px 12px;
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  transition: all 0.15s ease;
  font-family: inherit;
}

.rc-hud-menu-btn:hover {
  background: rgba(22, 56, 33, 0.98);
  border-color: var(--rc-neon-green);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(0, 255, 102, 0.6);
  transform: translateY(-1px);
}

.rc-flashlight-pill {
  pointer-events: auto;
  cursor: pointer;
  background: rgba(5, 16, 9, 0.9);
  border: 1px solid #163821;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.rc-flashlight-pill:hover {
  border-color: var(--rc-neon-green);
  background: rgba(10, 28, 16, 0.95);
}

.rc-flashlight-pill.alert {
  border-color: #fbbf24;
  background: rgba(28, 22, 6, 0.95);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.7);
  animation: rc-pill-warning-pulse 1s infinite alternate ease-in-out;
}

@keyframes rc-pill-warning-pulse {
  from {
    border-color: #fbbf24;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
  }
  to {
    border-color: #fde047;
    box-shadow: 0 0 18px rgba(251, 191, 36, 0.9);
  }
}

/* Blackout Flashlight Action Reminder (Centered Screen Overlay) */
.rc-hud-flashlight-tip {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%) scale(0.92);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(8, 12, 6, 0.94);
  border: 2px solid #fbbf24;
  border-radius: 8px;
  padding: 10px 22px;
  font-family: var(--rc-font-heading);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #ffffff;
  box-shadow:
    0 0 24px rgba(251, 191, 36, 0.5),
    0 6px 20px rgba(0, 0, 0, 0.85),
    inset 0 0 14px rgba(251, 191, 36, 0.2);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s ease-out,
    transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-transform: uppercase;
  z-index: 65;
  cursor: pointer;
  user-select: none;
}

.rc-hud-flashlight-tip.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
  animation: rc-flashlight-tip-pulse 1.3s infinite ease-in-out;
}

.rc-hud-flashlight-tip:hover {
  background: rgba(18, 24, 10, 0.98);
  border-color: #fde047;
  box-shadow:
    0 0 32px rgba(253, 224, 71, 0.7),
    0 6px 24px rgba(0, 0, 0, 0.9);
}

.rc-flashlight-tip-icon {
  font-size: 1.25rem;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.8));
  display: inline-flex;
  align-items: center;
}

.rc-flashlight-key-badge {
  background: #fbbf24;
  color: #040804;
  font-size: 1rem;
  min-width: 28px;
  height: 28px;
  border-radius: 4px;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.9);
}

.rc-flashlight-tip-text {
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.6);
  white-space: nowrap;
}

@keyframes rc-flashlight-tip-pulse {
  0%,
  100% {
    box-shadow:
      0 0 20px rgba(251, 191, 36, 0.45),
      0 6px 20px rgba(0, 0, 0, 0.85),
      inset 0 0 12px rgba(251, 191, 36, 0.15);
    border-color: #fbbf24;
  }
  50% {
    box-shadow:
      0 0 35px rgba(251, 191, 36, 0.85),
      0 8px 25px rgba(0, 0, 0, 0.95),
      inset 0 0 20px rgba(251, 191, 36, 0.35);
    border-color: #fde047;
  }
}

/* Dynamic In-Game Interact Tip Overlay (Centered HUD Pop-Up) */
.rc-hud-interact-tip {
  align-self: center;
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(4, 15, 8, 0.94);
  border: 2px solid var(--rc-neon-green);
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #ffffff;
  box-shadow:
    0 0 20px rgba(0, 255, 102, 0.45),
    0 4px 15px rgba(0, 0, 0, 0.8),
    inset 0 0 12px rgba(0, 255, 102, 0.2);
  opacity: 0;
  transform: translateY(12px) scale(0.95);
  pointer-events: none;
  transition:
    opacity 0.18s ease-out,
    transform 0.18s ease-out;
  text-transform: uppercase;
  z-index: 60;
}

.rc-hud-interact-tip.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: rc-tip-pulse 1.4s infinite ease-in-out;
}

.rc-hud-interact-tip.locked {
  border-color: var(--rc-neon-red);
  box-shadow:
    0 0 20px rgba(255, 42, 85, 0.45),
    0 4px 15px rgba(0, 0, 0, 0.8),
    inset 0 0 12px rgba(255, 42, 85, 0.2);
  color: #fca5a5;
}

.rc-key-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  background: var(--rc-neon-green);
  color: #040a06;
  font-weight: 900;
  font-size: 0.95rem;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(0, 255, 102, 0.8);
}

.rc-hud-interact-tip.locked .rc-key-badge {
  background: var(--rc-neon-red);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(255, 42, 85, 0.8);
}

@keyframes rc-tip-pulse {
  0%,
  100% {
    box-shadow:
      0 0 16px rgba(0, 255, 102, 0.4),
      0 4px 15px rgba(0, 0, 0, 0.8);
  }
  50% {
    box-shadow:
      0 0 28px rgba(0, 255, 102, 0.7),
      0 4px 20px rgba(0, 0, 0, 0.9);
  }
}

.rc-hud-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  width: 100%;
  pointer-events: none;
}

.rc-hud-bottom-left {
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
  background: rgba(4, 12, 7, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid #163821;
  border-radius: 6px;
  padding: 3px 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.75);
  height: 34px;
  box-sizing: border-box;
}

.rc-hud-bottom-right {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.rc-hud-controls-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.rc-btn-controls-pill {
  background: rgba(8, 24, 14, 0.88);
  border: 1.5px solid var(--rc-neon-green);
  color: var(--rc-neon-green);
  font-family: var(--rc-font-mono);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
  transition: all 0.15s ease;
  user-select: none;
}

.rc-btn-controls-pill:hover {
  background: var(--rc-neon-green);
  color: #030805;
  box-shadow: 0 0 12px rgba(0, 255, 102, 0.6);
  transform: translateY(-1px);
}

.rc-hud-controls-popup {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  width: 270px;
  background: rgba(5, 15, 8, 0.96);
  padding: 12px 16px;
  border: 1.5px solid #163821;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.9),
    0 0 12px rgba(0, 255, 102, 0.2);
  z-index: 50;
  backdrop-filter: blur(4px);
}

.rc-controls-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #163821;
  padding-bottom: 6px;
  margin-bottom: 4px;
  font-size: 0.72rem;
  font-weight: 900;
  color: var(--rc-neon-green);
  letter-spacing: 1.5px;
}

.rc-controls-close-btn {
  background: transparent;
  border: none;
  color: var(--rc-text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.rc-controls-close-btn:hover {
  color: #ff4444;
}

.rc-ctrl-line {
  font-size: 0.74rem;
  color: var(--rc-text-muted);
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.4;
}

.rc-ctrl-tag {
  color: var(--rc-neon-green);
  font-weight: 800;
}

.rc-weapon-display {
  background: rgba(6, 16, 10, 0.85);
  border: 1.5px solid #1e4d2b;
  border-radius: 4px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
}

.rc-weapon-name {
  font-size: 1.1rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 2px;
}

.rc-ammo-counter {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--rc-neon-green);
  text-shadow: 0 0 8px rgba(0, 255, 102, 0.6);
}

.rc-ammo-counter.reloading {
  color: #f59e0b;
  font-size: 1.05rem;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.7);
  animation: rcBlinkReload 0.5s infinite alternate;
}

@keyframes rcBlinkReload {
  from {
    opacity: 0.5;
  }
  to {
    opacity: 1;
  }
}

/* Active Weapon Ammo Compact Pill */
.rc-tb-ammo-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #081a0f;
  border: 1px solid #1a4227;
  border-radius: 4px;
  padding: 2px 7px;
  height: 26px;
  box-sizing: border-box;
}

.rc-tb-wname {
  font-size: 0.58rem;
  font-weight: 900;
  color: #a7f3d0;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  line-height: 1;
}

.rc-tb-wammo {
  font-size: 0.68rem;
  font-weight: 900;
  font-family: var(--rc-font-mono);
  color: var(--rc-neon-green);
  line-height: 1;
}

.rc-tb-wammo.reloading {
  color: #f59e0b;
  font-size: 0.58rem;
  animation: rc-blink 0.5s infinite alternate;
}

/* Slim Weapons Group */
.rc-weapon-hotbar {
  display: flex;
  gap: 3px;
  align-items: center;
}

.rc-weapon-slot {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(6, 18, 10, 0.88);
  border: 1px solid #173822;
  border-radius: 4px;
  padding: 0 5px;
  height: 26px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  box-sizing: border-box;
}

.rc-weapon-slot:hover:not(.locked) {
  border-color: #27673c;
  background: #092012;
}

.rc-weapon-slot .rc-wslot-key {
  font-family: var(--rc-font-mono);
  font-size: 0.58rem;
  font-weight: 900;
  color: #64748b;
  background: #07150c;
  border: 1px solid #163621;
  border-radius: 2px;
  padding: 0 3px;
  line-height: 1.1;
}

.rc-weapon-slot .rc-wslot-icon {
  width: 22px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rc-weapon-slot .rc-gun-svg {
  width: 100%;
  height: 100%;
  fill: #64748b;
  transition:
    fill 0.15s,
    filter 0.15s;
}

.rc-weapon-slot.active {
  background: rgba(6, 32, 16, 0.95);
  border-color: var(--rc-neon-green);
  box-shadow: 0 0 8px rgba(0, 255, 102, 0.4);
}

.rc-weapon-slot.active .rc-wslot-key {
  background: var(--rc-neon-green);
  color: #020b05;
  border-color: var(--rc-neon-green);
}

.rc-weapon-slot.active .rc-gun-svg {
  fill: var(--rc-neon-green);
  filter: drop-shadow(0 0 4px #00ff66);
}

.rc-weapon-slot.locked {
  opacity: 0.35;
  filter: grayscale(0.9);
  cursor: not-allowed;
  border-color: #0b1810;
}

.rc-tb-divider {
  width: 1px;
  height: 18px;
  background: #194825;
  margin: 0 2px;
}

/* Slim Tactical Abilities (Live Cooldown Meters) */
.rc-abilities-section {
  display: flex;
  gap: 4px;
  align-items: center;
  background: rgba(4, 12, 7, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid #163821;
  border-radius: 6px;
  padding: 3px 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.75);
  height: 34px;
  box-sizing: border-box;
}

.rc-ability-slot {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(6, 18, 10, 0.88);
  border: 1px solid #173822;
  border-radius: 4px;
  padding: 0 5px;
  height: 26px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.rc-ability-slot:hover {
  border-color: #27673c;
}

.rc-ability-slot.ready {
  border-color: rgba(0, 229, 255, 0.6);
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.25);
}

.rc-ability-slot.active {
  border-color: #00e5ff;
  background: rgba(0, 35, 48, 0.96);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.8);
  animation: rcPulseAbility 0.8s infinite alternate ease-in-out;
}

.rc-ability-slot.on-cooldown {
  opacity: 0.72;
  border-color: #1e293b;
  cursor: default;
}

.rc-ability-slot .rc-ability-key {
  font-family: var(--rc-font-mono);
  font-size: 0.54rem;
  font-weight: 900;
  background: #081a0f;
  color: #a7f3d0;
  border: 1px solid #163e21;
  border-radius: 2px;
  padding: 0 3px;
  line-height: 1.1;
}

.rc-ability-slot.ready .rc-ability-key {
  border-color: #00e5ff;
  color: #ffffff;
  background: rgba(0, 229, 255, 0.2);
}

.rc-ability-slot .rc-ability-icon-wrap {
  width: 14px;
  height: 14px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rc-ability-slot .rc-ability-svg {
  width: 13px;
  height: 13px;
  fill: #64748b;
  transition:
    fill 0.2s,
    filter 0.2s;
}

.rc-ability-slot.ready .rc-ability-svg {
  fill: #38bdf8;
  filter: drop-shadow(0 0 3px #00e5ff);
}

.rc-ability-slot.active .rc-ability-svg {
  fill: #ffffff;
  filter: drop-shadow(0 0 6px #00e5ff);
}

.rc-ability-slot .rc-ability-cd-overlay {
  display: none;
}

.rc-ability-status {
  font-size: 0.56rem;
  font-weight: 900;
  font-family: var(--rc-font-mono);
  color: #94a3b8;
  min-width: 30px;
  text-align: right;
}

.rc-ability-slot.ready .rc-ability-status {
  color: #00ff66;
}

.rc-ability-slot.active .rc-ability-status {
  color: #00e5ff;
  font-weight: 900;
}

.rc-ability-slot.on-cooldown .rc-ability-status {
  color: #f59e0b;
}

.rc-ability-bar-track {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: rgba(0, 0, 0, 0.85);
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  overflow: hidden;
}

.rc-ability-bar-fill {
  height: 100%;
  width: 100%;
  transition: width 0.08s linear;
}

.rc-ability-bar-fill.fill-dash {
  background: linear-gradient(90deg, #00ff66, #00e5ff);
}

.rc-ability-bar-fill.fill-shield {
  background: linear-gradient(90deg, #38bdf8, #00e5ff);
}

.rc-keycard-tray {
  display: flex;
  gap: 6px;
  align-items: center;
}

.rc-keycard-title {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--rc-text-muted);
  margin-right: 2px;
}

.rc-card-icon {
  width: 24px;
  height: 16px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  opacity: 0.25;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 900;
}

.rc-card-icon.active {
  opacity: 1;
  box-shadow: 0 0 10px currentColor;
}

.card-alpha {
  background: #ef4444;
  color: #fff;
}
.card-beta {
  background: #3b82f6;
  color: #fff;
}
.card-gamma {
  background: #eab308;
  color: #000;
}

/* ══════════════════════════════════════════════════════════════════════════
   MODAL DIALOGS (TERMINAL / SETTINGS / DEBRIEF)
   ══════════════════════════════════════════════════════════════════════════ */
.rc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.rc-modal-backdrop.active {
  display: flex;
}

.rc-modal {
  background: #08140b;
  border: 2px solid var(--rc-neon-green);
  border-radius: 8px;
  padding: 24px;
  max-width: 650px;
  width: 100%;
  box-shadow:
    0 0 35px rgba(0, 255, 102, 0.3),
    0 10px 30px rgba(0, 0, 0, 0.9);
  color: var(--rc-text);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.rc-modal-title {
  font-size: 1.4rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 2px;
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1.5px solid #163621;
  padding-bottom: 10px;
}

/* Custom Scrollbar */
.rc-screen::-webkit-scrollbar,
.rc-modal::-webkit-scrollbar {
  width: 6px;
}

.rc-screen::-webkit-scrollbar-track,
.rc-modal::-webkit-scrollbar-track {
  background: #040805;
}

.rc-screen::-webkit-scrollbar-thumb,
.rc-modal::-webkit-scrollbar-thumb {
  background: #173822;
  border-radius: 3px;
}

.rc-screen::-webkit-scrollbar-thumb:hover,
.rc-modal::-webkit-scrollbar-thumb:hover {
  background: var(--rc-neon-green);
}
