/* 코드 실행기 스타일 */
#codeRunnerPanel {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60vh;
  background-color: #fff;
  z-index: 999;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  border-top: 1px solid #ddd;
  transform: translateY(100%);
  transition: transform 0.4s ease-in-out;
  overflow-y: auto;

  background-color: #f8fafc; /* 은은한 배경색 */
  border-top: 1px solid #e2e8f0; /* 부드러운 경계 */
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
}

/* 패널 상단 바 스타일 */
#codeRunnerPanel .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #dac198; /* soft gray-blue */
  padding: 6px 16px;
  border-bottom: 1px solid #cbd5e1;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

/* 닫기 버튼 스타일 */
#closeRunnerBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  border: none;
  color: #fff; /* slate-500 */
  cursor: pointer;
  transition: color 0.3s ease;
}

#closeRunnerBtn:hover {
  color: #fff; /* slate-800 */
}

#closeRunnerBtn i {
  width: 24px;
  height: 24px;
}

/* 열렸을 때 */
#codeRunnerPanel.active {
  transform: translateY(0%);
}
.code-pythone-body {
font-family: 'Segoe UI', sans-serif;
margin: 0;
padding: 20px;
background-color: #f4f4f4;
color: #222;
}

.code-pythone-body h2, .code-pythone-body h3 {
color: #222;
}

.code-pythone-body h3 {
  margin-top:0px;
}


.code-pythone-body label {
  display: block;
  margin: 10px 0 5px;
  font-weight: bold;
}

.code-pythone-body textarea {
  width: 100%;
  font-family: monospace;
}

.CodeMirror {
  font-size: 14px;
  line-height: 1.4 !important;
  height: auto;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.CodeMirror-scroll {
  max-height: 300px;
}

.CodeMirror pre {
  padding: 0 4px;
}

.CodeMirror-lines {
  padding: 5px 0;
}

.CodeMirror-cursor {
  height: 1.2em !important;
}

.code-pythone-input-row {
  width: 100%;
  padding: 8px 10px;
  margin: 5px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}


.code-pythone-button {
    background-color: #4a90e2;
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    margin-top: 10px;
    cursor: pointer;
    font-size: 13px;
    margin: 10px -1px;
}

.code-pythone-button:hover {
  background-color: #357ad8;
}
.CodeMirror-code{
  min-height: 4rem;
}

.code-pythone-output {
  background-color: #272822;
  color: #f8f8f2;
  padding: 10px;
  border-radius: 5px;
  white-space: pre-wrap;
  word-wrap: break-word;
  border: 1px solid #444;
  font-size: 14px;      
}



@media (max-width: 768px) {
      .code-pythone-body {
        padding: 15px;
      }

      .CodeMirror {
        font-size: 16px;
      }

      .code-pythone-button {
        width: 100%;
      }
}




//////////////Ai 패널

/* AI 패널 전체 영역 */
#aiPanelOutput {
  padding: 16px;
  background-color: #f8fafc;
  font-family: 'Segoe UI', sans-serif;
  color: #222;
  overflow-y: scroll;
}

/* 코드 블록 스타일 */
#aiPanelOutput pre.with-line-numbers {
  background: #dad08e;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  overflow-x: auto;
  margin-top: 1rem;
  position: relative;
  font-family: monospace;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
  
}

/* 줄 번호 + 코드 라인 정렬을 위한 그리드 */
#aiPanelOutput .highlight-wrapper {
  display: grid;
  grid-template-columns: 2rem auto;
  gap: 0.5rem;
  align-items: start;
  background:#f2e9ad;
}

/* 줄 번호 */
#aiPanelOutput .line-number {
  color: #94a3b8;
  text-align: right;
  user-select: none;
  font-size: 14px;
  line-height: 1.4;
}

/* 코드 내용 */
#aiPanelOutput .code-line {
  white-space: pre;
  font-size: 14px;
  color: #1e293b;
  line-height: 1.4;
}

