/* JSON → TypeScript 변환 전용 스타일 */

nav { max-width: 1080px; }
main { max-width: 1080px; }

.subtitle {
  color: var(--text-sub);
  margin-bottom: 1rem;
}

/* 옵션 영역 */
.options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.opt-field {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.opt-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
}

.opt-field input {
  padding: 0.4rem 0.65rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  width: 130px;
  box-sizing: border-box;
}

.opt-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

.opt-chk {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.opt-chk input {
  accent-color: var(--primary);
  cursor: pointer;
}

.opt-chk:hover span {
  color: var(--primary);
}

/* 입력/출력 */
.panes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.pane {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pane-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.85rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.pane-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-sub);
}

.pane-btn {
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--surface);
  color: var(--text-sub);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.pane-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pane-btn.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.pane-btn.primary:hover {
  filter: brightness(1.08);
  color: #fff;
}

.pane textarea {
  flex: 1;
  width: 100%;
  min-height: 360px;
  padding: 0.85rem 1rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.55;
  border: none;
  background: var(--surface);
  color: var(--text);
  outline: none;
  resize: vertical;
  box-sizing: border-box;
}

.pane textarea:focus {
  background: var(--bg);
}

.output-code {
  flex: 1;
  margin: 0;
  padding: 0.85rem 1rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.55;
  background: var(--surface);
  color: var(--text);
  overflow: auto;
  min-height: 360px;
  white-space: pre;
  word-break: normal;
}

/* 에러 라인 */
.error-line {
  background: rgba(220, 38, 38, 0.08);
  color: var(--error, #dc2626);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  padding: 0.45rem 0.85rem;
  border-top: 1px solid rgba(220, 38, 38, 0.2);
}

@media (max-width: 720px) {
  .panes { grid-template-columns: 1fr; }
  .pane textarea, .output-code { min-height: 220px; }
  .options { gap: 0.5rem 0.7rem; padding: 0.6rem 0.7rem; }
  .opt-field input { width: 110px; }
}
