/* ════════════════════════════════════════════════
   SECRET MESSENGER v2.1 — CYBERPUNK CRYPTOGRAPHIC
   ════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');

/* ── Variables ── */
:root {
  --bg:            #050505;
  --bg-panel:      #09090f;
  --bg-glass:      rgba(9, 9, 20, 0.82);
  --cyan:          #00f3ff;
  --cyan-dim:      rgba(0, 243, 255, 0.10);
  --cyan-mid:      rgba(0, 243, 255, 0.22);
  --cyan-glow:     rgba(0, 243, 255, 0.40);
  --magenta:       #ff00ff;
  --magenta-dim:   rgba(255, 0, 255, 0.10);
  --magenta-mid:   rgba(255, 0, 255, 0.22);
  --magenta-glow:  rgba(255, 0, 255, 0.40);
  --green:         #00ff88;
  --yellow:        #ffee00;
  --orange:        #ff8800;
  --red:           #ff2244;
  --text-primary:  #ddf4ff;
  --text-secondary:#5a8090;
  --text-dim:      #2a3a44;
  --border:        rgba(0, 243, 255, 0.14);
  --border-hover:  rgba(0, 243, 255, 0.50);
  --font:          'JetBrains Mono', 'Courier New', monospace;
  --r:             4px;
  --r-lg:          8px;
  --ease:          cubic-bezier(0.4, 0, 0.2, 1);
  --t:             0.18s;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Background ── */
.bg-grid {
  position: fixed; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(0,243,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,243,255,0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}
.scanline {
  position: fixed; inset: 0; z-index: 1;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,0,0,0.07) 2px, rgba(0,0,0,0.07) 4px
  );
  pointer-events: none;
  animation: scanMove 10s linear infinite;
}
@keyframes scanMove { to { background-position-y: 100px; } }

#particleCanvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; opacity: 0.4;
}

/* ── App Shell ── */
.app-shell {
  position: relative; z-index: 2;
  max-width: 700px; margin: 0 auto;
  padding: 0 14px 60px;
  display: flex; flex-direction: column;
}

/* ── Header ── */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.logo-block { display: flex; align-items: center; gap: 12px; }
.logo-icon {
  font-size: 30px; color: var(--cyan);
  text-shadow: 0 0 20px var(--cyan-glow);
  animation: hexPulse 3.5s ease-in-out infinite;
  line-height: 1;
}
@keyframes hexPulse {
  0%,100% { text-shadow: 0 0 18px var(--cyan-glow); }
  50%      { text-shadow: 0 0 40px var(--cyan), 0 0 70px var(--cyan-glow); }
}
.logo-text { display: flex; flex-direction: column; gap: 3px; }
.logo-title { font-size: 1.05rem; font-weight: 800; letter-spacing: 0.16em; }
.logo-accent { color: var(--cyan); text-shadow: 0 0 10px var(--cyan-glow); }
.logo-sub { font-size: 0.58rem; color: var(--text-secondary); letter-spacing: 0.12em; }
.header-right { display: flex; align-items: center; gap: 10px; }

/* ── Global Progress Bar ── */
.global-progress {
  position: relative; height: 28px;
  background: rgba(0,0,0,0.4); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center;
}
.global-progress-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0%;
  background: linear-gradient(90deg, var(--magenta), var(--cyan));
  transition: width 0.3s var(--ease);
  box-shadow: 0 0 20px var(--cyan-glow);
}
.global-progress-label {
  position: relative; z-index: 1;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em;
  color: var(--text-primary); text-shadow: 0 0 8px rgba(0,0,0,0.9);
}

/* ── Header Badge ── */
.header-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 11px; border: 1px solid var(--border);
  border-radius: 100px; background: var(--cyan-dim);
}
.badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 8px var(--green);
  animation: blink 1.8s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0.25; } }
.badge-label { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; color: var(--green); }

.header-btn { position: relative; }
.history-count-badge {
  position: absolute; top: -4px; right: -4px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--magenta); color: #000;
  font-size: 0.55rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 8px var(--magenta);
}

/* ── Panel ── */
.panel {
  background: var(--bg-glass); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px;
  margin-bottom: 14px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  position: relative; overflow: hidden;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.panel::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan-mid), transparent);
  opacity: 0.7;
}
.panel:hover { border-color: rgba(0,243,255,0.28); }
.panel.processing {
  animation: panelProcessing 0.9s ease-in-out infinite;
}
@keyframes panelProcessing {
  0%,100% { border-color: var(--cyan-mid); box-shadow: 0 0 0 rgba(0,243,255,0); }
  50%      { border-color: var(--magenta-mid); box-shadow: 0 0 24px var(--magenta-dim); }
}

