/* Starnet — Cyberpunk Vector Phosphene Aesthetic */

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

:root {
  --bg:         #0a0a0f;
  --bg-panel:   #0d0d14;
  --bg-panel2:  #111120;
  --cyan:       #00ffff;
  --cyan-dim:   #004444;
  --green:      #00ff41;
  --green-dim:  #003311;
  --magenta:    #ff00ff;
  --yellow:     #ffff00;
  --red:        #ff2020;
  --grey:       #334;
  --text:       #00ff41;
  --text-dim:   #336633;
  --border:     #0a3a3a;
  --font-mono:  "Courier New", "Lucida Console", monospace;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 17px;
}

/* ── Layout ────────────────────────────────────────────── */

#app {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
}

#hud {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

#main {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
}

#graph-column {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

#graph-container {
  flex: 1 1 auto;
  position: relative;
  overflow: hidden;
  min-height: 0;
  /* Scanline overlay */
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(0, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

#log-pane {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  overflow: hidden;
}

#log-header {
  padding: 0.3rem 1rem 0.1rem;
}

#log-entries {
  flex: 0 0 14rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  overflow-y: auto;
  padding: 0.3rem 1rem 0.3rem 1rem;
}

#console-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 1rem;
  border-top: 1px solid var(--border);
}

.console-prompt {
  color: var(--cyan);
  font-size: 0.8rem;
  white-space: nowrap;
  text-shadow: 0 0 6px var(--cyan);
}

#console-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--cyan);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  caret-color: var(--cyan);
}

#console-input::placeholder {
  color: var(--cyan-dim);
}

#graph-container::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0, 0, 0, 0.18) 3px,
    rgba(0, 0, 0, 0.18) 4px
  );
  pointer-events: none;
  z-index: 5;
}

#cy {
  width: 100%;
  height: 100%;
}

#cy canvas {
  cursor: pointer;
}

#sidebar {
  flex: 0 0 400px;
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border-left: 1px solid var(--border);
  overflow: hidden;
}

#sidebar-mission {
  flex: 0 0 auto;
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 1rem;
  background: #0a0a12;
}

.mission-label {
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  margin-bottom: 0.2rem;
}

.mission-target {
  font-size: 0.78rem;
  color: var(--yellow);
  letter-spacing: 0.05em;
  margin-bottom: 0.15rem;
}

.mission-status-active   { font-size: 0.7rem; color: var(--yellow); }
.mission-status-complete { font-size: 0.7rem; color: var(--green); text-shadow: 0 0 4px var(--green); }
.mission-status-failed   { font-size: 0.7rem; color: var(--red); }

#sidebar-node {
  flex: 1 1 50%;
  overflow-y: auto;
  min-height: 0;
}

#hand-strip {
  flex: 0 0 50%;
  overflow-y: auto;
  border-top: 1px solid var(--border);
  background: var(--bg-panel);
  padding: 0.4rem 0.75rem;
}

/* ── HUD ────────────────────────────────────────────────── */

#hud .hud-title {
  font-size: 1rem;
  font-weight: bold;
  color: var(--cyan);
  letter-spacing: 0.15em;
  text-shadow: 0 0 8px var(--cyan);
  margin-right: auto;
}

#hud .hud-label {
  color: var(--text-dim);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

#hud .hud-value {
  color: var(--green);
  font-size: 0.9rem;
  text-shadow: 0 0 6px var(--green);
}

#hud .hud-alert {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

#hud .alert-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

#hud .alert-dot.yellow {
  background: var(--yellow);
  box-shadow: 0 0 6px var(--yellow);
  animation: pulse 1s ease-in-out infinite;
  will-change: opacity;
}

#hud .alert-dot.red {
  background: var(--red);
  box-shadow: 0 0 10px var(--red);
  animation: pulse 0.5s ease-in-out infinite;
  will-change: opacity;
}

