body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  background: #f8f9f9;
}

.betty-box {
  display: flex;
  max-width: 1200px;
  height: 680px;
  margin: auto;
  background: #f8f9f9;
  overflow: hidden;
}

.betty-img {
  padding: 20px;
}

.dialog-box {
  flex: 1;
  padding: 20px;
  box-sizing: border-box;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header h3 {
  margin: 0;
  font-size: 20px;
}

.input-question {
  width: 100%;
  box-sizing: border-box;
  font-size: 16px;
  padding: 10px;
  margin: 15px 0;
  border: 1px solid #ccc;
  border-radius: 6px;
}


.buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.ask-btn,
.reset-btn {
  flex: 1;
  padding: 10px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 6px;
  border: none;
}

.ask-btn {
  background-color: #286fc5;
  color: white;
}

.reset-btn {
  background-color: #f5f5f5;
  border: 1px solid #bfbdbf;
}

#answer {
  background: #f5f5f5;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  margin-bottom: 10px;
  height: 390px; 
  overflow-y: auto;  
}



.panel {
  background-color: #fafafa;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 10px;
  border-left: 2px solid #ccc;
  border-radius: 0 0 5px 5px;
}
.panel p {
  margin: 10px 0;
}

#answers-list {
  padding-left: 20px;
  margin-top: 8px;
  list-style-type: auto;

}

.yesno {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.yesno button {
  flex: 1;
  padding: 10px;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  background-color: #f5f5f5;
  border: 1px solid #bfbdbf;
}
button:hover{
  background-color: #2674f3;
  color: #fff;
}


.method_label{
  font-size: 25px;
  margin-top: 50px;
}

/* ========================================
   CONVERSATION UI STYLES
   ======================================== */

/* Conversation Messages */
.message {
  padding: 12px 16px;
  margin: 8px 0;
  border-radius: 12px;
  max-width: 90%;
  word-wrap: break-word;
  line-height: 1.5;
  animation: slideIn 0.3s ease;
  clear: both;
}

.message.user {
  background: linear-gradient(135deg, #286fc5, #2674f3);
  color: white;
  margin-left: auto;
  float: right;
  border-bottom-right-radius: 4px;
}

.message.assistant {
  background: white;
  border: 1px solid #e0e0e0;
  color: #333;
  margin-right: auto;
  float: left;
  border-bottom-left-radius: 4px;
}

.message.error {
  background: #fff3f3;
  border-color: #ffcdd2;
  color: #c62828;
}

.message.hint {
  font-size: 13px;
  color: #666;
  font-style: italic;
  background: transparent;
  border: none;
  padding: 4px 0;
}

/* Clear floats after messages */
.message + .message {
  clear: both;
}

/* Option Buttons Container */
.options-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
  padding: 8px 0;
  clear: both;
  animation: fadeIn 0.4s ease;
}

.option-btn {
  padding: 10px 16px;
  background: white;
  border: 2px solid #286fc5;
  border-radius: 8px;
  color: #286fc5;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.option-btn:hover {
  background: #286fc5;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(40, 111, 197, 0.3);
}

.option-btn:active {
  transform: translateY(0);
}

/* Model Match Cards */
.model-matches-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
  clear: both;
  animation: fadeIn 0.4s ease;
}

.model-match-card {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.model-match-card:hover {
  border-color: #286fc5;
  box-shadow: 0 4px 12px rgba(40, 111, 197, 0.2);
  transform: translateX(4px);
}

.model-match-card .match-number {
  font-size: 18px;
  font-weight: bold;
  color: #286fc5;
  min-width: 25px;
}

.model-match-card .model-name {
  flex: 1;
  font-weight: 600;
  color: #333;
  font-size: 15px;
}

.model-match-card .confidence {
  font-size: 12px;
  color: #666;
  background: #f0f8ff;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
}

.model-match-card .matched-features {
  width: 100%;
  font-size: 12px;
  color: #888;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed #e0e0e0;
}

/* Manual Result Card */
.manual-card {
  background: linear-gradient(135deg, #f0f8ff, #ffffff);
  border: 2px solid #286fc5;
  border-radius: 12px;
  padding: 20px;
  margin: 16px 0;
  box-shadow: 0 6px 16px rgba(40, 111, 197, 0.2);
  animation: slideIn 0.5s ease;
  clear: both;
}

.manual-info {
  margin-bottom: 16px;
}

.manual-info h3 {
  color: #286fc5;
  margin-bottom: 14px;
  font-size: 22px;
  font-weight: 600;
}

.manual-info p {
  margin: 8px 0;
  color: #555;
  font-size: 15px;
}

.manual-info p strong {
  color: #333;
  font-weight: 600;
  min-width: 120px;
  display: inline-block;
}

.pdf-link {
  display: inline-block;
  padding: 14px 28px;
  background: linear-gradient(135deg, #286fc5, #2674f3);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(40, 111, 197, 0.3);
}

.pdf-link:hover {
  background: linear-gradient(135deg, #2674f3, #1e5aa8);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(40, 111, 197, 0.4);
}

.pdf-link:active {
  transform: translateY(0);
}

/* Loading Animation */
.loading-dots::after {
  content: '...';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

/* Animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Scrollbar Styling */
#results::-webkit-scrollbar {
  width: 8px;
}

#results::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 4px;
}

#results::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 4px;
}

#results::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* Results container improvements */
#results {
  padding-bottom: 10px;
}

#results > *:last-child {
  margin-bottom: 0;
}

/* Load More Button */
.load-more-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.load-more-btn {
  background: linear-gradient(135deg, #286fc5, #2674f3);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(40, 111, 197, 0.3);
  min-width: 200px;
}

.load-more-btn:hover {
  background: linear-gradient(135deg, #2674f3, #4a90e2);
  box-shadow: 0 6px 16px rgba(40, 111, 197, 0.4);
  transform: translateY(-2px);
}

.load-more-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(40, 111, 197, 0.3);
}

.hint-text {
  color: #6c757d;
  font-size: 14px;
  font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
  .betty-box {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  .betty-img {
    max-width: 150px;
    margin: 20px auto;
    display: block;
  }

  .options-container {
    flex-direction: column;
  }

  .option-btn {
    width: 100%;
  }

  .message {
    max-width: 95%;
  }

  .manual-info p strong {
    display: block;
    margin-bottom: 4px;
  }

  .model-match-card {
    flex-wrap: wrap;
  }

  .model-match-card .confidence {
    margin-left: auto;
  }

  .load-more-btn {
    width: 100%;
    min-width: auto;
  }
}

/* Focus styles for accessibility */
.input-question:focus,
.option-btn:focus,
.model-match-card:focus,
button:focus {
  outline: 2px solid #286fc5;
  outline-offset: 2px;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}