/* 기본 폰트 및 레이아웃 설정 */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  display: grid;
  grid-template-columns: 350px 1fr; /* 왼쪽 컨트롤 패널, 오른쪽 결과 화면 */
  gap: 30px;
  padding: 20px;
  max-width: 1400px;
  margin: auto;
  background-color: #fcfcfc;
}

/* 왼쪽 컨트롤 패널 */
#controls-container {
  background-color: #ffffff;
  border: 1px solid #ddd;
  padding: 0 20px 20px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  height: fit-content;
}

/* 오른쪽 출력 컨테이너 */
#output-container {
  background-color: #ffffff;
  border: 1px solid #ddd;
  padding: 20px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* 폼 레이아웃 */
form {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 라벨과 인풋을 2열로 배치하다가... */
  gap: 15px;
  align-items: center;
}

/* 라벨 스타일 */
label {
  font-weight: 500;
  text-align: right;
  font-size: 0.95em;
  color: #333;
}

/* 입력 필드 스타일 */
input[type='number'],
input[type='text'],
select {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s;
}

input:focus,
select:focus {
  border-color: #007bff;
  outline: none;
}

/* 기본 버튼 스타일 */
button {
  padding: 12px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  transition: background-color 0.2s;
}

button:hover {
  background-color: #0056b3;
}

button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* 섹션 헤더 */
h2 {
  margin-top: 20px;
  margin-bottom: 15px;
  color: #333;
}

h3 {
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
  margin-top: 25px;
  margin-bottom: 15px;
  grid-column: 1 / -1; /* 그리드 전체 너비 사용 */
  color: #444;
}

/* 설명 박스 */
.description {
  grid-column: 1 / -1;
  font-size: 0.9em;
  color: #555;
  background-color: #f1f8ff;
  padding: 12px;
  border-radius: 4px;
  border-left: 4px solid #007bff;
  line-height: 1.4;
}

/* 캔버스 (그래프) */
canvas {
  border: 1px solid #eee;
  width: 100%;
  max-width: 800px;
  aspect-ratio: 1/1;
  margin: auto;
  background-color: #fff;
}

/* 결과 텍스트 출력 */
#results-output {
  background: #f8f9fa;
  padding: 15px;
  margin-top: 20px;
  border-radius: 5px;
  border: 1px solid #eee;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  white-space: pre-wrap;
  line-height: 1.6;
}

/* --- 모달 (Modal) 스타일 --- */
/* HTML class="modal hidden"과 fade-in-box 호환 */
.fade-in-box,
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* 숨김 클래스 (매우 중요) */
.hidden {
  display: none !important;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 10px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh; /* 화면 넘어감 방지 */
  overflow-y: auto; /* 내용 많으면 스크롤 */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.modal-content h3,
.modal-content h2 {
  grid-column: unset;
  border-bottom: 1px solid #eee;
  margin-top: 0;
  padding-bottom: 10px;
}

/* 모달 내부 입력 행 */
.input-row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  align-items: center;
}

.input-row label {
  flex-shrink: 0;
  text-align: left;
  width: 140px;
}
.input-row input[type='text'] {
  flex-grow: 1;
}

/* --- VLE 데이터 입력 리스트 --- */
#vle-data-list {
  max-height: 300px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 15px;
  background-color: #fafafa;
}

.vle-row {
  display: grid;
  grid-template-columns: 40px 1fr 40px 1fr 40px; /* 라벨 너비 고정, 인풋 가변 */
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

.vle-row label {
  text-align: right;
  font-weight: normal;
  font-size: 0.9em;
}

/* 삭제 버튼 (작은 빨간 버튼) */
.vle-row button.remove-vle-row {
  grid-column: span 1;
  padding: 0;
  height: 36px;
  width: 100%;
  background-color: #dc3545; /* Red */
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.vle-row button.remove-vle-row:hover {
  background-color: #c82333;
}

/* 모달 하단 버튼 그룹 */
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 25px;
}
.modal-actions button {
  flex-grow: 1;
  padding: 12px;
}

/* 버튼 색상 변형 */
.secondary-action-btn {
  background-color: #6c757d; /* Grey */
}
.secondary-action-btn:hover {
  background-color: #5a6268;
}

.main-action-btn {
  background-color: #28a745; /* Green */
}
.main-action-btn:hover {
  background-color: #218838;
}

/* --- 데이터 관리 모달 추가 스타일 --- */

/* HTML에서 Tailwind 클래스(w-full 등)를 썼지만 CSS에서 잡아주기 위해 */
#data-management-modal .modal-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#manage-vle-data-btn {
  grid-column: 1 / -1;
  background-color: #17a2b8; /* Teal color for management */
  margin-bottom: 10px;
}
#manage-vle-data-btn:hover {
  background-color: #138496;
}

