:root {
  --bg: #0b0d10;
  --card: #14181d;
  --text: #e6ecf2;
  --muted: #a7b1bb;
  --accent: #4aa8ff;
  --danger: #ff6b6b;
  --tile: #1c2229;
  --tile-border: #2a333d;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.4;
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 56px;
}

.header h1 {
  margin: 0 0 4px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.header .sub {
  margin: 0 0 16px;
  color: var(--muted);
}

.input-section {
  background: var(--card);
  border: 1px solid var(--tile-border);
  border-radius: 12px;
  padding: 16px;
}

.label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.ciphertext {
  width: 100%;
  background: var(--tile);
  color: var(--text);
  border: 1px solid var(--tile-border);
  border-radius: 10px;
  padding: 12px 12px;
  resize: vertical;
}

.controls {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.btn {
  background: var(--accent);
  color: #00121f;
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn:active { transform: translateY(1px); }

.display-section { margin-top: 20px; }

.row { margin-bottom: 16px; }

.row-title {
  margin-bottom: 6px;
  font-weight: 700;
  color: var(--muted);
}

.block {
  background: var(--card);
  border: 1px solid var(--tile-border);
  border-radius: 12px;
  padding: 12px;
  min-height: 42px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--tile-border);
  border-radius: 12px;
  padding: 12px;
  overflow-x: auto;
}

.line {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tile {
  width: 2.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.cipher-char {
  width: 100%;
  height: 2.0rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tile);
  border: 1px solid var(--tile-border);
  border-radius: 8px;
  font-weight: 700;
  user-select: none;
}

.plain-input {
  width: 100%;
  height: 2.0rem;
  text-align: center;
  background: var(--tile);
  color: var(--text);
  border: 1px solid var(--tile-border);
  border-radius: 8px;
  text-transform: uppercase;
  font-weight: 700;
}

.plain-input:disabled {
  opacity: 0.4;
}

.placeholder {
  width: 100%;
  height: 2.0rem;
}

.symbol .cipher-char { opacity: 0.85; }

.blank .cipher-char { opacity: 0.4; }

.warn {
  color: var(--danger);
}

.hl {
  color: #ffe36e;
}


