/* ═══════════════════════════════════════════════════
   LOCALRANGE — Nmap Lab Environment Styles
   ═══════════════════════════════════════════════════ */

:root {
  --bg-deep: #0a0e14;
  --bg-primary: #0d1117;
  --bg-secondary: #151b23;
  --bg-tertiary: #1c2333;
  --bg-card: #141a24;
  --bg-terminal: #0c0c0c;
  --bg-input: #1a1a2e;

  --green-primary: #00ff41;
  --green-dim: #00cc33;
  --green-dark: #004d1a;
  --green-glow: rgba(0, 255, 65, 0.15);
  --green-glow-strong: rgba(0, 255, 65, 0.3);

  --cyan: #00e5ff;
  --cyan-dim: #00b8d4;
  --red: #ff3e3e;
  --red-dim: #cc3333;
  --orange: #ff9100;
  --yellow: #ffd600;
  --purple: #bb86fc;
  --blue: #4fc3f7;

  --text-primary: #c9d1d9;
  --text-secondary: #8b949e;
  --text-muted: #484f58;
  --text-bright: #e6edf3;

  --border: #21262d;
  --border-bright: #30363d;
  --border-accent: rgba(0, 255, 65, 0.2);

  --font-mono: 'Fira Code', 'Share Tech Mono', 'Courier New', monospace;
  --font-display: 'Orbitron', sans-serif;

  --radius: 6px;
  --radius-lg: 12px;
  --transition: 0.2s ease;
}

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

html { font-size: 14px; }

body {
  font-family: var(--font-mono);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

.hidden { display: none !important; }

/* ─── Scanlines Overlay ─── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ═══════════════════════════════════════════
   BOOT SCREEN
   ═══════════════════════════════════════════ */

#boot-screen {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
}

#boot-screen.fade-out {
  opacity: 0;
}

.boot-content {
  text-align: center;
  max-width: 800px;
  width: 90%;
}

.boot-ascii {
  font-family: var(--font-mono);
  color: var(--green-primary);
  font-size: 0.5rem;
  line-height: 1.2;
  white-space: pre;
  margin-bottom: 2rem;
  text-shadow: 0 0 10px var(--green-glow-strong);
  overflow-x: auto;
}

.boot-lines {
  text-align: left;
  font-size: 0.78rem;
  color: var(--green-dim);
  margin-bottom: 1.5rem;
  min-height: 120px;
}

.boot-line {
  opacity: 0;
  animation: fadeIn 0.15s forwards;
}

.boot-progress {
  width: 100%;
  height: 3px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.boot-bar {
  height: 100%;
  width: 0%;
  background: var(--green-primary);
  box-shadow: 0 0 10px var(--green-primary);
  transition: width 0.1s linear;
}

.boot-status {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* ═══════════════════════════════════════════
   SYSTEM BAR
   ═══════════════════════════════════════════ */

.sys-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1.2rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.sys-left, .sys-right { display: flex; align-items: center; gap: 0.5rem; }

.sys-icon {
  color: var(--green-primary);
  font-size: 1rem;
  text-shadow: 0 0 8px var(--green-glow-strong);
}

.sys-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-bright);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.sys-subtitle { color: var(--text-secondary); }
.sys-sep { color: var(--text-muted); }
.sys-info { color: var(--text-secondary); }
.target-ip { color: var(--red); font-weight: 600; }

.sys-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.sys-indicator.live { color: var(--green-primary); }

.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-primary);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--green-glow-strong); }
  50% { box-shadow: 0 0 0 6px transparent; }
}

/* ═══════════════════════════════════════════
   TAB NAVIGATION
   ═══════════════════════════════════════════ */

.tab-nav {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  padding: 0 1rem;
  position: sticky;
  top: 37px;
  z-index: 99;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  position: relative;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  color: var(--green-primary);
  border-bottom-color: var(--green-primary);
}

.tab-icon { font-size: 0.85rem; }

.tab-key {
  font-size: 0.6rem;
  padding: 0.1rem 0.35rem;
  border: 1px solid var(--border-bright);
  border-radius: 3px;
  color: var(--text-muted);
  background: var(--bg-tertiary);
}

.tab-progress-wrap {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.7rem;
}

.tab-progress-label { color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

.tab-progress-bar {
  width: 120px;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
}

.tab-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--green-primary), var(--cyan));
  transition: width 0.5s ease;
  border-radius: 2px;
}

.tab-progress-pct {
  color: var(--green-primary);
  font-weight: 600;
  min-width: 2.5rem;
  text-align: right;
}

/* ═══════════════════════════════════════════
   TAB CONTENT
   ═══════════════════════════════════════════ */

