/* ----------------------------------------------------------------
	Custom CSS
-----------------------------------------------------------------*/
.model-selection {
  background-color: #fff3e0;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #ffe0b2;
}
.model-selection label {
  display: block;
  font-weight: bold;
  margin-bottom: 8px;
  color: #f57c00;
}
.model-selection select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ffe0b2;
  border-radius: 4px;
  font-size: 14px;
  background-color: white;
}
.selection-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}
/* .form-group {
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
} */
.form-group {
  margin: 0;
}
.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 8px;
  color: #2196f3;
}
select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}
.chat-history {
  overflow-y: auto;
  margin-top: 20px;
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 5px;
}
.message {
  margin-bottom: 20px;
  padding: 15px;
  border-radius: 8px;
  line-height: 1.6;
  white-space: pre-line;
}
.message-header {
  font-weight: bold;
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.user-message {
  background-color: #e3f2fd;
  margin-left: 20px;
  border-left: 4px solid #2196f3;
}
.assistant-message {
  background-color: #f8f9fa;
  margin-right: 20px;
  border-left: 4px solid #4caf50;
}
.message .model-info {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
  font-style: italic;
}
#submitBtn {
  background-color: #2196f3;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  width: 100%;
  margin-top: 20px;
  transition: background-color 0.2s;
}
#submitBtn:hover {
  background-color: #1976d2;
}
#submitBtn:disabled {
  background-color: #ccc;
}
.loading {
  display: none;
  color: #666;
  margin-top: 10px;
  text-align: center;
  padding: 10px;
}
.selected-values {
  background-color: #e8f5e9;
  padding: 15px;
  border-radius: 8px;
  margin: 20px 0;
  border: 1px solid #c8e6c9;
}
.selected-values h3 {
  margin-top: 0;
  color: #2e7d32;
}
.selected-values p {
  margin: 5px 0;
  line-height: 1.6;
}
@media (max-width: 768px) {
  .selection-form {
    grid-template-columns: 1fr;
  }
  body {
    padding: 10px;
  }
}
/* 수학 수식 관련 스타일 추가 */
.math-content {
  overflow-x: auto;
  padding: 10px 0;
}

.message-content {
  font-size: 16px;
  line-height: 1.8;
}

.message-content .math {
  margin: 10px 0;
}

/* 수식이 들어있는 메시지에 대한 특별한 스타일 */
.message.has-math {
  background-color: #fafafa;
  border: 1px solid #e0e0e0;
}

.message-content ul {
  margin: 10px 0;
  padding-left: 20px;
  list-style-type: disc;
}

.message-content li {
  margin: 12px 0;
  line-height: 2;
}

.message-content .MathJax_Display {
  margin: 15px 0;
}

/* LaTeX의 text 명령어 내부의 굵은 텍스트 스타일링 */
.MathJax_Preview,
.MathJax {
  color: inherit !important;
}

.message-content code {
  background-color: rgba(0, 0, 0, 0.05);
  padding: 2px 4px;
  border-radius: 3px;
  font-family: monospace;
  color: #e53935;
}

.message-content strong {
  color: #1565c0;
  font-weight: bold;
}

.chat-history {
  /* 기존 스타일 유지 */
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent; /* Firefox */
}

/* Chrome, Edge, Safari용 스크롤바 스타일 */
.chat-history::-webkit-scrollbar {
  width: 8px;
}

.chat-history::-webkit-scrollbar-track {
  background: transparent;
}

.chat-history::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.chat-history::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.3);
}

.range-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

input[type="range"] {
  flex: 1;
  height: 8px;
  background: #ddd;
  border-radius: 4px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: #1ABC9C;
  border-radius: 50%;
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #1ABC9C;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

#loadValue, #weightValue {
  min-width: 80px;
}

/* 레이블 스타일 통일 */
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

/* select 박스 스타일 range input과 맞추기 */
.form-group select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}
