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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
  background-color: #f0f4f8;
  color: #004674;
}

h1 {
  color: #004674;
  margin-bottom: 30px;
  font-size: 2.2em;
  text-shadow: 0 2px 2px rgba(0,70,116,0.1);
}

.input-group {
  margin-bottom: 20px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 70, 116, 0.15);
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #004674;
}

textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  margin-bottom: 10px;
  border: 2px solid #54d8a3;
  border-radius: 6px;
  font-size: 14px;
  color: #004674;
  transition: border-color 0.3s ease;
  background-color: white;
}

input[type="number"],
select {
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
  border: 2px solid #54d8a3;
  border-radius: 6px;
  font-size: 1em;
  color: #004674;
  transition: border-color 0.3s ease;
  background-color: white;
}

textarea:focus,
input[type="number"]:focus,
select:focus {
  outline: none;
  border-color: #004674;
  box-shadow: 0 0 0 2px rgba(84, 216, 163, 0.2);
}

button {
  padding: 12px 24px;
  background: #004674;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1em;
  font-weight: 600;
  transition: transform 0.2s ease, background-color 0.2s ease;
  box-shadow: 0 3px 6px rgba(0,70,116,0.2);
  position: relative;
  overflow: hidden;
}

button:hover {
  background: #003557;
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0,70,116,0.25);
}

.diagnoses {
  margin-top: 30px;
}

.diagnoses-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 70, 116, 0.15);
  overflow: hidden; 
}

.diagnoses-table th,
.diagnoses-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
}

.diagnoses-table th {
  background-color: #e3f2fd;
  font-weight: 600;
  color: #004674;
  border-bottom: 2px solid #004674;
}

.diagnoses-table td {
  vertical-align: middle;
}

.diagnoses-table tr:nth-child(even) {
  background-color: #f8fafb;
}

.diagnoses-table tbody tr:hover {
  background-color: #e3f2fd !important;
}

.diagnoses-table td:last-child {
  text-align: center;
}

.analyze-button {
  padding: 10px 20px;
  background-color: #004674;
  color: white;
  border: 2px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
  transition: background-color 0.3s ease;
  min-width: 120px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.analyze-button:hover {
  background-color: #003557;
}

.analyze-button.active {
  background-color: #54d8a3;
  color: #004674;
  border-color: #004674;
}

.diagnoses-list {
  list-style-position: inside;
  padding: 0;
}

.diagnoses-list li {
  margin-bottom: 15px;
}

.diagnosis-info {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  background: white;
  padding: 10px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 70, 116, 0.1);
  width: calc(100% - 30px);
  margin-left: 10px;
}

.diagnosis-toggle {
  margin: 0;
  background: white;
  border: 1px solid #54d8a3;
  color: #004674;
  min-width: 300px;
  text-align: left;
}

.diagnosis-toggle:hover {
  background: #f0fff8;
}

.diagnosis-toggle.active {
  background: #004674;
  border-color: #004674;
  color: white;
}

.icd-code, .confidence {
  color: #004674;
  font-size: 0.9em;
  padding: 4px 8px;
  background: #f8f9fa;
  border-radius: 4px;
  border: 1px solid #54d8a3;
}

.highlighted {
  padding: 3px 5px;
  border-radius: 4px;
  display: inline;
  transition: background-color 0.3s ease;
  font-weight: 600;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 2px 3px rgba(0,0,0,0.1);
}

.text-display-container {
  margin-top: 30px;
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 70, 116, 0.1);
  border: 2px solid #e3f2fd;
}

.text-display-label {
  font-weight: 600;
  margin-bottom: 12px;
  color: #004674;
}

.text-display {
  background: white;
  padding: 20px;
  border-radius: 6px;
  margin: 15px 0;
  white-space: pre-wrap;
  border: 2px solid #54d8a3;
  color: #004674;
  line-height: 1.5;
}