/* ── Panel Label ── */
.panel-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.63rem; font-weight: 700; letter-spacing: 0.16em;
  color: var(--text-secondary); margin-bottom: 12px; text-transform: uppercase;
}
.panel-label-icon { font-size: 0.78rem; }
.panel-label-hint {
  margin-left: auto; color: var(--text-dim);
  font-size: 0.60rem; font-weight: 400; letter-spacing: 0.06em;
}

/* ── Input Base ── */
.input-base {
  background: rgba(0,0,0,0.55); border: 1px solid var(--border);
  border-radius: var(--r); color: var(--text-primary);
  font-family: var(--font); font-size: 0.83rem;
  transition: border-color var(--t), box-shadow var(--t);
  outline: none; width: 100%;
}
.input-base:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px var(--cyan-dim), 0 0 16px var(--cyan-dim);
}
.input-base::placeholder { color: var(--text-dim); }

/* ── Input Glow Wrapper ── */
.input-wrapper { position: relative; flex: 1; min-width: 0; }
.input-glow {
  position: absolute; inset: -3px; border-radius: calc(var(--r) + 3px);
  pointer-events: none; opacity: 0;
  background: linear-gradient(135deg, var(--magenta-glow), var(--cyan-glow));
  filter: blur(10px); transition: opacity var(--t);
}
.input-wrapper:focus-within .input-glow { opacity: 0.35; }
.input-glow.cyan { background: linear-gradient(135deg, var(--cyan-glow), transparent); }

/* ── Passphrase ── */
.passphrase-row { display: flex; gap: 8px; align-items: center; }
.passphrase-input { padding: 10px 14px; font-size: 0.84rem; letter-spacing: 0.06em; }
.passphrase-controls { display: flex; gap: 4px; flex-shrink: 0; }

/* ── Strength Bar ── */
.strength-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.strength-track {
  flex: 1; height: 3px; background: rgba(255,255,255,0.06);
  border-radius: 2px; overflow: hidden;
}
.strength-fill {
  height: 100%; width: 0%; border-radius: 2px;
  background: var(--red); transition: width 0.5s var(--ease), background 0.5s;
}
.strength-label {
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.12em;
  min-width: 64px; text-align: right; color: var(--text-dim);
}