#hud .alert-dot.trace {
  background: var(--red);
  box-shadow: 0 0 14px var(--red);
  animation: pulse 0.3s ease-in-out infinite;
  will-change: opacity;
}

/* LAN connection status indicator */
#hud-connection {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

#hud .hud-conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
}

#hud .hud-conn-dot.active {
  background: var(--magenta);
  box-shadow: 0 0 6px var(--magenta);
}

#hud .hud-conn-dot.detecting {
  background: var(--yellow);
  box-shadow: 0 0 8px var(--yellow);
  animation: pulse 0.6s ease-in-out infinite;
  will-change: opacity;
}

#hud #conn-status {
  color: var(--text-dim);
  font-size: 0.75rem;
}

#hud #conn-status.active {
  color: var(--magenta);
}

#hud #conn-status.detecting {
  color: var(--yellow);
  animation: pulse-text 0.6s ease-in-out infinite;
  will-change: opacity;
}

@keyframes pulse-text {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

#new-run-btn, #pause-btn, #save-btn, #load-btn {
  background: transparent;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  white-space: nowrap;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  text-shadow: 0 0 6px var(--cyan);
  box-shadow: 0 0 6px rgba(0, 255, 255, 0.3);
  transition: background 0.15s, box-shadow 0.15s;
}

#new-run-btn:hover, #pause-btn:hover, #save-btn:hover, #load-btn:hover {
  background: rgba(0, 255, 255, 0.1);
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.5);
}

#pause-btn.active {
  background: rgba(0, 255, 255, 0.15);
  box-shadow: 0 0 14px rgba(0, 255, 255, 0.7);
}

#jack-out-btn {
  background: transparent;
  border: 1px solid var(--red);
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  white-space: nowrap;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  text-shadow: 0 0 6px var(--red);
  box-shadow: 0 0 6px rgba(255, 32, 32, 0.3);
  transition: background 0.15s, box-shadow 0.15s;
}

#jack-out-btn:hover {
  background: rgba(255, 32, 32, 0.15);
  box-shadow: 0 0 12px rgba(255, 32, 32, 0.6);
}

#jack-out-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ── Sidebar ────────────────────────────────────────────── */

.sidebar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-dim);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-align: center;
  padding: 2rem;
  line-height: 2;
}

/* ── Node Detail Panel ──────────────────────────────────── */