/* 삭제 섹션 레이아웃 (Dropdown + Button) */
#data-management-modal select {
  margin-bottom: 10px;
}

/* 삭제 버튼 전용 스타일 */
#delete-vle-btn {
  background-color: #dc3545;
  margin-top: 5px;
  width: 100%;
}
#delete-vle-btn:hover {
  background-color: #c82333;
}

/* 새 데이터 추가 버튼 */
#add-new-vle-data-btn {
  background-color: #007bff;
  margin-bottom: 10px;
}

#close-data-management-modal-btn {
  background-color: #6c757d;
  margin-top: 10px;
}

/* 모달 컨텐츠 기본 크기보다 더 넓게 설정 */
.modal-content.modal-lg {
  max-width: 900px; /* 기존 600px에서 900px로 확장 */
  width: 95%;
  padding: 30px 40px;
  display: flex;
  flex-direction: column;
}

.modal-title {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.5rem;
  color: #333;
  border-bottom: 2px solid #eee;
  padding-bottom: 15px;
}

.modal-desc {
  color: #666;
  margin-bottom: 25px;
  font-size: 0.95rem;
}

/* 좌우 분할 컨테이너 */
.modal-split-container {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 1:1 비율로 분할 */
  gap: 40px; /* 패널 사이 간격 */
  margin-bottom: 30px;
  align-items: start;
}

/* 패널 공통 스타일 */
.split-panel {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* 왼쪽 패널 (선택/추가) */
.split-panel.left-panel {
  border-right: 1px solid #ddd; /* 세로 분리선 */
  padding-right: 40px; /* 분리선과의 간격 */
}

.split-panel h3 {
  font-size: 1.1rem;
  color: #444;
  margin-top: 0;
  margin-bottom: 5px;
  border-bottom: none; /* 기존 h3 border 제거 */
  padding-bottom: 0;
}

/* 드롭다운 스타일 강화 */
.split-panel select {
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #bbb;
  border-radius: 6px;
  background-color: #fff;
}

/* 버튼 그룹 */
.action-group {
  margin-top: 10px;
}

/* --- 버튼 색상 테마 --- */
.btn-primary {
  background-color: #007bff; /* 파란색 */
  color: white;
  width: 100%;
  padding: 12px;
  transition: background-color 0.2s;
}
.btn-primary:hover {
  background-color: #0056b3;
}

.btn-danger {
  background-color: #dc3545; /* 빨간색 */
  color: white;
  width: 100%;
  padding: 12px;
  transition: background-color 0.2s;
}
.btn-danger:hover {
  background-color: #a71d2a;
}

.btn-secondary {
  background-color: #6c757d; /* 회색 */
  color: white;
  padding: 12px;
  transition: background-color 0.2s;
}
.btn-secondary:hover {
  background-color: #545b62;
}

/* 하단 푸터 */
.modal-footer {
  margin-top: auto; /* 내용이 적어도 항상 바닥에 붙음 */
  border-top: 1px solid #eee;
  padding-top: 20px;
}

.full-width {
  width: 100%;
  font-size: 1.1rem;
}

/* 반응형: 화면이 좁아지면(모바일 등) 세로로 배치 */
@media (max-width: 768px) {
  .modal-split-container {
    grid-template-columns: 1fr; /* 1열로 변경 */
    gap: 30px;
  }

  .split-panel.left-panel {
    border-right: none;
    border-bottom: 1px solid #ddd;
    padding-right: 0;
    padding-bottom: 30px;
  }
}

/* 폼 내부의 제출(Submit) 버튼을 특정하여 스타일 적용 */
#calc-form button[type='submit'] {
  grid-column: 1 / -1; /* 그리드의 처음부터 끝까지 가로로 꽉 채움 */
  width: 100%; /* 너비 100% */
  padding: 15px; /* 높이감을 줘서 클릭하기 편하게 */
  font-size: 1.1rem; /* 글자 크기를 살짝 키움 */
  margin-top: 20px; /* 위쪽 입력창들과 간격을 둠 */
  background-color: #4361ee; /* (선택사항) 눈에 잘 띄는 진한 파란색 */
  border-radius: 6px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 살짝 그림자 추가 */
  transition: background-color 0.2s, transform 0.1s;
}