.tab-content {
  display: none;
  min-height: calc(100vh - 120px);
}

.tab-content.active { display: block; }

/* ═══════════════════════════════════════════
   GUIDE TAB
   ═══════════════════════════════════════════ */

.guide-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.guide-hero {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2.5rem 0;
}

.guide-title {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  color: var(--green-primary);
  text-shadow: 0 0 30px var(--green-glow-strong), 0 0 60px rgba(0, 255, 65, 0.1);
  letter-spacing: 8px;
  position: relative;
  display: inline-block;
}

.guide-version {
  font-size: 0.7rem;
  vertical-align: super;
  color: var(--cyan);
  letter-spacing: 1px;
}

.guide-tagline {
  margin-top: 0.8rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  letter-spacing: 1px;
}

/* Glitch */
.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

.glitch::before {
  animation: glitch1 3s infinite;
  color: var(--cyan);
  z-index: -1;
}

.glitch::after {
  animation: glitch2 3s infinite;
  color: var(--red);
  z-index: -2;
}

@keyframes glitch1 {
  0%, 93%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
  94% { clip-path: inset(20% 0 60% 0); transform: translate(-3px, 1px); }
  96% { clip-path: inset(50% 0 20% 0); transform: translate(3px, -1px); }
}

@keyframes glitch2 {
  0%, 93%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
  95% { clip-path: inset(40% 0 30% 0); transform: translate(3px, 2px); }
  97% { clip-path: inset(10% 0 70% 0); transform: translate(-2px, -1px); }
}

/* Diagram */
.diagram-section { margin-bottom: 2.5rem; }

.section-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 1.2rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.accent {
  color: var(--green-primary);
  margin-right: 0.6rem;
  font-weight: 700;
}

.network-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 2.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.network-diagram::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 15% 50%, rgba(0, 255, 65, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 85% 50%, rgba(255, 62, 62, 0.04) 0%, transparent 50%);
}

.net-node {
  text-align: center;
  padding: 1.5rem 2rem;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  min-width: 180px;
  position: relative;
  z-index: 1;
}

.net-node.attacker { border-color: rgba(0, 255, 65, 0.3); }
.net-node.target { border-color: rgba(255, 62, 62, 0.3); }

.node-icon { font-size: 2rem; margin-bottom: 0.5rem; }

.node-label {
  font-weight: 600;
  color: var(--text-bright);
  font-size: 0.9rem;
}

.node-ip {
  font-size: 0.85rem;
  margin-top: 0.3rem;
}

.net-node.attacker .node-ip { color: var(--green-primary); }
.net-node.target .node-ip { color: var(--red); }

.node-role {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 3px;
  margin-top: 0.5rem;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  display: inline-block;
}

.net-node.attacker .node-role { color: var(--green-primary); background: rgba(0, 255, 65, 0.1); }
.net-node.target .node-role { color: var(--red); background: rgba(255, 62, 62, 0.1); }

.net-link {
  flex: 1;
  max-width: 250px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.link-line {
  height: 2px;
  background: var(--border-bright);
  position: relative;
  margin: 0 1rem;
}

.packet {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-primary);
  top: -3px;
  box-shadow: 0 0 6px var(--green-primary);
  animation: movePacket 2s linear infinite;
}

.packet.p2 { animation-delay: 0.7s; background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.packet.p3 { animation-delay: 1.4s; }

@keyframes movePacket {
  0% { left: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

.link-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
}

/* Guide Cards */
.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
}

.guide-card.full-width { margin-bottom: 2rem; }

.guide-card p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.2rem;
  font-size: 0.85rem;
}

.feature-list { display: flex; flex-direction: column; gap: 0.7rem; }

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.f-icon { color: var(--green-primary); flex-shrink: 0; margin-top: 2px; }
.feature-item strong { color: var(--text-bright); }

.use-cases { display: flex; flex-direction: column; gap: 0.8rem; }

.use-case {
  padding: 0.8rem;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border-left: 3px solid var(--border-bright);
}

.uc-header {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-bright);
  margin-bottom: 0.3rem;
}

.uc-desc { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5; }

/* Cmd Reference */
.cmd-ref-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