.node-detail {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nd-header {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.5rem;
  position: relative;
}

.untarget-btn {
  position: absolute;
  top: 0;
  right: 0;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.3rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.untarget-btn:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

.nd-type {
  font-size: 0.7rem;
  color: var(--cyan);
  letter-spacing: 0.15em;
}

.nd-label {
  font-size: 1rem;
  color: var(--green);
  text-shadow: 0 0 6px var(--green);
  letter-spacing: 0.1em;
}

.nd-row {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  font-size: 0.8rem;
}

.nd-key {
  color: var(--text-dim);
  letter-spacing: 0.1em;
  min-width: 4.5rem;
}

.nd-val {
  color: var(--green);
}

.nd-divider {
  color: var(--border);
  margin: 0.25rem 0;
  font-size: 0.8rem;
}

.ice-timers {
  margin-bottom: 0.4rem;
}

.ice-timer {
  font-size: 0.75rem;
  font-weight: bold;
  letter-spacing: 0.05em;
  padding: 0.2rem 0;
}

.ice-timer-detect {
  color: #ff2020;
  text-shadow: 0 0 6px #ff2020;
}

.ice-timer-reboot {
  color: #888800;
}

.ice-timer-executing {
  color: var(--cyan);
  text-shadow: 0 0 6px var(--cyan-dim);
}

.ice-timer-scanning {
  color: var(--cyan);
  text-shadow: 0 0 6px var(--cyan-dim);
}

.nd-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.nd-dim {
  color: var(--text-dim);
  font-size: 0.75rem;
}

/* Grade color coding */
.grade-S, .grade-A { color: var(--red); text-shadow: 0 0 6px var(--red); }
.grade-B           { color: var(--yellow); }
.grade-C           { color: var(--cyan); }
.grade-D, .grade-F { color: var(--text-dim); }

/* ── Node Context Menu ───────────────────────────────────── */

#node-context-menu {
  min-width: 180px;
  background: var(--bg-panel);
  border: 1px solid var(--magenta);
  display: flex;
  flex-direction: column;
  transition: opacity 0.12s ease;
}

.ctx-item {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.6rem;
  text-align: inherit;
  cursor: pointer;
  width: 100%;
  transition: background 0.1s, color 0.1s;
}

.ctx-item:last-child { border-bottom: none; }

.ctx-item:hover {
  background: rgba(204, 0, 204, 0.1);
  color: var(--magenta);
}

.ctx-item-desc {
  display: block;
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-top: 0.1rem;
  letter-spacing: 0.05em;
}


/* ── Action Buttons ─────────────────────────────────────── */

.action-btn {
  display: block;
  width: 100%;
  background: transparent;
  border: 1px solid var(--green-dim);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.5rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s;
}

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

.action-btn.stub {
  color: var(--text-dim);
  border-color: #222;
  cursor: default;
}

.action-desc {
  display: block;
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-top: 0.1rem;
  letter-spacing: 0.05em;
}

/* ── Vulnerability List ──────────────────────────────────── */

.nd-vulns {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}

.nd-vuln {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.72rem;
  gap: 0.5rem;
}

.nd-vuln.patched .vuln-name { text-decoration: line-through; color: var(--text-dim); }

.vuln-name  { color: var(--green); }
.vuln-rarity { font-size: 0.65rem; }

.nd-indent { padding: 0.25rem 0; font-size: 0.75rem; }

/* ── Exploit Cards ──────────────────────────────────────── */

.nd-section-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  margin-top: 0.25rem;
}

