.chart-container {
  margin-top: 15px;
  max-height: 300px;
  overflow-y: auto;
  background-color: #fff;
  border-radius: 5px;
  padding: 10px;
  border: 1px solid #ddd;
}

.chart-bar-container {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}

.chart-label {
  width: 30px;
  font-weight: bold;
  text-align: center;
}

.chart-bar {
  height: 20px;
  background-color: #3498db;
  border-radius: 3px;
  margin: 0 10px;
  min-width: 5px;
  transition: width 0.3s ease;
}

.chart-percent {
  width: 60px;
  text-align: right;
  font-size: 0.9rem;
  color: #555;
}

.options-container {
  margin: 15px 0;
  background-color: #f8f9fa;
  border-radius: 5px;
  padding: 15px;
  border: 1px solid #e9ecef;
}

.option-group {
  margin-bottom: 15px;
}

.option-panel {
  background-color: #fff;
  border-radius: 4px;
  padding: 15px;
  margin-top: 10px;
  border: 1px solid #e9ecef;
}

.option-panel p {
  margin-top: 0;
  color: #666;
}

.checkbox-group {
  margin-top: 10px;
}

.form-group {
  margin-bottom: 10px;
}

.form-group input[type="number"] {
  width: 80px;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.nav-links {
  margin-bottom: 20px;
}

.nav-links a {
  color: #3498db;
  text-decoration: none;
  display: inline-block;
  padding: 5px 0;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #2980b9;
  text-decoration: underline;
}

#resultsContainer {
  margin-top: 20px;
  background-color: #f8f9fa;
  border-radius: 5px;
  padding: 15px;
  border: 1px solid #e9ecef;
}

#resultsContainer h2 {
  margin-top: 0;
  color: #2c3e50;
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 10px;
}

#resultsContainer h3 {
  color: #3498db;
  margin: 15px 0 10px 0;
}

.key-item, .result-item {
  background-color: #fff;
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 10px;
  border: 1px solid #e9ecef;
}

.key-item h4, .result-item h4 {
  margin-top: 0;
  color: #2c3e50;
}

.key-text {
  font-family: 'Courier New', Courier, monospace;
  background-color: #f5f5f5;
  padding: 8px;
  border-radius: 4px;
  margin: 10px 0;
  overflow-x: auto;
}

.key-mapping {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
  margin-top: 10px;
}

.result-text {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f5f5;
  padding: 15px;
  border-radius: 4px;
  margin-top: 10px;
  white-space: pre-wrap;
  max-height: 200px;
  overflow-y: auto;
}

/* Animation for results */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

#resultsContainer {
  animation: fadeIn 0.3s ease-out;
}

.key-item, .result-item {
  animation: fadeIn 0.3s ease-out;
  animation-fill-mode: both;
}

.key-item:nth-child(1), .result-item:nth-child(1) { animation-delay: 0.1s; }
.key-item:nth-child(2), .result-item:nth-child(2) { animation-delay: 0.2s; }
.key-item:nth-child(3), .result-item:nth-child(3) { animation-delay: 0.3s; }
.key-item:nth-child(4), .result-item:nth-child(4) { animation-delay: 0.4s; }
.key-item:nth-child(5), .result-item:nth-child(5) { animation-delay: 0.5s; }

/* New styles for known plaintext and status */
#knownPlaintextInput {
  width: 100%;
  height: 80px;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  resize: vertical;
}

#statusMessage {
  margin: 15px 0;
  padding: 10px 15px;
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  text-align: center;
  font-weight: bold;
}

#statusMessage.processing {
  background-color: #cce5ff;
  color: #004085;
  border-color: #b8daff;
}

#statusMessage.success {
  background-color: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}
