/* ===== BREACH | NORDIS Intelligence ===== */

:root {
  --bg0: #050810;
  --bg1: #0a1220;
  --bg2: #0f1a2e;
  --bg3: #162038;
  --bg4: #1e2d48;

  --green: #00e676;
  --green-dim: #007a40;
  --green-glow: rgba(0,230,118,0.15);
  --blue: #40c4ff;
  --blue-dim: #0077aa;
  --orange: #ff9100;
  --red: #ff1744;
  --purple: #cc44ff;
  --yellow: #ffd740;

  --text: #cce0ff;
  --text2: #7090b0;
  --text3: #3a5070;
  --border: rgba(255,255,255,0.07);
  --border-active: rgba(0,230,118,0.4);

  --font-mono: 'Share Tech Mono', 'Courier New', monospace;
  --font-ui: 'Rajdhani', sans-serif;
  --radius: 4px;
}

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

html, body {
  width: 100%; height: 100%;
  background: var(--bg0);
  color: var(--text);
  font-family: var(--font-ui);
  overflow: hidden;
  user-select: none;
}

#app {
  width: 100vw; height: 100vh;
  position: relative;
  overflow: hidden;
}

#scanlines {
  position: fixed; inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

#notification-container {
  position: fixed; top: 20px; right: 20px;
  z-index: 8000;
  display: flex; flex-direction: column; gap: 10px;
}

.notification {
  background: var(--bg2);
  border: 1px solid var(--border-active);
  border-left: 3px solid var(--green);
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green);
  box-shadow: 0 0 20px var(--green-glow);
  animation: notifIn 0.3s ease, notifOut 0.3s ease 2.7s forwards;
  max-width: 300px;
}
.notification.error { border-color: var(--red); color: var(--red); }
.notification.warn  { border-color: var(--orange); color: var(--orange); }

@keyframes notifIn  { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:translateX(0); } }
@keyframes notifOut { to   { opacity:0; transform:translateX(20px); } }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px;
  font-family: var(--font-ui); font-size: 14px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  border: 1px solid; border-radius: var(--radius);
  cursor: pointer; transition: all 0.15s;
  background: transparent;
}
.btn-primary {
  color: var(--green); border-color: var(--green);
}
.btn-primary:hover {
  background: var(--green); color: var(--bg0);
  box-shadow: 0 0 20px var(--green-glow);
}
.btn-secondary {
  color: var(--text2); border-color: var(--text3);
}
.btn-secondary:hover { border-color: var(--text2); color: var(--text); }
.btn-danger { color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: var(--red); color: white; }
.btn-sm { padding: 6px 14px; font-size: 12px; }

/* ===== INPUTS ===== */
input[type="text"], input[type="password"] {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-mono); font-size: 14px;
  padding: 10px 14px;
  outline: none; width: 100%;
  transition: border-color 0.2s;
}
input:focus { border-color: var(--green); box-shadow: 0 0 10px var(--green-glow); }
input::placeholder { color: var(--text3); }

/* ===== SCREEN BASE ===== */
.screen {
  position: absolute; inset: 0;
  display: none;
  animation: fadeIn 0.4s ease;
}
.screen.active { display: flex; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }

/* ==========================================
   SPLASH SCREEN
   ========================================== */
#screen-splash {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg0);
  gap: 40px;
}

.splash-logo {
  text-align: center;
  animation: slideUp 0.6s ease 0.2s both;
}

.splash-ascii {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.3;
  color: var(--green);
  text-shadow: 0 0 20px var(--green);
  white-space: pre;
  letter-spacing: 2px;
}

.splash-tagline {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text3);
  letter-spacing: 4px;
  margin-top: 12px;
  text-transform: uppercase;
}

.splash-version {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text3);
}

.splash-boot {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text2);
  text-align: center;
  width: 420px;
  height: 100px;
  animation: slideUp 0.6s ease 0.5s both;
  overflow: hidden;
}

.splash-boot-line {
  opacity: 0;
  color: var(--text2);
  text-align: left;
}
.splash-boot-line.ok { color: var(--green); }
.splash-boot-line.warn { color: var(--orange); }
.splash-boot-line.visible { opacity: 1; }

.splash-buttons {
  display: flex; gap: 20px;
  animation: slideUp 0.6s ease 1.2s both;
}

.splash-classification {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--red);
  letter-spacing: 3px;
  border: 1px solid var(--red);
  padding: 4px 14px;
  opacity: 0.7;
  animation: slideUp 0.6s ease 0.1s both;
}

/* ==========================================
   CHARACTER CREATION
   ========================================== */
#screen-character {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg0);
  padding: 40px;
}