.nd-hand {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.exploit-card {
  border: 1px solid var(--grey);
  padding: 0.4rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.72rem;
  background: var(--bg-panel2);
  width: auto;
  height: 160px;
  position: relative;
  overflow: hidden;
}

/* Rarity expressed via border + subtle glow; no text label */
.exploit-card.rarity-uncommon {
  border-color: #009999;
  box-shadow: inset 0 0 10px rgba(0, 200, 255, 0.1);
}
.exploit-card.rarity-rare {
  border-color: #bb0077;
  box-shadow: inset 0 0 10px rgba(255, 0, 200, 0.12);
}
.exploit-card.disclosed { opacity: 0.35; }

.ec-header {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.ec-index {
  color: var(--text-dim);
  font-size: 0.7rem;
  flex-shrink: 0;
}

.ec-name {
  color: var(--green);
  /* allow wrapping — card is now tall enough for 2 lines */
  overflow-wrap: break-word;
  min-width: 0;
}

.ec-row {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}

.ec-key  { color: var(--text-dim); min-width: 3rem; }
.ec-pips { color: var(--green); letter-spacing: 0.05em; }
.ec-val  { color: var(--green); }

.ec-vulns {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin-top: 0.6rem;
  overflow: hidden;
}

.ec-vuln {
  color: var(--text-dim);
  font-size: 0.65rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exploit-card.selectable-card {
  cursor: pointer;
  transition: border-color 0.1s, background 0.1s;
}

.exploit-card.selectable-card:hover {
  background: #0d1a0d;
}

.exploit-card.match {
  opacity: 1;
}

.exploit-card.no-match {
  opacity: 0.35;
}


/* While an exploit is executing, dim the whole hand… */
.nd-hand.exploit-hand-executing .exploit-card {
  opacity: 0.35;
  pointer-events: none;
}

/* …except the card that's actively executing */
.nd-hand.exploit-hand-executing .exploit-card.executing {
  opacity: 1;
  border-color: var(--cyan);
  box-shadow: 0 0 6px rgba(0, 200, 255, 0.4);
  position: relative;
  overflow: hidden;
}

/* Progress fill — sweeps bottom-to-top over the exploit duration */
.exploit-card.executing::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 200, 255, 0.1);
  transform-origin: bottom center;
  transform: scaleY(0);
  animation: exec-fill-sweep var(--exec-total) linear forwards;
  animation-delay: var(--exec-elapsed);
  pointer-events: none;
}

@keyframes exec-fill-sweep {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

.ec-executing-label {
  color: var(--cyan);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  margin-top: auto; /* push to card bottom */
  text-shadow: 0 0 6px var(--cyan-dim);
  position: relative; /* keep above the ::before fill */
  visibility: hidden;
  white-space: nowrap; /* prevents text wrapping which would shift card content */
  overflow: hidden;
}

.exploit-card.executing .ec-executing-label {
  visibility: visible;
}

/* Cancel overlay — semi-transparent circle with ✕, centered on executing card */
.ec-cancel-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  z-index: 2;
}

.ec-cancel-x {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: rgba(10, 10, 15, 0.65);
  border: 1px solid rgba(204, 0, 204, 0.4);
  color: var(--magenta);
  font-size: 1.2rem;
  line-height: 1;
  opacity: 0.55;
  transition: opacity 0.15s, box-shadow 0.15s;
}

.ec-cancel-overlay:hover .ec-cancel-x {
  opacity: 1;
  box-shadow: 0 0 8px rgba(204, 0, 204, 0.5);
}

/* ── Action Log ─────────────────────────────────────────── */

.nd-log {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.7rem;
}

#console-input, .log-entry { font-size: 15px; }

.log-entry           { color: #4daa55; }
.log-entry.log-success { color: #7fff7f; font-weight: bold; text-shadow: 0 0 4px rgba(0, 255, 65, 0.5); }
.log-entry.log-failure { color: var(--red); font-weight: bold; text-shadow: 0 0 4px rgba(255, 32, 32, 0.5); }
.log-entry.log-meta    { color: #517a57; }
.log-entry.log-command { color: var(--cyan); }
.log-entry.log-error   { color: var(--red); }

/* ── Macguffins ─────────────────────────────────────────── */

.nd-macguffins {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.macguffin {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.75rem;
  gap: 0.5rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid #1a1a2e;
}

.macguffin.collected { opacity: 0.4; }

.mg-name  { color: var(--green); flex: 1; }
.mg-value { color: var(--cyan); white-space: nowrap; }
.mg-collected { color: var(--text-dim); }

.macguffin.mission-target .mg-name {
  color: var(--yellow);
  text-shadow: 0 0 4px rgba(255, 255, 0, 0.4);
}

.mg-mission-tag {
  font-size: 0.62rem;
  color: var(--yellow);
  letter-spacing: 0.1em;
  white-space: nowrap;
}

/* ── Trace Countdown ────────────────────────────────────── */

.trace-countdown {
  color: var(--red) !important;
  text-shadow: 0 0 8px var(--red);
  animation: pulse 0.5s ease-in-out infinite;
  will-change: opacity;
  letter-spacing: 0.1em;
}

/* ── End Screen ─────────────────────────────────────────── */

#end-screen {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.end-box {
  background: var(--bg-panel);
  border: 1px solid var(--cyan);
  box-shadow: 0 0 24px rgba(0, 255, 255, 0.2);
  padding: 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 320px;
}

.end-title {
  font-size: 1.1rem;
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan);
  letter-spacing: 0.2em;
  text-align: center;
}

.end-divider {
  color: var(--border);
  font-size: 0.8rem;
  text-align: center;
}

.end-row {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  font-size: 0.82rem;
}

.end-key { color: var(--text-dim); letter-spacing: 0.08em; }
.end-val { color: var(--green); text-shadow: 0 0 4px var(--green); }
.end-val.end-zero { color: var(--red); text-shadow: 0 0 4px var(--red); }
.end-val.end-mission-complete { color: var(--yellow); text-shadow: 0 0 6px rgba(255, 255, 0, 0.5); }

.end-btn {
  background: transparent;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  padding: 0.5rem 1rem;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.15s;
}

.end-btn:hover {
  background: rgba(0, 255, 255, 0.1);
}

/* ── Cheat mode ─────────────────────────────────────────── */

.hud-cheat-label {
  color: var(--magenta);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-shadow: 0 0 8px var(--magenta);
  animation: pulse 1.5s ease-in-out infinite;
  will-change: opacity;
}

/* ── Animations ─────────────────────────────────────────── */

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* Selection reticle — animated SVG ring overlay */
#selection-reticle {
  transition: opacity 0.2s ease;
}

#reticle-group {
  animation: reticle-spin 12s linear infinite;
  transform-box: fill-box;
  transform-origin: 50% 50%;
  will-change: transform;
}

@keyframes reticle-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Darknet store modal ──────────────────────────────────── */

#darknet-store {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.store-box {
  background: var(--bg);
  border: 1px solid var(--cyan);
  box-shadow: 0 0 16px rgba(0, 200, 255, 0.15);
  width: min(92%, 380px);
  max-height: calc(100% - 2rem);
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
}