/* ── Entropy Visualizer ── */
.entropy-viz {
  display: flex; gap: 2px; margin-top: 8px;
  min-height: 16px; flex-wrap: wrap;
}
.ev-block {
  height: 6px; flex: 1; min-width: 6px; max-width: 14px;
  border-radius: 1px; background: var(--text-dim);
  transition: background 0.3s, box-shadow 0.3s;
}
.ev-lower  { background: #00aa66; }
.ev-upper  { background: #0088ff; }
.ev-digit  { background: var(--yellow); }
.ev-symbol { background: var(--magenta); box-shadow: 0 0 4px var(--magenta); }

/* ── Control Buttons ── */
.ctrl-btn {
  width: 36px; height: 36px; display: flex;
  align-items: center; justify-content: center;
  background: rgba(0,243,255,0.04); border: 1px solid var(--border);
  border-radius: var(--r); color: var(--text-secondary);
  cursor: pointer; transition: all var(--t); flex-shrink: 0;
}
.ctrl-btn svg { width: 14px; height: 14px; }
.ctrl-btn:hover {
  background: var(--cyan-dim); border-color: var(--cyan);
  color: var(--cyan); box-shadow: 0 0 12px var(--cyan-dim);
}
.ctrl-btn:active { transform: scale(0.92); }

/* ── Mode Selector ── */
.mode-selector-wrap { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.mode-selector {
  display: flex; flex: 1;
  background: rgba(0,0,0,0.5); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
}
.mode-btn {
  flex: 1; padding: 10px 8px; background: transparent; border: none;
  color: var(--text-secondary); font-family: var(--font);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  gap: 6px; transition: all var(--t);
}
.mode-btn.active { background: var(--cyan-dim); color: var(--cyan); text-shadow: 0 0 10px var(--cyan); }
.mode-btn:not(.active):hover { background: rgba(255,255,255,0.03); color: var(--text-primary); }
.mode-icon { font-size: 0.8rem; }
.mode-divider { width: 1px; background: var(--border); align-self: stretch; }
.mode-indicator {
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.1em;
  color: var(--cyan); padding: 5px 10px;
  border: 1px solid var(--border); border-radius: var(--r);
  background: var(--cyan-dim); white-space: nowrap;
  transition: all 0.3s;
}

/* ── Textarea ── */
.textarea-wrapper { position: relative; }
.text-area {
  min-height: 200px; max-height: 500px; resize: vertical;
  padding: 12px 14px; line-height: 1.65; display: block;
}
.output-area { min-height: 150px; color: var(--cyan); }

/* ── Action Buttons ── */
.text-actions, .file-actions, .output-actions {
  display: flex; gap: 7px; margin-top: 10px; flex-wrap: wrap;
}
.action-btn {
  padding: 8px 14px; border-radius: var(--r);
  font-family: var(--font); font-size: 0.68rem;
  font-weight: 700; letter-spacing: 0.12em;
  cursor: pointer; border: 1px solid;
  transition: all var(--t);
  display: flex; align-items: center; gap: 5px;
  white-space: nowrap;
}
.action-btn.primary {
  background: var(--cyan-dim); border-color: var(--cyan);
  color: var(--cyan); margin-left: auto;
  text-shadow: 0 0 10px var(--cyan-glow);
}
.action-btn.primary:hover {
  background: var(--cyan-mid);
  box-shadow: 0 0 20px var(--cyan-dim), 0 0 40px var(--cyan-dim);
}
.action-btn.primary:active { transform: scale(0.97); }
.action-btn.secondary {
  background: rgba(255,255,255,0.025); border-color: var(--border); color: var(--text-secondary);
}
.action-btn.secondary:hover {
  border-color: var(--border-hover); color: var(--text-primary);
  background: rgba(0,243,255,0.05);
}
.action-btn.danger {
  background: rgba(255,34,68,0.1); border-color: var(--red); color: var(--red);
}
.action-btn.danger:hover {
  background: rgba(255,34,68,0.2); box-shadow: 0 0 16px rgba(255,34,68,0.2);
}
.action-btn:disabled { opacity: 0.28; cursor: not-allowed; pointer-events: none; }
.action-btn.wide { width: 100%; justify-content: center; }

/* ── Kbd hint ── */
.kbd-hint {
  font-size: 0.58rem; color: var(--text-dim); margin-top: 8px;
  letter-spacing: 0.06em;
}
kbd {
  display: inline-block; padding: 1px 5px;
  border: 1px solid var(--text-dim); border-radius: 3px;
  font-family: var(--font); font-size: inherit;
  color: var(--text-secondary);
}

/* ── File Zone ── */
.file-zone {
  border: 1px dashed var(--border); border-radius: var(--r-lg);
  min-height: 130px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative;
  transition: all var(--t); background: rgba(0,0,0,0.3); overflow: hidden;
}
.file-zone.drag-over {
  border-color: var(--cyan); background: var(--cyan-dim);
  box-shadow: 0 0 40px var(--cyan-dim), inset 0 0 30px var(--cyan-dim);
  border-style: solid;
}
.file-zone.has-file { border-style: solid; border-color: var(--cyan); cursor: default; }
.file-zone.smsg-detected { border-color: var(--magenta); background: var(--magenta-dim); }
.file-input-hidden {
  position: absolute; inset: 0; opacity: 0;
  width: 100%; height: 100%; cursor: pointer; z-index: 1;
}
.file-zone.has-file .file-input-hidden { pointer-events: none; }
.file-zone-content {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  pointer-events: none; z-index: 2;
}
.file-zone-icon {
  font-size: 2.2rem; color: var(--text-dim);
  animation: hexPulse 4s ease-in-out infinite;
  transition: color 0.3s;
}
.file-zone-text {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; color: var(--text-secondary);
}
.file-zone-sub { font-size: 0.68rem; color: var(--text-dim); }
.file-zone-hint { font-size: 0.58rem; color: var(--text-dim); margin-top: 2px; }
.inline-link {
  background: none; border: none; color: var(--cyan); cursor: pointer;
  font-family: var(--font); font-size: inherit; text-decoration: underline;
  pointer-events: all; z-index: 5; position: relative;
}
/* File preview */
.file-preview {
  width: 100%; padding: 14px;
  display: flex; align-items: center; gap: 12px; z-index: 2; position: relative;
}
.file-info { flex: 1; font-size: 0.72rem; line-height: 1.75; }
.file-info .file-name { color: var(--cyan); font-weight: 700; word-break: break-all; }
.file-info .file-size, .file-info .file-type { color: var(--text-dim); }
.file-info .file-smsg-badge {
  display: inline-block; margin-top: 4px; padding: 2px 7px;
  background: var(--magenta-dim); border: 1px solid var(--magenta);
  border-radius: 100px; font-size: 0.58rem; color: var(--magenta);
  letter-spacing: 0.1em;
}
#imageCanvas { max-width: 76px; max-height: 76px; border-radius: var(--r); border: 1px solid var(--border); }
.remove-file {
  width: 28px; height: 28px; font-size: 0.75rem;
  color: var(--red); border-color: rgba(255,34,68,0.25);
}
.remove-file:hover {
  background: rgba(255,34,68,0.1); border-color: var(--red); box-shadow: none;
}

/* File progress bar */
.file-progress {
  height: 22px; background: rgba(0,0,0,0.4);
  border: 1px solid var(--border); border-radius: var(--r);
  overflow: hidden; position: relative; margin-top: 10px;
  display: flex; align-items: center; justify-content: center;
}
.file-progress-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0%;
  background: linear-gradient(90deg, var(--magenta), var(--cyan));
  transition: width 0.25s var(--ease);
}
.file-progress-label {
  position: relative; z-index: 1; font-size: 0.6rem;
  font-weight: 700; letter-spacing: 0.12em;
  color: var(--text-primary); text-shadow: 0 0 6px rgba(0,0,0,0.8);
}

/* ── Output Meta ── */
.output-meta-bar {
  display: flex; align-items: center; gap: 8px; padding: 7px 12px;
  background: rgba(0,255,136,0.06); border: 1px solid rgba(0,255,136,0.18);
  border-radius: var(--r); margin-bottom: 10px;
  font-size: 0.67rem; color: var(--green); line-height: 1.5;
}
.ts-icon { font-size: 0.8rem; flex-shrink: 0; }

/* ── Batch Results ── */
.batch-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.batch-item {
  background: rgba(0,0,0,0.4); border: 1px solid var(--border);
  border-radius: var(--r); padding: 10px 12px; font-size: 0.74rem; line-height: 1.6;
}
.batch-item-header {
  color: var(--magenta); font-size: 0.60rem; font-weight: 700;
  letter-spacing: 0.12em; margin-bottom: 5px;
}
.batch-item-text { color: var(--text-primary); word-break: break-word; white-space: pre-wrap; }
.batch-item-ts { color: var(--text-dim); font-size: 0.60rem; margin-top: 6px; }

/* ── Image Preview ── */
.image-preview-wrap {
  display: flex; justify-content: center; align-items: center; padding: 10px;
  background: rgba(0,0,0,0.4); border: 1px solid var(--border);
  border-radius: var(--r); margin-bottom: 10px; overflow: hidden;
}
#decryptedCanvas { max-width: 100%; max-height: 400px; border-radius: var(--r); }

/* ── History Panel ── */
.history-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.history-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px;
  background: rgba(0,0,0,0.35); border: 1px solid var(--border);
  border-radius: var(--r); font-size: 0.70rem; line-height: 1.6;
  animation: fadeSlideIn 0.25s var(--ease);
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
.history-op {
  font-size: 0.58rem; font-weight: 800; letter-spacing: 0.12em;
  padding: 2px 7px; border-radius: 100px; flex-shrink: 0; margin-top: 1px;
}
.history-op.enc { background: var(--magenta-dim); color: var(--magenta); border: 1px solid var(--magenta); }
.history-op.dec { background: var(--cyan-dim); color: var(--cyan); border: 1px solid var(--cyan); }
.history-op.file { background: rgba(255,136,0,0.1); color: var(--orange); border: 1px solid var(--orange); }
.history-op.err { background: rgba(255,34,68,0.1); color: var(--red); border: 1px solid var(--red); }
.history-detail { flex: 1; min-width: 0; }
.history-detail-main { color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-detail-time { color: var(--text-dim); font-size: 0.58rem; margin-top: 2px; }
.history-empty {
  font-size: 0.68rem; color: var(--text-dim); text-align: center;
  padding: 20px; letter-spacing: 0.08em;
}

/* ── QR Container ── */
.modal-qr { max-width: 340px; }
.qr-container {
  background: #fff; border-radius: var(--r); padding: 12px;
  display: flex; align-items: center; justify-content: center;
  margin: 16px auto; width: fit-content;
}
.qr-container canvas { display: block; }
.qr-warn {
  font-size: 0.62rem; color: var(--yellow); text-align: center;
  margin-bottom: 8px; letter-spacing: 0.08em;
}

/* ── Purge ── */
.purge-section { margin-top: 6px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.purge-warning {
  font-size: 0.57rem; letter-spacing: 0.09em; color: var(--text-dim);
  text-align: center; padding: 5px 14px;
  border: 1px solid rgba(0,243,255,0.07); border-radius: 100px;
}
.purge-btn {
  width: 100%; padding: 14px 20px;
  background: rgba(255,0,255,0.04); border: 1px solid rgba(255,0,255,0.22);
  border-radius: var(--r); color: var(--magenta);
  font-family: var(--font); font-size: 0.76rem; font-weight: 700;
  letter-spacing: 0.18em; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: all var(--t);
}
.purge-icon { font-size: 1rem; }
.purge-sub { font-size: 0.57rem; font-weight: 400; letter-spacing: 0.1em; opacity: 0.65; margin-left: 4px; }
.purge-btn:hover {
  background: rgba(255,0,255,0.10); border-color: var(--magenta);
  box-shadow: 0 0 30px var(--magenta-glow), inset 0 0 20px rgba(255,0,255,0.04);
  text-shadow: 0 0 10px var(--magenta);
}
.purge-btn:active { transform: scale(0.98); }

/* ── Footer ── */
.app-footer {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 7px; padding: 16px 0; border-top: 1px solid var(--border);
  font-size: 0.57rem; letter-spacing: 0.09em; color: var(--text-dim);
  text-align: center; margin-top: 10px;
}
.footer-sep { color: var(--border); }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bg-glass); border: 1px solid var(--border);
  border-radius: 100px; padding: 9px 20px;
  font-size: 0.71rem; font-family: var(--font); letter-spacing: 0.09em;
  color: var(--text-primary); backdrop-filter: blur(16px);
  z-index: 1000; transition: transform 0.28s cubic-bezier(0.34,1.56,0.64,1), opacity 0.28s;
  opacity: 0; pointer-events: none;
  max-width: 92vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { border-color: var(--green);   color: var(--green); }
.toast.error   { border-color: var(--red);     color: var(--red); }
.toast.info    { border-color: var(--cyan);    color: var(--cyan); }
.toast.warn    { border-color: var(--yellow);  color: var(--yellow); }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85); backdrop-filter: blur(6px);
  z-index: 500; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: var(--bg-panel); border: 1px solid rgba(255,0,255,0.35);
  border-radius: var(--r-lg); padding: 28px 22px;
  max-width: 380px; width: 100%; text-align: center;
  box-shadow: 0 0 60px var(--magenta-glow);
  animation: modalIn 0.22s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modalIn { from { transform: scale(0.84); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-icon { font-size: 2.4rem; margin-bottom: 12px; animation: hexPulse 2s ease-in-out infinite; }
.modal-title {
  font-size: 0.95rem; font-weight: 800; letter-spacing: 0.14em;
  color: var(--magenta); margin-bottom: 10px; text-shadow: 0 0 12px var(--magenta-glow);
}
.modal-body { font-size: 0.72rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: center; }

@keyframes fileDownloadPulse {
  0%,100% { box-shadow: 0 0 0 rgba(0,243,255,0); }
  50%     { box-shadow: 0 0 24px var(--cyan-glow), 0 0 48px var(--cyan-dim); }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan); }
::selection { background: var(--cyan-dim); color: var(--cyan); }

/* ── Responsive ── */
@media (max-width: 440px) {
  html { font-size: 13px; }
  .logo-title { font-size: 0.9rem; }
  .passphrase-controls { flex-wrap: wrap; }
  .action-btn { font-size: 0.64rem; padding: 7px 11px; }
  .mode-selector-wrap { flex-direction: column; align-items: stretch; }
  .mode-indicator { text-align: center; }
  .output-actions { justify-content: stretch; }
  .output-actions .action-btn { flex: 1; justify-content: center; min-width: 0; }
}
@media (min-width: 560px) {
  .app-shell { padding: 0 24px 60px; }
  .panel { padding: 20px 22px; }
}