.char-container {
  width: 560px;
  animation: slideUp 0.5s ease;
}

.char-header {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--green);
  letter-spacing: 4px;
  margin-bottom: 6px;
}
.char-title {
  font-size: 32px; font-weight: 700;
  letter-spacing: 4px;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.char-subtitle {
  font-family: var(--font-mono);
  font-size: 12px; color: var(--text2);
  margin-bottom: 40px;
}

.char-field { margin-bottom: 28px; }
.char-label {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--green);
  letter-spacing: 2px;
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 10px;
}
.char-label::after {
  content: ''; flex: 1;
  height: 1px; background: var(--border);
}

.char-preview {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--text3);
  margin-top: 6px;
  height: 16px;
  transition: color 0.2s;
}

.background-options {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.bg-option {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--bg1);
}
.bg-option:hover { border-color: var(--text3); }
.bg-option.selected {
  border-color: var(--green);
  background: rgba(0,230,118,0.05);
  box-shadow: 0 0 10px var(--green-glow);
}
.bg-option-title {
  font-weight: 600; font-size: 14px;
  margin-bottom: 4px;
}
.bg-option-desc {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--text2);
  line-height: 1.4;
}

.char-vera {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 12px; line-height: 1.6;
  color: var(--text2);
  margin-bottom: 28px;
  min-height: 60px;
}
.char-vera-tag { color: var(--green); font-weight: bold; }

.char-submit { width: 100%; padding: 14px; font-size: 16px; letter-spacing: 3px; }

/* ==========================================
   HUB SCREEN
   ========================================== */
#screen-hub {
  flex-direction: column;
  background: var(--bg0);
}

.hub-topbar {
  display: flex; align-items: center;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg1);
  gap: 20px;
  flex-shrink: 0;
}

.hub-logo {
  font-family: var(--font-mono);
  font-size: 16px; color: var(--green);
  letter-spacing: 3px; font-weight: bold;
  text-shadow: 0 0 10px var(--green);
}

.hub-logo-sep { color: var(--text3); }

.hub-agent {
  font-family: var(--font-mono);
  font-size: 12px; color: var(--text2);
}
.hub-agent span { color: var(--text); font-weight: bold; }

.hub-rank {
  font-family: var(--font-mono); font-size: 11px;
  padding: 3px 10px;
  border: 1px solid currentColor;
  border-radius: 2px;
  letter-spacing: 2px;
}

.hub-xp-wrap {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11px; color: var(--text3);
  flex: 1;
}
.hub-xp-bar {
  flex: 1; max-width: 160px; height: 4px;
  background: var(--bg3); border-radius: 2px; overflow: hidden;
}
.hub-xp-fill {
  height: 100%; background: var(--green);
  border-radius: 2px; transition: width 0.5s ease;
}

.hub-body {
  display: grid; grid-template-columns: 280px 1fr 280px;
  gap: 0; flex: 1; overflow: hidden;
}

.hub-panel {
  padding: 24px;
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
.hub-panel:last-child { border-right: none; border-left: 1px solid var(--border); }

.hub-panel-title {
  font-family: var(--font-mono);
  font-size: 10px; color: var(--green);
  letter-spacing: 3px; text-transform: uppercase;
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.hub-panel-title::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.player-card {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.player-card-codename {
  font-size: 22px; font-weight: 700;
  letter-spacing: 2px; margin-bottom: 4px;
}
.player-card-rank {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 2px; margin-bottom: 16px;
}
.player-card-stat {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text2); padding: 4px 0;
  border-bottom: 1px solid var(--border);
}
.player-card-stat:last-child { border-bottom: none; }
.player-card-stat span { color: var(--text); }

.hub-tools-list {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.hub-tool-badge {
  font-family: var(--font-mono); font-size: 10px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text2);
  letter-spacing: 1px;
}
.hub-tool-badge.active { border-color: var(--green); color: var(--green); }

/* Mission board */
.mission-board { display: flex; flex-direction: column; gap: 16px; }

.mission-card {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.mission-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(0,230,118,0.03));
  opacity: 0; transition: opacity 0.2s;
}
.mission-card:not(.locked):hover {
  border-color: var(--green);
  box-shadow: 0 0 20px var(--green-glow);
}
.mission-card:not(.locked):hover::before { opacity: 1; }
.mission-card.locked { opacity: 0.4; cursor: not-allowed; }
.mission-card.completed { border-color: var(--green-dim); }
.mission-card.completed .mission-card-badge { color: var(--green); }

.mission-card-number {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text3); letter-spacing: 2px;
  margin-bottom: 4px;
}
.mission-card-name {
  font-size: 24px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  margin-bottom: 4px;
}
.mission-card-sub {
  font-family: var(--font-mono); font-size: 13px;
  color: var(--text2); margin-bottom: 14px;
  font-style: italic;
}
.mission-card-meta {
  display: flex; gap: 16px; align-items: center;
  margin-bottom: 16px;
}
.mission-card-badge {
  font-family: var(--font-mono); font-size: 10px;
  padding: 3px 8px; border: 1px solid currentColor;
  border-radius: 2px; letter-spacing: 1px;
  color: var(--text3);
}
.badge-intro { color: var(--blue) !important; border-color: var(--blue) !important; }
.badge-normal { color: var(--orange) !important; border-color: var(--orange) !important; }
.badge-hard { color: var(--red) !important; border-color: var(--red) !important; }
.badge-done { color: var(--green) !important; border-color: var(--green) !important; }