#calc-form button[type='submit']:hover {
  background-color: #304ffe;
  transform: translateY(-1px); /* 마우스 올리면 살짝 떠오르는 효과 */
}

#calc-form button[type='submit']:active {
  transform: translateY(0); /* 클릭 시 눌리는 효과 */
}

.languages {
  white-space: nowrap; /* 1. 강제로 줄바꿈 금지 (한 줄 유지) */
  grid-column: 1 / -1; /* 2. (만약 Grid 안에 있다면) 가로 전체 너비 사용 */
  width: 100%; /* 너비 100% */
  margin-bottom: 15px; /* 아래 요소와 간격 */
  font-size: 0.9rem; /* 글자 크기 살짝 작게 */
  color: #666; /* 글자 색상 회색조 */
  text-align: right; /* (선택사항) 오른쪽 정렬이 보기 좋을 수 있음 */
}

.languages a {
  text-decoration: none; /* 링크 밑줄 제거 */
  color: #007bff; /* 링크 색상 (파란색) */
  font-weight: bold;
}

.languages a:hover {
  text-decoration: underline; /* 마우스 올리면 밑줄 */
}

footer {
  grid-column: 1 / -1; /* 그리드 전체 너비 사용 (가로 꽉 채우기) */
  text-align: center; /* 텍스트 가운데 정렬 */
  margin-top: 50px; /* 위쪽 콘텐츠와 간격 띄우기 */
  padding-top: 20px; /* 내부 여백 */
  padding-bottom: 20px;
  border-top: 1px solid #ddd; /* 위쪽에 얇은 회색 줄 그리기 */
  color: #777; /* 글자색은 너무 튀지 않게 회색으로 */
  font-size: 0.9rem; /* 본문보다 약간 작게 */
}

footer p {
  margin: 5px 0; /* 줄 간격 조정 */
}

footer a {
  color: #333; /* 링크 색상 */
  text-decoration: none;
  font-weight: bold;
}

footer a:hover {
  color: #007bff; /* 마우스 올리면 파란색 */
  text-decoration: underline;
}

.copyright {
  font-size: 0.8rem;
  color: #999;
}

/* 모달 크기 확장 */
.modal-lg {
  max-width: 900px; /* 넓게 쓰기 위해 */
  width: 95%;
}

/* 3단 분할 레이아웃 */
.modal-split-container {
  display: flex;
  gap: 20px;
  margin: 20px 0;
}

.split-panel {
  flex: 1; /* 1:1:1 비율 */
  display: flex;
  flex-direction: column;
}

/* 가운데 패널 구분선 */
.center-panel {
  border-left: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;
  padding: 0 20px;
}

/* 버튼 및 인풋 스타일 보정 */
.full-width {
  width: 100%;
  box-sizing: border-box;
}

.btn-success {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 8px;
  border-radius: 4px;
  cursor: pointer;
}
.btn-success:hover { background-color: #218838; }

.props-container {
  display: flex;
  gap: 15px;
  background: #f9f9f9;
  padding: 10px;
  border-radius: 5px;
}
.prop-group {
  flex: 1;
}
.prop-group input {
  width: 100%;
  margin-bottom: 5px;
}

/* 모바일 대응 (화면 작으면 세로로) */
@media (max-width: 768px) {
  .modal-split-container {
    flex-direction: column;
  }
  .center-panel {
    border: none;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    padding: 20px 0;
    margin: 20px 0;
  }
}

/*# sourceMappingURL=main.abfdc0a968c818d8c2f5.css.map*/