/* 복사 버튼 */
#aiPanelOutput .copy-btn {
  grid-column: span 2;
  justify-self: end;
  margin-top: 0.75rem;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  border: none;
  border-radius: 4px;
  background: #e2e8f0;
  cursor: pointer;
  color: #1e293b;
  transition: "background 0.2s ease";
}

#aiPanelOutput .copy-btn:hover {
  background: #cbd5e1;
}

/* 반응형 대응 */
@media (max-width: 768px) {
  #aiPanelOutput {
    padding: 12px;
  }

  #aiPanelOutput .code-line {
    font-size: 15px;
  }

  #aiPanelOutput .copy-btn {
    width: 100%;
    text-align: center;
  }
}


/* AI 응답 패널 전체 영역 */
#aiPanelOutput {
  font-family: 'Segoe UI', 'Pretendard', sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #1e293b;
  background-color: #f8fafc;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid #e2e8f0;
  overflow-y: auto;
}

/* 제목 계층 구조 */
#aiPanelOutput h1 { font-size: 1.5rem; margin: 1.5rem 0 1rem; font-weight: bold; }
#aiPanelOutput h2 { font-size: 1.25rem; margin: 1.25rem 0 1rem; }
#aiPanelOutput h3 { font-size: 1.1rem; margin: 1rem 0 0.75rem; }
#aiPanelOutput h4 { font-size: 1rem; margin: 0.9rem 0 0.5rem; }
#aiPanelOutput h5 { font-size: 0.95rem; margin: 0.9rem 0 0.5rem; }
#aiPanelOutput h6 { font-size: 0.9rem; margin: 0.8rem 0 0.5rem; }

#aiPanelOutput p {
  margin: 0.75rem 0;
  font-size: 0.9rem;
  color: #334155;
}

/* 코드 블록 */
#aiPanelOutput pre {
  background: #282c34;
  color: #f8f8f2;
  overflow-x: auto;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-family: Consolas, monospace;
  font-size: 0.85rem;
  margin: 1rem 0;
}

/* 줄 번호 있는 코드 스타일 */
#aiPanelOutput pre.with-line-numbers {
  background: #f2e9ad;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  overflow-x: auto;
  margin-top: 1rem;
  position: relative;
  font-family: Consolas, monospace;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

#aiPanelOutput .highlight-wrapper {
  display: grid;
  grid-template-columns: 2rem auto;
  gap: 0.5rem;
  align-items: start;
}

#aiPanelOutput .line-number {
  color: #94a3b8;
  text-align: right;
  user-select: none;
  font-size: 0.8rem;
  line-height: 1.4;
}

#aiPanelOutput .code-line {
  white-space: pre;
  font-size: 0.85rem;
  color: #1e293b;
  line-height: 1.4;
}

/* 복사 버튼 */
#aiPanelOutput .copy-btn {
  grid-column: span 2;
  justify-self: end;
  margin-top: 0.75rem;
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  border: none;
  border-radius: 4px;
  background: #e2e8f0;
  cursor: pointer;
  color: #1e293b;
  transition: background 0.2s ease;
}
#aiPanelOutput .copy-btn:hover {
  background: #cbd5e1;
}

/* 표 스타일 */
#aiPanelOutput table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.85rem;
}
#aiPanelOutput table, #aiPanelOutput th, #aiPanelOutput td {
  border: 1px solid #ccc;
}
#aiPanelOutput th, #aiPanelOutput td {
  padding: 0.4rem 0.75rem;
  text-align: left;
}
#aiPanelOutput th {
  background-color: #f0f0f0;
}

/* 수평선, 강조 스타일 */
#aiPanelOutput hr {
  margin: 2.5rem 0;
  border: none;
  border-top: 1px solid #ddd;
}

#aiPanelOutput mark {
  background-color: #fef08a;
  font-weight: bold;
}

#aiPanelOutput .red {
  color: #ed1b25;
  font-weight: bold;
}

/* 반응형 */
@media (max-width: 768px) {
  #aiPanelOutput {
    padding: 1rem;
    font-size: 0.95rem;
  }

  #aiPanelOutput .copy-btn {
    width: 100%;
    text-align: center;
  }
}