.mission-card-xp {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--yellow);
}
.mission-card-vera {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--text2); font-style: italic;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.mission-card-lock {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text3);
  margin-top: 10px;
}

/* Vera panel in hub */
.vera-hub-messages { display: flex; flex-direction: column; gap: 12px; }
.vera-hub-msg {
  background: var(--bg1); border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  padding: 12px 14px;
  font-family: var(--font-mono); font-size: 13px;
  line-height: 1.6; color: var(--text2);
}
.vera-hub-msg-from { color: var(--green); font-weight: bold; margin-bottom: 4px; font-size: 11px; letter-spacing: 1px; }

/* ==========================================
   MISSION SCREEN
   ========================================== */
#screen-mission {
  flex-direction: column;
  background: var(--bg0);
}

.mission-header {
  display: flex; align-items: center;
  padding: 10px 20px;
  background: var(--bg1);
  border-bottom: 1px solid var(--border);
  gap: 16px;
  flex-shrink: 0;
}

.mission-header-logo {
  font-family: var(--font-mono);
  font-size: 13px; color: var(--green);
  letter-spacing: 3px;
  text-shadow: 0 0 8px var(--green);
  margin-right: 4px;
}

.mission-header-sep { color: var(--text3); font-size: 18px; }

.mission-header-name {
  font-size: 16px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
}

.mission-header-diff { font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px; }

.spacer { flex: 1; }

.mission-timer {
  font-family: var(--font-mono); font-size: 18px;
  color: var(--orange);
  letter-spacing: 2px;
  min-width: 80px; text-align: right;
}
.mission-timer.critical { color: var(--red); animation: blink 0.5s step-end infinite; }
.mission-timer.hidden { display: none; }

.mission-header-rank {
  font-family: var(--font-mono); font-size: 10px;
  padding: 3px 8px; border: 1px solid currentColor;
  border-radius: 2px; letter-spacing: 2px;
}

.btn-hub {
  font-family: var(--font-mono); font-size: 10px;
  padding: 5px 12px; border: 1px solid var(--border);
  border-radius: 2px; color: var(--text2);
  cursor: pointer; background: transparent;
  letter-spacing: 1px;
  transition: all 0.15s;
}
.btn-hub:hover { border-color: var(--red); color: var(--red); }

/* Mission body layout */
.mission-body {
  display: grid;
  grid-template-columns: 240px 1fr 260px;
  flex: 1; overflow: hidden;
}

/* Left sidebar */
.mission-sidebar-left {
  background: var(--bg1);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden;
}

.sidebar-section {
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
}
.sidebar-section:last-child { border-bottom: none; flex: 1; }

.sidebar-title {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--green); letter-spacing: 3px;
  margin-bottom: 12px;
}

/* Objectives list */
.objectives-list { display: flex; flex-direction: column; gap: 8px; }
.objective-item {
  display: flex; align-items: flex-start; gap: 10px;
  font-family: var(--font-mono); font-size: 13px;
  color: var(--text2); line-height: 1.4;
  transition: color 0.3s;
}
.objective-item.done { color: var(--text3); }
.objective-check {
  width: 14px; height: 14px; flex-shrink: 0;
  border: 1px solid var(--text3); border-radius: 2px;
  margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: transparent;
  transition: all 0.3s;
}
.objective-item.done .objective-check {
  background: var(--green); border-color: var(--green);
  color: var(--bg0);
}

/* Tool tabs */
.tool-tabs {
  display: flex; flex-direction: column; gap: 4px;
  overflow-y: auto;
}
.tool-tab {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-mono); font-size: 13px;
  color: var(--text2);
  transition: all 0.15s;
  background: transparent;
}
.tool-tab:hover { border-color: var(--border); color: var(--text); }
.tool-tab.active {
  border-color: var(--green);
  background: rgba(0,230,118,0.05);
  color: var(--green);
}
.tool-tab-icon { font-size: 14px; width: 18px; text-align: center; }
.tool-tab-badge {
  margin-left: auto;
  background: var(--red);
  color: white; font-size: 9px;
  border-radius: 10px; padding: 1px 5px;
  min-width: 16px; text-align: center;
}