.store-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--cyan-dim);
  flex-shrink: 0;
}

.store-title {
  color: var(--cyan);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
}

.store-wallet {
  color: var(--green);
  font-size: 0.7rem;
}

.store-card-list {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.store-card-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.store-card-row:last-child {
  border-bottom: none;
}

.store-item-name {
  flex: 1;
  color: var(--fg);
  font-size: 0.65rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.store-item-rarity {
  font-size: 0.6rem;
}

.store-item-vuln {
  color: var(--cyan-dim);
  font-size: 0.6rem;
}

.store-item-price {
  color: var(--yellow);
  font-size: 0.65rem;
  flex-shrink: 0;
}

.store-buy-btn {
  background: none;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.35rem;
  cursor: pointer;
  flex-shrink: 0;
}

.store-buy-btn:hover:not([disabled]) {
  background: rgba(0, 255, 255, 0.08);
}

.store-buy-btn[disabled] {
  border-color: var(--cyan-dim);
  color: var(--cyan-dim);
  cursor: not-allowed;
}

.store-footer {
  padding: 0.4rem 0.75rem;
  border-top: 1px solid var(--cyan-dim);
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}

.store-close-btn {
  background: none;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  padding: 0.25rem 1rem;
  cursor: pointer;
}

.store-close-btn:hover {
  background: rgba(0, 255, 255, 0.08);
}

/* ── Level select modal ───────────────────────────────────── */

#level-select {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.level-select-box {
  background: var(--bg);
  border: 1px solid var(--cyan);
  box-shadow: 0 0 24px rgba(0, 200, 255, 0.15);
  width: min(92%, 420px);
  font-family: var(--font-mono);
  display: flex;
  flex-direction: column;
}

.level-select-header {
  color: var(--cyan);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--cyan-dim);
}

.level-select-form {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.level-select-label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  color: var(--green);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
}

.level-select-hint {
  color: var(--cyan-dim);
  font-size: 0.55rem;
  letter-spacing: 0.05em;
}

.level-select-input,
.level-select-select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--cyan-dim);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.3rem 0.4rem;
}

.level-select-input:focus,
.level-select-select:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 6px rgba(0, 200, 255, 0.2);
}

.level-select-select option {
  background: var(--bg);
  color: var(--green);
}

.level-select-actions {
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--cyan-dim);
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.level-select-btn {
  background: none;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.75rem;
  cursor: pointer;
  white-space: nowrap;
}

.level-select-btn:hover {
  background: rgba(0, 255, 255, 0.08);
}

.level-select-go {
  border-color: var(--green);
  color: var(--green);
}

.level-select-go:hover {
  background: rgba(0, 255, 0, 0.08);
}

/* Exploit zap laser lines — instant attack, slow decay */
.exploit-zap {
  transition: stroke-opacity 180ms ease-out;
}