.cmd-ref {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0.8rem;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.cmd-ref code {
  color: var(--green-primary);
  font-size: 0.78rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.cmd-ref span {
  color: var(--text-muted);
  font-size: 0.72rem;
}

/* Start Button */
.guide-start { text-align: center; margin-top: 2rem; }

.btn-start {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.9rem 2.5rem;
  background: transparent;
  border: 2px solid var(--green-primary);
  color: var(--green-primary);
  border-radius: var(--radius);
  cursor: pointer;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-start:hover {
  background: var(--green-primary);
  color: var(--bg-deep);
  box-shadow: 0 0 25px var(--green-glow-strong);
}

/* ═══════════════════════════════════════════
   TERMINAL TAB
   ═══════════════════════════════════════════ */

.terminal-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  height: calc(100vh - 120px);
  overflow: hidden;
}

/* Sidebar */
.term-sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 0.8rem;
}

.sidebar-section {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-section:last-child { border-bottom: none; }

.sb-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.sb-info { display: flex; flex-direction: column; gap: 0.3rem; }

.sb-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
}

.sb-k { color: var(--text-muted); }
.sb-v { color: var(--text-secondary); }
.target-highlight { color: var(--red) !important; font-weight: 600; }
.sb-online { color: var(--green-primary) !important; }

.sb-ports {
  max-height: 150px;
  overflow-y: auto;
  font-size: 0.72rem;
}

.sb-empty { color: var(--text-muted); font-size: 0.7rem; font-style: italic; }

.port-item {
  display: flex;
  justify-content: space-between;
  padding: 0.15rem 0;
  color: var(--text-secondary);
  animation: fadeIn 0.3s ease;
}

.port-num { color: var(--cyan); font-weight: 600; }
.port-svc { color: var(--text-muted); }

.sb-hints { display: flex; flex-direction: column; gap: 0.3rem; }

.hint-btn {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.35rem 0.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--green-dim);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
}

.hint-btn:hover {
  border-color: var(--green-primary);
  background: rgba(0, 255, 65, 0.05);
}

/* Terminal Main */
.terminal-main {
  display: flex;
  flex-direction: column;
  background: var(--bg-terminal);
  overflow: hidden;
}

.term-titlebar {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.8rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  min-height: 32px;
}

.term-dots { display: flex; gap: 0.4rem; }

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.term-title {
  flex: 1;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.term-action {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 0.3rem;
}

.term-action:hover { color: var(--text-primary); }

/* Terminal Body */
.terminal-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.8rem;
  font-size: 0.82rem;
  line-height: 1.5;
  cursor: text;
}

.terminal-body::-webkit-scrollbar { width: 6px; }
.terminal-body::-webkit-scrollbar-track { background: transparent; }
.terminal-body::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 3px; }

#terminalOutput .line { white-space: pre-wrap; word-break: break-all; }
#terminalOutput .line-prompt { color: var(--green-primary); }
#terminalOutput .line-cmd { color: var(--text-bright); }
#terminalOutput .line-output { color: var(--text-secondary); }
#terminalOutput .line-error { color: var(--red); }
#terminalOutput .line-info { color: var(--cyan); }
#terminalOutput .line-warn { color: var(--orange); }
#terminalOutput .line-success { color: var(--green-primary); }
#terminalOutput .line-header { color: var(--green-primary); font-weight: 600; }
#terminalOutput .line-separator { color: var(--text-muted); }

/* Scan analysis box */
.scan-analysis {
  margin: 0.5rem 0;
  padding: 0.8rem;
  background: rgba(0, 229, 255, 0.04);
  border-left: 3px solid var(--cyan);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.scan-analysis .sa-title {
  color: var(--cyan);
  font-weight: 700;
  font-size: 0.78rem;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.scan-analysis .sa-item {
  font-size: 0.76rem;
  color: var(--text-secondary);
  padding: 0.15rem 0;
}

.sa-item .risk-high { color: var(--red); font-weight: 600; }
.sa-item .risk-med { color: var(--orange); font-weight: 600; }
.sa-item .risk-low { color: var(--yellow); font-weight: 600; }
.sa-item .risk-info { color: var(--blue); font-weight: 600; }

/* Input line */
.input-line {
  position: relative;
}

.prompt-top {
  color: var(--green-primary);
  font-size: 0.82rem;
  line-height: 1.5;
}

.prompt-bottom-row {
  display: flex;
  align-items: center;
}

.prompt {
  color: var(--green-primary);
  white-space: pre;
  flex-shrink: 0;
  font-size: 0.82rem;
  line-height: 1.5;
}

.input-wrap {
  flex: 1;
  position: relative;
}

#termInput {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-bright);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  outline: none;
  caret-color: var(--green-primary);
  line-height: 1.5;
}

/* Autocomplete */
.autocomplete-box {
  position: absolute;
  bottom: 100%;
  left: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  max-height: 180px;
  overflow-y: auto;
  z-index: 50;
  min-width: 300px;
  margin-bottom: 4px;
}

.ac-item {
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.ac-item:hover, .ac-item.selected {
  background: rgba(0, 255, 65, 0.1);
}

.ac-cmd { color: var(--green-primary); }
.ac-desc { color: var(--text-muted); font-size: 0.68rem; }

/* ═══════════════════════════════════════════
   MISSIONS TAB
   ═══════════════════════════════════════════ */

.missions-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.missions-header { text-align: center; margin-bottom: 2.5rem; }

.missions-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.missions-subtitle {
  color: var(--text-secondary);
  font-size: 0.82rem;
  margin-top: 0.5rem;
}

.missions-progress {
  font-size: 0.8rem;
  color: var(--green-primary);
  margin-top: 0.8rem;
  font-weight: 600;
}

.missions-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mission-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.mission-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--text-muted);
  transition: background 0.3s ease;
}