/* Center tool area */
.mission-center {
  display: flex; flex-direction: column;
  overflow: hidden;
  background: var(--bg0);
}

/* Right sidebar - VERA */
.mission-sidebar-right {
  background: var(--bg1);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden;
}

.vera-panel {
  flex: 1; overflow-y: auto;
  padding: 16px;
}
.vera-panel-title {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--green); letter-spacing: 3px;
  margin-bottom: 12px;
}
.vera-messages { display: flex; flex-direction: column; gap: 10px; }
.vera-msg {
  background: var(--bg2);
  border-left: 2px solid var(--green);
  padding: 10px 12px;
  font-family: var(--font-mono); font-size: 13px;
  line-height: 1.6; color: var(--text2);
  animation: slideUp 0.3s ease;
}
.vera-msg-from {
  color: var(--green); font-size: 10px;
  letter-spacing: 2px; margin-bottom: 5px;
}
.vera-msg.hint { border-color: var(--yellow); }
.vera-msg.hint .vera-msg-from { color: var(--yellow); }

/* Notepad */
.notepad-panel {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  height: 170px;
}
.notepad-area {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 8px 10px;
  resize: none;
  outline: none;
  line-height: 1.7;
  transition: border-color 0.2s;
}
.notepad-area:focus {
  border-color: var(--green);
  box-shadow: 0 0 8px var(--green-glow);
}
.notepad-area::placeholder {
  color: var(--text3);
}

/* Progress in right panel */
.mission-progress-panel {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}
.progress-bar-wrap {
  height: 4px; background: var(--bg3);
  border-radius: 2px; overflow: hidden; margin-top: 8px;
}
.progress-bar-fill {
  height: 100%; background: var(--green);
  transition: width 0.5s ease;
}
.progress-label {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text2); display: flex; justify-content: space-between;
}

/* ==========================================
   BRIEF TAB
   ========================================== */
.brief-content {
  padding: 28px 32px;
  overflow-y: auto; flex: 1;
}
.brief-classification {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--red); letter-spacing: 3px;
  border: 1px solid var(--red); display: inline-block;
  padding: 3px 10px; margin-bottom: 20px; opacity: 0.8;
}
.brief-mission-id {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text3); letter-spacing: 2px; margin-bottom: 4px;
}
.brief-title {
  font-size: 36px; font-weight: 700;
  letter-spacing: 4px; text-transform: uppercase;
  margin-bottom: 4px; line-height: 1;
}
.brief-subtitle {
  font-family: var(--font-mono); font-size: 13px;
  color: var(--text2); margin-bottom: 28px;
}
.brief-section { margin-bottom: 24px; }
.brief-section-title {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--green); letter-spacing: 3px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border); padding-bottom: 6px;
}
.brief-section p {
  font-family: var(--font-mono); font-size: 14px;
  color: var(--text2); line-height: 1.8;
  margin-bottom: 8px;
}
.brief-target-box {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--orange);
  padding: 14px 16px;
  font-family: var(--font-mono); font-size: 13px;
}
.brief-target-row {
  display: flex; gap: 16px;
  margin-bottom: 6px;
}
.brief-target-row:last-child { margin-bottom: 0; }
.brief-target-key { color: var(--text3); width: 100px; flex-shrink: 0; }
.brief-target-val { color: var(--text); }
.brief-highlight { color: var(--yellow); }

/* ==========================================
   TERMINAL TOOL
   ========================================== */
