* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 30px;
  background: #0f172a;
  color: #f8fafc;
  font-family: Arial, sans-serif;
}

.container {
  max-width: 1100px;
  margin: auto;
}

h1 {
  text-align: center;
  margin-bottom: 30px;
  font-weight: 600;
}

/* =======================
   ПАНЕЛИ
======================= */

.controls,
.panel {
  background: #1e293b;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}

/* =======================
   INPUT / TEXTAREA
======================= */

textarea {
  width: 100%;
  min-height: 120px;
  margin-top: 10px;
  margin-bottom: 20px;

  padding: 12px;
  font-size: 15px;

  border-radius: 8px;
  border: 1px solid #334155;

  background: #0f172a;
  color: #f8fafc;

  outline: none;
  resize: vertical;
}

input {
  width: 100%;
  padding: 10px;

  margin-top: 10px;

  border-radius: 8px;
  border: 1px solid #334155;

  background: #0f172a;
  color: #f8fafc;
}

/* =======================
   ROW / BUTTONS
======================= */

.row {
  display: flex;
  gap: 20px;
}

.buttons {
  margin-top: 20px;
  display: flex;
  gap: 10px;
}

button {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;

  background: #2563eb;
  color: white;

  cursor: pointer;
  font-size: 16px;
}

button:hover {
  background: #1d4ed8;
}

/* =======================
   TABLE
======================= */

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 10px;
}

th,
td {
  border: 1px solid #1f2937;
  padding: 10px;
  text-align: center;
  font-size: 14px;
}

th {
  background: #334155;
  color: #f8fafc;
}

/* =======================
   WINDOW VIEW
======================= */

#windowView {
  font-family: monospace;
  font-size: 18px;
  word-break: break-all;
  line-height: 1.8;

  padding: 10px;
  background: #0f172a;
  border-radius: 8px;
  border: 1px solid #1f2937;
}

/* =======================
   COLORS (ЕДИНАЯ СИСТЕМА)
======================= */

.regular {
  background: #374151;
  padding: 2px 4px;
  border-radius: 4px;
}

.dictionary {
  background: #1e3a8a;
  padding: 2px 4px;
  border-radius: 4px;
}

.buffer {
  background: #2563eb;
  padding: 2px 4px;
  border-radius: 4px;
}

.match {
  background: #16a34a;
  padding: 2px 4px;
  border-radius: 4px;
}

/* =======================
   OUTPUT BLOCKS
======================= */

#decodedText,
#validation,
#stats {
  margin-top: 10px;
  font-size: 16px;
  color: #cbd5e1;
}