.mission-card.completed::before { background: var(--green-primary); }
.mission-card.active::before { background: var(--cyan); }

.mission-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.mission-num {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.mission-card:not(.completed) .mission-num { color: var(--cyan); }
.mission-card.completed .mission-num { color: var(--green-primary); }

.mission-status {
  font-size: 0.68rem;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.mission-card:not(.completed) .mission-status {
  color: var(--orange);
  background: rgba(255, 145, 0, 0.1);
}

.mission-card.completed .mission-status {
  color: var(--green-primary);
  background: rgba(0, 255, 65, 0.1);
}

.mission-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
}

.mission-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.8rem;
}

.mission-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  padding: 0.3rem 0.7rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.mission-hint:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.mission-hint-text {
  display: none;
  color: var(--cyan);
  margin-left: 0.3rem;
}

.mission-hint.revealed .mission-hint-text { display: inline; }

.mission-goto {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.3rem 0.7rem;
  background: rgba(0, 255, 65, 0.08);
  border: 1px solid rgba(0, 255, 65, 0.2);
  border-radius: var(--radius);
  color: var(--green-primary);
  cursor: pointer;
  margin-left: 0.5rem;
  transition: all var(--transition);
}

.mission-goto:hover {
  background: rgba(0, 255, 65, 0.15);
}

/* ═══════════════════════════════════════════
   QUIZ TAB
   ═══════════════════════════════════════════ */

.quiz-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.quiz-header { text-align: center; margin-bottom: 2.5rem; }

.quiz-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.quiz-subtitle {
  color: var(--text-secondary);
  font-size: 0.82rem;
  margin-top: 0.5rem;
}

.quiz-question {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: border-color 0.3s ease;
}

.quiz-question.correct { border-color: var(--green-primary); }
.quiz-question.incorrect { border-color: var(--red); }