.terminal-wrap {
  display: flex; flex-direction: column;
  height: 100%; background: #000;
  position: relative;
}
.terminal-titlebar {
  background: var(--bg2);
  padding: 8px 14px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text3); letter-spacing: 2px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dot-r { background: #ff5f57; }
.terminal-dot-y { background: #febc2e; }
.terminal-dot-g { background: #28c840; }
.terminal-status {
  margin-left: auto;
  font-size: 10px;
}
.terminal-status.connected { color: var(--green); }
.terminal-status.disconnected { color: var(--text3); }

.terminal-output {
  flex: 1; overflow-y: auto;
  padding: 16px;
  font-family: var(--font-mono); font-size: 15px;
  line-height: 1.75;
  color: #33ff66;
  text-shadow: 0 0 8px rgba(50,255,100,0.4);
  cursor: text;
}
.terminal-output::-webkit-scrollbar { width: 4px; }
.terminal-output::-webkit-scrollbar-thumb { background: var(--bg4); }

.t-line { display: block; white-space: pre-wrap; word-break: break-all; }
.t-prompt { color: #33ff66; }
.t-cmd { color: #ffffff; }
.t-out { color: #33ff66; }
.t-out-dim { color: #228844; }
.t-out-info { color: #40c4ff; }
.t-out-warn { color: #ff9100; }
.t-out-err { color: #ff1744; }
.t-out-success { color: #00e676; font-weight: bold; }
.t-out-file { color: #40c4ff; }
.t-out-dir { color: #ffd740; }

.terminal-input-row {
  display: flex; align-items: center;
  padding: 8px 16px;
  border-top: 1px solid #1a2a1a;
  background: #000;
}
.terminal-prompt-text {
  font-family: var(--font-mono); font-size: 15px;
  color: #33ff66; white-space: nowrap;
  text-shadow: 0 0 8px rgba(50,255,100,0.4);
  margin-right: 8px;
}
.terminal-input {
  flex: 1; background: transparent; border: none;
  color: #fff; font-family: var(--font-mono); font-size: 15px;
  outline: none; caret-color: #33ff66;
}

/* ==========================================
   FTP CLIENT
   ========================================== */
.ftp-wrap {
  display: flex; flex-direction: column;
  height: 100%;
}
.ftp-toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--bg1);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 13px;
}
.ftp-server-info { color: var(--green); flex: 1; }
.ftp-server-info.disconnected { color: var(--text3); }
.ftp-connect-form {
  flex: 1; display: flex; align-items: center; gap: 8px;
}
.ftp-connect-form input { flex: 1; }
.ftp-path {
  padding: 6px 14px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 13px;
  color: var(--text3);
}
.ftp-body {
  display: flex; flex: 1; overflow: hidden;
}
.ftp-tree {
  width: 280px; flex-shrink: 0;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 8px 0;
}
.ftp-file-panel {
  flex: 1; display: flex; flex-direction: column;
}
.ftp-file-list { flex: 1; overflow-y: auto; padding: 8px 0; }
.ftp-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  font-family: var(--font-mono); font-size: 14px;
  cursor: pointer; transition: background 0.1s;
  color: var(--text);
}
.ftp-item:hover { background: var(--bg2); }
.ftp-item.selected { background: rgba(0,230,118,0.08); color: var(--green); }
.ftp-item-icon { width: 16px; text-align: center; }
.ftp-item-name { flex: 1; }
.ftp-item-size { color: var(--text3); font-size: 10px; }
.ftp-item-dir { color: var(--yellow); }
.ftp-item-up { color: var(--text3); }

.ftp-connect-panel {
  flex: 1; display: flex; align-items: center; justify-content: center;
}
.ftp-connect-box {
  width: 380px;
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
}
.ftp-connect-box h3 {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--green); letter-spacing: 3px;
  margin-bottom: 20px;
}
.ftp-connect-box .form-row {
  margin-bottom: 14px;
}
.ftp-connect-box .form-label {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text3); letter-spacing: 1px;
  margin-bottom: 6px; display: block;
}
.ftp-action-bar {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; align-items: center;
}
.ftp-selected-name {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text2); flex: 1;
}

/* ==========================================
   EMAIL CLIENT
   ========================================== */
.email-wrap {
  display: flex; height: 100%;
}
.email-list-panel {
  width: 200px; flex-shrink: 0;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.email-list-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 9px;
  color: var(--green); letter-spacing: 3px;
}
.email-list { overflow-y: auto; flex: 1; }
.email-item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background 0.1s;
}
.email-item:hover { background: var(--bg2); }
.email-item.active { background: rgba(0,230,118,0.06); border-left: 2px solid var(--green); }
.email-item.unread .email-item-subject { color: var(--text); font-weight: bold; }
.email-item-from {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text3); margin-bottom: 3px;
}
.email-item-subject {
  font-family: var(--font-mono); font-size: 13px;
  color: var(--text2); margin-bottom: 3px;
}
.email-item-preview {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text3); overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis;
}
.email-item-badge {
  display: inline-block;
  background: var(--red); color: white;
  font-size: 8px; padding: 1px 4px;
  border-radius: 2px; margin-bottom: 3px;
  letter-spacing: 1px;
}

.email-content-panel {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden;
}
.email-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg1);
}
.email-subject-line {
  font-size: 18px; font-weight: 600;
  margin-bottom: 10px;
}
.email-meta {
  font-family: var(--font-mono); font-size: 13px;
  color: var(--text2); line-height: 1.8;
}
.email-meta-key { color: var(--text3); width: 60px; display: inline-block; }
.email-body {
  flex: 1; overflow-y: auto; padding: 24px;
  font-family: var(--font-mono); font-size: 14px;
  color: var(--text2); line-height: 1.9;
  white-space: pre-wrap;
  user-select: text;
  cursor: text;
}
.email-highlight { color: var(--yellow); font-weight: bold; }
.email-empty {
  flex: 1; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px; color: var(--text3);
}

/* ==========================================
   IN-GAME BROWSER
   ========================================== */
.browser-wrap {
  display: flex; flex-direction: column;
  height: 100%; background: #fff;
}
.browser-chrome {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 8px 12px;
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}
.browser-btn {
  width: 28px; height: 28px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text2);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: all 0.15s;
}
.browser-btn:hover { border-color: var(--text2); color: var(--text); }
.browser-url-bar {
  flex: 1; background: var(--bg1);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 6px 12px;
  font-family: var(--font-mono); font-size: 12px; color: var(--text);
  outline: none;
}
.browser-url-bar:focus { border-color: var(--green); }
.browser-secure { color: var(--green); font-size: 12px; }
.browser-content {
  flex: 1; overflow-y: auto;
  background: #f0f4f8;
}
.browser-page { padding: 0; }
.browser-empty {
  display: flex; align-items: center; justify-content: center;
  height: 100%;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--text3);
}
/* Fake website styles (inside browser) */
.fakesite { font-family: 'Rajdhani', sans-serif; }
.fakesite-nav {
  background: #1a1a2e; color: white;
  padding: 14px 28px; display: flex; align-items: center; gap: 24px;
}
.fakesite-logo { font-size: 20px; font-weight: 700; letter-spacing: 2px; }
.fakesite-nav a {
  color: rgba(255,255,255,0.7); text-decoration: none;
  font-size: 13px; letter-spacing: 1px; cursor: pointer;
}
.fakesite-nav a:hover { color: white; }
.fakesite-hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: white; padding: 60px 40px;
  text-align: center;
}
.fakesite-hero h1 { font-size: 40px; font-weight: 700; margin-bottom: 12px; }
.fakesite-hero p { font-size: 16px; opacity: 0.7; max-width: 500px; margin: 0 auto; }
.fakesite-section { padding: 40px; background: white; }
.fakesite-section h2 { font-size: 28px; font-weight: 700; color: #1a1a2e; margin-bottom: 16px; }
.fakesite-section p { color: #555; line-height: 1.7; margin-bottom: 12px; }
.fakesite-section .highlight { color: #c00; font-weight: bold; }
.fakesite-team { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; padding: 40px; background: #f8f9fa; }
.fakesite-person {
  background: white; padding: 20px; border-radius: 6px;
  text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.fakesite-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  margin: 0 auto 12px;
  background: #1a1a2e; display: flex; align-items: center; justify-content: center;
  color: white; font-size: 24px; font-weight: 700;
}
.fakesite-person h3 { font-size: 16px; font-weight: 700; color: #1a1a2e; margin-bottom: 4px; }
.fakesite-person p { font-size: 12px; color: #777; margin: 0; }
.fakesite-person .bio { font-size: 12px; color: #555; margin-top: 8px; line-height: 1.5; text-align: left; }

/* Login form in browser */
.fakesite-login {
  max-width: 380px; margin: 60px auto;
  background: white; padding: 36px;
  border-radius: 8px; box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}
.fakesite-login h2 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.fakesite-login .subtitle { font-size: 13px; color: #777; margin-bottom: 28px; }
.fakesite-login label { display: block; font-size: 12px; font-weight: 600; color: #555; margin-bottom: 5px; }
.fakesite-login input {
  width: 100%; padding: 10px 14px;
  border: 1px solid #ddd; border-radius: 4px;
  font-size: 14px; margin-bottom: 16px;
  font-family: sans-serif;
  outline: none; color: #333; background: white;
}
.fakesite-login input:focus { border-color: #1a1a2e; }
.fakesite-login-btn {
  width: 100%; padding: 12px;
  background: #1a1a2e; color: white;
  border: none; border-radius: 4px;
  font-size: 14px; font-weight: 600;
  cursor: pointer; letter-spacing: 1px;
  transition: background 0.2s;
}
.fakesite-login-btn:hover { background: #16213e; }
.fakesite-login-err {
  color: #c00; font-size: 12px; margin-top: -10px; margin-bottom: 10px;
}
.fakesite-admin {
  padding: 28px; font-family: sans-serif;
}
.fakesite-admin h2 { font-size: 22px; font-weight: 700; color: #1a1a2e; margin-bottom: 20px; }
.fakesite-admin table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 24px; }
.fakesite-admin th { background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; }
.fakesite-admin td { padding: 8px 14px; border-bottom: 1px solid #eee; color: #333; }
.fakesite-admin tr:hover td { background: #f5f5f5; }
.admin-section { background: #f8f9fa; border-radius: 6px; padding: 20px; margin-bottom: 20px; }
.admin-section h3 { font-size: 16px; font-weight: 700; color: #1a1a2e; margin-bottom: 12px; }
.admin-btn {
  padding: 10px 20px; border: none; border-radius: 4px;
  cursor: pointer; font-size: 13px; font-weight: 600;
  letter-spacing: 1px; transition: all 0.2s; margin-right: 10px;
}
.admin-btn-primary { background: #1a1a2e; color: white; }
.admin-btn-primary:hover { background: #0d1020; }
.admin-btn-danger { background: #c00; color: white; }
.admin-btn-danger:hover { background: #900; }

/* ==========================================
   FILE VIEWER
   ========================================== */
.files-wrap {
  display: flex; height: 100%;
}
.files-list-panel {
  width: 240px; flex-shrink: 0;
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
.files-list-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 9px;
  color: var(--green); letter-spacing: 3px;
}
.files-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background 0.1s;
}
.files-item:hover { background: var(--bg2); }
.files-item.active { background: rgba(0,230,118,0.06); border-left: 2px solid var(--green); }
.files-item-name {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text); margin-bottom: 2px;
}
.files-item-type {
  font-family: var(--font-mono); font-size: 9px;
  color: var(--text3); letter-spacing: 1px;
}
.files-content-panel {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
}
.files-content-header {
  padding: 14px 20px;
  background: var(--bg1); border-bottom: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 11px; color: var(--text2);
}
.files-content-body {
  flex: 1; overflow-y: auto; padding: 24px;
  font-family: var(--font-mono); font-size: 14px;
  color: var(--text2); line-height: 1.9;
  white-space: pre-wrap;
}
.files-empty {
  flex: 1; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px; color: var(--text3);
}
.files-doc-title {
  font-size: 18px; font-weight: 700; color: var(--text);
  letter-spacing: 2px; margin-bottom: 8px;
}
.files-doc-meta {
  font-size: 10px; color: var(--text3);
  letter-spacing: 1px; margin-bottom: 20px;
  border-bottom: 1px solid var(--border); padding-bottom: 12px;
}
.files-redacted {
  background: var(--text); color: var(--text);
  border-radius: 2px; cursor: default;
}
.files-highlight { color: var(--yellow); font-weight: bold; }

/* ==========================================
   MISSION COMPLETE
   ========================================== */
#screen-complete {
  flex-direction: column;
  align-items: center; justify-content: center;
  background: var(--bg0);
  gap: 32px;
}

.complete-header {
  text-align: center;
  animation: slideUp 0.5s ease;
}
.complete-tag {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--green); letter-spacing: 4px;
  margin-bottom: 8px;
}
.complete-title {
  font-size: 56px; font-weight: 700;
  letter-spacing: 6px; text-transform: uppercase;
  color: var(--green);
  text-shadow: 0 0 40px rgba(0,230,118,0.5);
}
.complete-mission { font-family: var(--font-mono); font-size: 14px; color: var(--text2); }

.complete-xp-box {
  background: var(--bg1); border: 1px solid var(--border-active);
  border-radius: var(--radius); padding: 28px 40px;
  text-align: center; min-width: 320px;
  animation: slideUp 0.5s ease 0.2s both;
  box-shadow: 0 0 40px var(--green-glow);
}
.complete-xp-label {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text3); letter-spacing: 3px; margin-bottom: 8px;
}
.complete-xp-amount {
  font-size: 52px; font-weight: 700;
  color: var(--yellow);
  animation: xpCount 1s ease 0.5s both;
}
.complete-rank-up {
  margin-top: 14px; font-family: var(--font-mono);
  font-size: 12px; color: var(--purple);
  letter-spacing: 2px;
  animation: blink 0.8s step-end 5;
}
@keyframes xpCount { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } }

.complete-vera {
  width: 480px;
  background: var(--bg1); border: 1px solid var(--border);
  border-left: 3px solid var(--green); padding: 16px 20px;
  font-family: var(--font-mono); font-size: 14px;
  color: var(--text2); line-height: 1.7;
  animation: slideUp 0.5s ease 0.4s both;
}
.complete-vera-from { color: var(--green); font-size: 11px; letter-spacing: 2px; margin-bottom: 6px; }

.complete-buttons {
  display: flex; gap: 16px;
  animation: slideUp 0.5s ease 0.6s both;
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 10px var(--green-glow); }
  50% { box-shadow: 0 0 30px var(--green-glow), 0 0 60px var(--green-glow); }
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.loading-spinner {
  display: inline-block; width: 12px; height: 12px;
  border: 2px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ===== SCROLLBARS ===== */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* ===== MISC ===== */
.tag {
  font-family: var(--font-mono); font-size: 10px;
  padding: 2px 8px; border: 1px solid currentColor;
  border-radius: 2px; letter-spacing: 1px;
}

.divider {
  height: 1px; background: var(--border);
  margin: 16px 0;
}

.text-green { color: var(--green); }
.text-blue { color: var(--blue); }
.text-orange { color: var(--orange); }
.text-red { color: var(--red); }
.text-dim { color: var(--text2); }
.text-mono { font-family: var(--font-mono); }

/* ==========================================
   BADGE: KRITISK (mission 4+)
   ========================================== */
.badge-critical { color: var(--purple) !important; border-color: var(--purple) !important; }

/* ==========================================
   CHAT TOOL (BJÖRK)
   ========================================== */
.chat-wrap {
  display: flex; flex-direction: column;
  height: 100%; background: var(--bg0);
}
.chat-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: var(--bg1);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse-glow 2s ease-in-out infinite;
}
.chat-name {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--green); letter-spacing: 2px;
}
.chat-secure {
  font-family: var(--font-mono); font-size: 9px;
  color: var(--text3); letter-spacing: 1px;
  margin-left: auto;
  border: 1px solid var(--border);
  padding: 2px 7px; border-radius: 2px;
}
.chat-log {
  flex: 1; overflow-y: auto;
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 14px;
}
.chat-msg {
  max-width: 82%;
  animation: slideUp 0.2s ease;
}
.chat-msg-bjork { align-self: flex-start; }
.chat-msg-player { align-self: flex-end; }
.chat-msg-from {
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 2px; margin-bottom: 4px;
}
.chat-msg-bjork .chat-msg-from { color: var(--blue); }
.chat-msg-player .chat-msg-from { color: var(--green); text-align: right; }
.chat-msg-body {
  font-family: var(--font-mono); font-size: 13px;
  line-height: 1.65; padding: 10px 14px;
  border-radius: var(--radius);
}
.chat-msg-bjork .chat-msg-body {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 2px solid var(--blue);
  color: var(--text2);
}
.chat-msg-player .chat-msg-body {
  background: rgba(0,230,118,0.07);
  border: 1px solid var(--border-active);
  color: var(--text);
}
.chat-footer {
  display: flex; gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg1);
  flex-shrink: 0;
}
.chat-input { flex: 1; }
.chat-send {
  background: var(--green); color: var(--bg0);
  border: none; border-radius: var(--radius);
  padding: 8px 18px;
  font-family: var(--font-mono); font-size: 16px; font-weight: bold;
  cursor: pointer; transition: all 0.15s;
}
.chat-send:hover { background: #00c85e; box-shadow: 0 0 14px var(--green-glow); }

/* ==========================================
   CRYPTO DECODER TOOL
   ========================================== */
.crypto-wrap {
  display: flex; flex-direction: column;
  height: 100%; overflow-y: auto;
  padding: 24px 28px; gap: 22px;
  background: var(--bg0);
}
.crypto-header { }
.crypto-title {
  font-size: 20px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  margin-bottom: 4px;
}
.crypto-sub {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--text2);
}
.crypto-section { }
.crypto-label {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--green); letter-spacing: 3px;
  margin-bottom: 8px;
}
.crypto-box {
  font-family: var(--font-mono); font-size: 14px;
  padding: 14px 16px; border-radius: var(--radius);
  line-height: 1.7; word-break: break-all;
}
.crypto-box-enc {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--orange);
  color: var(--orange);
}
.crypto-box-dec {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  color: var(--green);
  min-height: 52px;
  transition: color 0.2s;
}
.crypto-slider-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 10px;
}
.crypto-slider {
  flex: 1;
  accent-color: var(--green);
  cursor: pointer;
  height: 4px;
}
.crypto-step {
  width: 34px; height: 34px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text2); font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; user-select: none;
}
.crypto-step:hover { border-color: var(--green); color: var(--green); }
.crypto-shift-badge {
  font-family: var(--font-mono); font-size: 24px; font-weight: bold;
  color: var(--text); min-width: 38px; text-align: right;
}
.crypto-hint {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--yellow);
  background: rgba(255,215,64,0.05);
  border: 1px solid rgba(255,215,64,0.2);
  border-left: 3px solid var(--yellow);
  padding: 8px 12px; border-radius: var(--radius);
}
.crypto-indicator {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text3); letter-spacing: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  transition: color 0.3s;
}