.qq-num {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.qq-text {
  font-size: 0.9rem;
  color: var(--text-bright);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.qq-scenario {
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding: 0.6rem 0.8rem;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  border-left: 2px solid var(--cyan);
  line-height: 1.5;
}

.qq-options { display: flex; flex-direction: column; gap: 0.4rem; }

.qq-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.8rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.qq-option:hover:not(.disabled) {
  border-color: var(--green-primary);
  color: var(--text-primary);
}

.qq-option.selected {
  border-color: var(--cyan);
  background: rgba(0, 229, 255, 0.05);
  color: var(--text-bright);
}

.qq-option.correct-answer {
  border-color: var(--green-primary) !important;
  background: rgba(0, 255, 65, 0.08) !important;
  color: var(--green-primary) !important;
}

.qq-option.wrong-answer {
  border-color: var(--red) !important;
  background: rgba(255, 62, 62, 0.08) !important;
  color: var(--red) !important;
}

.qq-option.disabled { cursor: not-allowed; opacity: 0.6; }

.qq-marker {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-bright);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
}

.qq-option.selected .qq-marker { border-color: var(--cyan); }
.qq-option.correct-answer .qq-marker { border-color: var(--green-primary); background: var(--green-primary); color: var(--bg-deep); }
.qq-option.wrong-answer .qq-marker { border-color: var(--red); background: var(--red); color: var(--bg-deep); }

.qq-explanation {
  margin-top: 0.8rem;
  padding: 0.6rem 0.8rem;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: none;
}

.quiz-question.answered .qq-explanation { display: block; }

.quiz-submit {
  text-align: center;
  margin-top: 1.5rem;
}

.btn-submit, .btn-retry {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.8rem 2rem;
  background: transparent;
  border: 2px solid var(--green-primary);
  color: var(--green-primary);
  border-radius: var(--radius);
  cursor: pointer;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.btn-submit:hover, .btn-retry:hover {
  background: var(--green-primary);
  color: var(--bg-deep);
  box-shadow: 0 0 20px var(--green-glow-strong);
}

/* Quiz Results */
.result-card {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.result-score {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  color: var(--green-primary);
  text-shadow: 0 0 30px var(--green-glow-strong);
}

.result-pct {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
}

.result-rank {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-top: 1rem;
  padding: 0.4rem 1.2rem;
  border-radius: var(--radius);
  display: inline-block;
}

.result-rank.beginner { color: var(--orange); background: rgba(255, 145, 0, 0.1); }
.result-rank.intermediate { color: var(--cyan); background: rgba(0, 229, 255, 0.1); }
.result-rank.advanced { color: var(--green-primary); background: rgba(0, 255, 65, 0.1); }

.result-feedback {
  margin-top: 1rem;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.5;
}

.btn-retry { margin-top: 1.5rem; }

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */

.lab-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.2rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  font-size: 0.7rem;
}

.footer-left, .footer-right { display: flex; align-items: center; gap: 0.5rem; }
.footer-text { color: var(--text-muted); }
.footer-text a { color: var(--green-primary); text-decoration: none; }
.footer-text a:hover { text-decoration: underline; }
.footer-sep { color: var(--text-muted); }

.footer-badge {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--orange);
  color: var(--orange);
  border-radius: 3px;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

@media (max-width: 900px) {
  .guide-grid { grid-template-columns: 1fr; }
  .cmd-ref-grid { grid-template-columns: 1fr; }
  .terminal-layout { grid-template-columns: 1fr; }
  .term-sidebar { display: none; }
  .network-diagram { flex-direction: column; gap: 1rem; }
  .net-link { max-width: 100%; }
  .link-line { width: 2px; height: 40px; margin: 0 auto; }
  .packet { animation: movePacketV 2s linear infinite; left: -3px !important; }
  .sys-center { display: none; }
  .boot-ascii { font-size: 0.28rem; }
}

@keyframes movePacketV {
  0% { top: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

@media (max-width: 600px) {
  .sys-bar { font-size: 0.65rem; padding: 0.4rem 0.6rem; }
  .tab-btn { padding: 0.5rem 0.6rem; font-size: 0.7rem; }
  .tab-label { display: none; }
  .tab-key { display: none; }
  .tab-progress-wrap { display: none; }
  .guide-title { font-size: 1.8rem; letter-spacing: 4px; }
}

/* ─── Typing cursor blink ─── */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.typing-cursor {
  display: inline-block;
  width: 7px;
  height: 1em;
  background: var(--green-primary);
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 1px;
}

/* ═══════════════════════════════════════════
   CTA — Call To Action (Security365 courses)
   ═══════════════════════════════════════════ */
.cta-banner {
  position: relative;
  overflow: hidden;
  margin-top: 2.5rem;
  padding: 2.2rem 2rem;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 30px rgba(0, 255, 65, 0.06) inset;
}
.cta-banner--success { border-color: rgba(0, 255, 65, 0.4); }

.cta-glow {
  position: absolute;
  top: -60%;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 160%;
  background: radial-gradient(ellipse at center, var(--green-glow) 0%, transparent 60%);
  pointer-events: none;
}

.cta-tag {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 3px;
  color: var(--green-primary);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.cta-heading {
  position: relative;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.8rem;
  line-height: 1.3;
}

.cta-text {
  position: relative;
  max-width: 680px;
  margin: 0 auto 1.4rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
}
.cta-text strong { color: var(--cyan); font-weight: 600; }

.cta-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 2.2rem;
  color: var(--bg-deep);
  background: var(--green-primary);
  border: 2px solid var(--green-primary);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 0 18px var(--green-glow-strong);
}
.cta-btn:hover {
  background: transparent;
  color: var(--green-primary);
  box-shadow: 0 0 28px var(--green-glow-strong);
  transform: translateY(-2px);
}
.cta-arrow { transition: transform 0.25s ease; }
.cta-btn:hover .cta-arrow { transform: translateX(4px); }

.cta-sub {
  position: relative;
  margin-top: 1rem;
  font-size: 0.72rem;
  letter-spacing: 1px;
  color: var(--text-muted);
}

/* Compact CTA inside quiz results */
.cta-mini {
  margin-top: 1.8rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.cta-mini-text {
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.5;
  margin-bottom: 0.9rem;
}
.cta-mini-btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--green-primary);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  padding: 0.55rem 1.4rem;
  transition: all 0.2s ease;
}
.cta-mini-btn:hover {
  background: var(--green-glow);
  border-color: var(--green-primary);
  box-shadow: 0 0 16px var(--green-glow);
}
